reserve E, F, G,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 S, T be RealNormSpace,
      f be PartFunc of S,T,
      Z be Subset of S,
      x be Point of S
    st Z is open & x in Z & Z c= dom f
  holds
    f|Z is_differentiable_in x
      iff
    f is_differentiable_in x
proof
  let S, T be RealNormSpace,
      f be PartFunc of S,T,
      Z be Subset of S,
      x0 be Point of S;
  assume
  A1: Z is open & x0 in Z & Z c= dom f;

  hereby
    assume
    A2: f | Z is_differentiable_in x0;

    thus f is_differentiable_in x0
    proof
      consider N be Neighbourhood of x0 such that
      A3: N c= dom (f | Z)
            and
      A4: ex L be Point of R_NormSpace_of_BoundedLinearOperators(S,T),
              R be RestFunc of S,T
          st for x be Point of S st x in N
             holds (f | Z)/.x - (f | Z)/.x0 = L.(x - x0) + R/.(x - x0) by A2;

      consider L be Point of (R_NormSpace_of_BoundedLinearOperators (S,T)),
                R be RestFunc of S,T such that
      A5: for x be Point of S st x in N
          holds (f | Z)/.x - (f | Z)/.x0
              = L.(x - x0) + R/.(x - x0) by A4;
      take N;
      A6: dom(f | Z) = (dom f) /\ Z by RELAT_1:61;
      then dom(f | Z) c= dom f by XBOOLE_1:17;
      hence N c= dom f by A3,XBOOLE_1:1;
      take L;
      take R;
      let x be Point of S;

      assume
      A7: x in N;
      then (f | Z)/.x - (f | Z)/.x0 = L.(x - x0) + R/.(x - x0) by A5;
      then f/.x - (f | Z)/.x0 = L.(x - x0) + R/.(x - x0)
        by A3,A6,A7,PARTFUN2:16;
      hence f/.x - f/.x0 = L.(x - x0) + R/.(x - x0) by A1,PARTFUN2:17;
    end;
  end;

  thus thesis by A1,NDIFF_9:1;
end;
