reserve r,x,x0,a,b for Real;
reserve n,m for Element of NAT;
reserve A for non empty closed_interval Subset of REAL;
reserve Z for open Subset of REAL;

theorem Th1:
  AffineMap(1/2,0)-(1/4)(#)(sin*AffineMap(2,0))
  is_differentiable_on REAL & for x holds ((AffineMap(1/2,0)-(1/4)(#)(sin*
  AffineMap(2,0)))`|REAL).x = (sin.x)^2
proof
A1: for x st x in REAL holds AffineMap(2,0).x=2*x + 0 by FCONT_1:def 4;
  then
A2: sin*AffineMap(2,0) is_differentiable_on REAL by Lm2,FDIFF_4:37;
  then
A3: (1/4)(#)(sin*AffineMap(2,0)) is_differentiable_on REAL by Lm3,FDIFF_1:20;
A4: dom (AffineMap(1/2,0)-(1/4)(#)(sin*AffineMap(2,0))) = [#]REAL by
FUNCT_2:def 1;
A5: for x st x in REAL holds AffineMap(1/2,0).x=(1/2)*x + 0 by FCONT_1:def 4;
  then
A6: AffineMap(1/2,0) is_differentiable_on REAL by Lm1,FDIFF_1:23;
  hence AffineMap(1/2,0)-(1/4)(#)(sin*AffineMap(2,0))
  is_differentiable_on REAL by A4,A3,FDIFF_1:19;
A7: for x st x in REAL holds (((1/4)(#)(sin*AffineMap(2,0)))`|REAL).x =(1/2)
  *cos(2*x)
  proof
    let x;
    assume
A8: x in REAL;
    (((1/4)(#)(sin*AffineMap(2,0)))`|REAL).x =(1/4)*diff((sin*AffineMap(2,
    0)),x) by A2,Lm3,FDIFF_1:20,A8
      .=(1/4)*((sin*AffineMap(2,0))`|REAL).x by A2,FDIFF_1:def 7,A8
      .=(1/4)*(2*cos.(2*x+0)) by A1,Lm2,FDIFF_4:37,A8
      .=(1/2)*cos(2*x);
    hence thesis;
  end;
A9:
  for x st x in REAL holds ((AffineMap(1/2,0)-(1/4)(#)(sin*AffineMap(2,0))
  )`|REAL).x = (sin.x)^2
  proof
    let x;
    assume
A10: x in REAL;
    ((AffineMap(1/2,0)-(1/4)(#)(sin*AffineMap(2,0)))`|REAL).x =diff(
AffineMap(1/2,0),x) - diff((1/4)(#)(sin*AffineMap(2,0)),x) by A4,A6,A3,
FDIFF_1:19,A10
      .=((AffineMap(1/2,0))`|REAL).x -diff((1/4)(#)(sin*AffineMap(2,0)),x)
    by A6,FDIFF_1:def 7,A10
      .=(1/2)-diff((1/4)(#)(sin*AffineMap(2,0)),x) by A5,Lm1,FDIFF_1:23,A10
      .=(1/2)-(((1/4)(#)(sin*AffineMap(2,0)))`|REAL).x by A3,FDIFF_1:def 7,A10
      .=(1/2)-(1/2)*cos(2*x) by A7,A10
      .=(1-cos(2*x))/2
      .=(sin(x))^2 by SIN_COS5:20;
    hence thesis;
  end;
  let x;
   x in REAL by XREAL_0:def 1;
  hence thesis by A9;
end;
