reserve x,r,a,x0,p for Real;
reserve n,i,m for Element of NAT;
reserve Z for open Subset of REAL;
reserve f,f1,f2 for PartFunc of REAL,REAL;
reserve k for Nat;

theorem Th16:
  f1 is_differentiable_on n,Z & f2 is_differentiable_on n,Z
  implies diff(f1-f2,Z).n = diff(f1,Z).n - diff(f2,Z).n
proof
  defpred P[Nat] means
f1 is_differentiable_on $1,Z & f2
is_differentiable_on $1,Z implies diff(f1-f2,Z).$1 = diff(f1,Z).$1 - diff(f2,Z)
  .$1;
A1: for k be Nat st P[k] holds P[k+1]
  proof
    let k be Nat such that
A2: P[k];
    assume
A3: f1 is_differentiable_on (k+1),Z & f2 is_differentiable_on (k+1),Z;
A4: diff(f1,Z).k is_differentiable_on Z & diff(f2,Z).k
    is_differentiable_on Z by A3;
    k<k+1 by NAT_1:19;
    then diff(f1-f2,Z).(k+1) = ((diff(f1,Z).k)-(diff(f2,Z).k))`|Z by A2,A3,
TAYLOR_1:23,def 5
      .= (diff(f1,Z).k)`|Z - (diff(f2,Z).k)`|Z by A4,FDIFF_2:18
      .= diff(f1,Z).(k+1) - (diff(f2,Z).k)`|Z by TAYLOR_1:def 5
      .= diff(f1,Z).(k+1) - diff(f2,Z).(k+1) by TAYLOR_1:def 5;
    hence thesis;
  end;
A5: P[0]
  proof
    assume that
    f1 is_differentiable_on 0,Z and
    f2 is_differentiable_on 0,Z;
    diff(f1-f2,Z).0 = (f1-f2)|Z by TAYLOR_1:def 5
      .=f1|Z - f2|Z by RFUNCT_1:47
      .=diff(f1,Z).0 - f2|Z by TAYLOR_1:def 5
      .=diff(f1,Z).0 - diff(f2,Z).0 by TAYLOR_1:def 5;
    hence thesis;
  end;
  for k be Nat holds P[k] from NAT_1:sch 2(A5,A1);
  hence thesis;
end;
