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
  f1 is_differentiable_on n,Z & f2 is_differentiable_on n,Z implies f1+
  f2 is_differentiable_on n,Z
proof
  assume that
A1: f1 is_differentiable_on n,Z and
A2: f2 is_differentiable_on n,Z;
  now
    let i be Nat such that
A3: i <= n-1;
A4: i in NAT by ORDINAL1:def 12;
 A5: diff(f2,Z).i is_differentiable_on Z by A2,A3;
    then
A6: Z c= dom (diff(f2,Z).i) by FDIFF_1:def 6;
    i <= n by A3,WSIERP_1:18;
    then
A7: diff(f1+f2,Z).i = diff(f1,Z).i + diff(f2,Z).i by A1,A2,Th17,A4;
A8: diff(f1,Z).i is_differentiable_on Z by A1,A3;
    then Z c= dom (diff(f1,Z).i) by FDIFF_1:def 6;
    then Z c= dom (diff(f1,Z).i) /\ dom (diff(f2,Z).i) by A6,XBOOLE_1:19;
    then Z c= dom(diff(f1,Z).i + diff(f2,Z).i) by VALUED_1:def 1;
    hence diff(f1+f2,Z).i is_differentiable_on Z by A8,A5,A7,FDIFF_1:18;
  end;
  hence thesis;
end;
