reserve x for Real;

theorem
  rng (sin|[.PI/2,3/2*PI.]) = [.-1,1 .]
proof
  set sin1 = sin|[.PI/2,3/2*PI.];
  now
    let y be object;
    thus y in [.-1,1 .] implies
ex x be object st x in dom sin1 & y = sin1.x
    proof
      3/2*PI in [.PI/2,3/2*PI.] by Lm4,XXREAL_1:1;
      then
A1:   sin1.(3/2*PI) = sin.(3/2*PI) by FUNCT_1:49;
      assume
A2:   y in [.-1,1 .];
      then reconsider y1=y as Real;
A3:   dom sin1 = [.PI/2,3/2*PI .] /\ REAL by RELAT_1:61,SIN_COS:24
        .= [.PI/2,3/2*PI .] by XBOOLE_1:28;
      PI/2 in [.PI/2,3/2*PI.] by Lm4,XXREAL_1:1;
      then sin1.(PI/2) = sin.(PI/2) by FUNCT_1:49;
      then
      sin1|[.PI/2,3/2*PI.] is continuous & y1 in [.sin1.(PI/2),sin1.(3/2*
PI).] \/ [.sin1.(3/2*PI),sin1.(PI/2).] by A2,A1,SIN_COS:76,XBOOLE_0:def 3;
      then consider x be Real such that
A4:   x in [.PI/2,3/2*PI.] and
A5:   y1 = sin1.x by A3,Lm4,FCONT_2:15;
      take x;
      x in REAL /\ [.PI/2,3/2*PI.] by A4,XBOOLE_0:def 4;
      hence thesis by A5,RELAT_1:61,SIN_COS:24;
    end;
    thus (ex x be object st x in dom sin1 & y = sin1.x)
implies y in [.-1,1 .]
    proof
      given x be object such that
A6:   x in dom sin1 and
A7:   y = sin1.x;
      dom sin1 c= dom sin by RELAT_1:60;
      then reconsider x1=x as Real by A6,SIN_COS:24;
      y = sin.x1 by A6,A7,FUNCT_1:47;
      hence thesis by Th27;
    end;
  end;
  hence thesis by FUNCT_1:def 3;
end;
