reserve c, c1, c2, d, d1, d2, e, y for Real,
  k, n, m, N, n1, N0, N1, N2, N3, M for Element of NAT,
  x for set;

theorem :: (Part 5, O(n^8) c O((1+e)^n))
  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
  set f = seq_n^(8);
  let e be Real such that
A1: 0 < e and
A2: e < 1;
  consider N such that
A3: for n st n >= N holds n*log(2,1+e) - 8*log(2,n) > 8*log(2,n) by A1,A2,Lm25;
  set g = seq_a^(1+e,1,0);
  set h = f/"g;
  reconsider g as eventually-positive Real_Sequence by A1;
  take g;
  thus g = seq_a^(1+e,1,0);
A4: now
    let p be Real such that
A5: p > 0;
    reconsider p1 = p as Real;
A6: ((1/p1) to_power (1/8)) > 0 by A5,POWER:34;
    set N1 = max( N, max([/((1/p1) to_power (1/8))\], 2) );
A7: N1 >= N by XXREAL_0:25;
A8: N1 is Integer
    proof
      per cases by XXREAL_0:16;
      suppose
        N1 = N;
        hence thesis;
      end;
      suppose
        N1 = max([/((1/p) to_power (1/8))\], 2);
        hence thesis by XXREAL_0:16;
      end;
    end;
A9: N1 >= max([/((1/p) to_power (1/8))\], 2) by XXREAL_0:25;
    max([/((1/p) to_power (1/8))\], 2) >= [/((1/p) to_power (1/8))\] by
XXREAL_0:25;
    then
A10: N1 >= [/((1/p) to_power (1/8))\] by A9,XXREAL_0:2;
    N1 in NAT by A7,A8,INT_1:3;
    then reconsider N1 as Nat;
    take N1;
    let n be Nat;
A11:  n in NAT by ORDINAL1:def 12;
    assume
A12: n >= N1;
    then n >= N by A7,XXREAL_0:2;
    then ((n*log(2,1+e)) - (8*log(2,n))) > (8*log(2,n)) by A3,A11;
    then
A13: 2 to_power ((n*log(2,1+e)) - (8*log(2,n))) > 2 to_power (8*log(2,n))
    by POWER:39;
A14: max([/((1/p) to_power (1/8))\], 2) >= 2 by XXREAL_0:25;
A15: g.n = ((1+e) to_power (1*n + 0)) by Def1;
    h.n = f.n/g.n by Lm4;
    then
A16: h.n = (n to_power 8) / ((1+e) to_power n) by A9,A14,A12,A15,Def3
      .= (2 to_power (8*log(2,n))) / ((1+e) to_power n) by A9,A14,A12,Lm3
      .= (2 to_power (8*log(2,n))) / (2 to_power (n*log(2,1+e))) by A1,Lm3
      .= (2 to_power ((8*log(2,n)) - (n*log(2,1+e)))) by POWER:29
      .= (2 to_power -((n*log(2,1+e)) - (8*log(2,n))));
    [/((1/p) to_power (1/8))\] >= ((1/p) to_power (1/8)) by INT_1:def 7;
    then N1 >= ((1/p) to_power (1/8)) by A10,XXREAL_0:2;
    then n >= ((1/p) to_power (1/8)) by A12,XXREAL_0:2;
    then n to_power 8 >= ((1/p) to_power (1/8)) to_power 8 by A6,Lm6;
    then n to_power 8 >= (1/p1) to_power ((1/8)*8) by A5,POWER:33;
    then n to_power 8 >= 1/p1 by POWER:25;
    then 1 / (n to_power 8) <= 1 / (p") by A5,XREAL_1:85;
    then 1 / (2 to_power (8*log(2,n))) <= p by A9,A14,A12,Lm3;
    then
A17: 2 to_power -(8*log(2,n)) <= p by POWER:28;
    2 to_power (8*log(2,n)) > 0 by POWER:34;
    then
    1 / (2 to_power ((n*log(2,1+e)) - (8*log(2,n)))) < 1 / (2 to_power (8
    *log(2,n))) by A13,XREAL_1:88;
    then
    2 to_power -((n*log(2,1+e)) - (8*log(2,n))) < 1 / (2 to_power (8*log(
    2,n))) by POWER:28;
    then h.n < 2 to_power -(8*log(2,n)) by A16,POWER:28;
    then
A18: h.n < p by A17,XXREAL_0:2;
    h.n > 0 by A16,POWER:34;
    hence |.h.n-0.| < p by A18,ABSVALUE:def 1;
  end;
  then
A19: h is convergent by SEQ_2:def 6;
  then
A20: lim h = 0 by A4,SEQ_2:def 7;
  then not g in Big_Oh(f) by A19,ASYMPT_0:16;
  then
A21: not f in Big_Omega(g) by ASYMPT_0:19;
  f in Big_Oh(g) by A19,A20,ASYMPT_0:16;
  hence thesis by A21,Th4;
end;
