reserve k,m,n for Nat;
reserve R for commutative Ring,
        p,q for Polynomial of R,
        z0,z1 for Element of R;

theorem Th26:
  rng sqr cot x_r-seq(n) c= Roots (sieve (<%i_FC,1.F_Complex%> `^ (2*n+1),2))
proof
  set f = x_r-seq(n);
  set f1 = sqr cot f;
  set PPn=PP `^ (2*n+1);
  let y be object;
  assume y in rng f1;
  then consider x be object such that
A1: x in dom f1 & f1.x = y by FUNCT_1:def 3;
A2:len f1 = len cot f by CARD_1:def 7;
  then
A3: dom f1 = dom cot f by FINSEQ_3:29;
A4: dom cot f = dom f by BASEL_1:def 3;
  reconsider x as Nat by A1;
A5: (cot f).x = cot (f.x) by BASEL_1:def 3,A1,A3,A4;
  cot (f.x) is Element of COMPLEX by XCMPLX_0:def 2;
  then reconsider c = cot (f.x) as Element of FC by COMPLFLD:def 1;
A6: c*c = ((cot f).x)^2 by A5
    .=y by VALUED_1:11,A1;
  set N=2*n+1;
A7: (cot(f.x)+<i>) |^ N is real
  proof
    x in dom f & len f = n by BASEL_1:21,A2,FINSEQ_3:29,A4,A1;
    then
A8:   1<= x <= n by FINSEQ_3:25;
    then 0 < f.x < PI/2 & PI/2 < PI by BASEL_1:23,COMPTRIG:5;
    then 0 < f.x < PI by XXREAL_0:2;
    then f.x in ].0,PI.[ by XXREAL_1:4;
    then sin.(f.x) >0 by COMPTRIG:7;
    then <i>*sin(f.x)/sin(f.x) = <i> by XCMPLX_1:89;
    then (cot(f.x)+<i>) |^ N = ((cos(f.x)+<i>*sin(f.x))/sin(f.x)) |^ N
      .= ( (cos(f.x) + <i>*sin(f.x)) |^ N) / ((sin(f.x)) |^ N) by PREPOWER:8
      .= (cos(N*f.x) + <i>*sin(N*f.x)) / ((sin(f.x)) |^ N) by COMPTRIG:53
      .= (cos(N*f.x) + <i>*sin(x*PI)) / ((sin(f.x)) |^ N) by A8,BASEL_1:25
      .= (cos(N*f.x) + <i>*0) / ((sin(f.x)) |^ N) by BASEL_1:13;
    hence thesis;
  end;
A9: eval(even_part PPn,c) =0
  proof
A10: (power FC).(c+i_FC,N) =  (cot(f.x)+<i>) |^ N by COMPLFLD:74;
A11: 1.FC is real by COMPLEX1:6,COMPLFLD:8;
    even_part PPn is imaginary by A11,Th17;
    then
A12:  eval(even_part PPn,c) is imaginary by Th14;
    odd_part PPn is real by Th17,A11;
    then eval(odd_part PPn,c) is real by Th15;
    then
A13:  Im eval(odd_part PPn,c) = 0;
A14:eval(PP,c) = i_FC+ 1.(FC) * c by POLYNOM5:44
      .=c+i_FC;
A15:Im eval(PPn,c) =Im ((cot(f.x)+<i>) |^ N) by A14,A10,POLYNOM5:22
      .= 0 by A7;
    Im eval(PPn,c) = Im eval(odd_part PPn,c) + Im eval(even_part PPn,c)
    proof
      reconsider ppn=PPn as Polynomial of FC;
      PPn = (odd_part ppn) + (even_part ppn) by HURWITZ2:10;
      then eval(PPn,c) = eval(odd_part PPn,c) + eval(even_part PPn,c)
        by POLYNOM4:19;
      hence thesis by COMPLEX1:8;
    end;
    hence eval(even_part PPn,c) = 0+0*<i> by A15,A13,A12,COMPLEX1:13 .=0;
  end;
  set X2 = <%0.FC,0.FC,1_FC%>;
  reconsider z1 = 0.FC as Element of FC;
A16: eval(X2,c) = 0.FC + z1*c + 1_FC*c*c by NIVEN:38
    .= c*c;
  even_part PPn = Subst (sieve (PPn,2),X2) by Th22;
  then eval(sieve (PPn,2),c*c)=0.FC by A9,A16,POLYNOM5:53;
  then c*c is_a_root_of sieve(PPn,2) by POLYNOM5:def 7;
  hence thesis by A6,POLYNOM5:def 10;
end;
