reserve y for object, X for set;
reserve x,x0,x1,x2,g,g1,g2,r,r1,s,p,p1 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 f,f1,f2 for PartFunc of REAL,REAL;
reserve h for non-zero 0-convergent Real_Sequence;
reserve c for constant Real_Sequence;
reserve R,R1,R2 for RestFunc;
reserve L,L1,L2 for LinearFunc;

theorem Th26:
  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;
  hence Z c= dom f by A2;
  let x0;
  assume
A3: x0 in Z;
  then f|X is_differentiable_in x0 by A1,A2;
  then consider N being Neighbourhood of x0 such that
A4: N c= dom(f|X) and
A5: 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
A6: N1 c= Z by A3,RCOMP_1:18;
  consider N2 being Neighbourhood of x0 such that
A7: N2 c= N and
A8: N2 c= N1 by RCOMP_1:17;
A9: N2 c= Z by A6,A8;
  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 A4;
  then N2 c=dom f by A7;
  then N2 c=dom f/\Z by A9,XBOOLE_1:19;
  hence
A10: N2 c=dom(f|Z) by RELAT_1:61;
  consider L,R such that
A11: for x st x in N holds (f|X).x-(f|X).x0=L.(x-x0)+R.(x-x0) by A5;
  take L,R;
  let x;
  assume
A12: x in N2;
  then (f|X).x-(f|X).x0=L.(x-x0)+R.(x-x0) by A7,A11;
  then
A13: (f|X).x-f.x0=L.(x-x0)+R.(x-x0) by A2,A3,FUNCT_1:49;
  x in N by A7,A12;
  then f.x-f.x0=L.(x-x0)+R.(x-x0) by A4,A13,FUNCT_1:47;
  then f.x-(f|Z).x0=L.(x-x0)+R.(x-x0) by A3,FUNCT_1:49;
  hence thesis by A10,A12,FUNCT_1:47;
end;
