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

theorem
  Z c= dom -(ln*(f1-f2)) & f2=#Z 2 & (for x st x in Z holds f1.x=a^2 & (
  f1-f2).x >0) implies -(ln*(f1-f2)) is_differentiable_on Z & for x st x in Z
  holds ((-(ln*(f1-f2)))`|Z).x = 2*x/(a^2-x |^2)
proof
  assume that
A1: Z c= dom -(ln*(f1-f2)) and
A2: f2=#Z 2 and
A3: for x st x in Z holds f1.x=a^2 & (f1-f2).x >0;
A4: Z c= dom (ln*(f1+(-1)(#)f2)) & for x st x in Z holds f1.x=a^2+0*x & ( f1
  +(-1 )(#)f2).x >0 by A1,A3,VALUED_1:8;
  then
A5: ln*(f1+(-1)(#)f2) is_differentiable_on Z by A2,Th13;
  for x st x in Z holds ((-(ln*(f1-f2)))`|Z).x =2*x/(a^2-x |^2)
  proof
    let x;
    assume
A6: x in Z;
    then ((-(ln*(f1-f2)))`|Z).x =(-1)*diff((ln*(f1+(-1)(#)f2)),x) by A1,A5,
FDIFF_1:20
      .=(-1)*((ln*(f1+(-1)(#)f2))`|Z).x by A5,A6,FDIFF_1:def 7
      .=(-1)*((0+2*(-1)*x)/(a^2+0*x+(-1)*x |^2)) by A2,A4,A6,Th13
      .=(-1)*(2*(-1)*x)/(a^2+(-1)*x |^2) by XCMPLX_1:74
      .=2*x/(a^2-x |^2);
    hence thesis;
  end;
  hence thesis by A1,A5,FDIFF_1:20;
end;
