:: ASYMPT_1 semantic presentation

Lemma47: for n being Element of NAT st n >= 2 holds
2 to_power n > n + 1
proof end;

theorem Th1: :: ASYMPT_1:1
for t, t1 being Real_Sequence st t . 0 = 0 & ( for n being Element of NAT st n > 0 holds
t . n = ((((12 * (n to_power 3)) * (log 2,n)) - (5 * (n ^2 ))) + ((log 2,n) ^2 )) + 36 ) & t1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
t1 . n = (n to_power 3) * (log 2,n) ) holds
ex s, s1 being eventually-positive Real_Sequence st
( s = t & s1 = t1 & s in Big_Oh s1 )
proof end;

Lemma112: for a being logbase Real
for f being Real_Sequence st a > 1 & f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = log a,n ) holds
f is eventually-positive
proof end;

theorem Th2: :: ASYMPT_1:2
for a, b being logbase Real
for f, g being Real_Sequence st a > 1 & b > 1 & f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = log a,n ) & g . 0 = 0 & ( for n being Element of NAT st n > 0 holds
g . n = log b,n ) holds
ex s, s1 being eventually-positive Real_Sequence st
( s = f & s1 = g & Big_Oh s = Big_Oh s1 )
proof end;

definition
let a be Real, b be Real, c be Real;
func seq_a^ c1,c2,c3 -> Real_Sequence means :Def1: :: ASYMPT_1:def 1
for n being Element of NAT holds it . n = a to_power ((b * n) + c);
existence
ex b1 being Real_Sequence st
for n being Element of NAT holds b1 . n = a to_power ((b * n) + c)
proof end;
uniqueness
for b1, b2 being Real_Sequence st ( for n being Element of NAT holds b1 . n = a to_power ((b * n) + c) ) & ( for n being Element of NAT holds b2 . n = a to_power ((b * n) + c) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines seq_a^ ASYMPT_1:def 1 :
for a, b, c being Real
for b4 being Real_Sequence holds
( b4 = seq_a^ a,b,c iff for n being Element of NAT holds b4 . n = a to_power ((b * n) + c) );

registration
let a be positive Real;
let b be Real, c be Real;
cluster seq_a^ a1,a2,a3 -> eventually-positive ;
coherence
seq_a^ a,b,c is eventually-positive
proof end;
end;

Lemma118: for a, b, c being Real st a > 0 & c > 0 & c <> 1 holds
a to_power b = c to_power (b * (log c,a))
proof end;

theorem Th3: :: ASYMPT_1:3
for a, b being positive Real st a < b holds
not seq_a^ b,1,0 in Big_Oh (seq_a^ a,1,0)
proof end;

definition
func seq_logn -> Real_Sequence means :Def2: :: ASYMPT_1:def 2
( it . 0 = 0 & ( for n being Element of NAT st n > 0 holds
it . n = log 2,n ) );
existence
ex b1 being Real_Sequence st
( b1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b1 . n = log 2,n ) )
proof end;
uniqueness
for b1, b2 being Real_Sequence st b1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b1 . n = log 2,n ) & b2 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b2 . n = log 2,n ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines seq_logn ASYMPT_1:def 2 :
for b1 being Real_Sequence holds
( b1 = seq_logn iff ( b1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b1 . n = log 2,n ) ) );

definition
let a be Real;
func seq_n^ c1 -> Real_Sequence means :Def3: :: ASYMPT_1:def 3
( it . 0 = 0 & ( for n being Element of NAT st n > 0 holds
it . n = n to_power a ) );
existence
ex b1 being Real_Sequence st
( b1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b1 . n = n to_power a ) )
proof end;
uniqueness
for b1, b2 being Real_Sequence st b1 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b1 . n = n to_power a ) & b2 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b2 . n = n to_power a ) holds
b1 = b2
proof end;
end;

:: deftheorem Def3 defines seq_n^ ASYMPT_1:def 3 :
for a being Real
for b2 being Real_Sequence holds
( b2 = seq_n^ a iff ( b2 . 0 = 0 & ( for n being Element of NAT st n > 0 holds
b2 . n = n to_power a ) ) );

registration
cluster seq_logn -> eventually-positive ;
coherence
seq_logn is eventually-positive
proof end;
end;

registration
let a be Real;
cluster seq_n^ a1 -> eventually-positive ;
coherence
seq_n^ a is eventually-positive
proof end;
end;

Lemma121: for f, g being Real_Sequence
for n being Element of NAT holds (f /" g) . n = (f . n) / (g . n)
proof end;

Lemma122: for f, g being eventually-nonnegative Real_Sequence holds
( ( f in Big_Oh g & g in Big_Oh f ) iff Big_Oh f = Big_Oh g )
proof end;

theorem Th4: :: ASYMPT_1:4
for f, g being eventually-nonnegative Real_Sequence holds
( Big_Oh f c= Big_Oh g & not Big_Oh f = Big_Oh g iff ( f in Big_Oh g & not f in Big_Omega g ) )
proof end;

Lemma124: for a, b, c being real number st 0 < a & a <= b & c >= 0 holds
a to_power c <= b to_power c
proof end;

Lemma125: 2 to_power 2 = 4
proof end;

Lemma126: 2 to_power 3 = 8
proof end;

Lemma127: 2 to_power 4 = 16
proof end;

Lemma128: 2 to_power 5 = 32
proof end;

Lemma129: 2 to_power 6 = 64
proof end;

Lemma130: for n being Element of NAT st n >= 4 holds
(2 * n) + 3 < 2 to_power n
proof end;

Lemma131: for n being Element of NAT st n >= 6 holds
(n + 1) ^2 < 2 to_power n
proof end;

Lemma132: for c being Real st c > 6 holds
c ^2 < 2 to_power c
proof end;

Lemma135: for e being positive Real
for f being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = log 2,(n to_power e) ) holds
( f /" (seq_n^ e) is convergent & lim (f /" (seq_n^ e)) = 0 )
proof end;

