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 be PartFunc of [:X,Y:], W
  st Z is open holds
  ( f is_partial_differentiable_on`1 Z &
  f is_partial_differentiable_on`2 Z &
  f `partial`1|Z is_continuous_on Z &
  f `partial`2|Z is_continuous_on Z )
  iff
  f is_differentiable_on Z & f`|Z is_continuous_on Z
  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;
    I"Z = J.:Z by FUNCT_1:84;
    then OP1: E is open by AS,LM025;
    D1: dom <*X,Y*> = Seg len <*X,Y*> by FINSEQ_1:def 3
    .= Seg 2 by FINSEQ_1:44;
    then
    D2:1 in dom <*X,Y*>;
    then In(1,dom<*X,Y*>)=1 by SUBSET_1:def 8;
    then
    BX1: <*X,Y*> .In(1,dom<*X,Y*>) = X;
    D3: 2 in dom <*X,Y*> by D1;
    then In(2,dom<*X,Y*>)=2 by SUBSET_1:def 8;
    then
    BX2: <*X,Y*> .In(2,dom<*X,Y*>) = Y;
    JE1: J"E = J".: (I"Z) by FUNCT_1:85
    .= Z by X1,FUNCT_1:77;
    hereby
      assume P1:f is_partial_differentiable_on`1 Z &
      f is_partial_differentiable_on`2 Z &
      f `partial`1|Z is_continuous_on Z &
      f `partial`2|Z is_continuous_on Z;
      P2: g is_partial_differentiable_on E,1 by P1,LM300;
      P3: g is_partial_differentiable_on E,2 by P1,LM300;
      P4: f `partial`1|Z =g`partial|(E,1)*J by LM400,P1;
      P5: f `partial`2|Z =g`partial|(E,2)*J by LM401,P1;
      for i be set st i in dom <*X,Y*> holds
      g is_partial_differentiable_on E,i & g`partial|(E,i) is_continuous_on E
      proof
        let i be set;
        assume CX: i in dom <*X,Y*>;
        then
        C1: i = 1 or i = 2 by D1,TARSKI:def 2,FINSEQ_1:2;
        thus g is_partial_differentiable_on E,i
        by CX,D1,P2,P3,TARSKI:def 2,FINSEQ_1:2;
        thus g`partial|(E,i) is_continuous_on E
        by BX1,BX2,C1,P1,P4,P5,JE1,LM045;
      end;
      then
      GF1: g is_differentiable_on E & g`|E is_continuous_on E
      by NDIFF_5:57,OP1;
      hence f is_differentiable_on Z by LM155;
      hence f`|Z is_continuous_on Z by GF1,LMX1;
    end;
    assume X0: f is_differentiable_on Z & f`|Z is_continuous_on Z;
    then
    X1: g is_differentiable_on E by LM155;
    X3: g`|E is_continuous_on E by X0,LMX1;
    P2: g is_partial_differentiable_on E,1 by D2,OP1,X1,X3,NDIFF_5:57;
    hence f is_partial_differentiable_on`1 Z by LM300;
    P3: g is_partial_differentiable_on E,2 by D3,OP1,X1,X3,NDIFF_5:57;
    hence f is_partial_differentiable_on`2 Z by LM300;
    P6: g`partial|(E,1) is_continuous_on E by D2,OP1,X1,X3,NDIFF_5:57;
    P7: g`partial|(E,2) is_continuous_on E by D3,OP1,X1,X3,NDIFF_5:57;
    f `partial`1|Z =g`partial|(E,1)*J by P2,LM300,LM400;
    hence f `partial`1|Z is_continuous_on Z by BX1,P6,LM045,JE1;
    f `partial`2|Z = g`partial|(E,2)*J by P3,LM300,LM401;
    hence f `partial`2|Z is_continuous_on Z by BX2,P7,LM045,JE1;
  end;
