let f be PartFunc of REAL , REAL ; :: thesis: for x0 being real number st f is_differentiable_in x0 holds
f is_continuous_in x0

let x0 be real number ; :: thesis: ( f is_differentiable_in x0 implies f is_continuous_in x0 )
assume A1: f is_differentiable_in x0 ; :: thesis: f is_continuous_in x0
then consider N being Neighbourhood of x0 such that
A2: ( N c= dom f & ex L being LINEAR ex R being REST st
for x being Real st x in N holds
(f . x) - (f . x0) = (L . (x - x0)) + (R . (x - x0)) ) by Def5;
now
let s1 be Real_Sequence; :: thesis: ( rng s1 c= dom f & s1 is convergent & lim s1 = x0 & ( for n being Element of NAT holds s1 . n <> x0 ) implies ( f /* s1 is convergent & f . x0 = lim (f /* s1) ) )
assume A4: ( rng s1 c= dom f & s1 is convergent & lim s1 = x0 & ( for n being Element of NAT holds s1 . n <> x0 ) ) ; :: thesis: ( f /* s1 is convergent & f . x0 = lim (f /* s1) )
consider g being real number such that
A5: ( 0 < g & N = ].(x0 - g),(x0 + g).[ ) by RCOMP_1:def 7;
x0 in REAL by XREAL_0:def 1;
then reconsider s2 = NAT --> x0 as Real_Sequence by FUNCOP_1:57;
deffunc H1( Real) -> Element of REAL = (s1 . $1) - (s2 . $1);
consider s3 being Real_Sequence such that
A6: for n being Element of NAT holds s3 . n = H1(n) from SEQ_1:sch 1();
A8: lim s2 = s2 . 0 by SEQ_4:41
.= x0 by FUNCOP_1:13 ;
A9: s3 = s1 - s2 by A6, RFUNCT_2:6;
then A10: s3 is convergent by A4, SEQ_2:25;
A11: lim s3 = x0 - x0 by A4, A8, A9, SEQ_2:26
.= 0 ;
A12: now
given n being Element of NAT such that A13: s3 . n = 0 ; :: thesis: contradiction
(s1 . n) - (s2 . n) = 0 by A6, A13;
hence contradiction by A4, FUNCOP_1:13; :: thesis: verum
end;
consider l being Element of NAT such that
A14: for m being Element of NAT st l <= m holds
abs ((s1 . m) - x0) < g by A4, A5, SEQ_2:def 7;
A15: ( s3 ^\ l is convergent & lim (s3 ^\ l) = 0 ) by A10, A11, SEQ_4:33;
A16: now
given n being Element of NAT such that A17: (s3 ^\ l) . n = 0 ; :: thesis: contradiction
s3 . (n + l) = 0 by A17, NAT_1:def 3;
hence contradiction by A12; :: thesis: verum
end;
then s3 ^\ l is non-zero by SEQ_1:7;
then reconsider h = s3 ^\ l as convergent_to_0 Real_Sequence by A15, Def1;
reconsider c = s2 ^\ l as V6 Real_Sequence ;
A18: rng c = {x0}
proof
thus rng c c= {x0} :: according to XBOOLE_0:def 10 :: thesis: {x0} c= rng c
proof
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in rng c or y in {x0} )
assume y in rng c ; :: thesis: y in {x0}
then consider n being Element of NAT such that
A19: y = (s2 ^\ l) . n by FUNCT_2:190;
y = s2 . (n + l) by A19, NAT_1:def 3;
then y = x0 by FUNCOP_1:13;
hence y in {x0} by TARSKI:def 1; :: thesis: verum
end;
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in {x0} or y in rng c )
assume y in {x0} ; :: thesis: y in rng c
then A20: y = x0 by TARSKI:def 1;
c . 0 = s2 . (0 + l) by NAT_1:def 3
.= y by A20, FUNCOP_1:13 ;
hence y in rng c by VALUED_0:28; :: thesis: verum
end;
rng (h + c) c= N
proof
let y be set ; :: according to TARSKI:def 3 :: thesis: ( not y in rng (h + c) or y in N )
assume y in rng (h + c) ; :: thesis: y in N
then consider n being Element of NAT such that
A21: y = (h + c) . n by FUNCT_2:190;
(h + c) . n = (((s1 - s2) + s2) ^\ l) . n by A9, SEQM_3:37
.= ((s1 - s2) + s2) . (n + l) by NAT_1:def 3
.= ((s1 - s2) . (n + l)) + (s2 . (n + l)) by SEQ_1:11
.= ((s1 . (n + l)) - (s2 . (n + l))) + (s2 . (n + l)) by RFUNCT_2:6
.= s1 . (l + n) ;
then abs (((h + c) . n) - x0) < g by A14, NAT_1:12;
hence y in N by A5, A21, RCOMP_1:8; :: thesis: verum
end;
then A22: (h " ) (#) ((f /* (h + c)) - (f /* c)) is convergent by A1, A2, A18, Th20;
then A23: lim (h (#) ((h " ) (#) ((f /* (h + c)) - (f /* c)))) = 0 * (lim ((h " ) (#) ((f /* (h + c)) - (f /* c)))) by A15, SEQ_2:29
.= 0 ;
now
let n be Element of NAT ; :: thesis: (h (#) ((h " ) (#) ((f /* (h + c)) - (f /* c)))) . n = ((f /* (h + c)) - (f /* c)) . n
A24: h . n <> 0 by A16;
thus (h (#) ((h " ) (#) ((f /* (h + c)) - (f /* c)))) . n = (h . n) * (((h " ) (#) ((f /* (h + c)) - (f /* c))) . n) by SEQ_1:12
.= (h . n) * (((h " ) . n) * (((f /* (h + c)) - (f /* c)) . n)) by SEQ_1:12
.= (h . n) * (((h . n) " ) * (((f /* (h + c)) - (f /* c)) . n)) by VALUED_1:10
.= ((h . n) * ((h . n) " )) * (((f /* (h + c)) - (f /* c)) . n)
.= 1 * (((f /* (h + c)) - (f /* c)) . n) by A24, XCMPLX_0:def 7
.= ((f /* (h + c)) - (f /* c)) . n ; :: thesis: verum
end;
then A25: h (#) ((h " ) (#) ((f /* (h + c)) - (f /* c))) = (f /* (h + c)) - (f /* c) by FUNCT_2:113;
then A26: (f /* (h + c)) - (f /* c) is convergent by A10, A22, SEQ_2:28;
A27: now
let p be real number ; :: thesis: ( 0 < p implies ex n being Element of NAT st
for m being Element of NAT st n <= m holds
abs (((f /* c) . m) - (f . x0)) < p )

assume A28: 0 < p ; :: thesis: ex n being Element of NAT st
for m being Element of NAT st n <= m holds
abs (((f /* c) . m) - (f . x0)) < p

take n = 0 ; :: thesis: for m being Element of NAT st n <= m holds
abs (((f /* c) . m) - (f . x0)) < p

let m be Element of NAT ; :: thesis: ( n <= m implies abs (((f /* c) . m) - (f . x0)) < p )
assume n <= m ; :: thesis: abs (((f /* c) . m) - (f . x0)) < p
x0 in N by RCOMP_1:37;
then rng c c= dom f by A2, A18, ZFMISC_1:37;
then abs (((f /* c) . m) - (f . x0)) = abs ((f . (c . m)) - (f . x0)) by FUNCT_2:185
.= abs ((f . (s2 . (m + l))) - (f . x0)) by NAT_1:def 3
.= abs ((f . x0) - (f . x0)) by FUNCOP_1:13
.= 0 by ABSVALUE:7 ;
hence abs (((f /* c) . m) - (f . x0)) < p by A28; :: thesis: verum
end;
then A29: f /* c is convergent by SEQ_2:def 6;
then A30: lim (f /* c) = f . x0 by A27, SEQ_2:def 7;
A31: ((f /* (h + c)) - (f /* c)) + (f /* c) is convergent by A26, A29, SEQ_2:19;
A32: lim (((f /* (h + c)) - (f /* c)) + (f /* c)) = 0 + (f . x0) by A23, A25, A26, A29, A30, SEQ_2:20
.= f . x0 ;
now
let n be Element of NAT ; :: thesis: (((f /* (h + c)) - (f /* c)) + (f /* c)) . n = (f /* (h + c)) . n
thus (((f /* (h + c)) - (f /* c)) + (f /* c)) . n = (((f /* (h + c)) - (f /* c)) . n) + ((f /* c) . n) by SEQ_1:11
.= (((f /* (h + c)) . n) - ((f /* c) . n)) + ((f /* c) . n) by RFUNCT_2:6
.= (f /* (h + c)) . n ; :: thesis: verum
end;
then A33: ((f /* (h + c)) - (f /* c)) + (f /* c) = f /* (h + c) by FUNCT_2:113;
now
let n be Element of NAT ; :: thesis: (h + c) . n = (s1 ^\ l) . n
thus (h + c) . n = (((s1 - s2) + s2) ^\ l) . n by A9, SEQM_3:37
.= ((s1 - s2) + s2) . (n + l) by NAT_1:def 3
.= ((s1 - s2) . (n + l)) + (s2 . (n + l)) by SEQ_1:11
.= ((s1 . (n + l)) - (s2 . (n + l))) + (s2 . (n + l)) by RFUNCT_2:6
.= (s1 ^\ l) . n by NAT_1:def 3 ; :: thesis: verum
end;
then A34: ((f /* (h + c)) - (f /* c)) + (f /* c) = f /* (s1 ^\ l) by A33, FUNCT_2:113
.= (f /* s1) ^\ l by A4, VALUED_0:27 ;
hence f /* s1 is convergent by A31, SEQ_4:35; :: thesis: f . x0 = lim (f /* s1)
thus f . x0 = lim (f /* s1) by A31, A32, A34, SEQ_4:36; :: thesis: verum
end;
hence f is_continuous_in x0 by FCONT_1:2; :: thesis: verum