let S be RealNormSpace; :: thesis: for f being PartFunc of S,S
for Z being Subset of S st Z is open & Z c= dom f & f | Z = id Z holds
( f is_differentiable_on Z & ( for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S ) )

set L = id the carrier of S;
( R_NormSpace_of_BoundedLinearOperators (S,S) = NORMSTR(# (),(Zero_ ((),())),(Add_ ((),())),(Mult_ ((),())),() #) & id the carrier of S is Lipschitzian LinearOperator of S,S ) by ;
then reconsider L = id the carrier of S as Point of by LOPBAN_1:def 9;
let f be PartFunc of S,S; :: thesis: for Z being Subset of S st Z is open & Z c= dom f & f | Z = id Z holds
( f is_differentiable_on Z & ( for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S ) )

let Z be Subset of S; :: thesis: ( Z is open & Z c= dom f & f | Z = id Z implies ( f is_differentiable_on Z & ( for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S ) ) )

assume A1: Z is open ; :: thesis: ( not Z c= dom f or not f | Z = id Z or ( f is_differentiable_on Z & ( for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S ) ) )

reconsider R = the carrier of S --> (0. S) as PartFunc of S,S ;
A2: dom R = the carrier of S ;
now :: thesis: for h being 0. S -convergent sequence of S st h is non-zero holds
( () (#) (R /* h) is convergent & lim (() (#) (R /* h)) = 0. S )
let h be 0. S -convergent sequence of S; :: thesis: ( h is non-zero implies ( () (#) (R /* h) is convergent & lim (() (#) (R /* h)) = 0. S ) )
assume h is non-zero ; :: thesis: ( () (#) (R /* h) is convergent & lim (() (#) (R /* h)) = 0. S )
A3: now :: thesis: for n being Nat holds (() (#) (R /* h)) . n = 0. S
let n be Nat; :: thesis: (() (#) (R /* h)) . n = 0. S
A4: R /. (h . n) = R . (h . n) by
.= 0. S ;
A5: rng h c= dom R ;
A6: n in NAT by ORDINAL1:def 12;
thus (() (#) (R /* h)) . n = (() . n) * ((R /* h) . n) by Def2
.= (() . n) * (R /. (h . n)) by
.= 0. S by ; :: thesis: verum
end;
then A7: (||.h.|| ") (#) (R /* h) is constant by VALUED_0:def 18;
hence (||.h.|| ") (#) (R /* h) is convergent by Th18; :: thesis: lim (() (#) (R /* h)) = 0. S
((||.h.|| ") (#) (R /* h)) . 0 = 0. S by A3;
hence lim (() (#) (R /* h)) = 0. S by ; :: thesis: verum
end;
then reconsider R = R as RestFunc of S,S by Def5;
assume that
A8: Z c= dom f and
A9: f | Z = id Z ; :: thesis: ( f is_differentiable_on Z & ( for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S ) )

A10: now :: thesis: for x being Point of S st x in Z holds
f /. x = x
let x be Point of S; :: thesis: ( x in Z implies f /. x = x )
assume A11: x in Z ; :: thesis: f /. x = x
then (f | Z) . x = x by ;
then f . x = x by ;
hence f /. x = x by ; :: thesis: verum
end;
A12: now :: thesis: for x0 being Point of S st x0 in Z holds
f is_differentiable_in x0
let x0 be Point of S; :: thesis: ( x0 in Z implies f is_differentiable_in x0 )
assume A13: x0 in Z ; :: thesis:
then consider N being Neighbourhood of x0 such that
A14: N c= Z by ;
A15: for x being Point of S st x in N holds
(f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0))
proof
let x be Point of S; :: thesis: ( x in N implies (f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0)) )
A16: R /. (x - x0) = R . (x - x0) by
.= 0. S ;
assume x in N ; :: thesis: (f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0))
hence (f /. x) - (f /. x0) = x - (f /. x0) by
.= x - x0 by
.= L . (x - x0)
.= (L . (x - x0)) + (R /. (x - x0)) by ;
:: thesis: verum
end;
N c= dom f by ;
hence f is_differentiable_in x0 by A15; :: thesis: verum
end;
hence A17: f is_differentiable_on Z by A1, A8, Th31; :: thesis: for x being Point of S st x in Z holds
(f `| Z) /. x = id the carrier of S

let x0 be Point of S; :: thesis: ( x0 in Z implies (f `| Z) /. x0 = id the carrier of S )
assume A18: x0 in Z ; :: thesis: (f `| Z) /. x0 = id the carrier of S
then consider N1 being Neighbourhood of x0 such that
A19: N1 c= Z by ;
A20: f is_differentiable_in x0 by ;
then ex N being Neighbourhood of x0 st
( N c= dom f & ex L being Point of ex R being RestFunc of S,S st
for x being Point of S st x in N holds
(f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0)) ) ;
then consider N being Neighbourhood of x0 such that
A21: N c= dom f ;
consider N2 being Neighbourhood of x0 such that
A22: N2 c= N1 and
A23: N2 c= N by Th1;
A24: N2 c= dom f by ;
A25: for x being Point of S st x in N2 holds
(f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0))
proof
let x be Point of S; :: thesis: ( x in N2 implies (f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0)) )
A26: R /. (x - x0) = R . (x - x0) by
.= 0. S ;
assume x in N2 ; :: thesis: (f /. x) - (f /. x0) = (L . (x - x0)) + (R /. (x - x0))
then x in N1 by A22;
hence (f /. x) - (f /. x0) = x - (f /. x0) by
.= x - x0 by
.= L . (x - x0)
.= (L . (x - x0)) + (R /. (x - x0)) by ;
:: thesis: verum
end;
thus (f `| Z) /. x0 = diff (f,x0) by
.= id the carrier of S by ; :: thesis: verum