reserve m,n for Nat;
reserve r for Real;
reserve c for Element of F_Complex;

theorem Th24:
  (ex f being non-zero INT -valued Polynomial of F_Complex st c is_a_root_of f)
  iff
  (ex f being monic RAT-valued Polynomial of F_Complex st c is_a_root_of f)
proof
  thus (ex f being non-zero INT -valued Polynomial of FC st
  c is_a_root_of f)
  implies
  (ex f being monic RAT-valued Polynomial of FC st c is_a_root_of f)
  proof
    given f being non-zero INT -valued Polynomial of FC such that
A1: c is_a_root_of f;
    f <> 0_.FC; then
A2: len f <> 0 by POLYNOM4:5;
    rng NormPolynomial(f) c= RAT
    proof
      let o be object;
      assume o in rng NormPolynomial(f);
      then consider x being object such that
A3:   x in dom NormPolynomial(f) & o=(NormPolynomial(f)).x by FUNCT_1:def 3;
      reconsider x as Element of NAT by A3;
      reconsider fix=f.x, fil=f.(len f-'1) as Integer;
A4:   f.(len f-'1) = LC(f);
      o=f.x / f.(len f-'1) by A3,POLYNOM5:def 11
      .= fix / fil by A4,COMPLFLD:6;
      hence o in RAT by RAT_1:def 1;
    end;
    then
    reconsider g=NormPolynomial(f) as monic RAT-valued Polynomial of FC
    by RELAT_1:def 19;
    take g;
    thus c is_a_root_of g by A1,A2,POLYNOM5:59;
  end;
  given f being monic RAT-valued Polynomial of FC such that
A5: c is_a_root_of f;
    f <> 0_.FC; then
A6: len f <> 0 by POLYNOM4:5;
    reconsider lf=len f as Element of NAT;
    deffunc F(Element of NAT) = In(denominator(f.$1),FC);
    consider d being Polynomial of FC such that
A7: len d <= lf & for n being Element of NAT st n < lf holds d.n=F(n)
    from POLYNOM3:sch 2;
    now
      assume A8: len d < lf;
      then reconsider lf1=lf-1 as Element of NAT by NAT_1:20;
      len d < lf1+1 by A8;
      then
A9:   len d <= lf1 by NAT_1:13;
      d.lf1=F(lf1) by A7,XREAL_1:44;
      then d.lf1 <> 0.FC by COMPLFLD:def 1;
      hence contradiction by A9,ALGSEQ_1:8;
    end;
    then
A10: len d = len f by A7,XXREAL_0:1;
     deffunc G(Nat) = d.($1-'1);
     consider df being FinSequence such that
A11: len df = len d & for k being Nat st k in dom df holds df.k=G(k)
     from FINSEQ_1:sch 2;
A12: rng df c= INT
     proof
       let o be object;
       assume o in rng df;
       then consider a being object such that
A13:   a in dom df & o=df.a by FUNCT_1:def 3;
       reconsider a as Element of NAT by A13;
A14:   1 <= a & a <= len df by A13,FINSEQ_3:25;
       then a-'1 = a-1 by XREAL_0:def 2;
       then
A15:   a-'1 < len f by A10,A11,A14,XREAL_1:231;
       df.a=d.(a-'1) by A13,A11
       .= In(denominator(f.(a-'1)),FC) by A15,A7
       .= denominator(f.(a-'1));
       hence o in INT by A13,INT_1:def 2;
     end;
     then reconsider df as INT -valued FinSequence by RELAT_1:def 19;
     rng df c= COMPLEX by A12,NUMBERS:16;
     then rng df c= the carrier of FC by COMPLFLD:def 1; then
     reconsider dfc=df as FinSequence of FC by FINSEQ_1:def 4;
     Product df in COMPLEX by XCMPLX_0:def 2;
     then reconsider dd=Product df as Element of FC by COMPLFLD:def 1;
A16: for i being Nat st i in dom dfc holds dfc.i <> 0.FC
     proof
       let i be Nat;
       assume A17: i in dom dfc;
       then reconsider a=i as Element of NAT;
A18:   1 <= a & a <= len df by A17,FINSEQ_3:25;
       then a-'1 = a-1 by XREAL_0:def 2;
       then
A19:   a-'1 < len f by A10,A11,A18,XREAL_1:231;
       df.a=d.(a-'1) by A17,A11
       .= In(denominator(f.(a-'1)),FC) by A19,A7
       .= denominator(f.(a-'1));
       hence dfc.i <> 0.FC by COMPLFLD:def 1;
     end;
A20: the multF of FC = multcomplex & the carrier of FC = COMPLEX
     by COMPLFLD:def 1;
     consider dfo being FinSequence of COMPLEX such that
A21: dfo=df & Product df = multcomplex $$ dfo by RVSUM_1:def 13;
     Product df = Product dfc by A20,A21,GROUP_4:def 2;
     then
A22: len (dd*f) > 0 by A16,A6,POLYNOM5:25,RING_2:2;
     rng (dd*f) c= INT
     proof
       let o be object;
       assume o in rng (dd*f);
       then consider a being object such that
A23:   a in dom (dd*f) & o=(dd*f).a by FUNCT_1:def 3;
       reconsider a as Element of NAT by A23;
A24:   o=dd*f.a by A23,POLYNOM5:def 4
       .= (Product df) * (f.a);
       per cases;
       suppose a >= len f;
         then f.a = 0.FC by ALGSEQ_1:8;
         then o =(Product df)*0 by A24,COMPLFLD:def 1
         .= 0;
         hence o in INT by INT_1:def 2;
       end;
       suppose
A25:     a < len f;
         then
A26:     1 <= a+1 & a+1 <= len df by A11,A10,NAT_1:12,13;
         then
A27:     a+1 in dom df by FINSEQ_3:25;
         df.(a+1) = d.(a+1-'1) by A11,A26,FINSEQ_3:25
         .= d.a by NAT_D:34
         .= In(denominator(f.a),FC) by A25,A7
         .= denominator(f.a);
         then denominator(f.a) in rng df by A27,FUNCT_1:def 3;
         then denominator(f.a) divides Product df by Th23;
         then consider j being Integer such that
A28:     Product df = denominator(f.a) * j;
         f.a = numerator(f.a)/denominator(f.a) by RAT_1:15;
         then o = j*numerator(f.a) by A28,A24,XCMPLX_1:90;
         hence o in INT by INT_1:def 2;
       end;
     end;
     then reconsider g=dd*f as non-zero INT -valued Polynomial of FC
     by RELAT_1:def 19,UPROOTS:17,A22;
     take g;
     eval(g,c)=dd*0.FC by A5,POLYNOM5:30;
     hence c is_a_root_of g;
   end;