Lemma137: for e being Real st e > 0 holds
( seq_logn /" (seq_n^ e) is convergent & lim (seq_logn /" (seq_n^ e)) = 0 )
proof end;

theorem Th5: :: ASYMPT_1:5
( Big_Oh seq_logn c= Big_Oh (seq_n^ (1 / 2)) & not Big_Oh seq_logn = Big_Oh (seq_n^ (1 / 2)) )
proof end;

theorem Th6: :: ASYMPT_1:6
( seq_n^ (1 / 2) in Big_Omega seq_logn & not seq_logn in Big_Omega (seq_n^ (1 / 2)) )
proof end;

Lemma139: for f being Real_Sequence
for N being Element of NAT st ( for n being Element of NAT st n <= N holds
f . n >= 0 ) holds
Sum f,N >= 0
proof end;

Lemma140: for f, g being Real_Sequence
for N being Element of NAT st ( for n being Element of NAT st n <= N holds
f . n <= g . n ) holds
Sum f,N <= Sum g,N
proof end;

Lemma141: for f being Real_Sequence
for b being Real st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = b ) holds
for N being Element of NAT holds Sum f,N = b * N
proof end;

Lemma142: for f being Real_Sequence
for N, M being Element of NAT holds (Sum f,N,M) + (f . (N + 1)) = Sum f,(N + 1),M
proof end;

Lemma143: for f, g being Real_Sequence
for M, N being Element of NAT st N >= M + 1 & ( for n being Element of NAT st M + 1 <= n & n <= N holds
f . n <= g . n ) holds
Sum f,N,M <= Sum g,N,M
proof end;

Lemma144: for n being Element of NAT holds [/(n / 2)\] <= n
proof end;

Lemma145: for f being Real_Sequence
for b being Real
for N being Element of NAT st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = b ) holds
for M being Element of NAT holds Sum f,N,M = b * (N - M)
proof end;

theorem Th7: :: ASYMPT_1:7
for f being Real_Sequence
for k being Element of NAT st ( for n being Element of NAT holds f . n = Sum (seq_n^ k),n ) holds
f in Big_Theta (seq_n^ (k + 1))
proof end;

theorem Th8: :: ASYMPT_1:8
for f being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = n to_power (log 2,n) ) holds
ex s being eventually-positive Real_Sequence st
( s = f & not s is smooth )
proof end;

definition
let b be Real;
func seq_const c1 -> Real_Sequence equals :: ASYMPT_1:def 4
NAT --> b;
coherence
NAT --> b is Real_Sequence
proof end;
end;

:: deftheorem Def4 defines seq_const ASYMPT_1:def 4 :
for b being Real holds seq_const b = NAT --> b;

registration
cluster seq_const 1 -> eventually-nonnegative ;
coherence
seq_const 1 is eventually-nonnegative
proof end;
end;

Lemma146: for a, b, c being Real st a > 1 & b >= a & c >= 1 holds
log a,c >= log b,c
proof end;

theorem Th9: :: ASYMPT_1:9
for f being eventually-nonnegative Real_Sequence ex F being FUNCTION_DOMAIN of NAT , REAL st
( F = {(seq_n^ 1)} & ( f in F to_power (Big_Oh (seq_const 1)) implies ex N being Element of NAT ex c being Real ex k being Element of NAT st
( c > 0 & ( for n being Element of NAT st n >= N holds
( 1 <= f . n & f . n <= c * ((seq_n^ k) . n) ) ) ) ) & ( ex N being Element of NAT ex c being Real ex k being Element of NAT st
( c > 0 & ( for n being Element of NAT st n >= N holds
( 1 <= f . n & f . n <= c * ((seq_n^ k) . n) ) ) ) implies f in F to_power (Big_Oh (seq_const 1)) ) )
proof end;

theorem Th10: :: ASYMPT_1:10
for f being Real_Sequence st ( for n being Element of NAT holds f . n = ((3 * (10 to_power 6)) - ((18 * (10 to_power 3)) * n)) + (27 * (n ^2 )) ) holds
f in Big_Oh (seq_n^ 2)
proof end;

theorem Th11: :: ASYMPT_1:11
seq_n^ 2 in Big_Oh (seq_n^ 3)
proof end;

theorem Th12: :: ASYMPT_1:12
not seq_n^ 2 in Big_Omega (seq_n^ 3)
proof end;

Lemma152: for a being positive Real
for b, c being Real holds seq_a^ a,b,c is eventually-positive
;

theorem Th13: :: ASYMPT_1:13
ex s being eventually-positive Real_Sequence st
( s = seq_a^ 2,1,1 & seq_a^ 2,1,0 in Big_Theta s )
proof end;

