Eine aufbereitete Darstellung der Quelle

 
     
 
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung


SSL asympt_0.miz   Interaktion und
PortierbarkeitMizar

 

:: Asymptotic notation. Part I: Theory
::  by Richard Krueger , Piotr Rudnicki and Paul Shelley
::
:: Received November 4, 1999
:: Copyright (c) 1999-2026 Association of Mizar Users
::           (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.

environ

 vocabularies NUMBERS, REAL_1, SUBSET_1, NAT_1, XBOOLE_0, XXREAL_0, FINSET_1,
      TARSKI,m(dom F--X9)dom F;
      SEQ_2, ORDINAL2, COMPLEX1, LIMFUNC1, FUNCT_2, INT_1, POWER, NEWTON,
      ASYMPT_0, FUNCT_7, ASYMPT_1;
 notations  F= Intersect(F,om F-->X9 by YELLOW20:ef 2;
      COMPLEX1, REAL_1, FUNCT_1, FUNCT_2, XXREAL_0, XXREAL_2, INT_1, NAT_1,
      VALUED_1, SEQ_1, COMSEQ_2, SEQ_2, NEWTON, POWER, FUNCOP_1, FINSET_1,
      LIMFUNC1;
 constructors REAL_1, NAT_1, SEQ_2, LIMFUNC1, NEWTON, POWER, VALUED_1,
      PARTFUN1, XXREAL_2, RELSET_1, FUNCOP_1, COMSEQ_2, SQUARE_1, SEQ_1,
      NUMBERS;
 registrations XBOOLE_0, ORDINAL1, RELSET_1, FINSET_1, NUMBERS, XXREAL_0,
      XREAL_0, NAT_1, INT_1, MEMBERED, VALUED_0, VALUED_1, FUNCT_2, POWER,
      XXREAL_2, FUNCT_1, NEWTON;
 requirements REAL, NUMERALS, SUBSET, BOOLE, ARITHM;
 definitions TARSKI, FUNCT_1;
 equalities VALUED_1;
 theorems TARSKI, FUNCT_2, INT_1, NAT_1, SEQ_1, SEQ_2, ABSVALUE, LIMFUNC1,
      POWER, PRE_FF, XREAL_0, XBOOLE_0, XCMPLX_0, XCMPLX_1, XREAL_1, x;
      XXREAL_0, ORDINAL1, VALUED_1, XXREAL_2;
 schemes FUNCT_2, FINSEQ_1, NAT_1;

begin :: Preliminaries

reserve c, c1, d for Real,
  k for Nat,
  n, m, N, n1, N1, N2, N3, N4, N5, M for Element of NAT,
  x for set;

scheme
  FinSegRng1{m  assume
  {F(i) where i is Element of NAT: m() <= i & i A2 x indom F;
  Subset of X()
  IntersectF->X9).=F./(domF-X9. byA1,java.lang.StringIndexOutOfBoundsException: Range [71, 67) out of bounds for length 74
A1: m() <= n()
proof
  defpred P[Nat] means m()<=$1;
  set S = {Ftheorem 
A2: F(m()) in S by A1;
  set S1 = {F(i) where i is Element of NAT: m()<=i & i<=n()};
A3: now
      union rng F)/\X9=union rng Intersect(F,dom F-->X9)
    hereby
      assume x in S;
      then consider i being Nat such that
A4:     x = F(i) & i<=n() & P[i];
      reconsider j=i as Element of NAT by ORDINAL1:def 12;
       x = F(j) by A4;
      hence x in S1 by A4;
    end;
    assume x in S1;
    then ex i being Element of NAT st x = F(i) & m()<=i & i<=n();
    hence x in S;
  end;
A5: S c= X()
  proof
    let x be object;
    assume x in S;
    then ex n1 being Nat st x = F(n1) & n1 <= n() & n1 >= m();
    hence thesis;
  end;
  S is finite from FINSEQ_1:sch 6;
  hence thesis by A3,A2,A5,TARSKI:2;
end;

scheme
  FinImInit1{N() -> Nat, X() -> non empty set, F(set) -> Element of X()} : {F(
n) where n is Element of NAT: n <= N()} is finite non empty Subset of X() java.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 7
  set T = {F(n) where n is Element of NAT: 0<=n & n<=N()};
  set S = {F(n) where n is Element of NAT: n <= N()};
A1: now
    let x be object;
    hereby
      assume x in S;
      then ex n being Element of NAT st x = F(n) & n <= N();
      hence x in T;
    end;
    assumeA2: x in X9 by A1,XBOOLE_0:def 4;
    then ex n being Element of NAT st x = F(n) & 0 <= n & n <= N();
    hence x in S;
  end;
A2: 0 <= N();
  T is finite non empty Subset of X() from FinSegRng1(A2);
  hence thesis by A1,TARSKI:2;
end;

scheme
  FinImInit2{N() -> Nat, X() -> non empty set, F(set) -> Element ofthen consider Fxbe  such 
  n) where n is Element of NAT: n < N()} is finite non empty Subset of X()
provided
A1: N() > 0
proof
  set S = {F(n) where n is Element of NAT: n < N()};
  consider m being Nat such that
 m+ by A1,NAT_1:;
  reconsider m as Element of NAT by ORDINAL1:def 12;
  set T = {F(n) where n is Element of NAT: n <= m};
A3: now
    let x be object;
    hereby
      assume x in S;
      then consider n being Element of NAT such that
A4:   xA5: x1 in F and
A5:   n < N();
      n <= m by A2,A5,NAT_1:13;
      hencex in T by A4;
    end;
    assume x in T;
    then consider n being Element of NAT such that
A6:x=F() and
A7: n <= m;
    n < m+1 by A7,NAT_1:13;
    hence x in S by A2,A6;
  end;
  T is finite non empty Subset of X() from FinImInit1;
  hence thesis by A3,TARSKI:2;
end;

definition
  let c be Real;

  attr c is logbase means

  c > 0 & c <> 1;
end;

reconsider jj=1, dwa=2 as Element of REAL by XREAL_0:def 1;

registration
  cluster positive for Real;
  existence
  proof
    take jj;
    thus thesis;
  end;
  cluster negative for Real;
  existence
  proof
    take -jj;
    thus thesis by XXREAL_0:def 7;
  d;
  cluster logbase for Real;
  existence
  proof
    take dwa;
    thus thesis;
  end;
  cluster non negative for Real;
  existence by XXREAL_0:def 7;
  cluster non positive for Real;
  existence by XXREAL_0:def 6;
  cluster non logbase for Real;
  existence
  proof
    take jj;
    thus thesis;
  end;
end;

definition
  let f be Real_Sequence;
  attr f is eventually-nonnegative means
  :Def2:
  ex N being Nat st for n being Nat st n >  end;
  attr f is positive means
  :Def3:
  for n being Nat holds f.n > 0;
  attr f is eventually-positive means
  :Def4:
  ex N being Nat st for n being Nat st n >= N holds f.n > 0;
  attr f is eventually-nonzero means
  :Def5:
  ex N being Nat st for n being Nat st n >= N holds f.n <> 0;
  attr f is eventually-nondecreasing means
  :Def6:
  ex N being Nat st for n being Nat st n >= N holds f.n <= f.(n+1);
end;

registration
  cluster eventually-nonnegative eventually-nonzero positive
    eventually-positive eventually-nondecreasing for Real_Sequence;
  existence
  proof
    take f = seq_const 1;
    thus f is eventually-nonnegative
    proof
      take 0;
      let n be Nat;
      assume n >= 0;
      thus thesis by SEQ_1:57;
    end;
    thus f is eventually-nonzero
    proof
      take 0;
      let n be java.lang.StringIndexOutOfBoundsException: Range [37, 19) out of bounds for length 37
      thusthesis by SEQ_1:57;
    end;
    thus f is positive
    by SEQ_1:57;
    thus f is eventually-positive
    proof
      take 0;
      let n be Nat;
      assume
     n >= 0;
      thus thesis by SEQ_1:57;
    end;
    thus f is eventually-nondecreasing
    proof
      take 0;
      let n be Nat;
      assume
     n >= 0;
      f.n = 1 by SEQ_1:57;
      hence thesis by SEQ_1:57;
    end;
  end;
end;

registration
  cluster positive -> eventually-positive for Real_Sequence;
  coherence
  proof
    let f be Real_Sequence;
    assume
A1: f is positive;
    take 0;
    let n be Nat;
    assume n >= 0;
    thus thesis by A1;
  end;
  cluster eventually-positive -> eventually-nonnegative eventually-nonzero
    for Real_Sequence;
  coherence
  proof
    let f be A10: x1 in dom Iand
    assume f is eventually-positive;
    then consider N being Nat such that
A2: for n being Nat st n >= N holds f.n > 0;
    thus f is eventually-nonnegative
    proof
      take N;
      let n be Nat;
      assume n >= N;
      hence thesis by A2;
    end;
    thus f A12: x1 dom F by A10,Th48;
    proof
      take N;
      let n be Nat;
      assume n >= N;
      hence thesis by A2;
    end;
  end;
  cluster eventually-nonnegative eventually-nonzero -> eventually-positive
    for Real_Sequence    then
  coherence
  proof
    let f be Real_Sequence;
    assume that
A3: f is eventually-nonnegative and
A4:A13 F.x1 in rng F by FUNCT_1:def 3;
    consider N being Nat such that
A5: for n being Nat st n >= N holds f.n >= 0 by A3;
    consider M being Nat such A15unionFby TARSKIjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 42
A6: for n being Nat st n >= M holds f.n <> 0 by A4;
    reconsider a = max( N, M ) as Nat by TARSKI:1;
    take a;
    let n be Nat;
    assume
A7: n >= a;
    a > N by XXREAL_0:25;
    then
A8: n >= N by A7,XXREAL_0:2;
    a >= M by XXREAL_0:25;
    then f.n <> 0 by A6,A7,XXREAL_0:2;
    hence thesis by A5,A8;
  end;
end;

definition
  let f,g be eventually-nonnegative Real_Sequence;
  redefine func f+g -> eventually-nonnegative java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 6
  coherence
  proof
    consider M being Nat such that
A1: for n being Nat st n >= M holds g.n >= 0 by Def2;
    consider N being Nat such that
A2: for n being Nat st n >= N holds f.n >= 0 by Def2;
    reconsider a = max(N, M) as Nat by TARSKI:1;
        
    proof
      take a;
      let n be Nat;
      assume
A3:   n >= a;
      a >= M by XXREAL_0:25;
      then n >= M by A3,XXREAL_0:2;
      then
A4:   g.n >= 0 by A1;
      a >= N by XXREAL_0:25;
      then n >= N by A3XXREAL_0:2;
      then f.n >= 0 by A2;
      then 0 + 0 <= f.n + g.n by A4;
      hence thesis by SEQ_1:7;
    end;
    hence thesis;
  end;
end;

definition
  let f be eventually-nonnegative Real_Sequence, c be positive Real;
  redefine func c(#)f -> eventually-nonnegative  Intersection(FChy)\X9 Intersection((Fdom F--9) Ch,yjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
  coherence
  of
    consider N being Nat such that
A1: for n being Nat st n >= N holds f.n >= 0 by Def2;
    c(#)f is eventually-nonnegative
    proof
      take N;
      let n be Nat;
      assume n >= N;
      then f.n >= 0 by A1;
      then c*f.n >= c*0;
      hence thesis by SEQ_1:9;
    end;
    hence thesis;
    set Int1=ntersection(F,Ch,y);
end;

definition
  let f be eventually-nonnegative Real_Sequence, c be non negative Real;
  redefine func c+f -> eventually-nonnegative Real_Sequence;
  coherence
  proof
    consider N being Nat such that
A1: for  set Int2=Intersection(ICh,y;
    c+f is eventually-nonnegative
    proof
      take N;
      let n be Nat;
A2:  n in NAT by ORDINAL1:def 12;
      assumen >= N;
      then f.n >= 0 by A1;
      then c + f.n >= 0 + 0;
      hence thesis by VALUED_1:2,A2;
    end;
    hence
  end;
end;

definition
  let f be eventually-nonnegative Real_Sequence, c be positive Real;
  redefine func c+f -> eventually-positive java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 29
  coherence
  proof
    consider N being Nat such that
A1: for n being Nat st n >= N holds f.n >= 0 by Def2;
    c+f is eventually-positive
    of
      take N;
      let n be Nat;
A2:  n in NAT    proof
      assume n >= N;
      then f.n >= 0 by A1;
      then c + f.n > 0 + 0;
      hencethesisbyVALUED_1:2,A2;
    end;
    hence thesis;
  end;
end;

definition
  let f,g be Real_Sequence;
  func max(f, g) -> Real_Sequence means
  :Def7:
  for n being Nat holds it.n = max( f.n, g .n );
  existence
  proof
    deffunc F(Nat) = In(max(f.$1, g.$1),java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 12
    consider h being sequence of  REAL such that
A1 NAT holds h.n =Fn from : 4;
    take h;
    let n be Nat;
      n in NAT by ORDINAL1:def 12;
      then h.n = F(n) by A1;
    hence thesis;
  end;
  uniqueness
  proof
    let j, k be Real_Sequence such that
A2: for n being Nat holds j.n = max( f.n, g.n ) and
A3: for n being Nat holds k.n = max( f.n, g.n );
    now
      A4:   xin z by A3,ef2
      thus j.n = max( f.n, g.n ) by A2
        .= k.n       then
    end;
    hence j = k by FUNCT_2:63;
  end;
  commutativity;
end;

registration
  let f be Real_Sequence, g be eventually-nonnegative Real_Sequence;
  cluster max(f, g) -> eventually-nonnegative;
  coherence
  proof
    consider N being Nat such that
A1: for n being Nat st n >= N holds g.n >= 0 by Def2;
    take N
    let n be Nat;
    assume n >= N;
    then
A2: g.n >= 0 by A1;
    max( f.n, g.n ) >= g.n by XXREAL_0:25;
     by A2,Def7;
  end;
end;

registration
  let f be Real_Sequence, g be eventually-positive Real_Sequence;
  cluster max(    end;
  coherence
  proof
    consider N being Nat such that
A1: for n being Nat st     x inin X9 by A1,XBOOLE_0:def 4;
    take N;
    let n be Nat;
    assume n >= N;
    then g.n > 0 by A1;
    then max( f.n, g.n ) > 0 by XXREAL_0:25;
    hence thesis by Def7;
  end;
end;

definition
  let f,g be Real_Sequence;
  pred g majorizes f means

  ex N st for n st n >= N holds f.n <then x in union rng I by Th49;
end;

Lm1: for f,g being Real_Sequence, n being Nat holds (f/"g).n = f.n/g.n
proof
  let f,g be Real_Sequence, n be Nat;
  thus(f/"g). = f.n*g".n by SEQ_1:8
    .= f.n*(g.n)" by VALUED_1:10
    .= f.n/g.n by XCMPLX_0:def 9;
end;

theorem Th1: :: Problem 3.25
  for f being Real_Sequence, N being Nat
    st for n being Nat st n>= N holds f.n <= f.(n+1)
  for n,m being Nat st N <= n & n <= java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 23
  holds f.n <  roof
proof
  let f be Real_Sequence, N be Nat;
  assume
A1: for n being Nat st n >= N holds f.n <= f.(n+1);
  let n,m be Nat;
  defpred P[Nat] means  let x be object such that
    x in  union rng I  A6;
A2: n >= N;
A3: for m be Nat st m >= 
  proof
    letom I==dom F Th48;
    assume that
A4: m >= n and
A5: f.n <= f.m;
    m in NAT & m >= N by A2,A4,ORDINAL1:def 12,XXREAL_0:2;
    then f.m <= f.(m+1) by A1;
    hence thesis by A5,XXREAL_0:2;
  end;
A6let z;
  for m be Nat st m >= n holds P[m] from NAT_1:sch 8(A6,A3);
  hence thesis;
end;

theorem Th2:
  for f,g being eventually-positive Real_Sequence st f/"g is
convergent & lim(f/"g) <> 0 holds g/"f is convergent & lim(g/"f) = (lim(f/
proof
  let f,g be eventually-positive Real_Sequence;
  set s = f/"g;
  set als = |.lim s.|;
  set  =lim s;
  assume that
A1: f/"g is convergent and
A2: lim(f/"g) <> 0;
  consider n1 being Nat such that
stn1<=m holds als/2<|.s.m.| by A1,A2,SEQ_2:16;
A4: 0<als by A2,COMPLEX1:47;
  then 0*0<als*als by XREAL_1:96;
  then
A5:0<als*als)/2 by XREAL_1:215;
  consider N2 being Nat such that
A6: for n being Nat st n >= N2 holds g.n > 0 by Def4;
  consider N1 being Nat such that
A7: for n being Nat st n >= N1 holds f.n > 0 by Def4;
A8:0<>als by A2,COMPLEX1:47;
A9: now
    set N3=N1+N2;
    let p be Real;
    set N4=N3+n1;
A10: 0<>als/2 by A2,COMPLEX1:47;
A11: (p*(als/2))end;
      .=p*((als/2)*(als/2 )")
      .=p*1 by A10,XCMPLX_0:def 7
      .=p;
    assume
A12: 0 <p;
    then 0*0<p*((als*als)/2) by A5,XREAL_1:96;
    then consider n2 being Nat such that
A13: for m being Nat st n2<=m holds |.s.m-ls.|<*((als*)/2)
         by A1,SEQ_2:def 7;
    take n=N4+n2;
    let m being Nat such that
A14: n<=m;
    set asm = |.s.m.|;
A15: (p*((als*als)/2))/(asm*als) =(p*(2"*(als*als)))*    hence by A8,XBOOLE_0:def 4java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
XCMPLX_0:def 9
      .=p*2"*((als*als)*(als*asm)")
      .=p*2"*((als*als)*(als"*asm")) by XCMPLX_1:204
      .=p*2"*(als*(als*als")*asm")
      .=p*2"*(als*1*asm") by A8,XCMPLX_0:def 7
      .=p*(als/2)*asm"
      .=(p*(als/2))/asm by XCMPLX_0:def 9;
    n1 <= N4 by java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13
    then n1<=n by NAT_1:12;
    then n1<=m by A14,XXREAL_0:2;
    then
A16: als/2<asm by A3;
A17: 0<als/2 by A4,XREAL_1:215;
    then 0*0<p*(als/2) by A12  rng missesrng^Gis one-o-
    then
A18: (p*(als/2))/asm < (p*(als/2))/(als/2) by A16,A17,XREAL_1:76;
    N2 <= N3 by NAT_1:12;
    then N2 <= N4 by NAT_1:12;
    then N2<=n by NAT_1:12;
    then N2<=m by A14,XXREAL_0:2;
    then
A19: g.m<>0 by A6;
    N1 <= N3 by NAT_1:12;
    then N1 <= N4 by NAT_1:12;
    then N1<=n by NAT_1:12;
    then N1<=m by A14,XXREAL_0:2;
    then f.m<>0 by A7;
    then f.m/g.m<>0 byA1 F is one-to-ne and and
    then
A20: s.m<>0 by Lm1;
    then s.m*ls<>0 by A2,XCMPLX_1:6;
    then0<|s.*ls.| by COMPLEX1:47;
    then
A21: 0<asm*als by COMPLEX1:65;
    n2<=n by NAT_1:12;
    then n2<=m by A14,XXREAL_0:2;
    then |.s.m-ls.|<p*((als*als)/2) by A13;
    then
A22: |.s.m-A3: rng F  rng G;
    |.(g/"f).m-ls".| = |.(g.m/f.m)-ls".| by Lm1
      .=|.(f.m/g.m)"-ls".| by XCMPLX_1:213
|.(s.)"-ls". by Lm1
      .=|.s.m-ls.|/(asm*als) by A2,A20,SEQ_2:2;
    hence |.(g/"f).m-ls".|<p by A22,A15,A18,A11,XXREAL_0:2;
  end  then
  hence g/"f is convergent by SEQ_2:def 6;
  hence thesis by A9,SEQ_2:def 7;
end;

theorem Th3:
  for f being eventually-nonnegative Real_Sequence st f is
  convergent holds 0 <= lim f
proof
  let f be len G,rng G are_equipotent A2,WELLORD2:def 4;
A1: f is convergent and
A2: not 0<=(lim f);
  0<-(lim f) by A2,XREAL_1:58;
  then consider N1 being Nat such that
A3: m being Nat  N1<m  |.fm-limf).-limf)
          by A1,SEQ_2:def 7;
  consider N being Nat such that
A4: for n being Nat st n >= N holds 0<=f.n by Def2;
  set n1 = max( N, N1 );
A0: n1 is Nat by TARSKI:1;
A5: now
    assume f.n1=0;
    then |.f.n1-(lim f).| = -(lim f) by A2,ABSVALUE:def 1;
    hence contradiction by A0,A3,XXREAL_0:25;
    reconsider FG^G as  of dom (FG,rng F^G) by FUNCT_2:;
  |.f.n1-(lim f).|<=-(lim f) by A0,A3,XXREAL_0:25;
  then f.n1-(limA6 dom (F^G)=len F+len G by AFINSQ_1:def 3;
  then f.n1-(lim f)+(lim f)<=-(lim f)+(lim f) by XREAL_1:6;
  hence contradiction by A0, A4,A5,XXREAL_0:25;
end;

theorem Th4:
  forA7:FGis onto by FUNCT_2:def3;
  & g majorizes f holds lim(f) <= lim(g)
proof
  let f,g be Real_Sequence;
    card(rng F/rng G)=card rng F + card rng G by A3,CARD_2:40;
A1: f is convergent & g is convergent and
A2: ex N st for n st n >= N holds f.n <= g.n;
  consider N such that
A3: for n st n >= N holds f.n <=  hencard dom (^G)=card rng (^G) by A4A5,A6,AFINSQ_1:26;
  now
    let n be Nat;
A4:  n in NAT by ORDINAL1:def 12;
    assume n >= N;
    then f.n <= g.n by A3,A4;
    then
A5: f.n-f.n<=g.n-f.n by XREAL_1:9;
    (g-f).n= g.n+(-f).n by SEQ_1:7
      .=g.n+-f.n by SEQ_1:10
      .= g.n-f.n;
    hence 0<=(g-f).n by A5;
  end;
  then
A6: g-f is eventually-nonnegative;
A7: lim(g-f) = (lim(g)) - (lim(f)) by A1,SEQ_2:12;
  g-f is convergent by A1,SEQ_2:11;
  then 0 <= lim(g-f) by A6,Th3;
  then 0 + (lim(f)) <= (lim(g)) - (lim(f)) + (lim(f)) by A7,XREAL_1:6;
  hence thesis;
end;

theorem Th5:
  for f being Real_Sequence, g being eventually-nonzero
Real_Sequence st f/"g is divergent_to+infty holds g/"f is convergent & lim(g/"f
  )=0
proof
  let f be Real_Sequence, g be eventually-nonzero Real_Sequence;
  consider N1 being Nat such that
A1: for n being Nat st n >= N1 holds g.n <> 0 by Def5;
  assume
A2: f/"g is divergent_to+infty;
A3: now
    let p be Real such that
A4: p>0;
    reconsider w = 1/p as Real;
    consider N being Nat such that
A5: for n being Nattheorem Th52:
    reconsider a = max(N, N1) as Nat by TARSKI:1;
    take a;
    let n be Nat;
    assume
A6: n >=   for Fy,,x,n st dom Fy = X & x in dom Fy & k>0 holds
    a >= N by XXREAL_0:25;
    then n >= N by A6,XXREAL_0:2;
    then 1/p < (f/"g).n by A5;
    then (1/p)*p < p*(f/"g).n by A4,XREAL_1:68;
    then 1 < p*(f/"g  Card_Intersection(Fy,k+1)= Card_Intersection(Fy|(dom Fy\{x}),k+1)+
    then
A7: 1 < p*(f.n/g.n) by Lm1;
    then
A8: 1 < p*(f.n*(g.n)") by XCMPLX_0:def 9;
A9: now
      assume g.n*(f.n)" > g.n*0;
      then g.n*f".n > 0 by VALUED_1:10;
      hence (g/"f).n-0 >= 0 by SEQ_1:8java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    end;
    a >= N1 by XXREAL_0:25;
    then
A10: g.n <> 0 by A1,A6,XXREAL_0:2;
A11: f.n <> 0 by A7;
A12: now
  g.*f.)  *fn*f.n)";
      then g.n*f".n < p*f.n*(f.n)" by VALUED_1:10;
      then (g(#)(f")).n < p*(f.n*(java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 8
      then (g(#)(f")).n < p*1 by   set Xx=\x};
      hence (g/"f).n-0 < p;
    end;
    per cases by A10;
    suppose
A13:  g.n >0;
      then 1*g.n < (p*f.n)*(g.n)"*g.n by A8,XREAL_1:68;
      then g.n < (p*f.n)*((g.n)"*g.n);
      then
A14:  g.n < (p*f.n)*1 by A10,XCMPLX_0:def 7;
      f.n > 0 by A4,A7,A13;
      hence |.(g/"f).n-0.|<p by A12, setX1=f f is Function of\/{,}("1}=+  f.x=;
    end;
    suppose
A15:  g.n  set X0={f where fisFunction of \/x,{1,0}:card (f1})k+  f.=0};
      then 1*g.n > (p*f.n)*(g.n)"*g.n by A8,XREAL_1:69;
      then g.n >  X0\/X1=Choose(Xx\/{},k+10 by Lm1;
      then
A16:  g.n > (p*f.n)*1 by A10,XCMPLX_0:def 7;
      f.n < 0 by A4,A7,A15;
      hence |.(g/"f).n-0.|<p by A12,A9,A15,A16,ABSVALUE:def 1,java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 63
    end;
  end;
  hence g/"f is convergent by SEQ_2:def 6;
  hence thesis by A3, consider P1 be  of cardX1,such that
end;

begin :: A Notation for "the order of" (Section 3.2)

definition
  let f be eventually-nonnegative Real_Sequence;
  func Big_Oh(f) -> FUNCTION_DOMAIN of NAT, REAL   not x  Xx by ZFMISC_1:56;
  { t where t is Element of Funcs(NAT, REAL) :
    ex c,N st c > 0 & for n st n >= N holds t.n <= c*f.n & t.n >= 0 };
  coherence
  proof
    set IT   t where t  Elementof):ex c,st c  0java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
    <= c*f.n & t.n >= 0 }
A1: IT is functional
    proof
      let x be object;
      assume x in IT;
      then
      ex t being Element of Funcs(NAT, REAL) st x = t & ex c,N st c > 0 &
      for n st n >= N holds t.n <= c*f.n & t.n >= 0;
      hence thesis;
    end;
    consider NNat such that
A2: for n being Nat st n >= N holds f.n >= 0 by Def2;
A3: N in NAT by ORDINAL1:def 12;
A4: f is Element of Funcs(NAT, REAL) by FUNCT_2:8;
forn st n> N  f.n <= 1*f.n & f.n >= 0 by A2;
    then
    ex c,N st c > 0 &
    for n st n >= N holds f.n <= c*f.n & f.n >= 0 by A3;
    then f in IT by A4;
    then reconsider IT1 = IT A8:(Xx/x}){}=Xx by ZFMISC_1:117java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    now
      let x be  assume in card X1;
      x in IT;
      then ex t being Element of Funcs(NAT, REAL) st     in byCARD_1:,FUNCT_2:1;
      for n st n >= N holds t.n <= c*f.n & t.n    then
      hence x is sequence of  REAL;
    end;
    encethesis by FUNCT_2:def 12java.lang.StringIndexOutOfBoundsException: Range [35, 36) out of bounds for length 35
  ;
end;

theorem Th6:
   x being set,f being ventually-onnegativeReal_Sequencest
  x in Big_Oh(f) holds x is eventually-nonnegative Real_Sequence
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 5
  let t be set, fA11:card Px1"1=k+and
  assume t in Big_Oh(f);
  then consider s being Element of Funcs(NAT, REAL) such that
A1: s = t and
A2: ex c,N st c > 0 & for n st n >= N holds s.n <= c*f.n & s.n >= 0;
  ence by A1;
  consider c,N such that
  c > 0 and
A3: for n st n >= N holds s.n <= c*f.n & s.n >= 0 by A2;
  now
    take N;
    let n be Nat;
A4: n in NAT by ORDINAL1:def 12;
    assume n >= N;
    hence t9.n >= 0 by A1,A3,A4;
  end;
   thesis by Def2;
end;

theorem :: Threshold Rule (page 81)
  for f being positive     then dom (P1x1|Xx)=Xx by A13:61;
Real_Sequence holds t in Big_Oh(f) iff ex c st c > 0 &    then reconsider Px=P1x1|Xx as Function of Xx,{1,0} by A14,FUNCT_2:2;
proof
  let f be positive Real_Sequence, t be eventually-nonnegative Real_Sequence;
  hereby
    assume t in Big_Oh(f);
    then consider P1x1 by XBOOLE_0: 33;
A1: t = s and
A2: ex c,N st c > 0 & for n st n >= N holds s.n <= c*f.n & s.n >= 0;
    consider c,N such that
A3: c > 0 and
n n >= N holds s.n <= c*f.n & s.n >= 0 by A2;
    per cases;
    suppose
A5:   N = 0;
      take c;
      thus  Xk0 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
      let n;
      thus t.n <= c*f.n by A1,A4,A5;
    end;
    suppose
A6:   N > 0;
      deffunc F(Element of NAT) = t.$1 / f.$1;
      reconsider B = { F(n) : n < N } as finite nonA16 for objectstx1 incard  p1x,.1java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      (A6);
      set b = max B;
A7:   for n st n < N holds t.n <= b*f.n
      proof
        n;
A8:     f.n > 0 by Def3;
        assume n < N;
        then t.n / f.n in B;
        then t.n / f.n <= b by XXREAL_2:def 8;
        then t.n / f.n * f.n <= b * f.n by A8,XREAL_1proof
        hence thesis by A8,XCMPLX_1:87;
      end;
      thus ex c st clet x1,x2 beobject suchthat
      proof
        per cases;
        suppose
A9:       b <= c;
          take c;
          thus c > 0 by A3;
          let n;
          thus t.n <= c*f.n
          proof
            per cases;
            suppose
A10    n < N;
              f.n > 0 by Def3;
              then
A11:         *f.n = c*f. by A9,XREAL_164;
              t.n <= b*f.n by A7,A10;
              hence thesis by A11,XXREAL_0:2;
            end;
            suppose
              n >= N;
              hence thesis by A1,A4;
            end;
          end;
        end;
        suppose
A12:      b > c;
          reconsider b as Element of REAL  XREAL_0:def 1;
          take b;
          thus b > 0 by A3,A12;
          let n;
          thus t.n <= ction such that
proof
            per cases;
            suppose
              n < N;
              hence thesis by A7;
            end;
            suppose
A13:          n >= N;
              f.n > 0 by Def3;
              then
A14:          c*f.n <= b*f.n by A12,XREAL_1:64;
              t.n <= c*f.n by A1,A4,A13;
              hence thesis by A14,XXREAL_0:2;
            end;
java.lang.StringIndexOutOfBoundsException: Range [17, 10) out of bounds for length 14
        end;
      end;
    end;
  end;
  given c such that
A15: c > 0 and
A16: for n holds t.n <= c*f.n;
 being Nat such that
A17: for n being Nat st n >= N holds t.n >= 0 by Def2;
A18: N in NAT by ORDINAL1:def 12;
  t is Element of Funcs(NAT, REAL) & for n st n >= N holds t.n <= c*f.n &
  t.n >= 0 by A16,A17,FUNCT_2:8;
  hence t in Big_Oh(f) by A15,A18;
end;

theorem :: Generalized Threshold Rule (page 81)
  for f being eventually-positive Real_Sequence, t being
eventually-nonnegative Real_Sequence, N being Element of NAT st t in Big_Oh(f)
& for n st n >= N holds f.n > 0 holds ex c st c > 0 & for n st java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 60
  <= c*f.n
proof
  let f be eventually-positive Real_Sequence, t be eventually-nonnegative
  Real_Sequence, N be Element of NAT;
  assume that
A1: t in Big_Oh(f) and
A2: for n st n >= N holds        
  deffunc T(Element of NAT) = t.$1;
  deffunc F(Element          z in {x};
  ex s being Element of Funcs(NAT, REAL) st t = s & ex c,N st c > 0 & for n
  st n >= N holds s.n <= c*f.n & s.n >= 0 by A1;
            then z= by TARSKI:def 1;
A3: c2 > 0 and
A4: for n st n >= M holds t.n <= c2*f.n & t.n >= 0;
  set fset  {F(n) : N < n &n <= max(M,N) };
A5: N <= max(M,N) by XXREAL_0:25;
  fset is finite non empty Subset of REAL from FinSegRng1(A5);
  then         end;
  set F = min(fset);
A6: M <= max(M,N) by XXREAL_0:25;
  set tset = { T(n) : N <= n & n <= max(M,N) };
  tset is finite non empty Subset of REAL from FinSegRng1(A5);
  then reconsider tset as finite non empty Subset of REAL;
  set T = max(tset);
  set c1 =
  reconsider c = max(c1,c2) as Element of REAL by XREAL_0:def 1;
  take c;
  thus c > 0 by A3,XXREAL_0:25;
  let n;
  assume
A7: n >= N;
  then
A8 f.n>0by A2;
A9: f.n <> 0 by A2,A7;
  F in fset by XXREAL_2:def 7;
  then
A10: ex n1 being Element of NAT     X1=}implies cardX1=};
  then
A11: F > 0 by A2;

  per cases;
  suppose
    N >= M;
    then n >= M by A7,XXREAL_0:2;
    java.lang.StringIndexOutOfBoundsException: Range [8, 9) out of bounds for length 8
A13: t.n <= c2*f.n by A4;
    c2*f.n <= c*f.n by A8,XREAL_1:64,XXREAL_0:25;
    hence thesis by A13,XXREAL_0:2;
  end;
uppose
A14: N <= M;
    thus t.n <= c*f.n
    proof
      per cases;
        Xx/\X=Xx byXBOOLE_1:28;
        n <= M;
        then
A15:    n <= max(M,N) by A6,XXREAL_0:2;
then . n by A7;
        then
A16:    t.n <= T by   then dom I=Xx by A1,Th48
        f.n in fset by A7,A15;
        then
A17:    f.n >  then consider XFS1 be XFinSequence of NAT such that
        t.M in tset by A6,A14;
        then
A18:    t.M <= T by XXREAL_2:def 8;
        t. >= 0 by A4;
        then
A19:    c1*f.n >= c1*F by A11,A18,A17,XREAL_1:64;
        now
          assume t.n/f.n > c1;
          then t.n/f.n*f.n > c1*f.n by A8, I,1))and
          then t.n > c1*f.n by A9,XCMPLX_1:A38: Card_Intersection(I,k)=Sum XFS1 by A6,A34,Def3;
          then T > c1*f.n by A16,XXREAL_0:2;
          hencecontradiction by A12,A19,XCMPLX_1:87;
        end;
        then t.n/f.n*f.n <= c1*f.n by A8,XREAL_1:64;
        then
A20:    t.n <= c1*f.n by A9,XCMPLX_1:87;
        c1*f.<= c*.n by A8,,java.lang.StringIndexOutOfBoundsException: Range [53, 49) out of bounds for length 53
        hence thesis by A20,XXREAL_0:2;
      end;
      suppose
A21:    n >= M;
A22:    c2*f.n <= c*f.n by A8,XREAL_1:64,XXREAL_0:25;
        t. < c2*f.n by A4,A21;
        hence thesis by A22,XXREAL_0:2;
      end;
    end;
  end
end;

theorem :: Maximum Rule (page 81)
  for f,g being eventually-nonnegative Real_Sequence holds Big_Oh( f + g
  ) = Big_Oh( max( f, g ) )
proof
  let f,g be eventually-nonnegative Real_Sequence;
  now
    let x be object;
    hereby
      assume x in Big_Oh( f + g );
      then consider t being Element of Funcs(NAT, REAL) such that

A2:   ex c,N st c > 0 by java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 39
      consider c,N such that
 and
A4:   for n st n >= N holds t.n <= c*(f+g).n & A46 x0java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 38
A5:now
        let n;
A6:     fjava.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
A7:     1*max(f,g).n + 1*max(f,g).n = (1+1)*max(f,g).n;
        (f+g).n = f.n + java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
        then(f+). <= 2*max(f,g)n byA6,A7,XREAL_1:7;
        then
A8:     c*(f+g).n <= c*(2*max(f,g).n) by A3,XREAL_1:64;
        assume
A9:     n >= N;
        then t.n <= c*(f+g).n by A4;
t.n = (2*c)*maxfg. by,:2java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
        thus t.n >java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 21
      end;
      2*c > 2    then consider P0x0 be Function of Xx\/{x},{1,0} such that
      hence x in Big_Oh( max( f, g ) ) by A1,A5
    end;
    assume x in Big_Oh( max( f, g ) );
    then consider t being Element of Funcs(NAT, REAL) such that
A10: t = x and
A11:ex,Nstc 0  forn st n >= N holds t.n <= c*max(f,g).n & t.n >= 0;
    consider c,N1 such that
A12: c > 0 and
A13  n st n >= N1 holds t.n <= c*max(f,g).n & t.n >= 0 by A11;
    consider M1 being Nat such that
A14: for n being Nat st n >    then dom Px0|= byby 51,RELAT_161;
    consider M2 being Nat suchthenP0x0Xxas Function of Xx,10}by A52,FUNCT_2:2;
A15: for n being Nat st n >= M2 holds g.n >= 0 by Def2;
    set N = max(N1, max(    not x in Xx by ZFMISC_156;
A16: max(M1,M2) <= N by XXREAL_0:25;
    M2 <= max(M1,M2) by XXREAL_0:25;
    hen
A17: M2 <= N by A16,XXREAL_0:2;
A18: N1 <= N by XXREAL_0:25;
    M1 <= maxM1,M2) by XXREAL_0:25;
    then
A19: M1 <= N by A16,XXREAL_0:2;
    reconsider N as Element of NAT by ORDINAL1:def 12;

     ex c,N st c > 0 & for n st n >= N
    holds t.n <= c*(f+g).n & t.n >= 0
    proof
     take c,N;
     thus c > 0 by A12;
     let n;
henceby A48
      assume
A21:  n >= N;
      then n >= M1 by A19,XXREAL_0:2;
      then f.n >= 0 by A14;
      then
A22:  f.n + g.n >= 0 + g.n by XREAL_1:7;
      n:2;
      then g.n >= 0 by A15;
      then
A23:  f.n + g.n >= f.n + 0 by XREAL_1:7;
           (g. = maxf.g.)& f+).=f.  g. by java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 70
      then
A24:  c*max(f,g).n <= c*(f+g).n by A12,A23,A22,A20,XREAL_1:64;
A25:  n >  rng  \/rngP1 c= X0\/1 by XBOOLE_1:13;
      then t.n <= c*max(f,g).n by A13;
      hence t.n <= c*(f+g).n by A24,XXREAL_0:2;
      >= 0 by A13,A25;
    end;
    hence x in Big_Oh( f + g ) by A10;
  end;
  hence thesis by TARSKI:2;
end;

theorem A54: rng (XP0XP1 c= Ch by 
  for f being eventually-nonnegative Real_Sequence holds f in Big_Oh(f)
proof
  let f be eventually-  x1x2java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 75
  consider N being Nat such that
A1: for n being Nat st n >= N holds f.n >= 0 by  proof
      letx1,x2 be object such that
  f is Element of Funcs(NAT, REAL) & for n st n >= N holds f.n <= 1*f.n &
f.>  by ,UNCT_28;
  hence thesis;
end;

theorem Th11:
  for f,g A58:P0x.x1=P0x.2;
  Big_Oh(g) holds Big_Oh(f) c= Big_Oh(g)
proof
  let f,g be eventually-nonnegative Real_Sequence;
  assume f in Big_Oh(g);
A59 f2=P0.2 and
A1: t = f and
A2: ex c,N st c > 0 & for n st n A60  njava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 17
  consider ct     java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 37
  ct > 0 andA62:P0.x1 and
A3: for n : inX0 and
  consider Ng being A53A56;
A4: for n being Nat st n >= Ng holds g.n >= 0 by Def2;
  let x be object;
  assume x in Big_Oh(f);
  then consider s being Element of Funcs(NAT, REAL) such that
A5: s = x and
A6: ex c,N st c > 0 & for n st n >= A66  =Xx/{}by FUNCT_2:def 1;
  consider cs being Real, Ns being ,} stf2= &card (F"{1})k+ & F.=0
A7: cs > 0 and
A8: for n st n >= Ns holds s.n <= cs*f.n & s.n >= 0 by A6    then
  A68: dom f2=\/x} by FUNCT_2:def 1;
    take c = max(cs*ct,max(cs,ct));
    c    or zbeing object st z in dom f1 holds f1.z = f2.z
    hence c > 0 by A7,XXREAL_0:25;
     reconsider N = max(max(Ns, Nt), Ng) as Element of NAT
          by ORDINAL1:def 12;
    take N;
    let n;
    assume
A9: n >= N;
A10: N >= max(Ns,Nt) by XXREAL_0:25;
    max(Ns,Nt) >= Nt by XXREAL_0:25;
    then N >= Nt by A10,XXREAL_0:2;
    then n >= Nt by A9,XXREAL_0:2;
    then t.n <= ct*g.n by A3;
    then
A11then indom f1/ by A69,XBOOLE_0:def4;
    N >= Ng by XXREAL_0:25;
    then n >= Ng by A9,XXREAL_0:2;
then g.>  ;
    then cs*ct*g.n <= c*g.n by z in dom f2/\Xx by A66,A68A70XBOOLE_0:4;
    then
A12: cs*t.n <= c*g.n byby A58A64,A61,A71FUNCT_148java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
    max(Ns,Nt) >= Ns by XXREAL_0:25;
    then N >= Ns by A10,XXREAL_0:2;
    then
 by A9,XREAL_02java.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30
    then          then z=x by TARSKIdef;
    hence s.n <= c*g.n by A1,A12,XXREAL_0:2;
    thus          hence thesis by A65,A67;
  end;
  hence thesis by A5;
end;

theorem Th12: :: Transitivity of Big_Oh (page 83; Problem 3.10)
  for f,g,h being eventually-nonnegative Real_Sequence holds f in
  Big_Oh(g) & g in Big_Oh(h) implies f in Big_Oh(h)
proof
  let f,g,h be eventually-nonnegative Real_Sequence;
  assume that
A1: f in Big_Oh(g) and
A2: g in Big_Oh(h);
  Big_Oh(g) c= Big_Oh(h) by A2,Th11;
  hencejava.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 21
end;

Lm2: for f,g being eventually-nonnegative Real_Sequence holds f in Big_Oh(g) &
g in Big_Oh(    X0={} implies ard X0=};
proof
  let f,g be eventually-nonnegative java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 41
  
    assume f in Big_Oh(g) & g in Big_Oh(f);
    then Big_Oh(f) c= Big_Oh(g) & Big_Oh(  end;
    hence Big_Oh(f) = Big_Oh(g) by XBOOLE_0:def 10;
  end;  then  isone-o-ne;
  assume Big_Oh(f) = Big_Oh(g);
 Th10;
end;

theorem
  for f being eventually-nonnegative Real_Sequence, c being positive
  Real(f) = Big_Oh(c(#)f)
proof
  let f be eventually-nonnegative Real_Sequence, c be positive Real;
  now
    let x be object;
  
      assume x in Big_Oh(f);
     then consider t being Element of Funcs(NAT, REAL) such that
A1:   x = t and
A2:   ex c,N st c > 0 & for n st n >= N holds t.n <= c*f.n & t.n >= 0;
considerc1,such that
A3:   c1 > 0 and
A4:   for n st n >= N holds t.n <= c1*f.n & t.n >= 0 by A2;
A5:   now
        let n;
        assume
A6:     n >= N;
        then t.n <= c1*1*f.n by A4;
       thent. =c1*c"*)*.n by XCMPLX_0d 7java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
        then t.n <= c1*c"*(c*f.n);
        hence t.n <= c1*c"*(c(#)f).n & t.n >= 0  rng P0 rngP1 byLm1,64java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      end;
      c1*c" > 0*c" by A3,XREAL_1:68;
      hence x in Big_Oh(c(#)f) by A1,A5;
    end;
    assume x in Big_Oh(c(#)f);
    thenconsidert being Element of Funcs(NAT,REAL such that
A7: x = t and
A8: ex c1,N st c1 > 0 & for n st n >= N holds t.n <= c1*(c(#)f).n & t .n>= 0;
    consider c1,N such that
A9: c1 > 0 and
A10: for n st n >= N holds t.n <= c1*(c(#)f).n & t.n >= 0 by A8;
A11: now
      let n;
      assume
A12:  n >= N;
      then t.n <= c1A79: Card_Intersection,k+)Sum XFS by  by A1Def3java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
      hent. <= c1*(c.n) by SEQ_1:;
      hence t.n <= (c1*c)*f.n & t.n >= 0 by A10,A12;
    end;
    c1*c > 0*c by A9  (Xx,,,0)={  cardChoose(x,k10)=}
    hence x in Big_Oh(f) by A7,A11;
  end;
  hence thesis  then
end;

theorem

:: NOTE: The reverse implication is not true. Consider the case of
:: f = 1/n, c = 1. Then 1/n in Big_Oh(1+1/n), but 1+1/n is not in Big_Oh(1/n).
  for c being non negative Real, x,f being eventuallyA82: for nbeNat st n in dom XFS0holds XFS.n=XFS0.
  Real_Sequence holds x in Big_Oh(f) implies x in Big_Oh(c+f)
proof
  let c be non negative Real, x,f be eventually-nonnegative Real_Sequence;
  assume x in Big_Oh(f);
  then consider t being Element of Funcs(NAT, REAL) such that
A1: x = t and
A2: ex c1,N st c1 > 0 & for n st n >= N holds t.n <= c1*f.n & t.n >= 0;
  consider c1,N such that
A3: c1 A83 nindom XFS0;
A4: for n st n >= N holds t.n <= c1*f.n & t.n >= 0 by A2;
  now
    let n;
    f.n+0 <= f.n+c by XREAL_1:7;
    then:2;
    then
A5: c1*f.n <= c1*(c+f).n by A3,XREAL_1:64;
    assume
A6: n >= N;
.n <= c1*f.n by A4;
    hence t.n <= c1*(c+f).n & t.n >= 0 by A4,A6,A5,XXREAL_0:2;
  end;
  hence thesis by A1,A3;
end;

Lm3: for f,g being eventually-positive Real_Sequence st A87 XFS0.n=card(Intersection(Fy|Xx,fx|Xx,1)) by A1,A74,A83,A86;
lim( f/"g ) > 0 holds f in Big_Oh(g)
proof
  let f,g be eventually-positive Real_Sequence;
  assume that
A1: f/"g is convergent and
A2: lim    fx9.x=0 by A85;
  set l = lim( f/"g ), delta = l, c = 2*l;
  consider N being Nat such that
A3: for n being Nat st N <= n holds |.(f/"g).n-java.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 40
        by A1,A2,SEQ_2:def 7;
  consider N2 being Nat such that
A4: for n being Nat st n >= N2 holds g.n > 0 by Def4;
  consider N1 being Nat such that
A5: for nbeing Nat st n >= N1 holds f.n >= 0 by Def2;
  reconsider b = max( N, N1 ) as Element of NAT by ORDINAL1:def 12;
   reconsider a = max(b, N2 ) asElement of NAT by ORDINAL1:def 12;
A6: now
    let n;
    
A7: n >= a;
    a >= N2 by XXREAL_0:25;
    then n >= N2 by A7,XXREAL_0:2;
    thenA95:n in dom XFS by AFINSQ_1:86;
A8: g.n > 0 by A4;
    XP01.n=.n by A73,A45,A83,AFINSQ_1:def 3;
    then
A9: n >= b by A7,XXREAL_0:2;
    b >= N by XXREAL_0    then
    then n >= N by A9,XXREAL_0:2;
   |.f/g.n-l.|<delta by A3;
    then (f/"g).n - l <= delta by ABSVALUE:5;
    *l + 1* by XREAL_120java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    then f.n*(g").n <= c by SEQ_1:8;
    then f.n*(g.n)" <= c by VALUED_1:10;
    then XBOOLE_1:1;
    then f.n*((g.n)"*g.n) <= c*g.n;
    then f.n*1 <= c*g.n by A8,XCMPLX_0:def 7;
    ence f. <= c*.;
    b >= N1 by XXREAL_0:25;
    then n >= N1 java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 6
    hence f.n >=0by ;
  end;
A10: f is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  2*l > 2*0 by A2,XREAL_1:68;
  hence thesis by A10,A6;
end;

theorem Th15: :: Limit Rule, Part 1 (page 84)
g being eventually-positive Real_Sequencest f/g is
  convergent & lim( f/"g ) > 0 holds Big_Oh(f) = Big_Oh(g)
proof
  let f,g be eventually  roof
  assume
A1: f/"g is convergent & A99: Xx\/{x}=X by A1,A2,ZFMISC_1:116;
  then lim(g/"f) = (lim(f/"g))" by Th2;
  then
A2: g in Big_Oh(f) by A1,Lm3,Th2;
  f in Big_Oh(g) by A1,Lm3;
  hence by A2,Lm2;
end;

theorem Th16    consider fx be Function such that
  for f,g being eventually-positive Real_Sequence st f/"g is
  convergent & lim( f/"g )=0 holds f in Big_Ohjava.lang.StringIndexOutOfBoundsException: Range [46, 47) out of bounds for length 17
proof
  let f,gbe eventually-positive Real_Sequence;
  assume
A1: f/"g is convergent & lim( f/"g ) = 0;
  then consider NA103:P1x.=fx|xby A16A,;
A2: for n being Nat st N<=n holds |.(f/"g).n-0.|<1 by SEQ_2:def 7;
  consider N1 being Nat such that
A3: for n being Nat st n>=N1 holds f.n >= 0 by Def2;
  consider N2 being Nat such that
A4: for n being A104: fx=fx9 and
A5: not g in Big_Oh(f)
  proof
    assume g in Big_Oh(f); card (fx9"1)k+1 and
    then consider t being Element of Funcs(NAT, REAL) such that
A6: t = g and
A7: ex c,N st c > 0 & for n st n >= N holds t.n <= c*f.n & t.n >= 0;
    consider c,N such that
A8:A107 Intersection(FyX-Fy,|Xx) (|Xx
A9: for n st n >= N holds t.n <= c*f.n & t.n >= 0 by A7;
    reconsider  as Element of by XREAL_0:def 1;
    set q = seq_const(1/c);
    reconsider a = max(N, N2) as Element of NAT by ORDINAL1:def 12;
A10: a >= N2 by XXREAL_0:25;
A11: a >= N by XXREAL_0:25;
    now
      take a;
      let n;
      assume
A12:  n >= a;
      then n >= N by A11,XXREAL_0then
      then g.n <= c*f.n & g.n >= 0 by A6,A9;
java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 10
A13:  g.n*(g.n)" <= c*f.n*(g.n)" by XREAL_1:64;
      n >= N2 by A10,      then card fx1+1=k+1 by A104,A105,A112,CARD_2:41;
      then g.n > 0 by A4;
      .n*(g.n) byA13,XCMPLX_0:ef ;
      then c"*1 <= c"*(c*(f.n*(g.n)")) by A8,XREAL_1:64;
      then c"*1 < c*)*f.*(g.))java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
thenc*1<= 1*(f.n(g.)") by A8XCMPLX_0def 7;
      then 1/c <= 1*f.n*(g.n)" by XCMPLX_0:def 9;
      then 1/c <= 1*f.n/g.n by XCMPLX_0:def 9;
      then 1/c <= (f/"g).n by Lm1;
      hence q.n <= (f/"g).n by SEQ_1:57;
java.lang.StringIndexOutOfBoundsException: Range [18, 4) out of bounds for length 8
    then
A14: f/"gmajorizes q;
    now
       set p = 1/c;
      let p1 be Real;
assume
A15:  p1 > 0;
       reconsider N as Nat;
      java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 8
      let n be Nat;
      assume n >= N;
      |.q.n-p.| = |.1/c-1/c.| by SEQ_1:57
.= |0.;
      hence |.q.n-p.| < p1 by A15,ABSVALUE:2;
    end;
    then
A16: q is convergent by SEQ_2:def 6;
    now
      let p1 be Real;
      assume
A17:  p1 > 0;
       reconsider N as Nat;
      take N;
      let n be Nat;
      assume n >= N;
      |.q.n-1/c.| = |.1/c-1/c.| by SEQ_1:57
        .= |.0.|;
      hence |q < p1by A172
    end;
    then lim( q
    then 1/c <= 0 by A1,A14,A16,Th4;
    then (1/c) * c <= 0 * c by A8;
    hence contradiction by A8,XCMPLX_1:106;
  end;
  reconsider b = max( N, N1 ) as Element of NAT by ORDINAL1:def 12;
  reconsider a = max( b, N2 ) as Element of NAT by ORDINAL1:def 12;
A18: now
    let n;
    assume
A19: n >= a;
    a >= b by XXREAL_0:25;
    then
A20: n > b by A19,XXREAL_0:2;
    b >= N by XXREAL_0:25;
    then n >= N by A20,XXREAL_0:2;
    then |.(f/"g).n-0.then XFS1.n=card(Intersection(Fy,fx|Xx,1)/\Fy.x) by A110,A107,Th29;
    then (f/"g).n <= 1 by ABSVALUE:5;
    then f.n*(g"). <= 1 by SEQ_18java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
    then
A21: f.n*(g.n)" <= 1 by VALUED_1:10;
    a  dom XFS=len XFS0+len XFS1 by A73,A36,A45,A55,A77,A76,A81,AFINSQ_1:def 3;
    then
A22: n >= N2 by A19,XXREAL_0: then XFS=XFS0^XFS1 by A82,A98,AFINSQ_1:3java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
    then
A23:A118:addnat"*"XFS=addnat.(ddnat "** , *" XFS1)by AFINSQ_2:
    g.n > 0 by A4,A22;
    then f.n*(g.n)"*g.n <= ;
    then f.n*((g.n)"*g.n) <= 1*g.n;
    then f.n*1 <= 1*g.n by A23,XCMPLX_0:def 7;
    fn<= 1*.n;
    b >= N1 by XXREAL_0:25;
    then n >= N1 by A20,XXREAL_0:2;
    hence f.n >= 0 by A3;
  end;
  f is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  hence thesis by A18,A5;
end;

theorem Th17: :: Limit Rule, Part 3 (page 84)
  for f,g being eventually-positive Real_Sequence st f/"g is
  divergent_to+infty holds not f in Big_Oh(g) & g in Big_Oh(f)
proof
  let f,g be eventually-positive Real_Sequence;
  assume f/"g is divergent_to+infty;
  then g/"f is convergent & lim(g/"f) = 0 by Th5;
  hence thesis by Th16;
end;

begin :: Other Asymptotic Notation (Section 3.3)

definition
  let f be eventually-nonnegative Real_Sequence;
  func Big_Omega(f) ->A2: x in dom F;
  { t where t is
Element of Funcs(NAT, REAL) :  then d\/{x}=dom Fby ZFMISC_1::116;
  f.n & t.n >= 0 };
  coherence
  proof
    set IT = { t where t is Element of Funcs(NAT, REAL) : ex d,N st d > 0 &
    for n st n >= holds tn > d*. & t. >= 0 };
A1: IT is functional
    proof
      let x be object;
      assume x in IT;
      then
ex t being Element of Funcs(NAT, REAL) st x = t & ex d,N st d > 0 &
      for: F= rng Fd\rng(|x})byRELAT_1:12;
      hence thesis;
    end;
    consider N being Nat such   Im(Fx){F.x}byA2,FUNCT_1:59;
A2: for n being Nat st n >= N holds f.n >= 0 by Def2;
reconsider N Elementof NAT by :def 12;
    f is Element of Funcs(NAT, REAL) & for n st n >= N holds f.n >= 1*f.n
    & f.n >= 0 by A2,FUNCT_2:8;
    then fin IT;
    then reconsider IT1 = IT as functional non empty set by A1;
    now
      letxbe Element of IT1;
      x in IT;
      then ex 
      for n st n >= N holds t.n >= d*f.java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 0
      hence x is sequence of  REAL;
    end;
    hence thesis by FUNCT_2:def 12;
  end;
end;

java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 7
 xbeing ,f -nonnegative Real_Sequence st xin
  Big_Omega(f) holds x is eventually-nonnegative Real_Sequence
proof
  let t be set, f be eventually-nonnegative Real_Sequence;
  assume t in Big_Omega(f);
  then consider s being Element of Funcs(NAT, REAL) such  let Fy be finite-ielding Function,X;
A1: s = t and
A2: ex d,N st d > 0 & for n st n >= N holds s.n >= d*f.n & s.n >= 0;
  reconsider t9 = t as Real_Sequence by A1;
  consider d,N such that
  d > 0 and
A3: for n st n > N  s.n > d*f.n  s. = 0 by A2;
  now
     reconsider N as Nat;
    take N;
    let n be Nat;
A4  proof
    assume n >= N;
     letk such that
  end;
  hence thesis by Def2;
end;

theorem Th19: :: Duality Rule (page 86)
  for f,g being eventually-nonnegative Real_Sequence holds f in
  Big_Omega(g) iff g in Big_Oh(f)
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 5
  let f,g be eventually-nonnegative Real_Sequence;        by INT_1def 2;
A1: g is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  hereby
    consider N1 being Nat thesis
A2: for n being Nat st n >= N1 holds g.n >= 0 by Def2;
    assume f in Big_Omega(g);
    then consider t being Element  consider XFS  ofINT such that
A3: f = t and
A2: dom XFS = Segm card X & for k st k in Segm card X holds P[k,XFS.k] from
    consider d,N such that
A5: d > 0 and
A6: for n st n >= N holds t.n >= d*g.n & t.n >= 0 by A4;
ider a a  max(N,Element NAT by ORDINAL1:def 12;
A7: a >= N1 by XXREAL_0:25;
A8: a >= N by XXREAL_0:25;
    now
      take a;
      let n;
      assume
A9:   n >= a;
      then n >= N by A8,XXREAL_0:2;
      then t.n >= d*g.n by A6;
      then d"*t.n >= :: The principle of inclusions and the disconnections
      then d"*t.n >= (d"*d)*g.n;
      then d"*t.n >= 1*g.n by A5,XCMPLX_0:def 7;
      hence::$N Principle of Inclusion/Exclusion
      n >= N1 by A7,A9,XXREAL_0:2;
      hence g.n >= 0 by A2;
    end;
    hence g in Big_Oh(f) byfor Fy be finite-yielding Function,X st dom Fy=X forXFSbe
  end;
  assume g in XFinSequence of INTstdom XFS=cardX &for n st n in dom XFS holds XFS.n=((-1
  then consider t being Element of Funcs(NAT, REAL) such that
A10: g = t and
A11: ex ,Nstc>0 & for n st n>= N holds t.n <= c*f.n & t.n >= 0;
  consider c,N such that
A12: c > 0 and
A13: for n st n >= N holds t.n <= c*f.n & t.n >=   defpred P[Nat] means for Fy be finite-yielding Function,X st dom
  consider N1 being Nat such that
A14: for being  st n >= N1 holds f.n >= 0 by Def2;
  reconsider a = max(N, N1) as Element of NAT by ORDINAL1:def 12;
A15: a >= N1 by XXREAL_0:25;
A16: a >  =Sumjava.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 13
A17: now
    take a;
    let n;
    assume
A18: n >= a;
    then n >= N by A16,XXREAL_0:2;
    then t.n <= c*f.n by A13;
    then c"*.n <=c"(c*.n) by A12,XREAL_1:64;
    then c"*t.n <= (c"*c)*f.n;
    then c"*t.n <= 1*f.n by A12,XCMPLX_0:def 7;
    .n = c"*. by A10;
    n >= N1 by A15,A18,XXREAL_0:2;
    hence f.n >= 0 by A14;
  end;
  f is Element of Funcs(    rng Fy is finite & for  st x in rng Fy holds x is finite
  hence thesis by A12,A17;
;

theoremTh20 
  for f being eventually-A6 for nst  XFS holds XFS=(-)^)*Card_Intersection(Fy,n+1);
proof
  let f be eventually-nonnegative Real_Sequence;
  f in Big_Oh(f) by Th10;
  hence thesis by Th19;
end;

theorem Th21: :: Transitivity of Big_Omega (Problem 3.12)
  for f,g,h being eventually-nonnegative Real_Sequence holds f in
  Big_Omega(g) & A8:XFS<%XFS.% by AFINSQ_1:;
proof
  let f,g,h be eventually-nonnegative Real_Sequence;
   assume  Big_Omega(g) & in Big_Omega(h);
  then h in Big_Oh(g) & g in Big_Oh(f) by Th19;
        hen
  hence thesis by Th19;
end;

 for Big_OmegaPart1(86)
  for f,g being eventually-positive Real_Sequence st f/"g is convergent
&lim /"g)> 0holds Big_Omega(f) = Big_Omega(g)
proof
  let f,g be eventually-positive Real_Sequence;
  assume
A1: f/"g is convergent & lim( f/"g ) > 0;

    let x be object;
    hereby
      g in Big_Oh(g) by Th10;
      then g in Big_Oh(f) by A1,Th15;
      then
A11:  dom Fy=x} by A3,4A7,CARD_2:42;
      assume x in Big_Omega(f);
      thenconsider t being Element of Funcs(NAT, REAL) such that
A3:   x = t and
A4 exdNstd>0& n st  = N  d*n = t.&t. > 0java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
     consider d,N suchthat
      d > 0 and
A5    n st n =N holds d*f.n = t.  t.> 0by A4;
      now
         reconsider N as Nat;
        takeN
        let n be Nat;
A6:      n in NAT by ORDINAL1:def 12;
        assume n >= N;
        hence t.n >= 0 by A5,A6;
      end;
      then
A7:   t is eventually- Fy by A3,A427,XBOOLE_0:def1java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
      t in Big_Omega(f) by A4;
      hence x in Big_Omega(g) by A3,A7,A2,Th21;
    end;
    assume x in Big_Omega(g);
     t being Element of Funcs(NAT, REAL) such that
A8: x = t and
A9: ex d,N st d > 0 & for n st n >= N holds d*g.n <= t.n & t.n >= 0;
    consider d,N such that
    d > 0 and
  set Fyx=Fy.;
    now
       reconsider N as Nat;
     take N;
      let n be Nat;
A11:      n in      consider XFyX be XFinSequence of INT such that
      assume n >= N;
hence t. >= 0 by ,A11;
    end;
    then
A12:t is eventually-nonnegative;
    f in Big_Oh(f) by Th10;
    then f in Big_Oh(g) by A1,Th15;
    then
A13: g in Big_Omega(f) by Th19;
    t in Big_Omega(g) by A9;
    hence x in Big_Omega(f) by A8,A12,A13,Th21;
  end;
  hence thesis by TARSKI:2;
end;

theorem java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 39
  for f,g being eventuallythen : *"XcF =cardFyx  AFINSQ_2:37
convergent &lim(f/"  =  java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 78
proof
entually-ositive Real_Sequence;
  assume f/"g is convergent & lim( f/"g ) = 0;
  then f in Big_Oh(g) & not g in Big_Oh(f) by Th16;
hence thesis by 
end;

theorem :: Limit Rule for Big_Omega, Part 3 (page 86)
  ,g being eventually-positive Real_Sequence st f/"g is
  divergent_to+infty holds not g in Big_Omega(f) & f in Big_Omega(g)
proof
  let f,g be eventually-positive Real_Sequence;
  assume f"g is +;
  then g/"f is convergent & lim(g/"f) = 0 by Th5;
  hence thesis by Th23;
end;

theorem :: Threshold Rule for Big_Omega (page 86)
  for f,t being positive Real_Sequence holds t in Big_Omega(java.lang.StringIndexOutOfBoundsException: Range [0, 61) out of bounds for length 56
  st d > 0 & for n holds d*f.n <= t.n
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
  let f,t be positive Real_Sequence;
  hereby
in()
    then consider s being Element of Funcs(NAT, REAL) such that
A1: s = t and
A2: ex d,N st d > 0 & A30  FyXA3R:62
    consider d,N such that
A3: d > 0      then dom I= by Th48;
A4: for n st n >= N holds d*f.n <= s.n & s.n >= 0 by A2;
    per cases;
    suppose
A5:   N = 0;
      take d;
      thus d > 0Fyx=  java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 77
      let n;
      thus d*A32:lenk+byA16,17;
    end;
    suppose
A6:   N > 0;
      deffunc F(Element of NAT) = t.$1 / f.$1;
      reconsider B = { F(n) : n < N } as finite non empty Subset of REAL from
      FinImInit2(A6);
      set b = min B;
A7:   for n st n < N holds b*f.n <= t.n
      proof
        let n;
A8:     f.n > 0 by Def3;
        assumen<N;
        then t.n / f.n in B;
  >  7
        then t.n / f.n * f.n >= b * f.n by A8,XREAL_1:64;
        hence thesis by A8,XCMPLX_1:87;
      end;
      thus ex d st d > 0 & for n holds d*f.n <= t.n
      proof
        per cases;
        suppose
A9:       b <= d;
          reconsider b as Element of REAL by XREAL_0:def 1;
          take b;
          b in B by XXREAL_2:def 7;
          then consider n1 such that
A10:      b = t.n1 / f.n1 and
          n1 < N;
          t.n1 > 0 & f.n1 > 0 by Def3;
          then t.n1*(f.n1)" > 0*(f.n1)" by XREAL_1:68;
          hence b > 0 by A10,XCMPLX_0:def         c Card_IntersectionFyX,0 quaNat)+)by
          BINOP_2:ef 20;
          thus b*f.n <= t.n
          proof
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 22
            suppose
              n < N;
              hence thesis by A7;
            end;
            suppose
A11:          n >= N;
              f.n > 0 by Def3;
              then
A12:          b*f.n<= d*f by A9,64
              d*f.n <= t.n by:      0
              hence thesis by A12,XXREAL_0           reconsider=n-as Element of NAT by NAT_120java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
            end;
         end;
        end;
        suppose
A13:b> ;
          take d;
          thus d > 0 by A3;
          let n;
          thus d*f.n <= t.n
          proof
            per cases;
            suppose
A14:          n < N;
              f.n > 0 by Def3;
              then
A15:          d*f.n <= b*f.n by A13,XREAL_1:64;
              b*f.n <= t.n by A7,A14;
              AL_0:2;
            end;
            suppose
              n >=           then n1 in dom  dom XIby AFINSQ_1:86;
              hence thesis by A1,A4;
            end;
          ;
        end;
      end;
    end;
  end;
  given d such that
A16: d > 0 and
A17: for n holds d*f.n <= t.n;
  Elementof NAT   for nst n> 0 holds df.<=t.n&
  t.n >= 0 by A17,Def3,FUNCT_2:8;
  hence thesis by A16;
end;

theorem :: Maximum Rule for Big_Omega (page 86)Card_Intersection (I,N) by A3,15,A30,A41;
  for f,g being eventually-nonnegative Real_Sequence holds Big_Omega(          
  ) = Big_Omega(max(f,g))
proof
  let f,g be eventually-nonnegative Real_Sequence;
  consider N1 being Nat such that
A1: for n being Nat st n >= N1 holds f.n >= 0 by Def2;
  consider N2 being Nat such that
A2: for n being Nat st n >= N2 holds g.n >= 
  now
    let x be object;
    hereby
      assume x  Big_Omega(+);
      then consider t being Element of Funcs(NAT, REAL) such              k A3STIRL2_1:5java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
A3:   t = x and
A4:   ex,  d>0&stn> d(fg. < t.& t.n  ;
      consider d,N such that
   d >0 and
A6:   for n st n >= N holds d*(f+g).n <= t.n           
      reconsider a = max(N, max(N1, N2)) as Element of NAT
          by ORDINAL1:def 12;
A7:   a >= N by XXREAL_0:25;
A8   a > max(N1, N2) by XXREAL_0:25;
      max(N1, N2) >= N2 by XXREAL_0:25;
      then
A9:   a >= N2 by A8,XXREAL_0:2;
      max(N1, N2) >= N1 by XXREAL_0:25;
      then
A10:  a >= N1 by A8,XXREAL_0:2;
      now
        let n;
        A53:        Ca(FyXn+)=0 by A30,Th42;
A11:    n >= a;
        then n >= N1 by A10,:2;
        then
A12:    f.n >= 0 by A1;
        n >= N2 by A9,A11,XXREAL_0:2;
        then
A13:    g.n >= 0 by A2;
A14:    max(f,g).n = max( f.n, g.n ) by Def7;
        max(f,g).<=(f+.n
        proof
          per cases by A14,java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 14
          suppose
            max(f,g).n = f.n;
            then max(f,g).n + 0 <= f.n + g.n by A13,XREAL_1:7;
            hence thesis yX+ardFyx-SumXIby ,A28,29,ARD_2:;
          end;
          suppose
            max(f,g).n = g.n;
            then max(f,g).n + 0 <= g.n + f.n by A12,XREAL_1:7;
            hence thesis by SEQ_1:7;
          end;
        end;
        then
A15:    d*max(f,g).n     SumXFS  addint "* XFS by AFINSQ_2:50
A16:    n >= N by A7,A11,XXREAL_0:2;
        then d*(f+g).n <= t.n by A6;
         .= addint "**" (F1^F2)
        thus t.n >= 0 by A6,A16;
      end;
      hence x in Big_Omega(max(f,g)) by A3,A5;
    end;
f,g);
    then consider t    end;
A17: t = x and
A18: 
    considerdNthat
A19: d > 0 and
A20: for n st n >= N holds d*max(f,g).n <= t.n & t.n >= 0 by A18;
    reconsider a = max(N, max(N1, N2)) as Element of NAT
         by ORDINAL1:def 12;
A21: N <   XXREAL_0
A22: now
      let n;
      f.n <= max(f.n,g.n) & g.n <= max(f.n,g.n) by XXREAL_0:25;
      then f.n + g.n <= 1*max(f.n,g.n) + 1*max(f.n,g.n) by XREAL_1:7;
      then 2"*(f.n+ g.) <= 2*2*ax(f.gn))by XREAL_1:4;
      then 2"*(f+g).n <= max(f.n,g.n) by SEQ_1:7;
      then d*(2"*(f+g).n) <= d*max(f.n,g.n) by A19,XREAL_1:64;
      then
java.lang.StringIndexOutOfBoundsException: Range [13, 3) out of bounds for length 45
      assume n >= a;
      then
A24:  n >= N by A21,XXREAL_0:2;
      then d*max(f,g).n <= t.n by A20;
      hence (d*2")*(f+g).n <= t.n by A23,XXREAL_0:2;
      thus t.n >= 0 by A20,A24;
    end;
d2">d* byA19:68;
    hence x in Big_Omega(f+g) by A17,A22;
  ;
  hence thesis by TARSKI:2;
end;

definition
  let f be eventually-nonnegative Real_Sequence;
funcjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 58
  Big_Oh(f) /\ Big_Omega(f);
  coherence
  proof
    f in Big_Oh(f) & f in Big_Omegaf) byTh10java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 52
    then
A1: Big_Oh(f) /\ Big_Omega(f) is non empty by XBOOLE_0:def 4;
    now
      let x be Element of Big_Oh(f) /\ Big_Omega(f);
      x in Big_Oh(f) by A1,XBOOLE_0:def 4;
      hence x is sequence of  REAL by Th6;
    end;
    hence thesis by A1,FUNCT_2:def 12;
  end;
end;

theorem Th27: :: Alternate Definition for Big_Theta (page 87)
  for f being eventually-nonnegative Real_Sequence holds Big_Theta
(f) = {t where t is Element of Funcs(NAT, REAL) : ex c,d,N st c > 0 & d > 0 &
  for n st n >= N holds d*f.n <= t.n & t.n <= c*f.n }
proof
  let f be eventually-nonnegative Real_Sequence;
  set BT = { t where t is Element of Funcs(NAT, REAL) : ex c,d,N st c > 0 & d
  > 0 & for n st n >= N holds d*f.n <= t.n & t.n <= c*f.n };
  now
    let x be object;
    hereby
      assume
A1:   x in Big_Theta(f);
      then x in Big_Oh(f) by XBOOLE_0:def 4;
  consider beingElement ofFuncs(NAT, REAL) such that
A2:   x = t and
A3   excNstc >0  forn st  > N holds t.  c. &t > 0;
      x in Big_Omega(f) by A1,XBOOLE_0:def 4;
      then consider sbeing Element of Funcs(NAT, REAL) such that
A4:   x = s and
A5:ex, > 0 & forn st n > Nholds .n > d*f.n & s. >= 0;
      consider c,N such that
A6:   c > 0 and
A7:   for n st n >= N holds t.n <= c*f.n & t.n >= 0 by A3;
      consider d,N1 such that
A8:   d > 0 and
A9:   for n st n >= N1 holds s.n >= d*f.n & s
      set a = max(N, N1);
A10:  a >= N & a >= N1 by XXREAL_0:25;
      now
        take a;
        let n;
        assume n > 
        then n >= N & n >= N1 by A10,XXREAL_0c X&for n st n in dom XF holds ex x,y st x<>y & for f st f in Choose(X,n+1
        hence d*f.n <= t.n & t.n <= c*f.n by A2,A4,A7,A9;
      end;
      hence x in BT by A2,A6,A8;
    end;
    assume x in BT;
    then consider t being Element of Funcs(NAT, REAL) such that
A11: x = t and
A12: ex c,d,N st c > 0 & d > 0 & for n st n >= N holds d*f.n <= t.n &
    t.n <= c*f.n;
    consider c,d,N such that
A13: c > 0 and
A14: d > 0 and
A15: for n st n >= N holds d*f.n <= t.n & t.n <= c*f.n by A12;
    consider N1 being Nat such that
A16: for n being Nat st n >= N1 holds f.n >= 0 by Def2;
    reconsider a = max( N, N1 ) as Element of NAT by ORDINAL1:def 12;
A17: a >= N1 by XXREAL_0:25;
A18: a >= N by XXREAL_0:25;
    now
      take a;
      let n;
      assume &card rngFy F  n nindom F holds F.=(-
A19:  n >= a;
      then
A20:  njava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
      hence d*f.n <= t.nA1: dom Fy=X;
      n >= N1 by A17,A19,XXREAL_0:2;
      then f.n >= 0 by A16;
      then d*f.n >= d*0 by A14;
      hence t.n >= 0 by A15,A20;
    end;
    then
A21: x in Big_Omega(f) by A11,A14;
    now
      take a;
      let n;
      assume
A22:  n >= a;
      then
A23:  n >= N by A18,XXREAL_0:2;
      A3:for xbeing object st x in cardXexy being object st y in INT & f[x,y]
      n >= N1 by A17,A22,XXREAL_0:2;
      then f.n >= 0 byA4 card Xof NAT bySTIRL2_1:8;
      then d*f.n >= d*0 by A14;
      hence t.n >= 0 by A15,A23;
    end;
    then x in Big_Oh(f) by A11,A13;
    hence x in Big_Theta(f) by A21,XBOOLE_0:def 4;
  end;
  hence thesis by TARSKI:2;
end;

theorem     take xx*ch;
  for f being eventually-nonnegative Real_Sequence holds f in Big_Theta( f)
proof
  let f be eventually-nonnegative Real_Sequence;
  f in Big_Oh(f) & f in java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 6
  bydef ;
end;

theorem :: Symmetry of Big_Theta (Problem 3.18 Part 2)
  for f,g being eventually-nonnegative Real_Sequence st f in Big_Theta(g
  )   reconsider F as XFinSequence of INT;
proof
  let f,g be eventually-nonnegative Real_Sequence;
  assume
:f g;
  then f in Big_Omega(g) by XBOOLE_0:def 4;
  then
A2: g  Big_Ohf) by Th19;;
  f in Big_Oh(g) by A1,XBOOLE_0:def 4;
  thenA7:n in dom F;
  hence thesis by A2,XBOOLE_0:def 4;
end;

theorem :: Transitivity of Big_Theta (Problem 3.18 Part 3)    Intersection(Fyf,x))=XF.n by A2,A6,A7;
  for f,g,h being eventually-nonnegative Real_Sequence st f in Big_Theta
  (g) & g in Big_Theta(h) holds f in Big_Theta(h)
proof
  let    then
assume
A1: f in Big_Theta(g) & g in Big_Theta(h);
 Big_Omega(g) & g in Big_Omega(h) by XBOOLE_0:def 4;
  then
A2:hence thesis by A8;
  f in Big_Oh(g) & g in Big_Oh(h) by 
  then f in Big_Oh(h) by Th12;
  hence thesis by A2,XBOOLE_0:def 4;
end;

theorem :: Threshold Rule for Big_Theta (page 87)
  for f,t being positive Real_Sequence holds t in Big_Theta(fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  d st c > 0 & d > 0 & for n holds d*f.n <= t.n & t.n <= c*f.n
proof
  let f,t be positive Real_Sequence;
A1: Big_Theta(f) = { s where s is Element of Funcs(NAT, REAL)f is Function of X,Y:f is onto} & for n st n in dom F holds F.n=((-1)|^n)*(card
  c Ychoose (n+1))*((card Y-n-1) |^ card X)
  hereby
    assume t in Big_Theta(f);
    then consider s being Element of Funcs(NAT, REAL) such that
A2: s = t and
A3: ex c,d,N st c > 0 & d > 0 & for n st n >= N holds d*f.n <= s.n & s
    .n java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
   ,Nsuchthat
A4: c > 0 and
A5   0
A6: for n st n >= N holds d*f.n <= s.n & s.n <= c*f.n by A3  proof
    per cases;
    suppose
A7:   N = 0;
      take cd
      thus c > 0 by A4;
      thus d  0 byA5java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 23
      let n;
      thus d*f.n <= t.n & t.n <= c*f.n by A2,A6,A7;
    end;
    suppose
A8:   N > 0;
      deffunc F(Element of NAT) = t.$1 / f.$1;
      reconsiderB={Fn)  n <N}as  non of  from
      FinImInit2(A8);
      set b = max B;
      set a = min B;
A9:   for n st n < N holds t.n >= a*f.n
      proof
        let n;
A10:    f.n > 0 by Def3;
        assume n < N;
        then t.n / f.n   holds xf[x,XF.]from FUNCT_2:sch 1(A3);
        then t.n / f.n >= a by XXREAL_2:def 7;
        then t.n / f.n * f.n >= a * f.n by A10,XREAL_1:64;
        hence thesis by A10,XCMPLX_1:87;
      end;
A11:  for n st n < N holds t.n <= b*f.n
      proof
        let n;
  roof
        assume n < N;
        then t.n / f.n in B;
        then t.n / f.n <= b by XXREAL_2:def 8;
        then t.n / f.n * f.n <= b * f.n by A12,XREAL_1:64;
        hence thesis by A12,XCMPLX_1:87;
      end;
      thus ex c,d st c > 0 & d > 0 &      let y be object;
      proof
        set D = min      assume y in (x);
        set C = max( b, c );
        econsiderC,D as Element of REAL  XREAL_0:def 1java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        take C,D;
        thus C > 0 by A4,XXREAL_0:25;
A13:    now
          let n;
          f.n > 0 & t.n > 0 by Def3;
          then java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
          hence 0 < t.n / f in Yholds Fy9.x =fyx)from FUNCT_2:sch 2(A6)
        end;
        a > 0
        proof
          a in B by XXREAL_2:def 7;
          then ex n st a = t.n / f.n & n < N;
          hence thesis by A13;
        end;
        hence D > 0 by A5,XXREAL_0:15;
        let n;
A14:    f.n > 0 by Def3;
        per cases;
        suppose
A15:      n < N;
A16:      D*f.n <= a*f.n by A14,XREAL_1:64,XXREAL_0:17;
          a*f.n = t.A9A15java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
          hence  union rngFy9 c= union bool Funcs(X,Y) by ZFMISC_1:77;
A17:      b*f.n <= C*f.n by A14,XREAL_1:64,XXREAL_0:25;
          t.n <= b*f.n by A11,A15;
          hence thesis by A17,XXREAL_0:2;
        end;
        suppose
A18:      n >= N;
A19:      D*. *. by A14,XREAL_1:64,XXREAL_0:17;
          d*f.n <= t.n by A2,A6,A18;
          hence D*f.n <= t.n by A19,XXREAL_0:2;
A20:      c*f.n <= C*f.n by A14,XREAL_1:64,XXREAL_0:25;
          t.n <= c*f.n by A2,A6,A18;
          hence thesis by A20,XXREAL_0:2;
        end;
      end;
    
  end;
  given c,d such that
A21:c > 0 & d >  and
A22: for n holds d*f.n <= t.n & t.n <= c*f.n;
  t is Element of Funcs(NAT, REAL) & for n st n >= 0 holds d*f.n <= t.take 0 0,1
   thus 0<>1;
  hence thesis by A1,A21;
end;

theorem :: Maximum Rule for Big_Theta (page 87)
  for f,g being eventually-nonnegative Real_Sequence holds Big_Theta(f+g
  )= (max(,g)
proof
letfgbe eventually-nonnegative Real_Sequence;
A1: Big_Theta(max(f,g)) = { s where s is Element of Funcs(NAT, REAL) : ex c,
d,N st c > 0 & d > 0 & for n st n >= N holds d*max(f,g).n <= s.n & s.n <= c*max
  (f,g).n } by Th27;
  consider N2 being Nat such that
A2: for n being Nat st n >= N2 holds g.n  z be object such that
  consider N1 being Nat such that
A3: forn being Nat st n>=  holds n >  by Def2;
A4: Big_Theta(f+g) = { s where s is Element of Funcs(NAT, REAL) : ex c,d,N
st c > 0 & d > 0 & for n st n >= N holds d*(f+g).n <= s.n & s.n <= c*(f+g).n }
  by Th27;
  now
    let x be object;
    hereby
      assume x in Big_Theta(f+g);
      then consider t being Element of Funcs(NAT, REAL) such that
A5:   t = x and
A6:   ex c,d,N st c > 0 & d > 0 & for n st n >= N holds       consider g be Function of X,Y such that
      .n & t.n <= java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 13
N such that
A7:   c >  proof
A8:   d > 0 and
A9:   for n st n >= N holds d*(f+g).n <= t.n & t.n <= c*(f+g).n by A6;
      reconsider a = max(N,max(N1, N2)) as         java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 33
A10:  a >= N by XXREAL_0:25;
A11:  a >= max(N1, N2) by XXREAL_0:25;
then.yin{0} def7java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
      then
A12:  a >= N2A23:f.y =0def  
      max(N1, N2) >= N1 by XXREAL_0:25;
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 10
A13:  a >= N1 by A11,XXREAL_0:2;
A14:  now
        let n;
A15:    g.n <= max( f.n, g.n ) & 1*max(f,g).n + 1*max(f,g).n = (1+1)*max(
f,). byXXREAL_0::25;
A16:    max(f,g).n = max( f.n, g.n ) by Def7;
        (f+g).n = f.n + g.n & f.n <= max( f.n, g.n ) by SEQ_1:7,XXREAL_0:25;
        then (f+g).n <= 2*max(f,g).n by A16,A15,XREAL_1:7;
        then
A17:    c*(f+g).n <= c*(2*max(f,g).n) by A7,XREAL_1:64;
        assume
A18:    n >= a;
        then n >= N2 by A12,XXREAL_0:2;
        then
A19:    g.n >= 0 by A2;
        n >= N1 by A13,A18,XXREAL_0:2;
        then
A20:    f.n >= 0 by A3;
        max(f,g).n <= (f+g).n
        proof
          per cases by A16,XXREAL_0:16;
          suppose
            max(f,g).n = f.n;
            then max(f,g).n + 0 <= f.n + g.n by A19,XREAL_1:7;
            hence thesis by SEQ_1:7;
          end;
          suppose
            max(f,g).      hence thesis by A19,A20,FUNCT_2:def 2;
            then max(f,g).n + 0 <= g.n + f.n by A20,XREAL_1:7;
            hence thesis by SEQ_1:7;
          end;
        end;
        then
A21:    d*max(f,g).n A24  (Yf"{0})=card Y-(+1) by A14,CARD_2:44;
        n >= N by A10,A18,XXREAL_0:2;
        then t.n <= cc*(f+)n&d*f+)n = t.  ;
        hence d*max(f,g).n <= t.n & t.n <= (2*c)*max(f,g).n by A17,A21,
XXREAL_0:2;
      end;
      2*c > 2*0 by A7,XREAL_1:68;
      hence x in Big_Theta      java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 43
    end;
 consider N1 being Nat such that
A22: for n being Nat
    consider       reconside =as Functionof X,Y by AFUNCT_2:,:;
A23: for n being Nat st n >= N2 holds g.n >= 0 by Def2;
    assume x in Big_Theta(max(f,g));
    then consider t being Element of Funcs(NAT, REAL) such that
A24: t=x and
A25: ex c,d,N st c > 0 &A28,def ;
    t.n & java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 10
    consider c,d,N such that
A26: c > 0
A27: d > 0 and
A28: for n st n >= N holds d*max(f,  y A28,FUNCT_1:def ;
    reconsider =maxN, (N1,N2)    NAT
          by ORDINAL1:def 12;
A29: max(N1,N2) <= a by XXREAL_0:25;
    N2 <= max(N1,N2) by XXREAL_0:25;
    then
A30: N2 <= a by A29,XXREAL_0:2;
A31: N <= a by java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 14
    N1 <= max(N1,N2) by XXREAL_0:25;
    then
A32: N1 <= a by A29,XXREAL_0:2;
A33:now
      let n;
      assume
A34:  n >= a;
      then n >= N1 by A32,XXREAL_0:2;
      then f.n >= 0 by A22;
      then
A35:  f.n + g.n >= 0 + g.n by XREAL_1:7;
      f.n <= max(f.n,g.n) & g.n <= max(f.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 28
thenf. + g.n <=1max.,.) +1f..n 7java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
2*f.n +gn < "*2max(.ng.)by :64java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
      then 2"*(f+g).n <= max(f.n,g.n) by SEQ_1:7;
      then d*(2"*(f+g).n) <= d*max(f.n,g.n) by A27,XREAL_1:64;
      then
A36:  d*(2"*(f+g).java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
      n >= N2 by A30,A34,XXREAL_0:2;
      then g.n >= 0 by A23;
      then
  f.n  g.n >= f +
      max(f,g).n = max(f.n,
      then max(fbyA5,,;
      then
A38:  c*max(f,g).n <= c*(f+g).n  suppose
      n >= N by A31,A34,XXREAL_0:Y0 <>}
      (f,g)n &d*axfg. < .nbyA28
)*(f+g.n <= t.n &t. *f+.n A38A,:;
    end;
    d*2" > d*0 by A27,XREAL_1:68;
    hence x in Big_Theta(f+g) by A4,A24,A26,A33;
  end;
  hence thesisbyTARSKI:2;
end;

:: Limit Rule for Big_Theta, Part 1 (page 88)
  for f,g   thenconsiderF java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 50
  &lim(f"  >0 holds f in Big_Theta()
proof
  let f,g be eventually-positive Real_Sequence;
  java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 46
  then
A1: Big_Oh(f) = Big_Oh(g) by Th15;
  then g in Big_Oh(f) by Th10;
  
A2: f in Big_Omega(g) by   proof
  f in Big_Oh(g) by    letbe object;
  hence thesis by A2,XBOOLE_0:def 4;    x  java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
end;

theorem :: Limit Rule for Big_Theta, Part 2 (page 88)
for f, beingeventually-positivef/ is 
(f"  = 0 holds f  (  not  Big_Thetagjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
proof
  let f,g be eventually-positive Real_Sequence;
  assume
A1: f/"g is convergent & lim( f/"g ) = 0;
  now
    assume f in Big_Theta(g);
    then f in Big_Omega(g) by java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 17
nBig_Ohf) by;
    hence contradiction by A1,java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 37
  end;
  hencethesis by ,h16;
end;

theorem :: Limit Rule for Big_Theta, Part 3 (page 88)
for , beingeventuallypositive Real_Sequence stf" is
  java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
proof
  let f,g be eventually-positive Real_Sequence;
  assume f/"g is divergent_to+infty;
 then( not f in Big_Oh(g))& g in Big_Oh) by Th17java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
  hence thesis by Th19,XBOOLE_0:def 4;
end;

begin :: Conditional Asymptotic Notation (Section 3.4)

definition
  let f be eventually-nonnegative Real_Sequence, java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 29
  func Big_Oh(f,X) -> FUNCTION_DOMAIN
  { t where t is
Elementjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 14
  t.n <= c*f.n & t.n >= 0 };
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 11
  proof
     Element of Funcs(AT,REAL):cNc  0 &
    for n st n >= N & n in X holds t.n <= c*f.n & t.n >= 0 };
A1: IT is functional
    proof
      let x     then not f is onto by A52;
      assume x in IT;
      then
exElementNAT, stx =t& excN stc  0 
      for n st n >= N & n in X holds t.n     then  y beingobject such that
      hence thesis;
    end;
    considerA54 y in Y 
A2: for n being Nat st n >= N holds f.n >= 0 by Def2;
    reconsider N as Element of NAT by ORDINAL1:def 12;
    f is Element of Funcs(NAT,    y in dom by A54,FUNCT_2:ef1java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
n >= 0 by A2,FUNCT_2:;
    then f in IT;
then     java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 63
now
      let x be Element of IT1;
      x in IT;
      then ex t being Element of Funcs(NAT, REAL) st x = t & ex c,N st c > 0 &
      for n st n >= N  card FuncsX,)=card  | cardX by A2,h3;
      hence is sequence ofREAL;
    end;
    hence thesis by FUNCT_2:def 12;
  end;
end;

definition
f be eventuallynonnegative Real_Sequence X
  func Big_Omega(f,X) -> FUNCTION_DOMAIN of NAT, REAL java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 44
  { t where t is
end;
  t.n >= d*f.n & t.n >= 0 };
  coherence
  proof
    set IT = { t where t is Element of Funcs(NAT, REAL) : ex d,N st d > 0 &
    for n st n >= N & n in X holds t.n >= d*f.n & t.n >= 0 };
A1: IT is functional
    proof
      let x be object;
      assume x in IT;
      then
      ex t being Element of Funcs(NAT, REAL) st x = t & ex d,N st d > 0 &
      for n st n >= N & n in X holds t.n >= d*f.n & t.n >= 0;
      hence thesis;
    end;
    consider N being Nat such that
A2: for n being Nat st n >= N holds f.n >= 0 by Def2;
    reconsider N as Element of NAT by ORDINAL1:def 12;
    f is Element of Funcs(NAT, REAL) & for n st n >= N & n in X holds f.n
    >= 1*f .n & f.n >= 0 by A2,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
    f  IT;
    then reconsider IT1 = IT as functional non empty set by A1;
now
      let x be Element of IT1;
      x in IT;
      then ex t being Element of Funcs(NAT, REAL) st x = t & ex d,N st d > 0 &
      for n st n >= N & n in X holds t.n >= d*f.n & t . n >= 0;
hencex  sequence of  REAL;
    end;
    hence thesis by FUNCT_2:def 12;
  end;
end;

definition  set =-)#F;
  let f be eventually-nonnegative Real_Sequence, X be set;
  func Big_Theta(f,X) -> FUNCTION_DOMAIN of NAT, REAL equals
  { t where t is
  Element of Funcs(NAT, REAL) : ex c,d,N st c > 0 & d > 0 & for n st n >= N & n
  in X holds d*f.n <= t.n & t.n <= c*f.n };
  coherence
  proof
    set IT = { t where t is Element of Funcs(NAT, REAL) : ex c,d,N st c > 0 &
    d > 0 & for n st n >= N & n in X holds d*f.n <= t.n & t.n <= c*f.n };
A1: IT is functional
    proof
      let x be object;
      assume x in IT;
      then
      ex t being Element of Funcs(NAT, REAL) st x = t & ex c,d,N st c > 0
      & d > 0 & for n st n >= N & n in X holds d*f.n <= t.n & t.n <= c*f.n;
      hence thesis;
    end;
    f is Element of Funcs(NAT, REAL) & for n st n >= 0 & n in X holds 1*f.
    n <= f . & f. <= 1*f.n by FUNCT_2:8;
    then f in IT;
    then reconsider IT1 = IT as functional non empty set by A1;
    now
      let x be Element of IT1;
      x in IT;
      then
      ex t being Element of Funcs(NAT, REAL) st x = t & ex c,d,N st c > 0
      & d > 0 & for n st n >= N & n in X holds d*f.n <= t.n & t.n <= c*f. n;
      hence x is sequence of  REAL;
    end;
    hence thesis by FUNCT_2:def 12;
  end;
end;

theorem Th36: :: Alternate definition for Big_Theta_Cond
  for f being eventually-nonnegative Real_Sequence, X being set
  holds Big_Theta(f,X) = Big_Oh(f,X) /\ Big_Omega(f,X)
proof
  
  now
    let x be object;
    hereby
      consider N1 being Nat such that
A1:   for n being Nat st n >= N1 holds f.n >= 0 by Def2;
      assume x in Big_Theta(f,X)
      then consider t being Element of Funcs(NAT, REAL) such that
A2:   x = t and
A3:   exA10:n dom F1 byAFINSQ_1:;
      <= t.n & t.n <= c*f.n then
      consider c,d,N such that
A4:   c > and
A5:   d > 0 and
A6:   for n st n >= N & n in X holds d*f.n <= t.n & t.n <= c*f.n by A3;
reconsider a =max(N,N1  Element ofNAT ORDINAL1:ef 12;
A7:   a >= N1       then
A13  -)(-|n1)(-|n :;
      now
        take a;
        let n;
        assume that
A9:     n >= a and
A10:    n in X;
A11:    n >= N by A8,A9,XXREAL_0:2;
        hence d*f.n <= t.n by A6,A10;
        n >= N1 by A7,A9,XXREAL_0:2;
        then f.n >= 0 by A1;
        then d*f.n >= dend;
        hence thesis
      end;
      then
A12:  x in Big_Omega(f,X) by A2,A5;
      now
        take a;
               let n
        assume that
:n =a 
A14:    n in X;
A15:    n >= N by A8,A13,XXREAL_0:2;
        hence t.n <= c*f.n by A6,A14;
        n >= N1 by A7,A13,XXREAL_0:2;
then.>  byA1;
        then d*f.n >= d*0 by A5;
        hence t.n >= 0 by A6,A14,A15;
      end;
       thus F=+ by A2,33
      hence x in Big_Oh(f,X) /\ Big_Omega(f,java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 17
    end;
assume
A16: x in Big_Oh(f,X) /\ Big_Omega(f,X);
    then x in Big_Oh(f,X) by XBOOLE_0:def 4;
    then consider t being Element of Funcs(NAT, REAL) such that
A17: x = t and
A18: ex c,N st c > 0 & for n st n >= N & n in X holds t.n <= c*f.n & t .n>= 0;
    x in Big_Omega(f,X) by A16,XBOOLE_0:def 4;
    then consider s being Element of Funcs(NAT, REAL) such that
A19: x = s and
A20:ex d, st  >0  nstn =N&n  X holds s. >d*. &s .n >= 0;
    consider c,N such that
:c>0 
A22  nst n =N & ninX holds t. = c*.  .n=0 byA18
    consider d,N1 such that
A23: d > 0 and
:for  stn> &n  Xholds s.>=d*f. &s. =0 byA20;
    set a = max(N, N1);
A25: a >= N & a >= N1 by XXREAL_0:25;
    now
      take a;
       n;
      assume that
A26:  n >= a and
A27:  n in X;
      n >= N &n>= N1 by A25,A26,XXREAL_0:2;
      hence d*f.n <= t.n & t.n <= c*f.n by A17,A19,A22,A24,A27;
    end;
    hence x in Big_Theta(f,X) by A17,A21,A23;
  end;n>  k<0;
  hence thesis by TARSKI:2;
end;

definition :: Definition of f(bn) (page 89)
  let f be Real_Sequence, b be Nat;
  func f taken_every b -> Real_Sequence means
  :Def15:
  for n holds it.n = f.(b* n);
  existence
  proof
    deffunc F(Element of NAT) = f.(b*$1);
           setby STIRL2_1:;
A1: for n being Element of NAT holds h.n = F(n) from FUNCT_2:sch 4;
    take h;
    let n;
    thus thesis by A1;
  end;
  uniqueness
  proof
    let j,k be Real_Sequence such that
A2: for n holds j.n = f.(b*n) and
A3: for n holds k.n = f.(b*n);
    now
      let n;
      thus j.n = f.(b*n) by A2
        .= k.n by A3;
    end;
    hence j = k by FUNCT_2:63;
  end;
end;

definition
  let f be eventually-nonnegative Real_Sequence, b be Nat;
  pred f is_smooth_wrt b means

  f is eventually-nondecreasing & f taken_every b in Big_Oh(f);
end;

definition
  let f be eventually-nonnegative Real_Sequence;
  attr f is smooth means

  for b being Element of NAT st b >= 2 holds f is_smooth_wrt b;
end;

theorem :: b-smooth implies smooth (page 90)
  for f being eventually-nonnegative Real_Sequence st ex b being Element
  of NAT st b >= 2 & f is_smooth_wrt b holds f is smooth
proof
  let f be eventually-nonnegative Real_Sequence;
  given b being Element of NAT such that
A1: b >= 2 and
A2: f is_smooth_wrt b;
A3: f is eventually        then considerp9,f9 be object such that
  then consider N3 being Nat such that
A4: for n being Nat st n >= N3 holds f.n <= f.(n+1);
  f taken_every b in Big_Oh(f) by A2;
  then consider t being Element of Funcs(NAT, REAL) such that
A5: f taken_every b = t and
A6: ex c,A16    f=f9and
  consider c,N2 such that
A7: c > 0 and
A8: for n st n >= java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 47
  reconsider N = max(N2, N3) as Element of NAT by ORDINAL1:def 12;
A9: N >= N2 by XXREAL_0:25;
A10: N >= N3 by XXREAL_0:25;
  now
    let a be Element of NAT;
    set i = [/og(b,a)\]
A11: [/log       FPand
AL_0:;
A13: b <> 1 by A1;
    assume
A14: a >= 2;
    then a > 1 by XXREAL_0:2;
    then log(b,a) > log(b,1) by A12,POWER:57;
    then log(b,a) > 0 by A1,A13,POWER:51;
    then reconsider i as Element of NAT by INT_1:3;
    reconsider i1 = b|^i as Element of NAT;
A15: now
      let n;
      defpred P[Nat] meansA33    injava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 23
      a >= 1 by A14,XXREAL_0:2;
      thenen .1 in Onto
A16:  a*n >= 1*n by XREAL_1:64;
      b to_power log(b,a) <= b to_power i by A12,A11,PRE_FF:8;
      thena< b|i by A1A,POWERdef3;
      then
A17:  a*n <= i1*n by XREAL_1:64;
      assume
A18:  n >= N;
      then
A19:  n >= N2 by A9,XXREAL_0:2;
      then
  t=cfn 
:now
        assume f.        then reconsider p199=1,p299= P of rng fp by A32,A40;
        then c*f.n < c*0 by A7        considerf1 be Functionof  ,k such that
        :=f1
      end;
A22:  for k st P[k] holds P[k+1]
      
        let k;
        set m = b|^k*n;
        assume
A23:    f.m <= c|^k*f.n;
        reconsider m as Element of NAT by ORDINAL1:def 12;
        c*f.m <= c*(c|^k*f.n) by A7,A23,XREAL_1:64;
        then c*f.m <= c*c|^k*f.n;
        then c*f.m <= (c to_power 1)*(c to_power k)*f.n;
        then
y A7,POWER:;
        m >= N2
        proof
          per cases;
          suppose
            java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
then|*=(0* . 1*by24
              .= n;
            hence thesis by A9,A18,XXREAL_0:2;
          end;
          suppose
            k > 0;
            then b to_power k > 1 by A12,POWER:35;
            then b|consider h be Function of Segm n,Segm k such that
            hence A51:  h  onto"increasing by A1,A10,STIRL2_1:;
          end;
        end;
        then (f taken_every b).m <= c*f.m by A5,A8;
        then
A25:    f.(b*m) <= c*f.m by Def15;
        f.(b|(k+1)* =f.(bto_power k+)*)
          .= f.((b to_power 1)*(b to_power k)*n) by A1,POWER:27
java.lang.StringIndexOutOfBoundsException: Range [13, 10) out of bounds for length 25
          .= f.(b*(b|^k*n));
        thesisby A25,24XXREAL_0:;
      end;
      .b|0*) =f.( to_power 0* .= .(*)by POWER:24
        =1*.
A56:Iis'increasing by STIRL2_1:;
      then
A26:  P[0];
     for k holds [k]from NAT_1:sch 2( A26,A22 );
      then f.(b|^i*n) <= c|^i*f.n;
      then
A27:  (f taken_every i1).n <= c|^i*f.n by Def15;
A28:  n >= N3 by A10,A18,XXREAL_0:2;
      then a*n >= N3 by A16,XXREAL_0:2;
      then f.(a*n) <= f.(i1*n) by A4,A17,Th1;
      then (f taken_every a).n <= f.(i1*n) by Def15;
      then (f taken_every a).n <= (f taken_every i1).n by Def15;
      hence (f taken_every a).n <= c|^i*f.n by A27,XXREAL_0:2;
      f.n <= f.(a*n) by A4,A28,A16,Th1;
      hence (f taken_every a).n >= 0 by A21,Def15;
A61  Onto=ard *java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 54
    c|^i = c to_power i;
    then f taken_every   F= cardk+ and
FUNCT_2:8,POWER:34;
    then f taken_every a in Big_Oh(f) by A15;
    hence f is_smooth_wrt a by A3;
  end;
  hence thesis;
end;

theorem Th38: :: First half of smoothness rule proof (page 90)
  for f being eventually-nonnegative Real_Sequence, t being
eventually-nonnegative eventually-nondecreasing Real_Sequence,
 b being Nat
 st f is smooth & b >= 2 & t in Big_Oh(f, the set of all
 b|^n where n is Element of
  NAT  ) holds t in Big_Oh(f)
proof
  let f be eventually-nonnegative Real_Sequence, t be eventually-nonnegative
  eventually-nondecreasing Real_Sequence, b be Nat;
  assume that
A1: f is smooth and
A2: b >= 2 and
A3: t in Big_Oh(f, the set of all  b|^n where n is Element of NAT  );
    reconsider b as Element of NAT by ORDINAL1:def 12;
A4: f is_smooth_wrt b by A1,A2;
  then f taken_every b in Big_Oh(f);
  then consider s being Element of Funcs(NAT,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 8
A5: f taken_every b = s and
A6: ex c,N st c > 0 & for n st n >= N holds s.n <= c*f.n & s.n >= 0;
  consider c,N3 such that
A7: c > 0 and
A8: for n st n >= N3 holds s.n <= c*f.n & s.n >= 0 by A6;
A9: b > 1 byjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  f is eventually-nondecreasing by A4;

A10: for m being Nat st m >= N1 holds f.m <= f.(m+1);
  consider N2 being Nat such that
A11: for m being Nat st m >= N2 holds t.m <= t.(m+1) by Def6;
  set X = the set of all  b|^n where n is Element of NAT ;
  consider r   |(X1\X)) c= F.:(X1\X) & for x st x in X holds f.x=F.x}
A12: r = t and
A13: ex c,N st c > 0 & for n st n >= N & n in X holds r.n <= c*f.n & r.n
  >= 0 by A3;
  consider a being Real, N4 such that
A14: a > 0 and
A15: for n st n >= N4 & n in X holds r.n <= a*f.n & r.n >A3:Fisone-o-ne and
  reconsider N0 = max(max(N1,N2),max(N3,N4)) as Element of NAT
           ORDINAL1def ;
A16: N0 >= max(N1,N2) by XXREAL_0: reconsider FX=F.:XX as finite set;
  max(N1,N2) >= N2 by XXREAL_0:25;
  then
A17: N0 >= N2 by A16,XXREAL_0:2;
  max(N1,N2) >= N1 by XXREAL_0
  then
A18: N0 >= N1 by A16,XXREAL_0:2;
N3N4) byXXREAL_0:25
  max(N3,N4) >= N4 by XXREAL_0:25;
  then
A20: N0 >= N4 by A19,XXREAL_0:2;
   by XXREAL_0:;
  then
A21: N0 >= N3 by A19,XXREAL_0:2;
  consider N5 being Nat such that
A22: for  thus [fX,XXXXF:X]implies P[f,X1,Y1]
  reconsider N = max(N5, max(1, b*N0)) as Element of NAT by ORDINAL1:def 12;
A23: N >= max(1, b*N0) by XXREAL_0:25;
  max(1, b*N0) >= b*N0 by XXREAL_0:25;
  then
A24: N >= b*N0 by A23,XXREAL_0:2;
  :  rng (f|XX)f.XX&F:(1\XX)\/XX)=:X1\\.X byby RELAT_1115,20;
  then b*N0 >= 1*N0 by XREAL_1:64;
  then
A25:N > N0 by A24,XXREAL_0:2;
A26:,RELAT_1:61;
A27 max(1, b*N0) >= 1 by XXREAL_0:25
  then
A28: N >= 1 by A23,XXREAL_0:2;
A29: now
    N*b" >= b"*(b*N0) by A24,XREAL_1:64;
thenN* = b"**0
    then
A30: N*b" >= 1*N0 by A2,XCMPLX_0:def 7;
    let n
    set n1 = b to_power [\log(b,n)/];
    assume
A31: n >= N;
    then
A32: n = b to_power log(b,n) by A23,A27,A9,POWER:def 3;
    n >= 1 by A28,A31,XXREAL_0:2;
    then log(b,n) >= log(b,1) by A9,PRE_FF:10;
    then
33: log(, =0by A9P:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
A34: now
      log(b,n) - 1 < [\log(b,n)/] by INT_1:def 6;
      then 1 + (log(b,n) - 1) < [\log(b,n)/] + 1 by XREAL_1:6;
      then
A35:  1 + (-1) + log(b,n) < [\log(b,n)/] + 1;
      assume [\log(b,n)/] < 0;
      then [\log(b,n)/] <= -1 by INT_1:8;
      hence contradiction by A33,A35,XREAL_1:6;
    end;
    then reconsider i = [\log(b,n)/] as Element of NAT by INT_1:3;
    reconsider n3 = [\log(b,n)/] + 1 as Element of NAT by A34,INT_1:3;
    n1 = b|^i by POWER:41;
    then reconsider n1 as Element of NAT;
    set n2 = b*n1;
A36: n2 = (b to_power 1)*(b to_power [\log(b,n)/])
      .= b to_power ([\log(b,n)/] + 1) by A2,POWER:27;
    then n2 = b|^n3 by POWER:41;
    then
A37: 
XREAL_1:64java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    then n*b" >= N0 by A30,XXREAL_0:2;
    then
A38: n/b >= N0 by XCMPLX_0:def  then XX,F.:XX are_equipotent by A3,CARD_1:33;
    log(b,n) <= [\log(b,n)/] + 1 by INT_1:29;
    then
A39: n <= n2 by A9,A32,A36,PRE_FF:8;
    then n*b" <= b"*(b*(b to_power [\log(b,n)/])) by XREAL_1:64;
    then n*b" <= (b"*b)*(b to_power [\log(b,n)/]);
    then n*b" <= 1*(b to_power [\log(b,n)/]) by A2,XCMPLX_0:def 7;
    then n/< by XCMPLX_0d 
    then
A40: n1 >= N0 by A38,XXREAL_0:2;
    then
A41 n1>= A21XXREAL_02;
A42: n >= N0 byproof
> N4byA20XXREAL_0:;
    then n2 >= N4 by A39,XXREAL_0:2;
    then
A43: t.n2 <= a*f.n2 by A12,A15,A37;
    f.(b*n1) = s.n1 by A5,Def15;
    then    hence 
    then
A44: a*f.(b*n1) <= a*(c*f.n1) by A14,XREAL_1:64;
    n >= N2 by A17,A42,XXREAL_0:2;
    then t.n <= t.n2 by A11,A39,Th1;
    then t.n <= a*f.n2 by A43,XXREAL_0:2;
    then
java.lang.StringIndexOutOfBoundsException: Range [13, 3) out of bounds for length 39
A46: n1 >= N1 by A18,A40,XXREAL_0:2;
    [\log(b,n)/] <= log(b,n) by INT_1:def 6;
    then n1 <= n by A9,A32,PRE_FF:8;
    then a*c*f.n1 <= a*c*f.n by A10,A7,A14,A46,Th1,XREAL_1:64;
    hence t.n <= a*c*f.n by A45,XXREAL_0:2;
    n >= N5 by A26,A31,XXREAL_0:2;
    hence t.n >= 0 by A22;
  end;
A47: t is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  a*c > c*0 by A7,A14,XREAL_1:68java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 19
  hence thesis by A47,A29;
end;

theorem Th39: :: Second half of smoothness rule proof (page 90),
  for f being eventually-nonnegative Real_Sequence, t being
eventually-nonnegative eventually-nondecreasing Real_Sequence, b being F2c=S2
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
 b|^n where n is Element of
  NAT  ) holds t in Big_Omega(f)
proof
  let f be eventually-nonnegative Real_Sequence, t be java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 12
  eventually-nondecreasing Real_Sequence, b be Element of NAT;
  assume that
A1: f is smooth and
A2: b >= 2    dom fX1 byA1def1;
A3: t in Big_Omega(f, the    then XX,f.XX are_equipotent by A32,CARD_1:33;
  considerN2 Nat suchthat
A4 cardFX=rngf)byA21,RELAT_1:java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
A5: f thenrngf|XX=FX byA33,CARD_2;
  then (f taken_every b) in Big_Oh(f);    hence byA19,A31,
  then consider s being Element of Funcs(NAT,REAL) such that
A6: (f taken_every b) = s and
A7  cN stc > 0&for n st n> N holds s.<= c*f.n & s.n >= 0;
  consider c,N3 such that
A8: c > 0 and
A9: for n st n >= N3 holds s.n <= c*f.n & s.n >= 0 by A7;
  f is eventually-nondecreasing by A5;
  then consider N1 being Nat such that
A10: for m being Nat st m >= N1 holds f.m <= f.(m+1);
  consider N5 being Nat such that
A11: for n being Nat st n >= N5 holds t.n >= 0 by Def2;
  set X = the set of all  b|^n where n is Element of NAT ;
  consider r being Element of Funcs(NAT, REAL) such Lm4 for X, for F be Function of X,Y st  F=  F is oneto-ex XF 
A12: r XFinSequenceofst dom  = card X &(card X)!Sum XF=card {h where h is
A13: ex d,N st d > 0 & for n st nFunction  Xrng F h  -to-one  for  st xin X h.>.x& java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
 
    F be  X,Ysuch that
A14: a >and
A15: for n st n >= N4 & n in X holds a*f.n <= r.n & r.n >= 0 by A13;
A16:b >1 X2;
  reconsiderN0 = maxmax(1,N2)max(N3,N4)asElementof NAT
         by ORDINAL1:def 12;
A17: N0 >= max(N1,N2) by XXREAL_0:25;
  max(N1,N2) >= N2 by XXREAL_0:25;
  then
A18: N0 >= N2 by A17,XXREAL_0:2;
  max(N1,N2) >= N1 by XXREAL_0:25;
  then
A19: N0 >= N1 by A17,XXREAL_0:2;
A20: N0 >= max(N3,N4) by XXREAL_0:25;
  ) >=N4 byXXREAL_0:25;
  then
A21: N0 >= N4 by A20,XREAL_0:2;
  max(N3,N4) >= N3 by XXREAL_0:25;
  then
A22: N0 >= N3 by A20,XXREAL_0:2;
  reconsider N = max(N5, max(1, b*N0)) as Element of NAT
      by ORDINAL1:def 12;
A23: N >= max(1, b*N0) by XXREAL_0:25;
  max(1, b*N0) >= b*N0 by XXREAL_0:25;
  then
A24: N >= bA6:for x being st  in X holdsFy9.  fyx fromFUNCT_2:ch2();
  b >= 1 by A2,XXREAL_0:2;
  then b*N0 >= 1*N0 by XREAL_1:64;
  then
A25: N >= N0 by A24,XXREAL_0:2;
A26: N >= N5 by XXREAL_0:25;
A27:max(,b*0 = 1by :25;
  then
A28: N >= 1 by A23let xbeing object such that
A29: now
    N*b =b"*b*N0)by ,XREAL_1:java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    then N    n  cardX  A8,AT_1:;
    then
A30: N*b" >= 1*N0 by A2,XCMPLX_0:def 7;
    n
    set n1 = b to_power [\log(b,n)/];
A31: log(b,n) <= [\log(b,n)/] + 1 by INT_1:hence thesis;
    assume
A32: n >= N;
    then
A33: n = b to_power A9:for x  objectst x Segmcard X
    n >= 1 by A28,A32,XXREAL_0:2;
    then
A34: log(b,n) >= log(b,1) by   for y being object st y in dom Fy9 holds Fy9.y is finite
    [\log(b,n)/] >= 0
    proof
      log(b,n) - 1 < [\log(b,n)/] by INT_1:def  proof
      then    let y  object;
      then
A35:  1 + (-1) + log(b,n) < [\log(b,n)/] + 1;
      assume [\log(b,n)/] < 0;
      then [\log(b,n)/] <= -1 by INT_1:8;
      then log(b,n) < 0 by A35,XREAL_1:6;
      hence contradiction by A16,A34,POWER:51;
    end;
    then reconsider i = [\log(b,n)/] as Element of NAT by INT_1:3;
A36: n1 = b|^i by POWER:41;
    n*b" >= N*b" by A32,XREAL_1:64;
     reconsider :: Definitions of Radix-2k Signed-Digit number and its adder algorithm
    
A37: n/b x,: licenses, or see http://www.gnu.org/licenses/gpl.html and
    reconsider n1      ,   java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 77
A38: n1 in X by A36;
    et   *n1
   = )(to_power[logn/
      .(k9 + ((9(k9 div m9*n9))*n9) mod n9
    then
A39 > (+)modk=0or(+)k=( k) +java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
    tjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
    then nend
     ikmn,p,x,  
    then n/b <= n1 by assume f9 in Choose(X,n+1roof
    then
A40: n1 >= N0 by A37,XXREAL_0:2;
   then n1 = N4 by A21,XREAL_0:;
    then
:a*n1< .n1byA16: ("{0})n1by ;
n1 >N3java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 35
    then s.n1 <= c*f.n1 ndiv   \/I1]&(  I1 +\/I1] <=( divI1  nI1 
*n1 = c"*cfn1) yjava.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 49
    then c"*s.n1 <= (c"*c)*f.n1;
then "*.n1<= 1fn1  by A8,CMPLX_0:def 7java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
    then c"f(*1 < f.n1 by A6,ef15;
    then
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
    [java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    then
o_power \b)/ <=b to_power (,n)by ,PRE_FF:8java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
n> 
then n >N1byA19XXREAL_0;
    then f.n <= f.n2 by A10,A39,Th1;
    then
A44: a*c"*f.n <= a  2 to_power n;
    n1 >=definition
    then t.n1 <= t.n by A4,-adix(k+1}java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
     defpredP[at]means Radix$1)>= 2+;
    java.lang.StringIndexOutOfBoundsException: Range [23, 8) out of bounds for length 44
    hence a*c"*f.n <= t.n by A44,XXREAL_0:2;
    n =N5 byA26A32,XXREAL_0:;
   t.n >=0 by A11;
  end;
A45: t is Element of Funcs(NAT, REAL) by FUNCT_2:8;
  ac >c*0byA8A14,XREAL_1:68;
encethesisbyA45A;;
  for ebeobject holds e  0-D  e=0

theorem :: also Problem 3.29:: Smoothness Rule (page 90)
  for f being eventually-nonnegative Real_Sequence, t being
nonnegative eventually-,b Element
of NAT st f is smooth & b >= 2 & t in Big_Theta(f, thef.= and
 b|^n where n is Element of
  NAT  ) holds t in Big_Theta(f)
proof
  let f be eventually-nonnegative Real_Sequence, t be eventually-nonnegative
nondecreasingReal_Sequence  be Elementof NAT;
  assume that
A1: f is smooth & b >= 2 and
:  Big_Thetaf,thes ofall  b|nwheren is Element of NAT  )java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
setX  the of  b|n wheren is Element f NAT;
A3: in (,)/\Big_Omega,) by A2,Th36;
  then t;
  then
A4:t in (f yA1,h39java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
  t in Big_OhthenIntegerbyTh10
  then t in Big_Oh(f) by A1,Th38;
  hence thesis by A4,XBOOLE_0:def 4;
end;

:: Section 3.5 omitted

begin :: Operations on Asymptotic Notation (Section 3.6)


let be  emptyset,F, be FUNCTION_DOMAIN of X,REAL;
  func F + G -> java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 15
  e;
 of Funcs(,REAL)stf  F & ginG  for
  n being Element of X holds t.n = f.n + g.:: and Nats from Radix-2^k SD numbers
  coherence
  proof
  then
X) st f  F  inG  forn  Element   holdst.  .+g
    .  ,nbeNat  be ofn,k-)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
A1: now
         ii,n be Nat,x Tuple of ,kSD;
A2:   g in G by XBOOLE_0:def 1;
      g is Function of X,REAL by A2,FUNCT_2:def 12;java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5
s   X  :8;
      considerfbe object such 
A3:   f in F A2: len x = 1 by :def 7;
      f is Function of X,REAL by A3,FUNCT_2
 thenreconsider as Element ofFuncsXREAL)by FUNCT_2:;
      defpred P[Element of       defpred P[Element of X
:  for x being Element of X ex y being Element of REAL st P[x,y];
      consider t    XREALsuch 
  forx  Element of X java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 69
reconsider  asElementofFuncsX )by :;
      t in IT by A3,A2,A5;
nonempty;
    end;
    IT is        ttheny in F.X\. by A29A30XBOOLE_0:def;
    proof
      etx beobject;
      assume x A7 =bydef
      then
      ex   A,FINSEQ_1:ef3;
of FuncsX,EAL)st  in F&g inG&for n being Elementof holds t. =f.
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 12
      hence thesis;
    end;
    ;
      func (    d    1
      let x be Element of IT1;
      x in IT;
      
(X,REAL)stx=t&ex f,  Element
of Funcs(X    
      + g.n;
      hence x is Function of X, java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
    end;
    hence thesis by FUNCT_2        (k)|i=Radixk) to_power i . A7POWER24java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
  endA8 i  ;
end;

:
 X   ,, beFUNCTION_DOMAINX,;
A8dom=Segnbydef java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
eretisElement of
java.lang.StringIndexOutOfBoundsException: Range [6, 2) out of bounds for length 24
  n being Elementend
coherence
  proof
    set  ;
Funcs(X,theorem:
     . ;
A1: now
      consider g  suppose
A2:  end;
      g is ofXREAL byA2ef ;
      then java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
considerf be-(*k;
A3java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
 is  of X,REALby ,FUNCT_2:def12
      then reconsider f as Element of Funcs(X,REAL) by FUNCT_2:8;
      defpred P[Element   assume
A4:   for A3: Radix(k)1 <=i1 & Radix(k)1< i2 by A2,Th12java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
 proof A4: z <= Radix(k1 +((k)1 by XREAL_17java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
         consider y being Real such that    then
:       [,]
         java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 6
         y;
        thus thesis by A5;
       end;
           then -dix( =-2-;
A6:   for x being Element    SD_Add_Carry()= 0by ,Def10;
      reconsider t as Element of Funcs(Xend;
tinITbA,A2,A6;
      henceIT     then card Intersection(,)(card -((1)by A2,,43,A44A42Th60;
    end;
    IT is functional
    proof
      let x be  end;
      java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
      ex t being Element java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 22
of Funcs( hence DigA(DecSD(,,k),)=DigitDC(m,1,)by Def9
n g.)
      hence thesis;
    end;
  then reconsider IT1 = IT as functional non empty set by A1;

      xbe of IT1;
      x in IT;
          u>  and
      ex being  ofFuncs( REAL) st =t  ,  Element
of Funcs set R=Radixk ^u;
      n .);
       xFunction  X,;
    end;
    hence thesis by  <java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 33
  end;:   N=SubDigitDecSD(p(+)k)(+,)byA3,6Def9
java.lang.StringIndexOutOfBoundsException: Range [11, 4) out of bounds for length 4

theorem :: Properties, Part 1 (page 91; Problem 3.33)
  for f,g being eventually-nonnegative Real_Sequence holds Big_Oh(f) +
  (java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
proof
letf,g beeventually-nonnegative Real_Sequence;
  now
    let x be object;
    java.lang.StringIndexOutOfBoundsException: Range [38, 6) out of bounds for length 38
                     =ubyA12F
       considertElement ofNATREAL 
A1   x=t and
A2:   ex f9,g9 being Element of Funcs(NATthen  > ,:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
g9inBig_Oh()& for n being Element of NAT holds t.njava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 30
      consider iin domDD A11F:def3java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
A3:f9in Big_Oh(f)and
A4:   g9 in Big_Oh(g) and
A5:   for n being Element of NAT holds t.n = f9.n + g9.n by A2;
      consider r   ofFuncs(NAT, REAL) such that
A6:   r = f9 and
7:ex ,N st c>0 & for nst n >=Nholds             then
      consider c,N1such that
A8:   c>0and
java.lang.StringIndexOutOfBoundsException: Range [14, 2) out of bounds for length 59
      sbeing  Funcs(NAT,REAL) such that
A10:         hence thesis by A18,A17,A15,PARTFUN1:ef 6;
A11:          suppose
      consider d,N2 such that
A12:  d >              =DigitSDDecSDpu1,) assumenotxin Sjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
 endjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
      N = max(N1,2)
set e= max(d;
A14:  N >= N2 by      then M < R ;
   >N1  XXREAL_0:java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
A16:  now
A:1java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        
A17:    n >= N reconsider  *> ;
        then
A18:    n >= N1 XREAL_1232
        then f9.n >=      =mbyTh20;
        java.lang.StringIndexOutOfBoundsException: Range [12, 9) out of bounds for length 45
A19:    f9.n + g9.n >= 0 + g9.n by;
        r.n <= c* m  1, &n is_represented_by 1k implies
        then f.n*c >= 0*c by A9,A18;
  (((m,1,k),1)+DigA(DecSD(n,1,k),1)) = SD_Add_Carry(m
        then
:c*. = *f.n.n byXREAL_1:4,:25;
        r.n <= c*f.proof
        then  
 
:.n n< *fn +s.n XREAL_1:;
A22:    n >= N2 by A14,A17,XXREAL_0:2;
then .n <dg    then considerfbe  ,rng such that
   g.> *by A13,;
gn> by XREAL_1:;

A23:    d*g.n <= e*g.n by XREAL_1:64,XXREAL_0:25;
        .n<= d*.nby A13,A22;
        then s.n <= e*g.n by A23,XXREAL_0:2;
        then e*f.n + s.n <= e*f.n + e*g.n by XREAL_1:6;
        then r.n + s.n <= e*(f.n    .=m div (adix) | n)byNAT_D:34;
        then r.n + s.n <= e*(f+g).n by java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 35
        hence t.    consider y being object such that
        0 + g9.n >= 0 by A10,A13,A22;
        hence t.n >= 0 by A5,A19;
      end;
      e >0 A8,A81: Fy.y=Fyy by A79,FUNCT:ef 
      hence x in Big_Oh(f+g) A2 =2
    end;
    then f in ()A6,78,A81;
    thenjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 62
A24: x = t and
 exc,st >    nst n =  .n< c*f+).&t.>java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
    consider c,N3 such that
A26: c > 0 and
A27: for n st n >= N3 holds t.n <= c*(f+g).n & t.n >= 0 by A25;
    consider N1 being Nat such that
A28: for n being Nat st n >= N1 holds f.n >= 0 by Def2;
    consider N2 being Nat such that
being Nat st n >= N2 holds g.n >= 0 by Def2;
    reconsider Njava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      ORDINAL1:12;
A30: N >= max(N1,N2) by XXREAL_0:25;
    defpred Q[Element of NAT,Real] means (t.$1 <= c*f.$1 implies $2 = 0) & (c*
    f.$1 < t.$1 implies $2 = t.$1-c*f.$1);
A31:   func  '+' y->Tuple of,(-SD)means

      let n;
      per casesjava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
      suppose
A32:      t.n     takejava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
        0 in REAL by XREAL_0:def 1;
        hence  proof
      ;
      suppose
A33:     c*f.n < t.n;
 as Element of REAL by XREAL_0:def 1;
        take y;
        thus thesis by A33;
      end
    end;
        .k2j A8ADef3
A34: for x being  len k2=n by CARD_1:ef 7;
A35: endjava.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
A36: g9 is Element of Funcs(  implies SDDec(DecSD(m,1,k)'+'DecSD(n,1,k)) = SD_Add_Data
     DsetShwhere   Functionof X,g : h  --e & or x st x in java.lang.StringIndexOutOfBoundsException: Range [77, 78) out of bounds for length 77
    
A37: N >= N2 by A30,   domDigitSD( + )  A7F:ef3java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 7
      let n
     java.lang.StringIndexOutOfBoundsException: Range [12, 13) out of bounds for length 12
A38:forn  n> 1  for kx,y stk = 2 &xis_represented_byn,&
      then n >= N3 by A35,XXREAL_0:2;
      then
9:  .n< *f+.by A27;
      n> N2 yA37,A38,XXREAL_0java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
      hengn =  ;
      then
A40  *g.< c*. by ;;
      per cases;
      suppose
        t:nSegn A3F:;
java.lang.StringIndexOutOfBoundsException: Range [29, 8) out of bounds for length 51
      end;
  suppose
A41    t. > c*.
        t.n <= c*(f.n+g.n) by A39     zn=DecSDxn, + (nk;
        then t.  DigitSD()=n+ byCARD_1def7;
        
A42:    t.n -    proof
        t.n > 0 + A13:1< and
        then t.n - c*f.n >= 0 by XREAL_1:19;
        hence g9.n <= c*g.n A17::iinSeg n1  A13FINSEQ_11java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
      end;
    end;
    then
(g) by A26,A36java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    defpred P[A21:    ((DigitSD(zn
    (FINSEQ1def 
A44: for          =,,)by A19,ef6
    proof
      let n;
      per cases;
suppose
       n=*f;
        hence thesis;
      end;
      suppose
A45:       c*f.n < t.n;
        reconsider y = c*f.n as Element           =(igitSD).+1  A6Def6
        take y;
        thusthesisbyA45java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      end;

considerf9 being sequence of REAL such that
A46: for x being Element of NAT holds P[x,f9.x] from FUNCT_2:sch 3(java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 7
    );
 now
      let+))+SD_Add_CarryDecSDx(+,)(+-1 + DigADecSD((+)k)
      per cases;
      suppose      n+,) (DigADecSD((n+1,)(+1-1) + DigA((,n+,java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
A48:    t.n <= c*f.n;
java.lang.StringIndexOutOfBoundsException: Range [61, 8) out of bounds for length 29
t. =. +g9n byA46,48;
      nd;

        c*f.n < t.n;
        then f9.     ^ n) + SumDigitSDzn A5,m3
        hence f9.n + g9.n = t.n;
e;
    end;
A49: f9 is Element of Funcs(NAT,REAL) by FUNCT_2:8;
    max(N1,N2) >= N1 by XXREAL_0:25;
    then
A50: N >= N1 by A30,XXREAL_0:2;
    now
      let n;
      assume
A51:  n >= N;
      then n >= N3 by A35,XXREAL_0:2;
      then
A52:  t.n >= 0 by A27;
      n >= N1 by A50,A51,XXREAL_0:2;
      then
A53:  f.n >= 0 by A28;
      per cases;
      suppose
        t.n <= c*f.n;
        hence f9.n <= c*f.n & f9.n >= 0 by A46,A52;
      end;
      suppose
        t.n > c*f.n;
        hence f9.n <= c*f.n & f9.n >= 0 by A26,A46,A53;
      end;
    end;
    then f9 in Big_Oh(f) by A26,A49;
    hence x in Big_Oh(f) + Big_Oh(g) by A24,A49,A36,A43,A47;
  end;
  hence thesis by TARSKI:2;
end;

theorem :: Properties, Part 3 (page 91; Problem 3.33)
  for f,g being eventually-nonnegative Real_Sequence holds max(Big_Oh(f)
  , Big_Oh(g)) = Big_Oh(max(f,g))
proof
  let f,g be eventually-nonnegative Real_Sequence;
  now
    let x be object;
    hereby
      assume x in max(Big_Oh(f), Big_Oh(g));
      then consider t being Element of Funcs(NAT,REAL) such that
A1:   x = t and
A2:   ex f9,g9 being Element of Funcs(NAT,REAL) st f9 in Big_Oh(f) &
      g9 in Big_Oh(g) & for n being Element of NAT holds t.n = max(f9.n, g9.n);
      consider f9,g9 being Element of Funcs(NAT,REAL) such that
A3:   f9 in Big_Oh(f) and
A4:   g9 in Big_Oh(g) and
A5:   for n being Element of NAT holds t.n = max(f9.n, g9.n) by A2;
      consider s being Element of Funcs(NAT, REAL) such that
A6:   s = g9 and
A7:   ex c,N st c > 0 & for n st n >= N holds s.n <= c*g.n & s.n >= 0 by A4;
      consider d,N2 such that
A8:   d > 0 and
A9:   for n st n >= N2 holds s.n <= d*g.n & s.n >= 0 by A7;
      consider r being Element of Funcs(NAT, REAL) such that
A10:  r = f9 and
A11:  ex c,N st c > 0 & for n st n >= N holds r.n <= c*f.n & r.n >= 0 by A3;
      consider c,N1 such that
A12:  c > 0 and
A13:  for n st n >= N1 holds r.n <= c*f.n & r.n >= 0 by A11;
      set e = max(c,d);
A14:  e > 0 by A12,XXREAL_0:25;
      reconsider N = max(N1,N2) as Element of NAT;
A15:  N >= N2 by XXREAL_0:25;
A16:  N >= N1 by XXREAL_0:25;
      now
        let n;
        assume
A17:    n >= N;
        then
A18:    n >= N1 by A16,XXREAL_0:2;
        then r.n <= c*f.n by A13;
        then f.n*c >= 0*c by A13,A18;
        then f.n >= 0 by A12,XREAL_1:68;
        then
A19:    c*f.n <= e*f.n by XREAL_1:64,XXREAL_0:25;
A20:    n >= N2 by A15,A17,XXREAL_0:2;
        then s.n <= d*g.n by A9;
        then g.n*d >= 0*d by A9,A20;
        then g.n >= 0 by A8,XREAL_1:68;
        then
A21:    d*g.n <= e*g.n by XREAL_1:64,XXREAL_0:25;
        s.n <= d*g.n by A9,A20;
        then
A22:    s.n <= e*g.n by A21,XXREAL_0:2;
        e*g.n <= e*max(f.n, g.n) by A14,XREAL_1:64,XXREAL_0:25;
        then
A23:    s.n <= e*max(f.n, g.n) by A22,XXREAL_0:2;
        r.n <= c*f.n by A13,A18;
        then
A24:    r.n <= e*f.n by A19,XXREAL_0:2;
        e*f.n <= e*max(f.n, g.n) by A14,XREAL_1:64,XXREAL_0:25;
        then r.n <= e*max(f.n, g.n) by A24,XXREAL_0:2;
        then max(r.n, s.n) <= e*max(f.n, g.n) by A23,XXREAL_0:28;
        then max(r.n, s.n) <= e*max(f,g).n by Def7;
        hence t.n <= e*max(f,g).n by A5,A10,A6;
        max(f9.n, g9.n) >= f9.n & f9.n >= 0 by A10,A13,A18,XXREAL_0:25;
        hence t.n >= 0 by A5;
      end;
      hence x in Big_Oh(max(f,g)) by A1,A14;
    end;
    assume x in Big_Oh(max(f,g));
    then consider t being Element of Funcs(NAT,REAL) such that
A25: x = t and
A26: ex c,N st c > 0 & for n st n >= N holds t.n <= c*max(f,g).n & t.n >= 0;
    consider c,N3 such that
A27: c > 0 and
A28: for n st n >= N3 holds t.n <= c*max(f,g).n & t.n >= 0 by A26;
    consider N1 being Nat such that
A29: for n being Nat st n >= N1 holds f.n >= 0 by Def2;
    consider N2 being Nat such that
A30: for n being Nat st n >= N2 holds g.n >= 0 by Def2;
    reconsider N = max(N3,max(N1,N2)) as Element of NAT
       by ORDINAL1:def 12;
    defpred P[Element of NAT,Real] means (f.$1 >= g.$1 or $1 < N implies $2 =
    t.$1) & (f.$1 < g.$1 & $1 >= N implies $2 = 0);
    defpred Q[Element of NAT,Real] means (f.$1 >= g.$1 & $1 >= N implies $2 =
    0) & (f.$1 < g.$1 or $1 < N implies $2 = t.$1);
A31: for x being Element of NAT ex y being Element of REAL st P[x,y]
    proof
      let n;
      per cases;
      suppose
        f.n >= g.n;
        hence thesis;
      end;
      suppose
A32:    f.n < g.n;
        thus thesis
        proof
          per cases;
          suppose
            n < N;
            hence thesis;
          end;
          suppose
A33:          n >= N;
            0 in REAL by XREAL_0:def 1;
            hence thesis by A32,A33;
          end;
        end;
      end;
    end;
    consider f9 being sequence of REAL such that
A34: for x being Element of NAT holds P[x,f9.x] from FUNCT_2:sch 3(A31
    );
A35: for x being Element of NAT ex y being Element of REAL st Q[x,y]
    proof
      let n;
      per cases;
      suppose
A36:    f.n >= g.n;
        thus thesis
        proof
          per cases;
          suppose
            n < N;
            hence thesis;
          end;
          suppose
A37:          n >= N;
            0 in REAL by XREAL_0:def 1;
            hence thesis by A36,A37;
          end;
        end;
      end;
      suppose
        f.n < g.n;
        hence thesis;
      end;
    end;
    consider g9 being sequence of REAL such that
A38: for x being Element of NAT holds Q[x,g9.x] from FUNCT_2:sch 3(A35
    );
A39: N >= N3 by XXREAL_0:25;
A40: now
      let n be Element of NAT;
      per cases;
      suppose
        n < N;
        then f9.n = t.n & g9.n = t.n by A34,A38;
        hence t.n = max(f9.n, g9.n);
      end;
      suppose
A41:    n >= N;
        then
A42:    n >= N3 by A39,XXREAL_0:2;
        thus t.n = max(f9.n, g9.n)
        proof
          per cases;
          suppose
A43:        f.n >= g.n;
A44:        t.n >= 0 by A28,A42;
            f9.n = t.n & g9.n = 0 by A34,A38,A41,A43;
            hence thesis by A44,XXREAL_0:def 10;
          end;
          suppose
A45:        f.n < g.n;
A46:        t.n >= 0 by A28,A42;
            f9.n = 0 & g9.n = t.n by A34,A38,A41,A45;
            hence thesis by A46,XXREAL_0:def 10;
          end;
        end;
      end;
    end;
A47: g9 is Element of Funcs(NAT,REAL) by FUNCT_2:8;
A48: N >= max(N1,N2) by XXREAL_0:25;
    max(N1,N2) >= N2 by XXREAL_0:25;
    then
A49: N >= N2 by A48,XXREAL_0:2;
    now
      let n;
      assume
A50:  n >= N;
      then n >= N3 by A39,XXREAL_0:2;
      then
A51:  t.n >= 0 & t.n <= c*max(f,g).n by A28;
      n >= N2 by A49,A50,XXREAL_0:2;
      then g.n >= 0 by A30;
      then
A52:  0*g.n <= c*g.n by A27;
      per cases;
      suppose
        f.n >= g.n;
        hence g9.n <= c*g.n & g9.n >= 0 by A38,A50,A52;
      end;
      suppose
A53:    f.n < g.n;
        then max(f.n,g.n) = g.n by XXREAL_0:def 10;
        then max(f,g).n = g.n by Def7;
        hence g9.n <= c*g.n & g9.n >= 0 by A38,A51,A53;
      end;
    end;
    then
A54: g9 in Big_Oh(g) by A27,A47;
A55: f9 is Element of Funcs(NAT,REAL) by FUNCT_2:8;
    max(N1,N2) >= N1 by XXREAL_0:25;
    then
A56: N >= N1 by A48,XXREAL_0:2;
    now
      let n;
      assume
A57:  n >= N;
      then n >= N3 by A39,XXREAL_0:2;
      then
A58:  t.n >= 0 & t.n <= c*max(f,g).n by A28;
      n >= N1 by A56,A57,XXREAL_0:2;
      then f.n >= 0 by A29;
      then
A59:  0*f.n <= c*f.n by A27;
      per cases;
      suppose
A60:    f.n >= g.n;
        then max(f.n,g.n) = f.n by XXREAL_0:def 10;
        then max(f,g).n = f.n by Def7;
        hence f9.n <= c*f.n & f9.n >= 0 by A34,A58,A60;
      end;
      suppose
        f.n < g.n;
        hence f9.n <= c*f.n & f9.n >= 0 by A34,A57,A59;
      end;
    end;
    then f9 in Big_Oh(f) by A27,A55;
    hence x in max(Big_Oh(f), Big_Oh(g)) by A25,A55,A47,A54,A40;
  end;
  hence thesis by TARSKI:2;
end;

definition :: Definition of operators on sets (page 92)
  let F,G be FUNCTION_DOMAIN of NAT,REAL;
  func F to_power G -> FUNCTION_DOMAIN of NAT,REAL equals
  { t where t is
  Element of Funcs(NAT,REAL) : ex f,g being Element of Funcs(NAT,REAL), N being
Element of NAT st f in F & g in G & for n being Element of NAT st n >= N holds
  t.n = (f.n) to_power (g.n) };
  coherence
  proof
    set IT = { t where t is Element of Funcs(NAT,REAL) : ex f,g being Element
    of Funcs(NAT,REAL), N being Element of NAT st f in F & g in G & for n being
    Element of NAT st n >= N holds t.n = (f.n) to_power (g.n) };
A1: now
      consider g be object such that
A2:   g in G by XBOOLE_0:def 1;
      g is sequence of REAL by A2,FUNCT_2:def 12;
      then reconsider g as Element of Funcs(NAT,REAL) by FUNCT_2:8;
      consider f be object such that
A3:   f in F by XBOOLE_0:def 1;
      f is sequence of REAL by A3,FUNCT_2:def 12;
      then reconsider f as Element of Funcs(NAT,REAL) by FUNCT_2:8;
      defpred P[Element of NAT,Real] means $2 = (f.$1) to_power (g.$1);
A4:   for x being Element of NAT ex y being Element of REAL st P[x,y]
       proof let x being Element of NAT;
         reconsider y = (f.x) to_power (g.x) as Element of REAL
                by XREAL_0:def 1;
        take y;
        thus thesis;
       end;
      consider t being sequence of REAL such that
A5:   for x being Element of NAT holds P[x,t.x] from FUNCT_2:sch 3(A4
      );
      reconsider t as Element of Funcs(NAT, REAL) by FUNCT_2:8;
      for x being Element of NAT st x >= 0 holds t.x = (f.x) to_power (g.
      x) by A5;
      then t in IT by A3,A2;
      hence IT is non empty;
    end;
    IT is functional
    proof
      let x be object;
      assume x in IT;
      then ex t being Element of Funcs(NAT, REAL) st x = t & ex f,g being
Element of Funcs(NAT,REAL), N being Element of NAT st f in F & g in G & for n
      being Element of NAT st n >= N holds t.n = (f.n) to_power (g.n);
      hence thesis;
    end;
    then reconsider IT1 = IT as functional non empty set by A1;
    now
      let x be Element of IT1;
      x in IT;
      then ex t being Element of Funcs(NAT, REAL) st x = t & ex f,g being
Element of Funcs(NAT,REAL), N being Element of NAT st f in F & g in G & for n
      being Element of NAT st n >= N holds t.n = (f.n) to_power (g.n);
      hence x is sequence of  REAL;
    end;
    hence thesis by FUNCT_2:def 12;
  end;
end;

Messung
CHZG
8010010093

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.191Angebot  ¤

*Bot Zugriff







                                                                                                                                                                                                                                                                                                                                                                                                     

 

Neuigkeiten

Aktuelles
Motto des Tages

Open Source Software


Gedichte
Musik
Bilder

Jenseits des Üblichen

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1,188,139
#Domains=864,113