reserve F for RealNormSpace;
reserve G for RealNormSpace;
reserve X for set;
reserve x,x0,g,r,s,p for Real;
reserve n,m,k for Element of NAT;
reserve Y for Subset of REAL;
reserve Z for open Subset of REAL;
reserve s1,s3 for Real_Sequence;
reserve seq for sequence of G;
reserve f,f1,f2 for PartFunc of REAL,the carrier of F;
reserve h for 0-convergent non-zero Real_Sequence;
reserve c for constant Real_Sequence;
reserve R,R1,R2 for RestFunc of F;
reserve L,L1,L2 for LinearFunc of F;

theorem Th24:
  f is_differentiable_on X & Z c= X implies f is_differentiable_on Z
  proof
    assume that
    A1: f is_differentiable_on X and
    A2: Z c= X;
    X c= dom f by A1; then
    A3:Z c= dom f by A2;
    now let x0;
      assume
      A4: x0 in Z;
      then f|X is_differentiable_in x0 by A1,A2;
      then consider N being Neighbourhood of x0 such that
      A5: N c= dom(f|X) and
      A6: ex L,R st for x st x in N
      holds (f|X)/.x-(f|X)/.x0=L/.(x-x0)+R/.(x-x0);
      consider N1 being Neighbourhood of x0 such that
      A7: N1 c= Z by A4,RCOMP_1:18;
      consider N2 being Neighbourhood of x0 such that
      A8: N2 c= N and
      A9: N2 c= N1 by RCOMP_1:17;
      A10: N2 c= Z by A7,A9;
      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 A5;
      then N2 c=dom f by A8;
      then N2 c=dom f/\Z by A10,XBOOLE_1:19; then
      A11: N2 c=dom(f|Z) by RELAT_1:61;
      A12: N2 c= dom(f|X) by A8,A5;
      consider L,R such that
      A13: for x st x in N holds
      (f|X)/.x-(f|X)/.x0=L/.(x-x0)+R/.(x-x0) by A6;
      for x st x in N2 holds
      (f|Z)/.x-(f|Z)/.x0=L/.(x-x0)+R/.(x-x0)
      proof
        let x;
        assume
        A14: x in N2;
        then A15:(f|X)/.x-(f|X)/.x0=L/.(x-x0)+R/.(x-x0) by A8,A13;
        A16: x0 in N2 by RCOMP_1:16;
        (f|X)/.x-f/.x0=L/.(x-x0)+R/.(x-x0) by A15,A16,A12,PARTFUN2:15;
        then f/.x-f/.x0=L/.(x-x0)+R/.(x-x0) by A14,A12,PARTFUN2:15;
        then f/.x-(f|Z)/.x0=L/.(x-x0)+R/.(x-x0) by A16,A11,PARTFUN2:15;
        hence thesis by A14,A11,PARTFUN2:15;
      end;
      hence (f|Z) is_differentiable_in x0 by A11;
    end;
    hence thesis by A3;
  end;