definition
let a be Element of NAT ;
func seq_n! c1 -> Real_Sequence means :Def5: :: ASYMPT_1:def 5
for n being Element of NAT holds it . n = (n + a) ! ;
existence
ex b1 being Real_Sequence st
for n being Element of NAT holds b1 . n = (n + a) !
proof end;
uniqueness
for b1, b2 being Real_Sequence st ( for n being Element of NAT holds b1 . n = (n + a) ! ) & ( for n being Element of NAT holds b2 . n = (n + a) ! ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines seq_n! ASYMPT_1:def 5 :
for a being Element of NAT
for b2 being Real_Sequence holds
( b2 = seq_n! a iff for n being Element of NAT holds b2 . n = (n + a) ! );

registration
let a be Element of NAT ;
cluster seq_n! a1 -> eventually-positive ;
coherence
seq_n! a is eventually-positive
proof end;
end;

theorem Th14: :: ASYMPT_1:14
not seq_n! 0 in Big_Theta (seq_n! 1)
proof end;

E154: now
let a be Real, b be Real, c be Real, d be Real;
assume ( 0 <= b & a <= b & 0 <= c & c <= d ) ;
then ( a * c <= b * c & b * c <= b * d ) by XREAL_1:66;
hence a * c <= b * d by XXREAL_0:2;
end;

theorem Th15: :: ASYMPT_1:15
for f being Real_Sequence st f in Big_Oh (seq_n^ 1) holds
f (#) f in Big_Oh (seq_n^ 2)
proof end;

theorem Th16: :: ASYMPT_1:16
ex s being eventually-positive Real_Sequence st
( s = seq_a^ 2,1,0 & 2 (#) (seq_n^ 1) in Big_Oh (seq_n^ 1) & not seq_a^ 2,2,0 in Big_Oh s )
proof end;

theorem Th17: :: ASYMPT_1:17
( log 2,3 < 159 / 100 implies ( seq_n^ (log 2,3) in Big_Oh (seq_n^ (159 / 100)) & not seq_n^ (log 2,3) in Big_Omega (seq_n^ (159 / 100)) & not seq_n^ (log 2,3) in Big_Theta (seq_n^ (159 / 100)) ) )
proof end;

theorem Th18: :: ASYMPT_1:18
for f, g being Real_Sequence st ( for n being Element of NAT holds f . n = n mod 2 ) & ( for n being Element of NAT holds g . n = (n + 1) mod 2 ) holds
ex s, s1 being eventually-nonnegative Real_Sequence st
( s = f & s1 = g & not s in Big_Oh s1 & not s1 in Big_Oh s )
proof end;

theorem Th19: :: ASYMPT_1:19
for f, g being eventually-nonnegative Real_Sequence holds
( Big_Oh f = Big_Oh g iff f in Big_Theta g )
proof end;

theorem Th20: :: ASYMPT_1:20
for f, g being eventually-nonnegative Real_Sequence holds
( f in Big_Theta g iff Big_Theta f = Big_Theta g )
proof end;

Lemma155: for n being Element of NAT holds ((n ^2 ) - n) + 1 > 0
proof end;

Lemma156: for f, g being Real_Sequence
for N being Element of NAT
for c being Real st f is convergent & lim f = c & ( for n being Element of NAT st n >= N holds
f . n = g . n ) holds
( g is convergent & lim g = c )
proof end;

Lemma157: for n being Element of NAT st n >= 1 holds
((n ^2 ) - n) + 1 <= n ^2
proof end;

Lemma158: for n being Element of NAT st n >= 1 holds
n ^2 <= 2 * (((n ^2 ) - n) + 1)
proof end;

Lemma159: for e being Real st 0 < e & e < 1 holds
ex N being Element of NAT st
for n being Element of NAT st n >= N holds
(n * (log 2,(1 + e))) - (8 * (log 2,n)) > 8 * (log 2,n)
proof end;

theorem Th21: :: ASYMPT_1:21
for e being Real
for f being Real_Sequence st 0 < e & f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = n * (log 2,n) ) holds
ex s being eventually-positive Real_Sequence st
( s = f & Big_Oh s c= Big_Oh (seq_n^ (1 + e)) & not Big_Oh s = Big_Oh (seq_n^ (1 + e)) )
proof end;

theorem Th22: :: ASYMPT_1:22
for e being Real
for g being Real_Sequence st 0 < e & e < 1 & g . 0 = 0 & g . 1 = 0 & ( for n being Element of NAT st n > 1 holds
g . n = (n to_power 2) / (log 2,n) ) holds
ex s being eventually-positive Real_Sequence st
( s = g & Big_Oh (seq_n^ (1 + e)) c= Big_Oh s & not Big_Oh (seq_n^ (1 + e)) = Big_Oh s )
proof end;

theorem Th23: :: ASYMPT_1:23
for f being Real_Sequence st f . 0 = 0 & f . 1 = 0 & ( for n being Element of NAT st n > 1 holds
f . n = (n to_power 2) / (log 2,n) ) holds
ex s being eventually-positive Real_Sequence st
( s = f & Big_Oh s c= Big_Oh (seq_n^ 8) & not Big_Oh s = Big_Oh (seq_n^ 8) )
proof end;

theorem Th24: :: ASYMPT_1:24
for g being Real_Sequence st ( for n being Element of NAT holds g . n = (((n ^2 ) - n) + 1) to_power 4 ) holds
ex s being eventually-positive Real_Sequence st
( s = g & Big_Oh (seq_n^ 8) = Big_Oh s )
proof end;

theorem Th25: :: ASYMPT_1:25
for e being Real st 0 < e & e < 1 holds
ex s being eventually-positive Real_Sequence st
( s = seq_a^ (1 + e),1,0 & Big_Oh (seq_n^ 8) c= Big_Oh s & not Big_Oh (seq_n^ 8) = Big_Oh s )
proof end;

Lemma162: 2 to_power 12 = 4096
proof end;

Lemma163: for n being Element of NAT st n >= 3 holds
n ^2 > (2 * n) + 1
proof end;

Lemma164: for n being Element of NAT st n >= 10 holds
2 to_power (n - 1) > (2 * n) ^2
proof end;

Lemma165: for n being Element of NAT st n >= 9 holds
(n + 1) to_power 6 < 2 * (n to_power 6)
proof end;

Lemma170: for n being Element of NAT st n >= 30 holds
2 to_power n > n to_power 6
proof end;

Lemma171: for x being Real st x > 9 holds
2 to_power x > (2 * x) ^2
proof end;

Lemma172: ex N being Element of NAT st
for n being Element of NAT st n >= N holds
(sqrt n) - (log 2,n) > 1
proof end;

Lemma173: (4 + 1) ! = 120
proof end;

Lemma174: for n being Element of NAT st n >= 10 holds
(2 to_power (2 * n)) / (n ! ) < 1 / (2 to_power (n - 9))
proof end;

Lemma175: for n being Element of NAT st n >= 3 holds
2 * (n - 2) >= n - 1
proof end;

Lemma176: 5 to_power 5 = 3125
proof end;

Lemma177: 4 to_power 4 = 256
proof end;

Lemma178: for a, b, d, e being Real holds (a / b) / (d / e) = (a / d) * (e / b)
proof end;

Lemma179: for x being real number st x >= 0 holds
sqrt x = x to_power (1 / 2)
proof end;

Lemma180: ex N being Element of NAT st
for n being Element of NAT st n >= N holds
n - ((sqrt n) * (log 2,n)) > n / 2
proof end;

Lemma181: for s being Real_Sequence st ( for n being Element of NAT holds s . n = (1 + (1 / (n + 1))) to_power (n + 1) ) holds
s is non-decreasing
proof end;

Lemma182: for n being Element of NAT st n >= 1 holds
((n + 1) / n) to_power n <= ((n + 2) / (n + 1)) to_power (n + 1)
proof end;

theorem Th26: :: ASYMPT_1:26
for f, g being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = n to_power (log 2,n) ) & g . 0 = 0 & ( for n being Element of NAT st n > 0 holds
g . n = n to_power (sqrt n) ) holds
ex s, s1 being eventually-positive Real_Sequence st
( s = f & s1 = g & Big_Oh s c= Big_Oh s1 & not Big_Oh s = Big_Oh s1 )
proof end;

theorem Th27: :: ASYMPT_1:27
for f being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = n to_power (sqrt n) ) holds
ex s, s1 being eventually-positive Real_Sequence st
( s = f & s1 = seq_a^ 2,1,0 & Big_Oh s c= Big_Oh s1 & not Big_Oh s = Big_Oh s1 )
proof end;

theorem Th28: :: ASYMPT_1:28
ex s, s1 being eventually-positive Real_Sequence st
( s = seq_a^ 2,1,0 & s1 = seq_a^ 2,1,1 & Big_Oh s = Big_Oh s1 )
proof end;

theorem Th29: :: ASYMPT_1:29
ex s, s1 being eventually-positive Real_Sequence st
( s = seq_a^ 2,1,0 & s1 = seq_a^ 2,2,0 & Big_Oh s c= Big_Oh s1 & not Big_Oh s = Big_Oh s1 )
proof end;

theorem Th30: :: ASYMPT_1:30
ex s being eventually-positive Real_Sequence st
( s = seq_a^ 2,2,0 & Big_Oh s c= Big_Oh (seq_n! 0) & not Big_Oh s = Big_Oh (seq_n! 0) )
proof end;

theorem Th31: :: ASYMPT_1:31
( Big_Oh (seq_n! 0) c= Big_Oh (seq_n! 1) & not Big_Oh (seq_n! 0) = Big_Oh (seq_n! 1) )
proof end;

theorem Th32: :: ASYMPT_1:32
for g being Real_Sequence st g . 0 = 0 & ( for n being Element of NAT st n > 0 holds
g . n = n to_power n ) holds
ex s being eventually-positive Real_Sequence st
( s = g & Big_Oh (seq_n! 1) c= Big_Oh s & not Big_Oh (seq_n! 1) = Big_Oh s )
proof end;

Lemma184: for k, n being Element of NAT st k <= n holds
n choose k >= ((n + 1) choose k) / (n + 1)
proof end;

theorem Th33: :: ASYMPT_1:33
for n being Element of NAT st n >= 1 holds
for f being Real_Sequence
for k being Element of NAT st ( for n being Element of NAT holds f . n = Sum (seq_n^ k),n ) holds
f . n >= (n to_power (k + 1)) / (k + 1)
proof end;

Lemma194: for f being Real_Sequence st ( for n being Element of NAT holds f . n = log 2,(n ! ) ) holds
for n being Element of NAT holds f . n = Sum seq_logn ,n
proof end;

Lemma195: for n being Element of NAT st n >= 4 holds
n * (log 2,n) >= 2 * n
proof end;

theorem Th34: :: ASYMPT_1:34
for f, g being Real_Sequence st g . 0 = 0 & ( for n being Element of NAT st n > 0 holds
g . n = n * (log 2,n) ) & ( for n being Element of NAT holds f . n = log 2,(n ! ) ) holds
ex s being eventually-nonnegative Real_Sequence st
( s = g & f in Big_Theta s )
proof end;

theorem Th35: :: ASYMPT_1:35
for f being eventually-nonnegative eventually-nondecreasing Real_Sequence
for t being Real_Sequence st ( for n being Element of NAT holds
( ( n mod 2 = 0 implies t . n = 1 ) & ( n mod 2 = 1 implies t . n = n ) ) ) holds
not t in Big_Theta f
proof end;

definition
let f be Function of NAT ,REAL * ;
let n be Element of NAT ;
redefine func . as c1 . c2 -> FinSequence of REAL ;
coherence
f . n is FinSequence of REAL
proof end;
end;

E196: now
let a be positive Real, b be positive Real;
reconsider singlea = <*a*> as Element of REAL * by FINSEQ_1:def 11;
defpred S1[ Element of NAT , FinSequence of REAL , set ] means ex n1 being Element of NAT st
( n1 = [/(((a1 + 1) + 1) / 2)\] & a3 = a2 ^ <*((4 * (a2 /. n1)) + (b * ((a1 + 1) + 1)))*> );
E49: now
let n be Element of NAT ;
let x be Element of REAL * ;
reconsider n1 = [/(((n + 1) + 1) / 2)\] as Element of NAT by INT_1:80;
consider y being FinSequence of REAL such that
E50: y = x ^ <*((4 * (x /. n1)) + (b * ((n + 1) + 1)))*> ;
reconsider y = y as Element of REAL * by FINSEQ_1:def 11;
take y = y;
thus S1[n,x,y] by ;
end;
consider prob28 being Function of NAT ,REAL * such that
E51: prob28 . 0 = singlea and
E52: for n being Element of NAT holds S1[n,prob28 . n,prob28 . (n + 1)] from RECDEF_1:sch 2();
take prob28 = prob28;
thus ( prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) ) by , ;
end;

