reserve m,n for non zero Element of NAT;
reserve i,j,k for Element of NAT;
reserve Z for set;

theorem Th51:
for f,g be PartFunc of REAL m,REAL, x be Element of REAL m
  st f is_differentiable_in x & g is_differentiable_in x
holds
  f+g is_differentiable_in x & diff(f+g,x) = diff(f,x) + diff(g,x)
& f-g is_differentiable_in x & diff(f-g,x) = diff(f,x) - diff(g,x)
proof
   let f,g be PartFunc of REAL m,REAL, x be Element of REAL m;
   assume f is_differentiable_in x & g is_differentiable_in x; then
A1:<>*f is_differentiable_in x & <>*g is_differentiable_in x; then
A2:<>*f + <>*g is_differentiable_in x
 & <>*f - <>*g is_differentiable_in x by PDIFF_6:20,21;
   hence f+g is_differentiable_in x by Th7;
   thus diff(f+g,x) = proj(1,1)*diff(<>*f + <>*g,x) by Th7
              .= proj(1,1)*(diff(<>*f,x) + diff(<>*g,x)) by A1,PDIFF_6:20
              .= diff(f,x) + diff(g,x) by INTEGR15:15;
   thus f-g is_differentiable_in x by A2,Th7;
   thus diff(f-g,x) = proj(1,1)*diff(<>*f - <>*g,x) by Th7
              .= proj(1,1)*(diff(<>*f,x) - diff(<>*g,x)) by A1,PDIFF_6:21
              .= diff(f,x) - diff(g,x) by INTEGR15:15;
end;
