
theorem
  for n being Ordinal, T being connected TermOrder of n, L being Abelian
right_zeroed add-associative right_complementable well-unital distributive non
  trivial non empty doubleLoopStr, f,g being Polynomial of n,L, P being non
  empty Subset of Polynom-Ring(n,L), A,B being LeftLinearCombination of P, b
being bag of n, i being Element of NAT st A is_Standard_Representation_of f,P,b
,T & B = A/^i & g = Sum(A|i) & i <= len A holds B is_Standard_Representation_of
  f-g,P,b,T
proof
  let n be Ordinal, T be connected TermOrder of n, L be Abelian right_zeroed
add-associative right_complementable well-unital distributive non trivial non
  empty doubleLoopStr, f,g be Polynomial of n,L, P be non empty Subset of
  Polynom-Ring(n,L), A,B be LeftLinearCombination of P, b be bag of n, i be
  Element of NAT;
  assume that
A1: A is_Standard_Representation_of f,P,b,T and
A2: B = A/^i and
A3: g = Sum(A|i) and
A4: i <= len A;
A5: Sum A = f by A1;
A6: now
    let j being Element of NAT;
    assume
A7: j in dom B;
    then
A8: j + i in dom A by A2,FINSEQ_5:26;
    B/.j = B.j by A7,PARTFUN1:def 6
      .= A.(j+i) by A2,A4,A7,RFINSEQ:def 1
      .= A/.(j+i) by A8,PARTFUN1:def 6;
    hence
    ex m being non-zero Monomial of n,L, p being non-zero Polynomial of n
    ,L st p in P & B/.j = m *' p & HT(m*'p,T) <= b,T by A1,A8;
  end;
  A = (A|i) ^ B by A2,RFINSEQ:8;
  then Sum A = Sum(A|i) + Sum B by RLVECT_1:41;
  then Sum A + -(Sum(A|i)) = (Sum(A|i) + -Sum(A|i)) + Sum B by RLVECT_1:def 3
    .= 0.(Polynom-Ring(n,L)) + Sum B by RLVECT_1:5
    .= Sum B by ALGSTR_1:def 2;
  then Sum B = Sum A - (Sum(A|i))
    .= f - g by A3,A5,Lm3;
  hence thesis by A6;
end;