definition
let n be Element of NAT ;
let a be positive Real, b be positive Real;
defpred S1[ Element of NAT , FinSequence of REAL , set ] means ex n1 being Element of NAT st
( n1 = [/(((a1 + 1) + 1) / 2)\] & a3 = a2 ^ <*((4 * (a2 /. n1)) + (b * ((a1 + 1) + 1)))*> );
E49: for n being Element of NAT
for x, y1, y2 being Element of REAL * st S1[n,x,y1] & S1[n,x,y2] holds
y1 = y2 ;
func Prob28 c1,c2,c3 -> Real means :Def6: :: ASYMPT_1:def 6
it = 0 if n = 0
otherwise ex l being Element of NAT ex prob28 being Function of NAT ,REAL * st
( l + 1 = n & it = (prob28 . l) /. n & prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) );
consistency
for b1 being Real holds verum
;
existence
( ( n = 0 implies ex b1 being Real st b1 = 0 ) & ( not n = 0 implies ex b1 being Real ex l being Element of NAT ex prob28 being Function of NAT ,REAL * st
( l + 1 = n & b1 = (prob28 . l) /. n & prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) ) ) )
proof end;
uniqueness
for b1, b2 being Real holds
( ( n = 0 & b1 = 0 & b2 = 0 implies b1 = b2 ) & ( not n = 0 & ex l being Element of NAT ex prob28 being Function of NAT ,REAL * st
( l + 1 = n & b1 = (prob28 . l) /. n & prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) ) & ex l being Element of NAT ex prob28 being Function of NAT ,REAL * st
( l + 1 = n & b2 = (prob28 . l) /. n & prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) ) implies b1 = b2 ) )
proof end;
end;

