let f be one-to-one PartFunc of REAL ,REAL ; :: thesis: ( [#] REAL c= dom f & f is_differentiable_on [#] REAL & ( for x0 being Real holds 0 < diff f,x0 or for x0 being Real holds diff f,x0 < 0 ) implies ( f is one-to-one & f " is_differentiable_on dom (f " ) & ( for x0 being Real st x0 in dom (f " ) holds
diff (f " ),x0 = 1 / (diff f,((f " ) . x0)) ) ) )

assume that
A1: [#] REAL c= dom f and
A2: f is_differentiable_on [#] REAL and
A3: ( for x0 being Real holds 0 < diff f,x0 or for x0 being Real holds diff f,x0 < 0 ) ; :: thesis: ( f is one-to-one & f " is_differentiable_on dom (f " ) & ( for x0 being Real st x0 in dom (f " ) holds
diff (f " ),x0 = 1 / (diff f,((f " ) . x0)) ) )

A4: rng f is open by A1, A2, A3, Th44;
thus f is one-to-one ; :: thesis: ( f " is_differentiable_on dom (f " ) & ( for x0 being Real st x0 in dom (f " ) holds
diff (f " ),x0 = 1 / (diff f,((f " ) . x0)) ) )

A5: dom (f " ) = rng f by FUNCT_1:55;
A6: rng (f " ) = dom f by FUNCT_1:55;
A7: for y0 being Real st y0 in dom (f " ) holds
( f " is_differentiable_in y0 & diff (f " ),y0 = 1 / (diff f,((f " ) . y0)) )
proof
let y0 be Real; :: thesis: ( y0 in dom (f " ) implies ( f " is_differentiable_in y0 & diff (f " ),y0 = 1 / (diff f,((f " ) . y0)) ) )
assume A8: y0 in dom (f " ) ; :: thesis: ( f " is_differentiable_in y0 & diff (f " ),y0 = 1 / (diff f,((f " ) . y0)) )
then consider x0 being Real such that
A9: x0 in dom f and
A10: y0 = f . x0 by A5, PARTFUN1:26;
A11: for h being convergent_to_0 Real_Sequence
for c being V8() Real_Sequence st rng c = {y0} & rng (h + c) c= dom (f " ) holds
( (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) is convergent & lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = 1 / (diff f,((f " ) . y0)) )
proof
reconsider a = NAT --> ((f " ) . y0) as Real_Sequence by FUNCOP_1:57;
let h be convergent_to_0 Real_Sequence; :: thesis: for c being V8() Real_Sequence st rng c = {y0} & rng (h + c) c= dom (f " ) holds
( (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) is convergent & lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = 1 / (diff f,((f " ) . y0)) )

let c be V8() Real_Sequence; :: thesis: ( rng c = {y0} & rng (h + c) c= dom (f " ) implies ( (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) is convergent & lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = 1 / (diff f,((f " ) . y0)) ) )
assume that
A12: rng c = {y0} and
A13: rng (h + c) c= dom (f " ) ; :: thesis: ( (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) is convergent & lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = 1 / (diff f,((f " ) . y0)) )
A14: lim (h + c) = y0 by A12, Th4;
reconsider a = a as V8() Real_Sequence ;
defpred S1[ Element of NAT , real number ] means for r1, r2 being real number st r1 = (h + c) . $1 & r2 = a . $1 holds
r1 = f . (r2 + $2);
A15: for n being Element of NAT ex r being Real st S1[n,r]
proof
let n be Element of NAT ; :: thesis: ex r being Real st S1[n,r]
(h + c) . n in rng (h + c) by VALUED_0:28;
then consider g being Real such that
g in dom f and
A16: (h + c) . n = f . g by A5, A13, PARTFUN1:26;
take r = g - x0; :: thesis: S1[n,r]
let r1, r2 be real number ; :: thesis: ( r1 = (h + c) . n & r2 = a . n implies r1 = f . (r2 + r) )
assume that
A17: r1 = (h + c) . n and
A18: r2 = a . n ; :: thesis: r1 = f . (r2 + r)
a . n = (f " ) . (f . x0) by A10, FUNCOP_1:13
.= x0 by A9, FUNCT_1:56 ;
hence r1 = f . (r2 + r) by A16, A17, A18; :: thesis: verum
end;
consider b being Real_Sequence such that
A19: for n being Element of NAT holds S1[n,b . n] from FUNCT_2:sch 3(A15);
A20: now
let n be Element of NAT ; :: thesis: c . n = f . x0
c . n in rng c by VALUED_0:28;
hence c . n = f . x0 by A10, A12, TARSKI:def 1; :: thesis: verum
end;
A21: h is non-empty by FDIFF_1:def 1;
now
given n being Element of NAT such that A22: b . n = 0 ; :: thesis: contradiction
A23: (h + c) . n = (h . n) + (c . n) by SEQ_1:11
.= (h . n) + (f . x0) by A20 ;
f . ((a . n) + (b . n)) = f . ((f " ) . (f . x0)) by A10, A22, FUNCOP_1:13
.= f . x0 by A9, FUNCT_1:56 ;
then (h . n) + (f . x0) = f . x0 by A19, A23;
hence contradiction by A21, SEQ_1:7; :: thesis: verum
end;
then A24: b is non-empty by SEQ_1:7;
A25: [#] REAL c= dom f by A2, FDIFF_1:def 7;
then dom f = REAL by XBOOLE_0:def 10;
then A26: f is total by PARTFUN1:def 4;
A27: y0 in dom ((f " ) | (rng f)) by A5, A8, RELAT_1:98;
( f | ([#] REAL ) is increasing or f | ([#] REAL ) is decreasing ) by A1, A2, A3, Th37, Th38;
then (f " ) | (rng f) is continuous by A26, FCONT_3:30;
then (f " ) | (dom (f " )) is_continuous_in y0 by A5, A27, FCONT_1:def 2;
then A28: f " is_continuous_in y0 by RELAT_1:97;
A29: now
let n be Element of NAT ; :: thesis: (((f " ) /* (h + c)) - a) . n = b . n
A30: (b . n) + (a . n) in [#] REAL ;
thus (((f " ) /* (h + c)) - a) . n = (((f " ) /* (h + c)) . n) - (a . n) by RFUNCT_2:6
.= ((f " ) . ((h + c) . n)) - (a . n) by A13, FUNCT_2:185
.= ((f " ) . (f . ((b . n) + (a . n)))) - (a . n) by A19
.= ((b . n) + (a . n)) - (a . n) by A25, A30, FUNCT_1:56
.= b . n ; :: thesis: verum
end;
A31: h + c is convergent by A12, Th4;
then A32: (f " ) /* (h + c) is convergent by A13, A14, A28, FCONT_1:def 1;
then ((f " ) /* (h + c)) - a is convergent by SEQ_2:25;
then A33: b is convergent by A29, FUNCT_2:113;
A34: lim a = a . 0 by SEQ_4:41
.= (f " ) . y0 by FUNCOP_1:13 ;
(f " ) . y0 = lim ((f " ) /* (h + c)) by A13, A31, A14, A28, FCONT_1:def 1;
then lim (((f " ) /* (h + c)) - a) = ((f " ) . y0) - ((f " ) . y0) by A32, A34, SEQ_2:26
.= 0 ;
then A35: lim b = 0 by A29, FUNCT_2:113;
A36: rng (b + a) c= dom f
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng (b + a) or x in dom f )
assume x in rng (b + a) ; :: thesis: x in dom f
then x in REAL ;
hence x in dom f by A25; :: thesis: verum
end;
reconsider b = b as convergent_to_0 Real_Sequence by A24, A33, A35, FDIFF_1:def 1;
A37: b " is non-empty by A24, SEQ_1:41;
A38: rng a = {((f " ) . y0)}
proof
thus rng a c= {((f " ) . y0)} :: according to XBOOLE_0:def 10 :: thesis: {((f " ) . y0)} c= rng a
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng a or x in {((f " ) . y0)} )
assume x in rng a ; :: thesis: x in {((f " ) . y0)}
then ex n being Element of NAT st x = a . n by FUNCT_2:190;
then x = (f " ) . y0 by FUNCOP_1:13;
hence x in {((f " ) . y0)} by TARSKI:def 1; :: thesis: verum
end;
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in {((f " ) . y0)} or x in rng a )
assume x in {((f " ) . y0)} ; :: thesis: x in rng a
then x = (f " ) . y0 by TARSKI:def 1;
then a . 0 = x by FUNCOP_1:13;
hence x in rng a by VALUED_0:28; :: thesis: verum
end;
A39: rng a c= dom f
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng a or x in dom f )
assume x in rng a ; :: thesis: x in dom f
then x = (f " ) . y0 by A38, TARSKI:def 1;
hence x in dom f by A6, A8, FUNCT_1:def 5; :: thesis: verum
end;
now
let n be Element of NAT ; :: thesis: (f /* a) . n = c . n
c . n in rng c by VALUED_0:28;
then A40: c . n = y0 by A12, TARSKI:def 1;
thus (f /* a) . n = f . (a . n) by A39, FUNCT_2:185
.= f . ((f " ) . y0) by FUNCOP_1:13
.= c . n by A5, A8, A40, FUNCT_1:57 ; :: thesis: verum
end;
then A41: f /* a = c by FUNCT_2:113;
now
let n be Element of NAT ; :: thesis: h . n = ((f /* (b + a)) - (f /* a)) . n
(h + c) . n = f . ((a . n) + (b . n)) by A19;
then (h . n) + (c . n) = f . ((a . n) + (b . n)) by SEQ_1:11;
hence h . n = (f . ((b . n) + (a . n))) - ((f /* a) . n) by A41
.= (f . ((b + a) . n)) - ((f /* a) . n) by SEQ_1:11
.= ((f /* (b + a)) . n) - ((f /* a) . n) by A36, FUNCT_2:185
.= ((f /* (b + a)) - (f /* a)) . n by RFUNCT_2:6 ;
:: thesis: verum
end;
then A42: h = (f /* (b + a)) - (f /* a) by FUNCT_2:113;
then (f /* (b + a)) - (f /* a) is non-empty by FDIFF_1:def 1;
then A43: (b " ) (#) ((f /* (b + a)) - (f /* a)) is non-empty by A37, SEQ_1:43;
A44: rng c c= dom (f " )
proof
let x be set ; :: according to TARSKI:def 3 :: thesis: ( not x in rng c or x in dom (f " ) )
assume x in rng c ; :: thesis: x in dom (f " )
hence x in dom (f " ) by A8, A12, TARSKI:def 1; :: thesis: verum
end;
now
let n be Element of NAT ; :: thesis: ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) . n = (((b " ) (#) ((f /* (b + a)) - (f /* a))) " ) . n
A45: (a . n) + (b . n) in [#] REAL ;
c . n in rng c by VALUED_0:28;
then A46: c . n = y0 by A12, TARSKI:def 1;
thus ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) . n = ((h " ) . n) * ((((f " ) /* (h + c)) - ((f " ) /* c)) . n) by SEQ_1:12
.= ((h " ) . n) * ((((f " ) /* (h + c)) . n) - (((f " ) /* c) . n)) by RFUNCT_2:6
.= ((h " ) . n) * (((f " ) . ((h + c) . n)) - (((f " ) /* c) . n)) by A13, FUNCT_2:185
.= ((h " ) . n) * (((f " ) . (f . ((a . n) + (b . n)))) - (((f " ) /* c) . n)) by A19
.= ((h " ) . n) * (((a . n) + (b . n)) - (((f " ) /* c) . n)) by A25, A45, FUNCT_1:56
.= ((h " ) . n) * (((a . n) + (b . n)) - ((f " ) . (c . n))) by A44, FUNCT_2:185
.= ((h " ) . n) * (((a . n) + (b . n)) - (a . n)) by A46, FUNCOP_1:13
.= ((h " ) (#) ((b " ) " )) . n by SEQ_1:12
.= (((b " ) (#) ((f /* (b + a)) - (f /* a))) " ) . n by A42, SEQ_1:44 ; :: thesis: verum
end;
then A47: (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) = ((b " ) (#) ((f /* (b + a)) - (f /* a))) " by FUNCT_2:113;
A48: f is_differentiable_in (f " ) . y0 by A2, FDIFF_1:16;
then A49: lim ((b " ) (#) ((f /* (b + a)) - (f /* a))) = diff f,((f " ) . y0) by A38, A36, Th12;
diff f,((f " ) . y0) = diff f,((f " ) . y0) ;
then A50: (b " ) (#) ((f /* (b + a)) - (f /* a)) is convergent by A38, A36, A48, Th12;
A51: 0 <> diff f,((f " ) . y0) by A3;
hence (h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c)) is convergent by A47, A43, A50, A49, SEQ_2:35; :: thesis: lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = 1 / (diff f,((f " ) . y0))
thus lim ((h " ) (#) (((f " ) /* (h + c)) - ((f " ) /* c))) = (diff f,((f " ) . y0)) " by A47, A43, A50, A49, A51, SEQ_2:36
.= 1 / (diff f,((f " ) . y0)) by XCMPLX_1:217 ; :: thesis: verum
end;
ex N being Neighbourhood of y0 st N c= dom (f " ) by A4, A5, A8, RCOMP_1:39;
hence ( f " is_differentiable_in y0 & diff (f " ),y0 = 1 / (diff f,((f " ) . y0)) ) by A11, Th12; :: thesis: verum
end;
then for y0 being Real st y0 in dom (f " ) holds
f " is_differentiable_in y0 ;
hence f " is_differentiable_on dom (f " ) by A4, A5, FDIFF_1:16; :: thesis: for x0 being Real st x0 in dom (f " ) holds
diff (f " ),x0 = 1 / (diff f,((f " ) . x0))

let x0 be Real; :: thesis: ( x0 in dom (f " ) implies diff (f " ),x0 = 1 / (diff f,((f " ) . x0)) )
assume x0 in dom (f " ) ; :: thesis: diff (f " ),x0 = 1 / (diff f,((f " ) . x0))
hence diff (f " ),x0 = 1 / (diff f,((f " ) . x0)) by A7; :: thesis: verum