
theorem Th13a:
for F being Field,
    i being Element of NAT,
    m being Ordinal st m in card(nonConstantPolys F)
holds Poly(m,anpoly(1.F,1)) *' Poly(m,anpoly(1.F,i)) = Poly(m,anpoly(1.F,i+1))
proof
let F be Field, i be Element of NAT, m be Ordinal;
set n = card(nonConstantPolys F);
set f = power Polynom-Ring(card(nonConstantPolys F),F);
assume AS: m in n;
for o being object st o in {m} holds o in n by AS,TARSKI:def 1; then
reconsider S = {m} as finite Subset of n by TARSKI:def 3;
set p1 = Poly(m,anpoly(1.F,1)), p2 = Poly(m,anpoly(1.F,i));
set q = Poly(m,anpoly(1.F,i+1));
per cases;
suppose U: i = 0;
  then anpoly(1.F,i) = (1.F)|F by FIELD_1:7;
  then p2 = (1.F)|(n,F) by AS,XYZbb .= 1_(n,F) by POLYNOM7:20;
  hence p1 *' p2 = q by U,POLYNOM1:29;
  end;
suppose U: i <> 0;
now let b be Element of Bags n;
  consider s being FinSequence of the carrier of F such that
  A: (p1*'p2).b = Sum s & len s = len decomp b &
     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 = p1.b1*p2.b2 by POLYNOM1:def 10;
  A1: dom s = Seg(len decomp b) by A,FINSEQ_1:def 3
           .= dom(decomp b) by FINSEQ_1:def 3;
  A2: m in {m} by TARSKI:def 1;
  per cases;
  suppose support b = {}; then
    B: b = EmptyBag n by PRE_POLY:81;
    C: Sum s = 0.F
       proof
       divisors b = <* EmptyBag n *> by B,PRE_POLY:67; then
       C1: dom(decomp b) = dom <* EmptyBag n *> by PRE_POLY:def 17;
       dom <* EmptyBag n *> = Seg 1 by FINSEQ_1:38; then
       C2: 1 in dom(decomp b) by C1;
       C3: dom s = Seg(len decomp b) by A,FINSEQ_1:def 3
                .= dom(decomp b) by FINSEQ_1:def 3; then
       consider b1,b2 being bag of n such that
       C5: (decomp b)/.1 = <*b1,b2*> & s/.1 = p1.b1*p2.b2 by A,C2;
       b1 = (divisors b)/.1 by C5,C2,PRE_POLY:70
         .= EmptyBag n by PRE_POLY:65; then
       p1.b1 = anpoly(1.F,1).0 by defPg .= 0.F by POLYDIFF:25; then
       C6: 0.F = s.1 by C3,C2,C5,PARTFUN1:def 6;
       dom(decomp b) = Seg 1 by C1,FINSEQ_1:38; then
       1 = len s by A,FINSEQ_1:def 3; then
       s = <* s.1 *> by FINSEQ_1:40;
       hence Sum s = 0.F by C6,RLVECT_1:44;
       end;
    thus q.b = anpoly(1.F,i+1).0 by B,defPg
           .= (p1 *' p2).b by A,C,POLYDIFF:25;
    end;
  suppose B: support b = {m}; then
    C: q.b = anpoly(1.F,i+1).(b.m) by defPg;
    per cases;
    suppose C1: b.m = i + 1; then
      W: q.b = 1.F by C,POLYDIFF:24;
      C2: len(divisors b) = i + 1 + 1 by B,C1,Th13f;
      2 <= i + 2 by NAT_1:11; then
      2 in Seg(len(divisors b)) by C2; then
      C3: 2 in dom(divisors b) by FINSEQ_1:def 3;
      2 - 1 > 0; then
      2 -' 1 = 1 by XREAL_0:def 2; then
      C4: (S,1)-bag = (divisors b).2 by C3,B,Th13f
                   .= (divisors b)/.2 by C3,PARTFUN1:def 6;
      set b3 = (S,1)-bag;
      2 in dom(decomp b) by C3,PRE_POLY:def 17; then
      C6: (decomp b)/.2 = <*b3, b-'b3*> by C4,PRE_POLY:def 17;
      C20: 2 in dom s by A1,C3,PRE_POLY:def 17;
      V:s/.2 = 1.F
        proof
        consider b1,b2 being bag of n such that
        C7: (decomp b)/.2 = <*b1,b2*> & s/.2 = p1.b1*p2.b2 by A,C20;
        C8: b3 = <*b1,b2*>.1 by C7,C6,FINSEQ_1:44 .= b1;
        C9: b-'b3 = <*b1,b2*>.2 by C7,C6,FINSEQ_1:44 .= b2;
        C12: b -' b3 = (S,i)-bag
             proof
             now let o be object;
               assume o in n;
               per cases;
               suppose D2: o = m;
                 hence (b-'b3).o
                          = b.m -' b3.m by PRE_POLY:def 6
                         .= b.m -' 1 by A2,UPROOTS:7
                         .= b.m - 1 by C1,XREAL_0:def 2
                         .= (S,i)-bag.o by A2,C1,D2,UPROOTS:7;
                 end;
               suppose o <> m;
                 then D3: not o in {m} by TARSKI:def 1;
                 thus (b-'b3).o
                          = b.o -' b3.o by PRE_POLY:def 6
                         .= 0 -' b3.o by D3,B,PRE_POLY:def 7
                         .= 0 by NAT_2:8
                         .= (S,i)-bag.o by D3,UPROOTS:6;
                 end;
               end;
             hence thesis by PBOOLE:def 10;
             end; then
        support(b-'b3) = {m} by U,UPROOTS:8; then
        C10: Poly(m,anpoly(1.F,i)).(b-'b3)
           = anpoly(1.F,i).(((S,i)-bag).m) by C12,defPg
          .= anpoly(1.F,i).i by A2,UPROOTS:7
          .= 1.F by POLYDIFF:24;
        support b3 = {m} by UPROOTS:8; then
        p1.b3 = anpoly(1.F,1).(b3.m) by defPg
             .= anpoly(1.F,1).1 by A2,UPROOTS:7
             .= 1.F by POLYDIFF:24;
        hence s/.2 = 1.F by C10,C9,C8,C7;
        end;
      now let k be Element of NAT;
        assume C11: k in dom s & k <> 2; then
        consider b1,b2 being bag of n such that
        C7: (decomp b)/.k = <*b1,b2*> & s/.k = p1.b1*p2.b2 by A;
        C10: k in dom(divisors b) by C11,A1,PRE_POLY:def 17; then
        k in Seg(len(divisors b)) by FINSEQ_1:def 3; then
        1 <= k by FINSEQ_1:1; then
        C17: k -' 1 = k - 1 by XREAL_0:def 2;
        C9:  b1 = (divisors b)/.k by C11,A1,C7,PRE_POLY:70; then
        C16: b1 = (divisors b).k by C10,PARTFUN1:def 6;
        per cases;
        suppose k -' 1 = 0; then
          b1 = EmptyBag n by C17,C9,PRE_POLY:65; then
          p1.b1 = anpoly(1.F,1).0 by defPg
               .= 0.F by POLYDIFF:25;
          hence s/.k = 0.F by C7;
          end;
        suppose C13: k-'1 <> 0;
          C15: b1 = (S,k-'1)-bag by B,C16,C10,Th13f; then
          C12: support b1 = {m} by C13,UPROOTS:8;
          C14: now assume b1.m = 1;
               then k -' 1 = 1 by C15,A2,UPROOTS:7;
               hence contradiction by C17,C11;
               end;
          p1.b1 = anpoly(1.F,1).(b1.m) by C12,defPg
               .= 0.F by C14,POLYDIFF:25;
          hence s/.k = 0.F by C7;
          end;
        end;
      hence (p1 *' p2).b = q.b by V,W,C20,A,POLYNOM2:3;
      end;
    suppose U: b.m <> i + 1; then
      W: q.b = 0.F by C,POLYDIFF:25;
      C3: 1 in dom s
          proof
          1 <= len(decomp b) by NAT_1:14;
          then 1 in Seg(len decomp b);
          hence thesis by A1,FINSEQ_1:def 3;
          end;
      C2: now let k be Element of NAT;
          assume C11: k in dom s; then
          consider b1,b2 being bag of n such that
          C3: (decomp b)/.k = <*b1,b2*> & s/.k = p1.b1*p2.b2 by A;
          C10: k in dom(divisors b) by C11,A1,PRE_POLY:def 17; then
          k in Seg(len(divisors b)) by FINSEQ_1:def 3; then
          1 <= k by FINSEQ_1:1; then
          C17: k -' 1 = k - 1 by XREAL_0:def 2;
          C9:  b1 = (divisors b)/.k by C11,A1,C3,PRE_POLY:70; then
          C16: b1 = (divisors b).k by C10,PARTFUN1:def 6;
        per cases;
        suppose k -' 1 = 0; then
          b1 = EmptyBag n by C17,C9,PRE_POLY:65; then
          p1.b1 = anpoly(1.F,1).0 by defPg
               .= 0.F by POLYDIFF:25;
          hence s/.k = 0.F by C3;
          end;
        suppose C13: k-'1 <> 0;
          C15: b1 = (S,k-'1)-bag by B,C16,C10,Th13f; then
          C12: support b1 = {m} by C13,UPROOTS:8;
          C13: b1.m = k -' 1 by C15,A2,UPROOTS:7;
          per cases;
          suppose C14: b1.m <> 1;
            p1.b1 = anpoly(1.F,1).(b1.m) by C12,defPg
                 .= 0.F by C14,POLYDIFF:25;
            hence s/.k = 0.F by C3;
            end;
          suppose C14: b1.m = 1; then
            CC: b1 = (S,1)-bag by C15,A2,UPROOTS:7;
            C2: len(divisors b) = b.m + 1 by B,Th13f;
            C32: b.m <> 0 by A2,B,PRE_POLY:def 7;
            b.m + 1 >= 1 + 1 by C32,NAT_1:14,XREAL_1:6; then
            2 in Seg(len(divisors b)) by C2; then
            C30: 2 in dom(divisors b) by FINSEQ_1:def 3;
            2 - 1 > 0; then
            2 -' 1 = 1 by XREAL_0:def 2; then
            C4: (S,1)-bag = (divisors b).2 by C30,B,Th13f
                         .= (divisors b)/.2 by C30,PARTFUN1:def 6;
            2 in dom(decomp b) by C30,PRE_POLY:def 17; then
            C6: (decomp b)/.2 = <*b1, b-'b1*>
                by C13,C14,B,C16,C10,Th13f,C4,PRE_POLY:def 17;
        C90: b-'b1 = <*b1,b2*>.2 by C13,C17,C14,C3,C6,FINSEQ_1:44
                  .= b2;
        reconsider j = b.m - 1 as Element of NAT by C32,INT_1:3;
        per cases;
        suppose C34: b.m - 1 = 0;
           now let o be object;
             assume o in n;
             per cases;
             suppose o = m;
               hence b.o = b1.o by C14,C34;
               end;
             suppose H: o <> m;
               support b1 = {m} by CC,UPROOTS:8; then
               I: not o in support b1 by H,TARSKI:def 1;
               not o in support b by H,B,TARSKI:def 1;
               hence b.o = 0 by PRE_POLY:def 7
                        .= b1.o by I,PRE_POLY:def 7;
               end;
             end;
           then b1 = b by PBOOLE:def 10;
           then C35: EmptyBag n = b2 by C90,PRE_POLY:56;
           C36: i <> 0 by U,C34;
           p2.b2 = anpoly(1.F,i).0 by C35,defPg .= 0.F by C36,POLYDIFF:25;
           hence s/.k = 0.F by C3;
           end;
        suppose C34: b.m - 1 <> 0;
        C12: b -' b1 = (S,j)-bag
             proof
             now let o be object;
               assume o in n;
               per cases;
               suppose D2: o = m;
                 hence (b-'b1).o
                          = b.m -' 1 by C14,PRE_POLY:def 6
                         .= b.m - 1 by C32,XREAL_0:def 2
                         .= (S,j)-bag.o by A2,D2,UPROOTS:7;
                 end;
               suppose o <> m;
                 then D3: not o in {m} by TARSKI:def 1;
                 thus (b-'b1).o
                          = b.o -' b1.o by PRE_POLY:def 6
                         .= 0 -' b1.o by D3,B,PRE_POLY:def 7
                         .= 0 by NAT_2:8
                         .= (S,j)-bag.o by D3,UPROOTS:6;
                 end;
               end;
             hence thesis by PBOOLE:def 10;
             end; then
            C36: support(b-'b1) = {m} by C34,UPROOTS:8;
            b2.m = b.m - 1 by C12,C90,A2,UPROOTS:7; then
            C35: b2.m <> i by U;
            p2.b2 = anpoly(1.F,i).(b2.m) by C36,C90,defPg
                 .= 0.F by C35,POLYDIFF:25;
            hence s/.k = 0.F by C3;
            end;
          end;
          end;
        end;
      then for k being Element of NAT st k in dom s & k <> 1 holds s/.k = 0.F;
      hence (p1 *' p2).b = s/.1 by A,C3,POLYNOM2:3 .= q.b by C2,C3,W;
      end;
    end;
  suppose U1: support b <> {} & support b <> {m}; then
    W: q.b = 0.F by defPg;
    C3: 1 in dom s
        proof
        1 <= len(decomp b) by NAT_1:14;
        then 1 in Seg(len decomp b);
        hence thesis by A1,FINSEQ_1:def 3;
        end;
    C2: now let k be Element of NAT;
        assume C11: k in dom s; then
        consider b1,b2 being bag of n such that
        C3: (decomp b)/.k = <*b1,b2*> & s/.k = p1.b1*p2.b2 by A;
        consider a1,a2 being bag of n such that
        C4: (decomp b)/.k = <*a1, a2*> & b = a1 + a2 by C11,A1,PRE_POLY:68;
        C5: a1 = <*b1,b2*>.1 by C3,C4,FINSEQ_1:44 .= b1;
        C6: a2 = <*b1,b2*>.2 by C3,C4,FINSEQ_1:44 .= b2;
        per cases;
        suppose support b1 = {};
          then b1 = EmptyBag n by PRE_POLY:81;
          then p1.b1 = anpoly(1.F,1).0 by defPg
                    .= 0.F by POLYDIFF:25;
          hence s/.k = 0.F by C3;
          end;
        suppose D1: support b1 <> {};
          per cases;
          suppose support b2 = {};
            then b2 = EmptyBag n by PRE_POLY:81;
            then p2.b2 = anpoly(1.F,i).0 by defPg
                      .= 0.F by U,POLYDIFF:25;
            hence s/.k = 0.F by C3;
            end;
          suppose D2: support b2 <> {};
            now assume support b1 = {m} & support b2 = {m};
              then support b = {m} \/ {m} by C4,C5,C6,PRE_POLY:38;
              hence contradiction by U1;
              end; then
            per cases;
            suppose support b1 <> {m};
              then p1.b1 = 0.F by D1,defPg;
              hence s/.k = 0.F by C3;
              end;
            suppose support b2 <> {m};
              then p2.b2 = 0.F by D2,defPg;
              hence s/.k = 0.F by C3;
              end;
            end;
          end;
        end;
    then for k being Element of NAT st k in dom s & k <> 1 holds s/.k = 0.F;
    hence (p1 *' p2).b = s/.1 by A,C3,POLYNOM2:3 .= q.b by C2,C3,W;
    end;
 end;
hence thesis;
end;
end;