:: deftheorem Def6 defines Prob28 ASYMPT_1:def 6 :
for n being Element of NAT
for a, b being positive Real
for b4 being Real holds
( ( n = 0 implies ( b4 = Prob28 n,a,b iff b4 = 0 ) ) & ( not n = 0 implies ( b4 = Prob28 n,a,b iff ex l being Element of NAT ex prob28 being Function of NAT ,REAL * st
( l + 1 = n & b4 = (prob28 . l) /. n & prob28 . 0 = <*a*> & ( for n being Element of NAT ex n1 being Element of NAT st
( n1 = [/(((n + 1) + 1) / 2)\] & prob28 . (n + 1) = (prob28 . n) ^ <*((4 * ((prob28 . n) /. n1)) + (b * ((n + 1) + 1)))*> ) ) ) ) ) );

definition
let a be positive Real, b be positive Real;
func seq_prob28 c1,c2 -> Real_Sequence means :Def7: :: ASYMPT_1:def 7
for n being Element of NAT holds it . n = Prob28 n,a,b;
existence
ex b1 being Real_Sequence st
for n being Element of NAT holds b1 . n = Prob28 n,a,b
proof end;
uniqueness
for b1, b2 being Real_Sequence st ( for n being Element of NAT holds b1 . n = Prob28 n,a,b ) & ( for n being Element of NAT holds b2 . n = Prob28 n,a,b ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines seq_prob28 ASYMPT_1:def 7 :
for a, b being positive Real
for b3 being Real_Sequence holds
( b3 = seq_prob28 a,b iff for n being Element of NAT holds b3 . n = Prob28 n,a,b );

Lemma206: for n being Element of NAT st n >= 2 holds
[/(n / 2)\] < n
proof end;

Lemma207: for a, b being positive Real holds
( Prob28 0,a,b = 0 & Prob28 1,a,b = a & ( for n being Element of NAT st n >= 2 holds
ex n1 being Element of NAT st
( n1 = [/(n / 2)\] & Prob28 n,a,b = (4 * (Prob28 n1,a,b)) + (b * n) ) ) )
proof end;

theorem Th36: :: ASYMPT_1:36
for a, b being positive Real holds seq_prob28 a,b is eventually-nondecreasing
proof end;

definition
func POWEROF2SET -> non empty Subset of NAT equals :: ASYMPT_1:def 8
{ (2 to_power n) where n is Element of NAT : verum } ;
coherence
{ (2 to_power n) where n is Element of NAT : verum } is non empty Subset of NAT
proof end;
end;

:: deftheorem Def8 defines POWEROF2SET ASYMPT_1:def 8 :
POWEROF2SET = { (2 to_power n) where n is Element of NAT : verum } ;

Lemma210: for n being Element of NAT st n >= 2 holds
n ^2 > n + 1
proof end;

Lemma211: for n being Element of NAT st n >= 1 holds
(2 to_power (n + 1)) - (2 to_power n) > 1
proof end;

Lemma212: for n being Element of NAT st n >= 2 holds
not (2 to_power n) - 1 in POWEROF2SET
proof end;

theorem Th37: :: ASYMPT_1:37
for f being Real_Sequence st ( for n being Element of NAT holds
( ( n in POWEROF2SET implies f . n = n ) & ( not n in POWEROF2SET implies f . n = 2 to_power n ) ) ) holds
( f in Big_Theta (seq_n^ 1),POWEROF2SET & not f in Big_Theta (seq_n^ 1) & seq_n^ 1 is smooth & not f is eventually-nondecreasing )
proof end;

theorem Th38: :: ASYMPT_1:38
for f, g being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = n to_power (2 to_power [\(log 2,n)/]) ) & g . 0 = 0 & ( for n being Element of NAT st n > 0 holds
g . n = n to_power n ) holds
ex s being eventually-positive Real_Sequence st
( s = g & f in Big_Theta s,POWEROF2SET & not f in Big_Theta s & f is eventually-nondecreasing & s is eventually-nondecreasing & not s is_smooth_wrt 2 )
proof end;

