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

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