reserve S,T,W,Y for RealNormSpace;
reserve f,f1,f2 for PartFunc of S,T;
reserve Z for Subset of S;
reserve i,n for Nat;

theorem
  for X, Y, W be RealNormSpace,
  Z be Subset of [:X,Y:],
  f, g be PartFunc of [:X,Y:], W
  st Z is open &
  f is_partial_differentiable_on`2 Z &
  g is_partial_differentiable_on`2 Z
  holds
  f-g is_partial_differentiable_on`2 Z &
  (f-g) `partial`2|Z = f `partial`2|Z- g `partial`2|Z
  proof
    let X, Y, W be RealNormSpace,
    Z be Subset of [:X,Y:],
    f, g be PartFunc of [:X,Y:], W;
    assume that
    O1: Z is open and
    A1: f is_partial_differentiable_on`2 Z and
    A2: g is_partial_differentiable_on`2 Z;
    set h = f-g;
    dom h = (dom f) /\ (dom g) by VFUNCT_1:def 2; then
    D1: Z c= dom h by A1,A2,XBOOLE_1:19;
    X1: for x be Point of [:X,Y:] st x in Z holds
    h is_partial_differentiable_in`2 x &
    partdiff`2(h,x) = partdiff`2(f,x)-partdiff`2(g,x)
    proof
      let x be Point of [:X,Y:];
      assume P5: x in Z; then
      P6: f is_partial_differentiable_in`2 x by A1,O1,NDIFF5242;
      g is_partial_differentiable_in`2 x by A2,O1,P5,NDIFF5242;
      hence h is_partial_differentiable_in`2 x &
      partdiff`2(h,x) = partdiff`2(f,x)-partdiff`2(g,x) by LM216,P6;
    end;
    then
    for x be Point of [:X,Y:] st x in Z holds
    h is_partial_differentiable_in`2 x;
    hence
    P7:h is_partial_differentiable_on`2 Z by NDIFF5242,D1,O1;
    set fp = f`partial`2|Z;
    set gp = g`partial`2|Z;
    P8: dom fp= Z &
    for x be Point of [:X,Y:] st x in Z
    holds fp/.x = partdiff`2(f,x) by A1,Def92;
    dom gp= Z &
    for x be Point of [:X,Y:] st x in Z
    holds gp/.x = partdiff`2(g,x) by A2,Def92; then
    P10: dom (fp-gp) = Z /\ Z by P8,VFUNCT_1:def 2
    .= Z;
    for x be Point of [:X,Y:] st x in Z
    holds (fp-gp)/.x = partdiff`2(h,x)
    proof
      let x be Point of [:X,Y:];
      assume P11: x in Z; then
      Z1: fp/.x = partdiff`2(f,x) by A1,Def92;
      Z2: gp/.x = partdiff`2(g,x) by A2,P11,Def92;
      thus (fp-gp)/.x = fp/.x - gp/.x by P11,P10,VFUNCT_1:def 2
      .= partdiff`2(f-g,x) by P11,X1,Z1,Z2;
    end;
    hence h`partial`2|Z =fp-gp by P7,P10,Def92;
  end;
