
theorem Th22:
  for n being Ordinal, L being add-associative
  right_complementable right_zeroed distributive non trivial doubleLoopStr, p
being Series of n,L, b being bag of n, a being Element of L holds a * (b *' p)
  = Monom(a,b) *' p
proof
  let n be Ordinal, L be add-associative right_complementable right_zeroed
distributive non trivial doubleLoopStr, p be Series of n,L, b be bag of n, a
  be Element of L;
  set q = a * (b *' p), q9 = Monom(a,b) *' p, m = Monom(a,b);
  per cases;
  suppose
    a <> 0.L;
    then reconsider a as non zero Element of L by STRUCT_0:def 12;
A1: now
      let u be object;
      assume u in dom q;
      then reconsider s = u as bag of n;
      consider t being FinSequence of the carrier of L such that
A2:   q9.s = Sum t and
A3:   len t = len decomp s and
A4:   for k being Element of NAT st k in dom t ex b1, b2 being bag of
      n st (decomp s)/.k = <*b1, b2*> & t/.k = m.b1*p.b2 by POLYNOM1:def 10;
A5:   dom t = Seg(len(decomp s)) by A3,FINSEQ_1:def 3
        .= dom(decomp s) by FINSEQ_1:def 3;
A6:   term(Monom(a,b)) = b by POLYNOM7:10;
      now
        per cases;
        case
A7:       b divides s;
A8:       q.s = a * (b*'p).s by POLYNOM7:def 9
            .= a * p.(s-'b) by A7,Def1;
          consider s9 being bag of n such that
A9:       b + s9 = s by A7,TERMORD:1;
          consider i being Element of NAT such that
A10:      i in dom decomp s and
A11:      (decomp s)/.i = <*b,s9*> by A9,PRE_POLY:69;
          consider b1,b2 being bag of n such that
A12:      (decomp s)/.i = <*b1, b2*> and
A13:      t/.i = m.b1*p.b2 by A4,A5,A10;
A14:      b2 = <*b,s9*>.2 by A11,A12,FINSEQ_1:44
            .= s9;
A15:      s -' b = s9 by A9,PRE_POLY:48;
A16:      now
            let i9 be Element of NAT;
            assume that
A17:        i9 in dom t and
A18:        i9 <> i;
            consider b19,b29 being bag of n such that
A19:        (decomp s)/.i9 = <*b19,b29*> and
A20:        t/.i9 = m.b19*p.b29 by A4,A17;
            consider h1, h2 being bag of n such that
A21:        (decomp s)/.i9 = <*h1, h2*> and
A22:        s = h1 + h2 by A5,A17,PRE_POLY:68;
A23:        s -' h1 = h2 by A22,PRE_POLY:48;
A24:        h1 = <*b19,b29*>.1 by A19,A21,FINSEQ_1:44
              .= b19;
            now
              assume m.b19 <> 0.L;
              then b19 = b by A6,POLYNOM7:def 5;
              then
              (decomp s).i9 = (decomp s)/.i by A5,A11,A15,A17,A21,A24,A23,
PARTFUN1:def 6
                .= (decomp s).i by A10,PARTFUN1:def 6;
              hence contradiction by A5,A10,A17,A18,FUNCT_1:def 4;
            end;
            hence t/.i9 = 0.L by A20;
          end;
          b1 = <*b,s9*>.1 by A11,A12,FINSEQ_1:44
            .= b;
          then Sum t = coefficient(m) * p.(s-'b)
          by A6,A5,A10,A15,A13,A14,A16,POLYNOM2:3
            .= a * p.(s-'b) by POLYNOM7:9;
          hence q.s = q9.s by A2,A8;
        end;
        case
A25:      not b divides s;
          consider t being FinSequence of the carrier of L such that
A26:      q9.s = Sum t and
A27:      len t = len decomp s and
A28:      for k being Element of NAT st k in dom t ex b1, b2 being
bag of n st (decomp s)/.k = <*b1, b2*> & t/.k = m.b1*p.b2 by POLYNOM1:def 10;
A29:      now
            let k be Nat;
            assume
A30:        k in dom t;
            then consider b19,b29 being bag of n such that
A31:        (decomp s)/.k = <*b19,b29*> and
A32:        t/.k = m.b19*p.b29 by A28;
A33:        dom t = Seg(len(decomp s)) by A27,FINSEQ_1:def 3
              .= dom(decomp s) by FINSEQ_1:def 3;
            now
              per cases;
              case
A34:            b19 = term(m);
                consider h1,h2 being bag of n such that
A35:            (decomp s)/.k = <*h1,h2*> and
A36:            s = h1 + h2 by A30,A33,PRE_POLY:68;
                h1 = <*b19,b29*>.1 by A31,A35,FINSEQ_1:44
                  .= b19;
                hence contradiction by A6,A25,A34,A36,TERMORD:1;
              end;
              case
                b19 <> term(m);
                hence m.b19 = 0.L by Lm8;
              end;
            end;
            hence t/.k = 0.L by A32;
          end;
          q.s = a * (b*'p).s by POLYNOM7:def 9
            .= a * 0.L by A25,Def1
            .= 0.L;
          hence q.u = q9.u by A26,A29,MATRLIN:11;
        end;
      end;
      hence q.u = q9.u;
    end;
    dom q = Bags n by FUNCT_2:def 1
      .= dom q9 by FUNCT_2:def 1;
    hence thesis by A1,FUNCT_1:2;
  end;
  suppose
A37: a = 0.L;
A38: now
      let u be object;
      assume u in dom m;
      then reconsider u9 = u as Element of Bags n;
      now
        per cases;
        case
A39:      u9 = term(m);
          coefficient(m) = 0.L by A37,POLYNOM7:8;
          hence m.u = (0_(n,L)).u by A39,POLYNOM1:22;
        end;
        case
          u9 <> term(m);
          then m.u9 = 0.L by Lm8
            .= (0_(n,L)).u9 by POLYNOM1:22;
          hence m.u = (0_(n,L)).u;
        end;
      end;
      hence m.u = (0_(n,L)).u;
    end;
    dom m = Bags n by FUNCT_2:def 1
      .= dom 0_(n,L) by FUNCT_2:def 1;
    then
A40: m = 0_(n,L) by A38,FUNCT_1:2;
A41: now
      let u be object;
      assume u in dom q;
      then reconsider u9 = u as bag of n;
      q.u9 = 0.L * (b*'p).u9 by A37,POLYNOM7:def 9
        .= 0.L
        .= (0_(n,L)).u9 by POLYNOM1:22;
      hence q.u = (0_(n,L)).u;
    end;
    dom q = Bags n by FUNCT_2:def 1
      .= dom 0_(n,L) by FUNCT_2:def 1;
    then q = 0_(n,L) by A41,FUNCT_1:2;
    hence thesis by A40,Th5;
  end;
end;
