reserve r,r1,r2, s,x for Real,
  i for Integer;

theorem Th50:
  cos.:].0,PI.[ = ].-1,1.[
proof
  cos|].0,PI.[ c= cos|[.0,PI.] by RELAT_1:75,XXREAL_1:25;
  then
A1: rng (cos|].0,PI.[) c= rng (cos|[.0,PI.]) by RELAT_1:11;
A2: rng (cos|].0,PI.[) = cos.:].0,PI.[ by RELAT_1:115;
  thus cos.:].0,PI.[ c= ].-1,1.[
  proof
    let x be object;
    assume
A3: x in cos.:].0,PI.[;
    then consider a being object such that
A4: a in dom cos and
A5: a in ].0,PI.[ and
A6: cos.a = x by FUNCT_1:def 6;
    reconsider a, x as Real by A4,A6;
    set i = [\a/(2*PI)/];
A7: T(i)/(2*PI*1) = i/1 by XCMPLX_1:91;
A8: cos.a = cos a by SIN_COS:def 19;
A9: now
      assume x = 1;
      then
A10:  a = T(i) by A6,A8,Th26;
      then T(i) < PI by A5,XXREAL_1:4;
      then i < (1*PI)/(2*PI) by A7,XREAL_1:74;
      then
A11:  i < 1/2 by XCMPLX_1:91;
      0 < i by A5,A10,XXREAL_1:4;
      then 0+1 <= i by INT_1:7;
      hence contradiction by A11,XXREAL_0:2;
    end;
A12: now
      assume x = -1;
      then
A13:  a = PI+T(i) by A6,A8,Th25;
      then 0 < PI+T(i) by A5,XXREAL_1:4;
      then 0-PI < PI+T(i)-PI by XREAL_1:9;
      then (-PI)/(2*PI) < T(i)/(2*PI) by XREAL_1:74;
      then -(1*PI)/(2*PI) < i by A7,XCMPLX_1:187;
      then
A14:  -1/2 < i by XCMPLX_1:91;
      PI+T(i) < PI by A5,A13,XXREAL_1:4;
      then PI+T(i)-PI < PI-PI by XREAL_1:9;
      then i < 0;
      then i <= -1 by INT_1:8;
      hence contradiction by A14,XXREAL_0:2;
    end;
    x <= 1 by A1,A2,A3,COMPTRIG:32,XXREAL_1:1;
    then
A15: x < 1 by A9,XXREAL_0:1;
    -1 <= x by A1,A2,A3,COMPTRIG:32,XXREAL_1:1;
    then -1 < x by A12,XXREAL_0:1;
    hence thesis by A15,XXREAL_1:4;
  end;
  let a be object;
  assume
A16: a in ].-1,1.[;
  then reconsider a as Real;
  -1 < a & a < 1 by A16,XXREAL_1:4;
  then a in rng (cos|[.0,PI.]) by COMPTRIG:32,XXREAL_1:1;
  then consider x being object such that
A17: x in dom (cos|[.0,PI.]) and
A18: (cos|[.0,PI.]).x = a by FUNCT_1:def 3;
  reconsider x as Real by A17;
A19: cos.x = a by A17,A18,FUNCT_1:47;
A20: dom (cos|[.0,PI.]) = [.0,PI.] by RELAT_1:62,SIN_COS:24;
  then x <= PI by A17,XXREAL_1:1;
  then 0 < x & x < PI or 0 = x or PI = x by A17,A20,XXREAL_0:1,XXREAL_1:1;
  then x in ].0,PI.[ by A16,A19,SIN_COS:30,76,XXREAL_1:4;
  hence thesis by A19,FUNCT_1:def 6,SIN_COS:24;
end;
