reserve i,j,k,n,m for Nat,
        X for set,
        b,s for bag of X,
        x for object;
reserve O for Ordinal,
        R for right_zeroed add-associative right_complementable
          right_unital distributive non trivial doubleLoopStr,
        p for Polynomial of O, R;
reserve O for Ordinal,
        R for right_zeroed add-associative right_complementable
             right_unital distributive non trivial doubleLoopStr,
        p for Polynomial of O, R;

theorem Th69:
  for m be Ordinal
     for Pc be Polynomial of m,F_Complex,
         Pr be Polynomial of m,F_Real st Pc = Pr
      for xc be Function of m,F_Complex,
          xr be  Function of m,F_Real st xc = xr
  holds eval(Pc,xc) = eval(Pr,xr)
proof
  let m be Ordinal;
  let Pc be Polynomial of m,F_Complex,Pr be Polynomial of m,F_Real such that
A1: Pc = Pr;
  let xc be Function of m,F_Complex,
  xr be  Function of m,F_Real such that
A2:xc = xr;
  reconsider FC = F_Complex,FR = F_Real as Field;
  reconsider Pc as Polynomial of m,FC;
  reconsider Pr as Polynomial of m,FR;
  reconsider xc as Function of m,FC;
  reconsider xr as Function of m,FR;
  set S=SgmX(BagOrder m, Support Pc);
  consider Cy be FinSequence of the carrier of FC such that
A3:len Cy = len S & eval(Pc,xc) = Sum Cy and
A4: for i be Element of NAT st 1 <= i & i <= len Cy holds
  Cy/.i = (Pc * S)/.i * eval((S/.i),xc) by POLYNOM2:def 4;
A5: 0.FC = 0.FR by COMPLFLD:def 1;
A6: Support Pc c= Support Pr
  proof
    let x be object;
    assume x in Support Pc;
    then x in dom Pc & Pc.x <> 0.FC by POLYNOM1:def 3;
    hence thesis by A5,A1,POLYNOM1:def 3;
  end;
  Support Pr c= Support Pc
  proof
    let x be object;
    assume x in Support Pr;
    then x in dom Pr & Pr.x <> 0.FR by POLYNOM1:def 3;
    hence thesis by A5,A1,POLYNOM1:def 3;
  end;
  then
A7:Support Pr = Support Pc by A6,XBOOLE_0:def 10;
  then consider Ry be FinSequence of the carrier of FR such that
A8:len Ry = len S & eval(Pr,xr) = Sum Ry and
A9: for i be Element of NAT st 1 <= i & i <= len Ry holds
    Ry/.i = (Pr * S)/.i * eval((S/.i),xr) by POLYNOM2:def 4;
  defpred P[Nat] means for i be Nat st i=$1 <= len S holds
  Sum (Ry|i)= Sum (Cy|i);
A10:P[0]
  proof
    let i such that
A11: i= 0<= len S;
    Ry|0 = <*> the carrier of FR & Cy|0 = <*> the carrier of FC;
    then Sum (Ry|i) = 0.FR & Sum (Cy|i) = 0.FC by A11,RLVECT_1:43;
    hence thesis by COMPLFLD:def 1;
  end;
A12:P[n] implies P[n+1]
  proof
    assume
A13:P[n];
    let n1 be Nat such that
A14: n1=n+1 <= len S;
    n < len S by A14,NAT_1:13;
    then
A15: Sum (Ry|n) =Sum (Cy|n) by A13;
    reconsider s1=Sum (Ry|n),s2=Ry/.n1 as Real;
    Ry|n1 = (Ry|n) ^ <*Ry/.n1*> by A14,A8,FINSEQ_5:82;
    then Sum (Ry|n1) = Sum (Ry|n) + Sum <*Ry/.n1*> by RLVECT_1:41;
    then
A16: Sum (Ry|n1) = (the addF of FR).(Sum (Ry|n),Ry/.n1) by RLVECT_1:44
    .= s1+s2 by BINOP_2:def 9;
    Cy|n1 = (Cy|n) ^ <*Cy/.n1*> by A14,A3,FINSEQ_5:82;
    then Sum (Cy|n1) = Sum (Cy|n) + Sum <*Cy/.n1*> by RLVECT_1:41;
    then
A17:Sum (Cy|n1) = Sum (Cy|n) + Cy/.n1 by RLVECT_1:44
    .= addcomplex.(Sum (Cy|n),Cy/.n1) by COMPLFLD:def 1;
    BagOrder m linearly_orders  Support Pr by POLYNOM2:18;
    then rng S = Support Pr by A7,PRE_POLY:def 2;
    then rng S c= Bags m = dom Pr by FUNCT_2:def 1;
    then
A18: dom (Pr*S) = dom S & dom (Pc*S) = dom S by A1,RELAT_1:27;
    n1 in dom S by A14,NAT_1:11,FINSEQ_3:25;
    then
A19:(Pr * S)/.n1 = (Pr * S).n1 = (Pc * S)/.n1
      by A1,A18,PARTFUN1:def 6;
    reconsider r1=(Pr * S)/.n1, r2= eval((S/.n1),xr) as Real;
    Ry/.n1 = (Pr * S)/.n1 * eval((S/.n1),xr) by A9,A14,A8,NAT_1:11
    .= r1*r2 by BINOP_2:def 11
    .= multcomplex.(r1,r2) by BINOP_2:def 5
    .= (the multF of FC).(r1,r2) by COMPLFLD:def 1
    .= (Pc * S)/.n1 * eval((S/.n1),xc) by A2,Th68,A19
    .= Cy/.n1 by A14,NAT_1:11,A3,A4;
    hence thesis by A15,A16,A17,BINOP_2:def 3;
  end;
  P[n] from NAT_1:sch 2(A10,A12);
  then Sum (Ry|len S) = Sum (Cy|len S);
  hence thesis by A3,A8;
end;
