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:],
  r be Real,
  f be PartFunc of [:X,Y:], W
  st Z is open &
  f is_partial_differentiable_on`1 Z holds
  r(#)f is_partial_differentiable_on`1 Z &
  (r(#)f) `partial`1|Z = r(#)(f `partial`1|Z)
  proof
    let X, Y, W be RealNormSpace,
    Z be Subset of [:X,Y:],
    r be Real,
    f be PartFunc of [:X,Y:], W;
    assume that
    O1: Z is open and
    A1: f is_partial_differentiable_on`1 Z;
    set h = r(#)f;
    D1: Z c= dom h by A1,VFUNCT_1:def 4;
    X1: for x be Point of [:X,Y:] st x in Z holds
    h is_partial_differentiable_in`1 x &
    partdiff`1(h,x) = r*partdiff`1(f,x)
    proof
      let x be Point of [:X,Y:];
      assume x in Z;
      then f is_partial_differentiable_in`1 x by A1,O1,NDIFF5241;
      hence h is_partial_differentiable_in`1 x &
      partdiff`1(h,x) = r*partdiff`1(f,x) by LM217;
    end;
    then
    for x be Point of [:X,Y:] st x in Z holds
    h is_partial_differentiable_in`1 x;
    hence
    P7:h is_partial_differentiable_on`1 Z by D1,O1,NDIFF5241;
    set fp = f`partial`1|Z;
    P8: dom fp= Z &
    for x be Point of [:X,Y:] st x in Z
    holds fp/.x = partdiff`1(f,x) by A1,Def91;
    P10: dom (r(#)fp) = Z by P8,VFUNCT_1:def 4;
    for x be Point of [:X,Y:] st x in Z
    holds (r(#)fp)/.x = partdiff`1(h,x)
    proof
      let x be Point of [:X,Y:];
      assume P11: x in Z;
      Z1: fp/.x = partdiff`1(f,x) by A1,P11,Def91;
      thus (r(#)fp)/.x = r*(fp/.x) by P11,P10,VFUNCT_1:def 4
      .= partdiff`1(r(#)f,x) by P11,X1,Z1;
    end;
    hence h`partial`1|Z = r(#)fp by P7,P10,Def91;
  end;
