reserve y for set,
  x,a for Real,
  n for Element of NAT,
  Z for open Subset of REAL,
  f,f1,f2 for PartFunc of REAL,REAL;

theorem Th3:
  Z c= dom (f1-f2) & (for x st x in Z holds f1.x=a^2) & f2=#Z 2
implies f1-f2 is_differentiable_on Z & for x st x in Z holds ((f1-f2)`|Z).x = -
  2*x
proof
  assume that
A1: Z c= dom (f1-f2) and
A2: for x st x in Z holds f1.x=a^2 and
A3: f2=#Z 2;
A4: for x st x in Z holds f1.x=a^2+0*x by A2;
  for x st x in Z holds ((f1-f2)`|Z).x = -2*x
  proof
    let x;
    assume x in Z;
    hence ((f1-f2)`|Z).x =0+2*(-1)*x by A1,A3,A4,FDIFF_4:12
      .=-2*x;
  end;
  hence thesis by A1,A3,A4,FDIFF_4:12;
end;
