let x0 be Real; :: thesis: for f being PartFunc of REAL ,REAL holds
( f is_right_divergent_to+infty_in x0 iff ( ( for r being Real st x0 < r holds
ex g being Real st
( g < r & x0 < g & g in dom f ) ) & ( for g1 being Real ex r being Real st
( x0 < r & ( for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 ) ) ) ) )

let f be PartFunc of REAL ,REAL ; :: thesis: ( f is_right_divergent_to+infty_in x0 iff ( ( for r being Real st x0 < r holds
ex g being Real st
( g < r & x0 < g & g in dom f ) ) & ( for g1 being Real ex r being Real st
( x0 < r & ( for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 ) ) ) ) )

thus ( f is_right_divergent_to+infty_in x0 implies ( ( for r being Real st x0 < r holds
ex g being Real st
( g < r & x0 < g & g in dom f ) ) & ( for g1 being Real ex r being Real st
( x0 < r & ( for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 ) ) ) ) ) :: thesis: ( ( for r being Real st x0 < r holds
ex g being Real st
( g < r & x0 < g & g in dom f ) ) & ( for g1 being Real ex r being Real st
( x0 < r & ( for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 ) ) ) implies f is_right_divergent_to+infty_in x0 )
proof
assume that
A1: f is_right_divergent_to+infty_in x0 and
A2: ( ex r being Real st
( x0 < r & ( for g being Real holds
( not g < r or not x0 < g or not g in dom f ) ) ) or ex g1 being Real st
for r being Real st x0 < r holds
ex r1 being Real st
( r1 < r & x0 < r1 & r1 in dom f & f . r1 <= g1 ) ) ; :: thesis: contradiction
consider g1 being Real such that
A3: for r being Real st x0 < r holds
ex r1 being Real st
( r1 < r & x0 < r1 & r1 in dom f & f . r1 <= g1 ) by A1, A2, Def5;
defpred S1[ Element of NAT , real number ] means ( x0 < $2 & $2 < x0 + (1 / ($1 + 1)) & $2 in dom f & f . $2 <= g1 );
A4: now
let n be Element of NAT ; :: thesis: ex r1 being Real st S1[n,r1]
x0 < x0 + (1 / (n + 1)) by Lm3;
then consider r1 being Real such that
A5: r1 < x0 + (1 / (n + 1)) and
A6: x0 < r1 and
A7: r1 in dom f and
A8: f . r1 <= g1 by A3;
take r1 = r1; :: thesis: S1[n,r1]
thus S1[n,r1] by A5, A6, A7, A8; :: thesis: verum
end;
consider s being Real_Sequence such that
A9: for n being Element of NAT holds S1[n,s . n] from FUNCT_2:sch 3(A4);
A10: rng s c= (dom f) /\ (right_open_halfline x0) by A9, Th6;
A11: lim s = x0 by A9, Th6;
s is convergent by A9, Th6;
then f /* s is divergent_to+infty by A1, A11, A10, Def5;
then consider n being Element of NAT such that
A12: for k being Element of NAT st n <= k holds
g1 < (f /* s) . k by LIMFUNC1:def 4;
A13: g1 < (f /* s) . n by A12;
rng s c= dom f by A9, Th6;
then g1 < f . (s . n) by A13, FUNCT_2:185;
hence contradiction by A9; :: thesis: verum
end;
assume that
A14: for r being Real st x0 < r holds
ex g being Real st
( g < r & x0 < g & g in dom f ) and
A15: for g1 being Real ex r being Real st
( x0 < r & ( for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 ) ) ; :: thesis: f is_right_divergent_to+infty_in x0
now
let s be Real_Sequence; :: thesis: ( s is convergent & lim s = x0 & rng s c= (dom f) /\ (right_open_halfline x0) implies f /* s is divergent_to+infty )
assume that
A16: s is convergent and
A17: lim s = x0 and
A18: rng s c= (dom f) /\ (right_open_halfline x0) ; :: thesis: f /* s is divergent_to+infty
A19: (dom f) /\ (right_open_halfline x0) c= dom f by XBOOLE_1:17;
now
let g1 be Real; :: thesis: ex n being Element of NAT st
for k being Element of NAT st n <= k holds
g1 < (f /* s) . k

consider r being Real such that
A20: x0 < r and
A21: for r1 being Real st r1 < r & x0 < r1 & r1 in dom f holds
g1 < f . r1 by A15;
consider n being Element of NAT such that
A22: for k being Element of NAT st n <= k holds
s . k < r by A16, A17, A20, Th2;
take n = n; :: thesis: for k being Element of NAT st n <= k holds
g1 < (f /* s) . k

let k be Element of NAT ; :: thesis: ( n <= k implies g1 < (f /* s) . k )
assume A23: n <= k ; :: thesis: g1 < (f /* s) . k
A24: s . k in rng s by VALUED_0:28;
then s . k in right_open_halfline x0 by A18, XBOOLE_0:def 4;
then s . k in { g2 where g2 is Real : x0 < g2 } by XXREAL_1:230;
then A25: ex g2 being Real st
( g2 = s . k & x0 < g2 ) ;
s . k in dom f by A18, A24, XBOOLE_0:def 4;
then g1 < f . (s . k) by A21, A22, A23, A25;
hence g1 < (f /* s) . k by A18, A19, FUNCT_2:185, XBOOLE_1:1; :: thesis: verum
end;
hence f /* s is divergent_to+infty by LIMFUNC1:def 4; :: thesis: verum
end;
hence f is_right_divergent_to+infty_in x0 by A14, Def5; :: thesis: verum