reserve x,x0, r, s, h for Real,

  n for Element of NAT,
  rr, y for set,
  Z for open Subset of REAL,

  f, f1, f2 for PartFunc of REAL,REAL;

theorem Th21:
  rng (tan | [.-PI/4,PI/4.]) = [.-1,1.]
proof
  now
    let y be object;
    thus y in [.-1,1.] implies
   ex x be object st x in dom (tan | [.-PI/4,PI/4.])
    & y = (tan | [.-PI/4,PI/4.]).x
    proof
      assume
A1:   y in [.-1,1.];
      then reconsider y1=y as Real;
      y1 in [.tan.(-PI/4),tan.(PI/4).] by A1,Th17,SIN_COS:def 28;
      then
A2:   y1 in [.tan.(-PI/4),tan.(PI/4).] \/ [.tan.(PI/4),tan.(-PI/4).] by
XBOOLE_0:def 3;
A3:   [.-PI/4,PI/4.] c= ].-PI/2,PI/2.[ by Lm7,Lm8,XXREAL_2:def 12;
      tan|].-PI/2,PI/2.[ is continuous by Lm1,FDIFF_1:25;
      then tan|[.-PI/4,PI/4.] is continuous by A3,FCONT_1:16;
      then consider x be Real such that
A4:   x in [.-PI/4,PI/4.] and
A5:   y1 = tan.x by A3,A2,Th1,FCONT_2:15,XBOOLE_1:1;
      take x;
      thus thesis by A4,A5,Lm11,FUNCT_1:49;
    end;
    thus (ex x be object
st x in dom (tan | [.-PI/4,PI/4.]) & y = (tan | [.-PI/4,
    PI/4.]).x) implies y in [.-1,1.]
    proof
      given x be object such that
A6:   x in dom (tan | [.-PI/4,PI/4.]) and
A7:   y = (tan | [.-PI/4,PI/4.]).x;
      reconsider x1=x as Real by A6;
      y = tan.x1 by A6,A7,Lm11,FUNCT_1:49;
      hence thesis by A6,Lm11,Th19;
    end;
  end;
  hence thesis by FUNCT_1:def 3;
end;
