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 NDIFF5241:
  for X, Y, W be RealNormSpace,
  Z be Subset of [:X,Y:],
  f be PartFunc of [:X,Y:], W
  st Z is open holds
  f is_partial_differentiable_on`1 Z iff
  Z c= dom f &
  for x be Point of [:X,Y:] st x in Z holds
  f is_partial_differentiable_in`1 x
  proof
    let X, Y, W be RealNormSpace,
    Z be Subset of [:X,Y:],
    f be PartFunc of [:X,Y:], W;
    assume AS: Z is open;
    set I = (IsoCPNrSP(X,Y)");
    set J = IsoCPNrSP(X,Y);
    set g = f*I;
    set E = I"Z;
    X1: I = (IsoCPNrSP(X,Y)") & I is one-to-one onto &
    ( for x be Point of X, y be Point of Y holds I.<*x,y*> =[x,y] ) &
    0. [:X,Y:] = I.(0.product <*X,Y*>) & I is isometric by defISOA1,defISOA2;
    X2: J is one-to-one onto &
    ( for x be Point of X, y be Point of Y holds J.(x,y) =<*x,y*> ) &
    0.product <*X,Y*> = J.(0. [:X,Y:]) & J is isometric by defISO,ZeZe;
    A2: dom J = the carrier of [:X,Y:] by FUNCT_2:def 1;
    I"Z = J.:Z by FUNCT_1:84;
    then OP1: E is open by AS,LM025;
    hereby
      assume f is_partial_differentiable_on`1 Z;
      then P2: g is_partial_differentiable_on E,1 by LM300;
      then I"Z c= I" (dom f) by RELAT_1:147;
      hence Z c= dom f by X1,FUNCT_1:88;
      thus for x be Point of [:X,Y:] st x in Z holds
      f is_partial_differentiable_in`1 x
      proof
        let z be Point of [:X,Y:];
        assume A4: z in Z;
        set w = IsoCPNrSP(X,Y).z;
        I.w = z by A2,FUNCT_1:34;
        then w in E by FUNCT_2:38,A4;
        then g is_partial_differentiable_in w,1 by OP1,P2,NDIFF_5:24;
        hence f is_partial_differentiable_in`1 z by LM200;
      end;
    end;
    assume P1: Z c=dom f &
    for x be Point of [:X,Y:] st x in Z holds
    f is_partial_differentiable_in`1 x;
    then I"Z c= I" (dom f) by RELAT_1:143; then
    P3: E c=dom g by RELAT_1:147;
    for w be Point of product <*X,Y*> st w in E holds
    g is_partial_differentiable_in w,1
    proof
      let w be Point of product <*X,Y*>;
      assume A4: w in E;
      consider z be Point of [:X,Y:] such that
      F4: w = IsoCPNrSP(X,Y).z by X2,FUNCT_2:113;
      F8: I.w = z by A2,F4,FUNCT_1:34;
      z in Z by A4,F8,FUNCT_2:38;
      hence g is_partial_differentiable_in w,1 by F4,P1,LM200;
    end;
    then g is_partial_differentiable_on E,1 by NDIFF_5:24,P3,OP1;
    hence f is_partial_differentiable_on`1 Z by LM300;
  end;
