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;
reserve f, f1, f2, f3 for PartFunc of REAL, REAL;

theorem Th33:
  Z c= dom ((1/2)(#)f) & f=#Z 2 implies (1/2)(#)f
  is_differentiable_on Z & for x st x in Z holds (((1/2)(#)f)`|Z).x = x
proof
  assume that
A1: Z c= dom ((1/2)(#)f) and
A2: f=#Z 2;
  Z c= dom f & for x st x in Z holds f is_differentiable_in x by A1,A2,
TAYLOR_1:2,VALUED_1:def 5;
  then
A3: f is_differentiable_on Z by FDIFF_1:9;
A4: for x st x in Z holds (f`|Z).x=2*x
  proof
    let x;
    2 * (x #Z (2-1)) = 2 * x by PREPOWER:35;
    then
A5: diff(f,x) = 2 * x by A2,TAYLOR_1:2;
    assume x in Z;
    hence thesis by A3,A5,FDIFF_1:def 7;
  end;
  for x st x in Z holds (((1/2)(#)f)`|Z).x=x
  proof
    let x;
    assume
A6: x in Z;
    then (((1/2)(#)f)`|Z).x=(1/2)*diff(f,x) by A1,A3,FDIFF_1:20
      .=(1/2)*(f`|Z).x by A3,A6,FDIFF_1:def 7
      .=(1/2)*(2*x) by A4,A6
      .=x;
    hence thesis;
  end;
  hence thesis by A1,A3,FDIFF_1:20;
end;
