reserve x for Real,

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

     g for PartFunc of REAL,REAL;

theorem
  Z c= dom (arctan*tan) & (for x st x in Z holds tan.x > -1 & tan.x < 1)
implies arctan*tan is_differentiable_on Z & for x st x in Z holds ((arctan*tan)
  `|Z).x = 1
proof
  assume that
A1: Z c= dom (arctan*tan) and
A2: for x st x in Z holds tan.x > -1 & tan.x < 1;
  dom (arctan*tan) c= dom tan by RELAT_1:25;
  then
A3: Z c= dom tan by A1,XBOOLE_1:1;
A4: for x st x in Z holds arctan*tan is_differentiable_in x
  proof
    let x;
    assume
A5: x in Z;
    then cos.x <> 0 by A3,FDIFF_8:1;
    then
A6: tan is_differentiable_in x by FDIFF_7:46;
    tan.x > -1 & tan.x < 1 by A2,A5;
    hence thesis by A6,SIN_COS9:85;
  end;
  then
A7: arctan*tan is_differentiable_on Z by A1,FDIFF_1:9;
  for x st x in Z holds ((arctan*tan)`|Z).x = 1
  proof
    let x;
    assume
A8: x in Z;
    then
A9: tan.x > -1 & tan.x < 1 by A2;
A10: tan.x = sin.x/cos.x by A3,A8,RFUNCT_1:def 1;
A11: cos.x <> 0 by A3,A8,FDIFF_8:1;
    then
A12: tan is_differentiable_in x by FDIFF_7:46;
A13: (cos.x)^2 <> 0 by A11,SQUARE_1:12;
    ((arctan*tan)`|Z).x = diff(arctan*tan,x) by A7,A8,FDIFF_1:def 7
      .= diff(tan,x)/(1+(tan.x)^2) by A12,A9,SIN_COS9:85
      .= (1/(cos.x)^2)/(1+(tan.x)^2) by A11,FDIFF_7:46
      .= 1/((cos.x)^2*(1+(sin.x/cos.x)*(sin.x/cos.x))) by A10,XCMPLX_1:78
      .= 1/((cos.x)^2*(1+(sin.x)^2/(cos.x)^2)) by XCMPLX_1:76
      .= 1/((cos.x)^2+((cos.x)^2*(sin.x)^2)/(cos.x)^2)
      .= 1/((cos.x)^2+(sin.x)^2) by A13,XCMPLX_1:89
      .= 1/1 by SIN_COS:28
      .= 1;
    hence thesis;
  end;
  hence thesis by A1,A4,FDIFF_1:9;
end;
