let f be PartFunc of COMPLEX ,COMPLEX ; :: thesis: for Z being open Subset of COMPLEX st Z c= dom f & ex a1 being Complex st rng f = {a1} holds
( f is_differentiable_on Z & ( for x being Complex st x in Z holds
(f `| Z) /. x = 0c ) )

let Z be open Subset of COMPLEX ; :: thesis: ( Z c= dom f & ex a1 being Complex st rng f = {a1} implies ( f is_differentiable_on Z & ( for x being Complex st x in Z holds
(f `| Z) /. x = 0c ) ) )

assume A1: Z c= dom f ; :: thesis: ( for a1 being Complex holds not rng f = {a1} or ( f is_differentiable_on Z & ( for x being Complex st x in Z holds
(f `| Z) /. x = 0c ) ) )

given a1 being Complex such that A2: rng f = {a1} ; :: thesis: ( f is_differentiable_on Z & ( for x being Complex st x in Z holds
(f `| Z) /. x = 0c ) )

A3: now
let x0 be Complex; :: thesis: ( x0 in dom f implies f /. x0 = a1 )
assume A4: x0 in dom f ; :: thesis: f /. x0 = a1
then f . x0 in {a1} by A2, FUNCT_1:def 5;
then f /. x0 in {a1} by A4, PARTFUN1:def 8;
hence f /. x0 = a1 by TARSKI:def 1; :: thesis: verum
end;
set L = cf;
for z being Complex holds cf /. z = 0c * z by FUNCOP_1:13;
then reconsider L = cf as C_LINEAR by Def4;
set R = cf;
A5: dom cf = COMPLEX by FUNCOP_1:19;
now
let h be convergent_to_0 Complex_Sequence; :: thesis: ( (h " ) (#) (cf /* h) is convergent & lim ((h " ) (#) (cf /* h)) = 0c )
A6: now
let n be Nat; :: thesis: ((h " ) (#) (cf /* h)) . n = 0c
A7: rng h c= dom cf by A5;
X: n in NAT by ORDINAL1:def 13;
thus ((h " ) (#) (cf /* h)) . n = ((h " ) . n) * ((cf /* h) . n) by VALUED_1:5
.= ((h " ) . n) * (cf /. (h . n)) by A7, X, FUNCT_2:186
.= ((h " ) . n) * 0c by FUNCOP_1:13
.= 0c ; :: thesis: verum
end;
then A8: (h " ) (#) (cf /* h) is constant by VALUED_0:def 18;
((h " ) (#) (cf /* h)) . 0 = 0c by A6;
hence ( (h " ) (#) (cf /* h) is convergent & lim ((h " ) (#) (cf /* h)) = 0c ) by A8, CFCONT_1:48, CFCONT_1:49; :: thesis: verum
end;
then reconsider R = cf as C_REST by Def3;
A9: now
let x0 be Complex; :: thesis: ( x0 in Z implies f is_differentiable_in x0 )
assume A10: x0 in Z ; :: thesis: f is_differentiable_in x0
then consider N being Neighbourhood of x0 such that
A11: N c= Z by Th12;
A12: N c= dom f by A1, A11, XBOOLE_1:1;
for x being Complex st x in N holds
(f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0))
proof
let x be Complex; :: thesis: ( x in N implies (f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0)) )
assume x in N ; :: thesis: (f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0))
hence (f /. x) - (f /. x0) = a1 - (f /. x0) by A3, A12
.= a1 - a1 by A1, A3, A10
.= (L /. (x - x0)) + 0c by FUNCOP_1:13
.= (L /. (x - x0)) + (R /. (x - x0)) by FUNCOP_1:13 ;
:: thesis: verum
end;
hence f is_differentiable_in x0 by A12, Def6; :: thesis: verum
end;
hence A15: f is_differentiable_on Z by A1, Th18; :: thesis: for x being Complex st x in Z holds
(f `| Z) /. x = 0c

let x0 be Complex; :: thesis: ( x0 in Z implies (f `| Z) /. x0 = 0c )
assume A16: x0 in Z ; :: thesis: (f `| Z) /. x0 = 0c
then A17: f is_differentiable_in x0 by A9;
then ex N being Neighbourhood of x0 st
( N c= dom f & ex L being C_LINEAR ex R being C_REST st
for x being Complex st x in N holds
(f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0)) ) by Def6;
then consider N being Neighbourhood of x0 such that
A18: N c= dom f ;
A19: for x being Complex st x in N holds
(f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0))
proof
let x be Complex; :: thesis: ( x in N implies (f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0)) )
assume x in N ; :: thesis: (f /. x) - (f /. x0) = (L /. (x - x0)) + (R /. (x - x0))
hence (f /. x) - (f /. x0) = a1 - (f /. x0) by A3, A18
.= a1 - a1 by A1, A3, A16
.= (L /. (x - x0)) + 0c by FUNCOP_1:13
.= (L /. (x - x0)) + (R /. (x - x0)) by FUNCOP_1:13 ;
:: thesis: verum
end;
thus (f `| Z) /. x0 = diff f,x0 by A15, A16, Def12
.= L /. 1r by A17, A18, A19, Def7
.= 0c by FUNCOP_1:13 ; :: thesis: verum