theorem Th39: :: ASYMPT_1:39
for g being Real_Sequence st ( for n being Element of NAT holds
( ( n in POWEROF2SET implies g . n = n ) & ( not n in POWEROF2SET implies g . n = n to_power 2 ) ) ) holds
ex s being eventually-positive Real_Sequence st
( s = g & seq_n^ 1 in Big_Theta s,POWEROF2SET & not seq_n^ 1 in Big_Theta s & s taken_every 2 in Big_Oh s & seq_n^ 1 is eventually-nondecreasing & not s is eventually-nondecreasing )
proof end;

Lemma216: for n being Element of NAT st n >= 2 holds
n ! > 1
proof end;

Lemma217: for n1, n being Element of NAT st n <= n1 holds
n ! <= n1 !
proof end;

Lemma218: for k being Element of NAT st k >= 1 holds
ex n being Element of NAT st
( n ! <= k & k < (n + 1) ! & ( for m being Element of NAT st m ! <= k & k < (m + 1) ! holds
m = n ) )
proof end;

definition
let x be Element of NAT ;
func Step1 c1 -> Element of NAT means :Def9: :: ASYMPT_1:def 9
ex n being Element of NAT st
( n ! <= x & x < (n + 1) ! & it = n ! ) if x <> 0
otherwise it = 0;
consistency
for b1 being Element of NAT holds verum
;
existence
( ( x <> 0 implies ex b1, n being Element of NAT st
( n ! <= x & x < (n + 1) ! & b1 = n ! ) ) & ( not x <> 0 implies ex b1 being Element of NAT st b1 = 0 ) )
proof end;
uniqueness
for b1, b2 being Element of NAT holds
( ( x <> 0 & ex n being Element of NAT st
( n ! <= x & x < (n + 1) ! & b1 = n ! ) & ex n being Element of NAT st
( n ! <= x & x < (n + 1) ! & b2 = n ! ) implies b1 = b2 ) & ( not x <> 0 & b1 = 0 & b2 = 0 implies b1 = b2 ) )
proof end;
end;

:: deftheorem Def9 defines Step1 ASYMPT_1:def 9 :
for x, b2 being Element of NAT holds
( ( x <> 0 implies ( b2 = Step1 x iff ex n being Element of NAT st
( n ! <= x & x < (n + 1) ! & b2 = n ! ) ) ) & ( not x <> 0 implies ( b2 = Step1 x iff b2 = 0 ) ) );

Lemma220: for n being Element of NAT st n >= 3 holds
n ! > n
proof end;

theorem Th40: :: ASYMPT_1:40
for f being Real_Sequence st ( for n being Element of NAT holds f . n = Step1 n ) holds
ex s being eventually-positive Real_Sequence st
( s = f & f is eventually-nondecreasing & ( for n being Element of NAT holds f . n <= (seq_n^ 1) . n ) & not s is smooth )
proof end;

Lemma222: (seq_n^ 1) - (seq_const 1) is eventually-positive
proof end;

