reserve X for set;
reserve k,m,n for Nat;
reserve i for Integer;
reserve a,b,c,d,e,g,p,r,x,y for Real;
reserve z for Complex;

theorem
  sqr cot x_r-seq(n) is one-to-one
proof
  set f = x_r-seq(n);
A1:f is one-to-one by Th25;
  let x1,x2 be object such that
A2:x1 in dom sqr cot f & x2 in dom sqr cot f & (sqr cot f).x1
     = (sqr cot f).x2;
  reconsider x1,x2 as Nat by A2;
A3:len sqr cot f = len cot f = len f =n by CARD_1:def 7;
  then
A4: dom sqr cot f = dom cot f = dom f by FINSEQ_3:29;
  1<=x1 <= n & 1<= x2 <=n by FINSEQ_3:25,A3,A2;
  then
A5: 0 < f.x1 < PI/2 & 0 < f.x2 < PI/2 & PI/2 < PI by Th21,COMPTRIG:5;
  then f.x1 < PI & f.x2 < PI by XXREAL_0:2;
  then
A6: f.x1 in ].0,PI.[ & f.x2 in ].0,PI.[ & f.x1 in ].0,PI/2.[ &
  f.x2 in ].0,PI/2.[ by A5,XXREAL_1:4;
  then
A7:sin (f.x1) >0 &  sin (f.x2) >0 & cos(f.x1) >0 & cos (f.x2) >0
    by COMPTRIG:7,SIN_COS:80;
A8: (cot f).x1 = cot (f.x1) & (cot f).x2 = cot (f.x2) by Def3,A2,A4;
A9: cot (f.x1) = cot (f.x2)
  proof
    (sqr cot f).x1 = ((cot f).x1)^2 & (sqr cot f).x2 = ((cot f).x2)^2
      by VALUED_1:11;
    then (cot f).x1 = (cot f).x2 or (cot f).x1 = - (cot f).x2
      by A2,SQUARE_1:40;
    hence thesis by A7,A8;
  end;
  f.x1=f.x2
  proof
A10: cot.(f.x1) = cot (f.x1) & cot.(f.x2) = cot (f.x2)
      by A6,SIN_COS9:2,RFUNCT_1:def 1;
A11: f.x1 in dom (cot| ].0,PI.[) & f.x2 in dom (cot| ].0,PI.[)
      by A6,SIN_COS9:2,RELAT_1:57;
    then cot.(f.x1) = (cot| ].0,PI.[).(f.x1) &
    cot.(f.x2) = (cot| ].0,PI.[).(f.x2) by FUNCT_1:47;
    hence thesis by A9,A10,A11,FUNCT_1:def 4,SIN_COS9:10;
  end;
  hence thesis by A1,A2,A4,FUNCT_1:def 4;
end;
