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 G be RealNormSpace-Sequence,
  F be RealNormSpace,
  i be set,
  f be PartFunc of product G,F,
  r be Real,
  X be Subset of product G
  st X is open & i in dom G &
  f is_partial_differentiable_on X,i holds
  r(#)f is_partial_differentiable_on X,i &
  (r(#)f) `partial|(X,i) = r(#)(f `partial|(X,i))
  proof
    let G be RealNormSpace-Sequence;
    let F be RealNormSpace;
    let i be set;
    let f be PartFunc of product G,F;
    let r be Real;
    let X be Subset of product G;
    assume that
    O1:X is open and
    A0: i in dom G and
    A1: f is_partial_differentiable_on X,i;
    set h = r(#)f;
    D1: X c= dom h by A1,VFUNCT_1:def 4;
    X1: for x be Point of product G st x in X holds
    h is_partial_differentiable_in x,i &
    partdiff(h,x,i) = r*partdiff(f,x,i)
    proof
      let x be Point of product G;
      assume x in X;
      then f is_partial_differentiable_in x,i by A1,O1,NDIFF_5:24;
      hence thesis by A0,NDIFF_5:30;
    end; then
    for x be Point of product G st x in X holds
    h is_partial_differentiable_in x,i;
    hence
    P7: h is_partial_differentiable_on X,i by NDIFF_5:24,D1,O1;
    set fp = f`partial|(X,i);
    P8: dom fp = X &
    for x be Point of product G st x in X
    holds fp/.x = partdiff(f,x,i) by A1,NDIFF_5:def 9;
    P10: dom (r(#)fp) = X by P8,VFUNCT_1:def 4;
    for x be Point of product G st x in X
    holds (r(#)fp)/.x = partdiff(h,x,i)
    proof
      let x be Point of product G;
      assume P11: x in X;
      thus (r(#)fp)/.x = r*(fp/.x) by P11,P10,VFUNCT_1:def 4
      .= r* partdiff(f,x,i) by A1,P11,NDIFF_5:def 9
      .= partdiff(r(#)f,x,i) by P11,X1;
    end;
    hence h`partial|(X,i) = r(#)fp by P7,P10,NDIFF_5:def 9;
end;
