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
  Z c= dom f & f|Z is constant implies f is_differentiable_on Z & for x
  st x in Z holds (f`|Z).x = 0.F
  proof
    set R = REAL --> 0.F;
    A1: dom R = REAL;
    now let h;
      now let n be Nat;
        A2: rng h c= dom R;
        A3: n in NAT by ORDINAL1:def 12;
        thus ((h")(#)(R/*h)).n = (h".n)*((R/*h).n) by NDIFF_1:def 2
        .=(h".n)*(R/.(h.n)) by A3,A2,FUNCT_2:108
        .=0.F by RLVECT_1:10;
      end; then
      (h")(#)(R/*h) is constant
      & ((h")(#)(R/*h)).0 = 0.F by VALUED_0:def 18;
      hence (h")(#)(R/*h) is convergent &
      lim ((h")(#)(R/*h)) = 0.F by NDIFF_1:18;
    end;
    then reconsider R as RestFunc of F by Def1;
    set L = REAL --> 0.F;
    now let p be Real;
       reconsider pp=p as Element of REAL by XREAL_0:def 1;
      thus L/.p = L/.pp
      .= (0.F)
      .= p*(0.F) by RLVECT_1:10;
    end;
    then reconsider L as LinearFunc of F by Def2;
    assume that
    A4: Z c= dom f and
    A5: f|Z is constant;
    consider r be Point of F such that
    A6: for x being Element of REAL st x in Z/\dom f holds f.x=r
      by A5,PARTFUN2:57;
    A7: now let x;
    assume A8: x in Z/\dom f;
    then x in dom f by XBOOLE_0:def 4;
    hence f/.x= f.x by PARTFUN1:def 6
    .= r by A8,A6;
  end;
  A9: now
  let x0;
  assume
  A10: x0 in Z;
  then consider N being Neighbourhood of x0 such that
  A11: N c= Z by RCOMP_1:18;
  A12: N c= dom f by A4,A11;
  A13: x0 in Z/\dom f by A4,A10,XBOOLE_0:def 4;
  for x st x in N holds f/.x-f/.x0=L/.(x-x0)+R/.(x-x0)
  proof
    let x;
A14:   x-x0 in REAL by XREAL_0:def 1;
     then
    A15: R/.(x-x0)=R.(x-x0) by A1,PARTFUN1:def 6
    .= 0.F by FUNCOP_1:7,A14;
    assume x in N;
    then x in Z/\dom f by A11,A12,XBOOLE_0:def 4;
    hence f/.x-f/.x0=r-f/.x0 by A7
    .=r - r by A7,A13
    .=0.F by RLVECT_1:15
    .=L.(x-x0) by FUNCOP_1:7,A14
    .=L/.(x-x0) by A1,PARTFUN1:def 6,A14
    .=L/.(x-x0) + R/.(x-x0) by A15,RLVECT_1:4;
  end;
  hence f is_differentiable_in x0 by A12;
end;
hence
A16: f is_differentiable_on Z by A4,Th10;
let x0;
assume
A17: x0 in Z;
then consider N being Neighbourhood of x0 such that
A18: N c= Z by RCOMP_1:18;
A19: N c= dom f by A4,A18;
A20: x0 in Z/\dom f by A4,A17,XBOOLE_0:def 4;
A21: for x st x in N holds f/.x-f/.x0=L/.(x-x0)+R/.(x-x0)
proof
  let x;
A22:  x-x0 in REAL by XREAL_0:def 1;
  then
  A23: R/.(x-x0)=R.(x-x0) by A1,PARTFUN1:def 6
  .= 0.F by FUNCOP_1:7,A22;
  assume x in N;
  then x in Z/\dom f by A18,A19,XBOOLE_0:def 4;
  hence f/.x - f/.x0 = r - f/.x0 by A7
  .=r - r by A7,A20
  .=0.F by RLVECT_1:15
  .=L.(x-x0) by FUNCOP_1:7,A22
  .=L/.(x-x0) by A1,PARTFUN1:def 6,A22
  .=L/.(x-x0) + R/.(x-x0) by A23,RLVECT_1:4;
end;
A24: f is_differentiable_in x0 by A9,A17;
thus (f`|Z).x0 = diff(f,x0) by A16,A17,Def6
.=L/.jj by A24,A19,A21,Def4
.=0.F;
end;
