
theorem Th7:
  for n being Ordinal, L being add-associative right_complementable
right_zeroed distributive non empty doubleLoopStr, p being Polynomial of n,L,
m being Monomial of n,L, b being bag of n holds (m*'p).(term(m)+b) = m.term(m)
  * p.b
proof
  let n be Ordinal, L be add-associative right_complementable right_zeroed
  distributive non empty doubleLoopStr, p be Polynomial of n,L, m be Monomial
  of n,L, b2 be bag of n;
  set q = m*'p, b = term(m)+b2;
  consider s being FinSequence of the carrier of L such that
A1: q.b = Sum s and
A2: len s = len decomp b and
A3: for k being Element of NAT st k in dom s ex b1,b2 being bag of n st
  (decomp b)/.k = <*b1, b2*> & s/.k = m.b1*p.b2 by POLYNOM1:def 10;
  consider k being Element of NAT such that
A4: k in dom decomp b and
A5: (decomp(term(m)+b2))/.k = <*term(m),b2*> by PRE_POLY:69;
A6: dom s = Seg(len s) by FINSEQ_1:def 3
    .= dom decomp(term(m)+b2) by A2,FINSEQ_1:def 3;
  then consider b19,b29 being bag of n such that
A7: (decomp(term(m)+b2))/.k = <*b19,b29*> and
A8: s/.k = m.b19 * p.b29 by A3,A4;
A9: b2 = <*term(m),b2*>.2
    .= b29 by A5,A7,FINSEQ_1:44;
A10: for k9 being Element of NAT st k9 in dom s & k9 <> k holds s/.k9 = 0.L
  proof
    let k9 be Element of NAT;
    assume that
A11: k9 in dom s and
A12: k9 <> k;
    consider b19,b29 being bag of n such that
A13: (decomp(term(m)+b2))/.k9 = <*b19,b29*> and
A14: s/.k9 = m.b19 * p.b29 by A3,A11;
A15: b19 = (divisors b)/.k9 by A6,A11,A13,PRE_POLY:70;
A16: b-'b19 = <*b19,b-'b19*>.2
      .= <*b19,b29*>.2 by A6,A11,A13,A15,PRE_POLY:def 17
      .= b29;
    per cases;
    suppose
A17:  b19 = term(m) & b29 = b2;
      (decomp(term(m)+b2)).k9 = (decomp(term(m)+b2))/.k9 by A6,A11,
PARTFUN1:def 6
        .= (decomp(term(m)+b2)).k by A4,A5,A13,A17,PARTFUN1:def 6;
      hence thesis by A6,A4,A11,A12,FUNCT_1:def 4;
    end;
    suppose
      b19 <> term(m);
      then m.b19 = 0.L by Lm8;
      hence thesis by A14;
    end;
    suppose
      b29 <> b2;
      then b19 <> term(m) by A16,PRE_POLY:48;
      then m.b19 = 0.L by Lm8;
      hence thesis by A14;
    end;
  end;
  term(m) = <*b19,b29*>.1 by A5,A7
    .= b19;
  hence thesis by A1,A6,A4,A8,A9,A10,POLYNOM2:3;
end;
