reserve i,n,m for Nat,
        r,s for Real,
        A for non empty closed_interval Subset of REAL;

theorem Th1:
  rng (tan| ].-PI/2,PI/2.[) = REAL
proof
  set P=PI/2,I=].-P,P.[;
  REAL c= rng (tan| I)
  proof
    let r be object;assume r in REAL;then reconsider r as Real;
    per cases;
    suppose
A1:   r>0;
      then consider s be Real such that
A2:   0<= s < P & tan.s=r by Lm3;
      s in dom tan by A1,A2,FUNCT_1:def 2;
      hence thesis by XXREAL_1:4,A2,FUNCT_1:50;
    end;
    suppose
A3:   r<0;
      then consider s be Real such that
A4:   0<= s < P & tan.s=-r by Lm3;
A5:   s in dom tan by A3,A4,FUNCT_1:def 2;
A6:   dom sin=REAL & dom cos = REAL by FUNCT_2:def 1;
      then dom tan = REAL /\(REAL \ cos"{0}) by RFUNCT_1:def 1;
      then s in REAL\cos"{0} by A5,XBOOLE_0:def 4;
      then s in REAL & not s in cos"{0} by XBOOLE_0:def 5;
      then not cos.s in {0} by A6,FUNCT_1:def 7;
      then cos.s <>0 & cos.s = cos.(-s) by TARSKI:def 1,SIN_COS:30;
      then tan.s= tan s & tan.(-s)=tan (-s) & -tan(s)=tan(-s)
        by SIN_COS9:15,SIN_COS4:1;
      then
A7:   -s in dom tan & tan.(-s)=r by A3,A4,FUNCT_1:def 2;
      P > -s > -P by A4,XREAL_1:24;
      hence thesis by A7,FUNCT_1:50,XXREAL_1:4;
    end;
    suppose r=0;
      then 0 in dom tan & tan.0=r & 0 in I
        by XXREAL_1:1,SIN_COS:70,SIN_COS9:41,XXREAL_1:4;
      hence thesis by FUNCT_1:50;
    end;
  end;
  hence thesis by XBOOLE_0:def 10;
end;
