reserve n,k for Element of NAT;
reserve x,y,X for set;
reserve g,r,p for Real;
reserve S for RealNormSpace;
reserve rseq for Real_Sequence;
reserve seq,seq1 for sequence of S;
reserve x0 for Point of S;
reserve Y for Subset of S;
reserve S,T for RealNormSpace;
reserve f,f1,f2 for PartFunc of S,T;
reserve s1 for sequence of S;
reserve x0 for Point of S;
reserve h for (0.S)-convergent sequence of S;
reserve c for constant sequence of S;
reserve R,R1,R2 for RestFunc of S,T;
reserve L,L1,L2 for Point of R_NormSpace_of_BoundedLinearOperators(S,T);

theorem
  for Z be Subset of S st Z is open holds ( f is_differentiable_on X & Z
  c= X implies f is_differentiable_on Z )
proof
  let Z be Subset of S such that
A1: Z is open;
  assume that
A2: f is_differentiable_on X and
A3: Z c= X;
  X c= dom f by A2;
  hence
A4: Z c= dom f by A3;
  let x0;
  assume
A5: x0 in Z;
  then consider N1 being Neighbourhood of x0 such that
A6: N1 c= Z by A1,Th2;
  f|X is_differentiable_in x0 by A2,A3,A5;
  then consider N being Neighbourhood of x0 such that
A7: N c= dom(f|X) and
A8: ex L,R st for x be Point of S st x in N holds (f|X)/.x-(f|X)/.x0=L.(
  x-x0)+R/.(x-x0);
  consider N2 being Neighbourhood of x0 such that
A9: N2 c= N and
A10: N2 c= N1 by Th1;
A11: N2 c= Z by A6,A10;
  take N2;
  dom(f|X)=dom f/\X by RELAT_1:61;
  then dom(f|X) c=dom f by XBOOLE_1:17;
  then N c= dom f by A7;
  then N2 c=dom f by A9;
  then N2 c=dom f/\Z by A11,XBOOLE_1:19;
  hence
A12: N2 c=dom(f|Z) by RELAT_1:61;
  consider L,R such that
A13: for x be Point of S st x in N holds (f|X)/.x-(f|X)/.x0=L.(x-x0)+R/.
  (x-x0) by A8;
  take L,R;
  let x be Point of S;
  assume
A14: x in N2;
  then (f|X)/.x-(f|X)/.x0=L.(x-x0)+R/.(x-x0) by A9,A13;
  then
A15: (f|X)/.x-f/.x0=L.(x-x0)+R/.(x-x0) by A3,A4,A5,PARTFUN2:17;
  x in N by A9,A14;
  then f/.x-f/.x0=L.(x-x0)+R/.(x-x0) by A7,A15,PARTFUN2:15;
  then f/.x-(f|Z)/.x0=L.(x-x0)+R/.(x-x0) by A4,A5,PARTFUN2:17;
  hence thesis by A12,A14,PARTFUN2:15;
end;
