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 LM166:
  for X, Y be RealNormSpace,
  f be PartFunc of [:X,Y:], W,
  D be Subset of [:X,Y:]
  st f is_differentiable_on D holds
  for z be Point of [:X,Y:] st z in dom (f`| D )
  holds (f`| D ).z = ((f*(IsoCPNrSP(X,Y)") `| ((IsoCPNrSP(X,Y)"))"D)
  /.(IsoCPNrSP(X,Y).z)) *(IsoCPNrSP(X,Y)")"
  proof
    let X, Y be RealNormSpace,
    f be PartFunc of [:X,Y:], W,
    D be Subset of [:X,Y:];
    assume AS2: f is_differentiable_on D;
    then OP1: D is open by NDIFF_1:32;
    set I = (IsoCPNrSP(X,Y)");
    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;
    set J = IsoCPNrSP(X,Y);
    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;
    P1: dom (f`| D) = D &
    for x be Point of [:X,Y:] st x in D holds (f`| D)/.x = diff(f,x)
    by NDIFF_1:def 9,AS2;
    set g = f*I;
    set E = I"D;
    P3: g is_differentiable_on E by LM155,AS2;
    for z be Point of [:X,Y:] st z in dom (f`| D)
    holds (f`| D ).z = ((g`| E )/.(J.z)) *I"
    proof
      let z be Point of [:X,Y:];
      assume F1X: z in dom (f`| D );
      then F1: z in D by AS2,NDIFF_1:def 9;
      F2: (f`| D).z = (f`| D)/.z by F1X,PARTFUN1:def 6
      .= diff(f,z) by F1X,P1;
      F3: f is_differentiable_in z by F1,OP1,AS2,NDIFF_1:31;
      consider w be Point of product <*X,Y*> such that
      F4: z = (IsoCPNrSP(X,Y)").w by X1,FUNCT_2:113;
      reconsider I0 = I as Point of R_NormSpace_of_BoundedLinearOperators
      ( product <*X,Y*>,[:X,Y:] ) by LOPBAN_1:def 9;
      F9: diff(f,z) * I0 * I0" = diff(g,w)*I0" by F3,F4,LM120;
      F11: diff(f,z) * I0 * I0" = modetrans(diff(f,z), [:X,Y:],W)
      * ( modetrans(I0,product <*X,Y*>,[:X,Y:]) * I0" ) by RELAT_1:36
      .= modetrans(diff(f,z), [:X,Y:],W) * ( I * I" ) by LOPBAN_1:def 11
      .= modetrans(diff(f,z), [:X,Y:],W) * ( id rng I0 ) by FUNCT_1:39
      .= modetrans(diff(f,z), [:X,Y:],W) by X1,FUNCT_2:17
      .= (f`| D).z by F2,LOPBAN_1:def 11;
      w in E by F4,F1,FUNCT_2:38; then
      ((g`| E )/.w) *I0" = diff(g,w)*I0" by P3,NDIFF_1:def 9;
      hence thesis by F4,F9,F11,X2,FUNCT_1:35;
    end;
    hence thesis;
  end;