theorem Th41: :: ASYMPT_1:41
for F being eventually-nonnegative Real_Sequence st F = (seq_n^ 1) - (seq_const 1) holds
(Big_Theta F) + (Big_Theta (seq_n^ 1)) = Big_Theta (seq_n^ 1)
proof end;

theorem Th42: :: ASYMPT_1:42
ex F being FUNCTION_DOMAIN of NAT , REAL st
( F = {(seq_n^ 1)} & ( for n being Element of NAT holds (seq_n^ (- 1)) . n <= (seq_n^ 1) . n ) & not seq_n^ (- 1) in F to_power (Big_Oh (seq_const 1)) )
proof end;

theorem Th43: :: ASYMPT_1:43
for c being non negative Real
for x, f being eventually-nonnegative Real_Sequence st ex e being Real ex N being Element of NAT st
( e > 0 & ( for n being Element of NAT st n >= N holds
f . n >= e ) ) & x in Big_Oh (c + f) holds
x in Big_Oh f
proof end;

theorem Th44: :: ASYMPT_1:44
2 to_power 2 = 4 by ;

theorem Th45: :: ASYMPT_1:45
2 to_power 3 = 8 by ;

theorem Th46: :: ASYMPT_1:46
2 to_power 4 = 16 by ;

theorem Th47: :: ASYMPT_1:47
2 to_power 5 = 32 by ;

theorem Th48: :: ASYMPT_1:48
2 to_power 6 = 64 by ;

theorem Th49: :: ASYMPT_1:49
2 to_power 12 = 4096 by ;

theorem Th50: :: ASYMPT_1:50
for n being Element of NAT st n >= 3 holds
n ^2 > (2 * n) + 1 by ;

theorem Th51: :: ASYMPT_1:51
for n being Element of NAT st n >= 10 holds
2 to_power (n - 1) > (2 * n) ^2 by ;

theorem Th52: :: ASYMPT_1:52
for n being Element of NAT st n >= 9 holds
(n + 1) to_power 6 < 2 * (n to_power 6) by ;

theorem Th53: :: ASYMPT_1:53
for n being Element of NAT st n >= 30 holds
2 to_power n > n to_power 6 by ;

theorem Th54: :: ASYMPT_1:54
for x being Real st x > 9 holds
2 to_power x > (2 * x) ^2 by ;

theorem Th55: :: ASYMPT_1:55
ex N being Element of NAT st
for n being Element of NAT st n >= N holds
(sqrt n) - (log 2,n) > 1 by ;

theorem Th56: :: ASYMPT_1:56
for a, b, c being Real st a > 0 & c > 0 & c <> 1 holds
a to_power b = c to_power (b * (log c,a)) by ;

theorem Th57: :: ASYMPT_1:57
(4 + 1) ! = 120 by ;

theorem Th58: :: ASYMPT_1:58
5 to_power 5 = 3125 by ;

theorem Th59: :: ASYMPT_1:59
4 to_power 4 = 256 by ;

theorem Th60: :: ASYMPT_1:60
for n being Element of NAT holds ((n ^2 ) - n) + 1 > 0 by ;

theorem Th61: :: ASYMPT_1:61
for n being Element of NAT st n >= 2 holds
n ! > 1 by ;

theorem Th62: :: ASYMPT_1:62
for n1, n being Element of NAT st n <= n1 holds
n ! <= n1 ! by ;

theorem Th63: :: ASYMPT_1:63
for k being Element of NAT st k >= 1 holds
ex n being Element of NAT st
( n ! <= k & k < (n + 1) ! & ( for m being Element of NAT st m ! <= k & k < (m + 1) ! holds
m = n ) ) by ;

theorem Th64: :: ASYMPT_1:64
for n being Element of NAT st n >= 2 holds
[/(n / 2)\] < n by ;

theorem Th65: :: ASYMPT_1:65
for n being Element of NAT st n >= 3 holds
n ! > n by ;

theorem Th66: :: ASYMPT_1:66
(seq_n^ 1) - (seq_const 1) is eventually-positive by ;

theorem Th67: :: ASYMPT_1:67
for n being Element of NAT st n >= 2 holds
2 to_power n > n + 1 by ;

theorem Th68: :: ASYMPT_1:68
for a being logbase Real
for f being Real_Sequence st a > 1 & f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = log a,n ) holds
f is eventually-positive by ;

theorem Th69: :: ASYMPT_1:69
for f, g being eventually-nonnegative Real_Sequence holds
( ( f in Big_Oh g & g in Big_Oh f ) iff Big_Oh f = Big_Oh g ) by ;

theorem Th70: :: ASYMPT_1:70
for a, b, c being Real st 0 < a & a <= b & c >= 0 holds
a to_power c <= b to_power c by ;

theorem Th71: :: ASYMPT_1:71
for n being Element of NAT st n >= 4 holds
(2 * n) + 3 < 2 to_power n by ;

theorem Th72: :: ASYMPT_1:72
for n being Element of NAT st n >= 6 holds
(n + 1) ^2 < 2 to_power n by ;

theorem Th73: :: ASYMPT_1:73
for c being Real st c > 6 holds
c ^2 < 2 to_power c by ;

theorem Th74: :: ASYMPT_1:74
for e being positive Real
for f being Real_Sequence st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = log 2,(n to_power e) ) holds
( f /" (seq_n^ e) is convergent & lim (f /" (seq_n^ e)) = 0 ) by ;

theorem Th75: :: ASYMPT_1:75
for e being Real st e > 0 holds
( seq_logn /" (seq_n^ e) is convergent & lim (seq_logn /" (seq_n^ e)) = 0 ) by ;

