:: Asymptotic notation. Part II: Examples and Problems
:: by Richard Krueger, Piotr Rudnicki and Paul Shelley
::
:: Received November 4, 1999
:: Copyright (c) 1999 Association of Mizar Users


Lm1: for n being Nat st n >= 2 holds
2 to_power n > n + 1
proof end;

theorem :: 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;

Lm2: 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 :: 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, b, c be Real;
func seq_a^ a,b,c -> 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, c be Real;
cluster seq_a^ a,b,c -> eventually-positive ;
coherence
seq_a^ a,b,c is eventually-positive
proof end;
end;

Lm3: 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 :: 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^ a -> 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^ a -> eventually-positive ;
coherence
seq_n^ a is eventually-positive
proof end;
end;

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

Lm5: 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;

Lm6: 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;

Lm8: 2 to_power 3 = 8
by POWER:69;

Lm9: 2 to_power 4 = 16
by POWER:70;

Lm10: 2 to_power 5 = 32
by POWER:71;

Lm11: 2 to_power 6 = 64
by POWER:72;

Lm12: for n being Nat st n >= 4 holds
(2 * n) + 3 < 2 to_power n
proof end;

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

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

Lm15: 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;

Lm16: 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 :: ASYMPT_1:6
( seq_n^ (1 / 2) in Big_Omega seq_logn & not seq_logn in Big_Omega (seq_n^ (1 / 2)) )
proof end;

Lm17: 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;

Lm18: 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;

Lm19: 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;

Lm20: for f being Real_Sequence
for N, M being Nat holds (Sum f,N,M) + (f . (N + 1)) = Sum f,(N + 1),M
proof end;

Lm21: 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;

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

Lm23: 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 :: 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 :: 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 b -> Real_Sequence equals :: ASYMPT_1:def 4
NAT --> b;
coherence
NAT --> b is Real_Sequence
proof end;
end;

:: deftheorem 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;

Lm24: 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 :: 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 :: ASYMPT_1:11
seq_n^ 2 in Big_Oh (seq_n^ 3)
proof end;

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

theorem :: 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! a -> 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! a -> eventually-positive ;
coherence
seq_n! a is eventually-positive
proof end;
end;

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

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

theorem :: 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 :: 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 :: 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 :: 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 :: 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 :: 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;

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

Lm28: 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;

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

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

Lm31: 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 :: 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 :: 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 :: 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 :: 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 :: 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;

Lm32: 2 to_power 12 = 4096
proof end;

Lm33: for n being Nat st n >= 3 holds
n ^2 > (2 * n) + 1
proof end;

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

Lm35: for n being Nat st n >= 9 holds
(n + 1) to_power 6 < 2 * (n to_power 6)
proof end;

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

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

Lm38: 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;

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

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

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

Lm42: 5 to_power 5 = 3125
proof end;

Lm43: 4 to_power 4 = 256
proof end;

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

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

Lm46: 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;

Lm47: 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;

Lm48: 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 :: 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 :: 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 :: 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 :: 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 :: 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 :: 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 :: 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;

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

theorem :: 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;

Lm50: 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;

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

theorem :: 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 :: 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 ;
:: original: .
redefine func f . n -> FinSequence of REAL ;
coherence
f . n is FinSequence of REAL
proof end;
end;

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

definition
canceled;
canceled;
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 ASYMPT_1:def 6 :
canceled;

:: deftheorem ASYMPT_1:def 7 :
canceled;

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

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

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

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

theorem :: ASYMPT_1:36
canceled;

theorem :: 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 :: 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 :: 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;

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

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

Lm60: 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 x -> 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 ) ) );

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

theorem :: 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;

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

theorem :: 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 :: 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 :: 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 :: ASYMPT_1:44
canceled;

theorem :: ASYMPT_1:45
canceled;

theorem :: ASYMPT_1:46
canceled;

theorem :: ASYMPT_1:47
canceled;

theorem :: ASYMPT_1:48
canceled;

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

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

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

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

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

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

theorem :: 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 Lm38;

theorem :: 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 Lm3;

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

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

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

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

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

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

theorem :: 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 Lm60;

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

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

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

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

theorem :: 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 Lm2;

theorem :: 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 Lm5;

theorem :: 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 Lm6;

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

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

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

theorem :: 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 Lm15;

theorem :: 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 Lm16;

theorem :: 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 Lm17;

theorem :: 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 Lm18;

theorem :: 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 Lm19;

theorem :: 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 Lm20;

theorem :: 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 Lm21;

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

theorem :: 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 Lm23;

theorem :: 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 Lm28;

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

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

theorem :: 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 Lm31;

theorem :: 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 Lm40;

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

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

theorem :: 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 Lm46;

theorem :: 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 Lm47;

theorem :: 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 Lm48;

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

theorem :: 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 Lm50;

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

theorem :: ASYMPT_1:96
canceled;

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

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

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

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

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