theorem Th76: :: ASYMPT_1:76
for f being Real_Sequence
for N being Element of NAT st ( for n being Element of NAT st n <= N holds
f . n >= 0 ) holds
Sum f,N >= 0 by ;

theorem Th77: :: ASYMPT_1:77
for f, g being Real_Sequence
for N being Element of NAT st ( for n being Element of NAT st n <= N holds
f . n <= g . n ) holds
Sum f,N <= Sum g,N by ;

theorem Th78: :: ASYMPT_1:78
for f being Real_Sequence
for b being Real st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = b ) holds
for N being Element of NAT holds Sum f,N = b * N by ;

theorem Th79: :: ASYMPT_1:79
for f being Real_Sequence
for N, M being Element of NAT holds (Sum f,N,M) + (f . (N + 1)) = Sum f,(N + 1),M by ;

theorem Th80: :: ASYMPT_1:80
for f, g being Real_Sequence
for M, N being Element of NAT st N >= M + 1 & ( for n being Element of NAT st M + 1 <= n & n <= N holds
f . n <= g . n ) holds
Sum f,N,M <= Sum g,N,M by ;

theorem Th81: :: ASYMPT_1:81
for n being Element of NAT holds [/(n / 2)\] <= n by ;

theorem Th82: :: ASYMPT_1:82
for f being Real_Sequence
for b being Real
for N being Element of NAT st f . 0 = 0 & ( for n being Element of NAT st n > 0 holds
f . n = b ) holds
for M being Element of NAT holds Sum f,N,M = b * (N - M) by ;

theorem Th83: :: ASYMPT_1:83
for f, g being Real_Sequence
for N being Element of NAT
for c being Real st f is convergent & lim f = c & ( for n being Element of NAT st n >= N holds
f . n = g . n ) holds
( g is convergent & lim g = c ) by ;

theorem Th84: :: ASYMPT_1:84
for n being Element of NAT st n >= 1 holds
((n ^2 ) - n) + 1 <= n ^2 by ;

theorem Th85: :: ASYMPT_1:85
for n being Element of NAT st n >= 1 holds
n ^2 <= 2 * (((n ^2 ) - n) + 1) by ;

theorem Th86: :: ASYMPT_1:86
for e being Real st 0 < e & e < 1 holds
ex N being Element of NAT st
for n being Element of NAT st n >= N holds
(n * (log 2,(1 + e))) - (8 * (log 2,n)) > 8 * (log 2,n) by ;

theorem Th87: :: ASYMPT_1:87
for n being Element of NAT st n >= 10 holds
(2 to_power (2 * n)) / (n ! ) < 1 / (2 to_power (n - 9)) by Lemma47;

theorem Th88: :: ASYMPT_1:88
for n being Element of NAT st n >= 3 holds
2 * (n - 2) >= n - 1 by ;

theorem Th89: :: ASYMPT_1:89
for c being real number st c >= 0 holds
c to_power (1 / 2) = sqrt c by ;

theorem Th90: :: ASYMPT_1:90
ex N being Element of NAT st
for n being Element of NAT st n >= N holds
n - ((sqrt n) * (log 2,n)) > n / 2 by ;

theorem Th91: :: ASYMPT_1:91
for s being Real_Sequence st ( for n being Element of NAT holds s . n = (1 + (1 / (n + 1))) to_power (n + 1) ) holds
s is non-decreasing by ;

theorem Th92: :: ASYMPT_1:92
for n being Element of NAT st n >= 1 holds
((n + 1) / n) to_power n <= ((n + 2) / (n + 1)) to_power (n + 1) by ;

theorem Th93: :: ASYMPT_1:93
for k, n being Element of NAT st k <= n holds
n choose k >= ((n + 1) choose k) / (n + 1) by ;

theorem Th94: :: ASYMPT_1:94
for f being Real_Sequence st ( for n being Element of NAT holds f . n = log 2,(n ! ) ) holds
for n being Element of NAT holds f . n = Sum seq_logn ,n by ;

theorem Th95: :: ASYMPT_1:95
for n being Element of NAT st n >= 4 holds
n * (log 2,n) >= 2 * n by ;

theorem Th96: :: ASYMPT_1:96
for a, b being positive Real holds
( Prob28 0,a,b = 0 & Prob28 1,a,b = a & ( for n being Element of NAT st n >= 2 holds
ex n1 being Element of NAT st
( n1 = [/(n / 2)\] & Prob28 n,a,b = (4 * (Prob28 n1,a,b)) + (b * n) ) ) ) by ;

theorem Th97: :: ASYMPT_1:97
for n being Element of NAT st n >= 2 holds
n ^2 > n + 1 by ;

theorem Th98: :: ASYMPT_1:98
for n being Element of NAT st n >= 1 holds
(2 to_power (n + 1)) - (2 to_power n) > 1 by ;

theorem Th99: :: ASYMPT_1:99
for n being Element of NAT st n >= 2 holds
not (2 to_power n) - 1 in POWEROF2SET by ;

theorem Th100: :: ASYMPT_1:100
for n, k being Element of NAT st k >= 1 & n ! <= k & k < (n + 1) ! holds
Step1 k = n ! by ;

theorem Th101: :: ASYMPT_1:101
for a, b, c being Real st a > 1 & b >= a & c >= 1 holds
log a,c >= log b,c by ;