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;

theorem :: Threshold Rule for Big_Omega (page 86)
  for f,t being positive Real_Sequence holds t in Big_Omega(f) iff ex d
  st d > 0 & for n holds d*f.n <= t.n
proof
  let f,t be positive Real_Sequence;
  hereby
    assume t in Big_Omega(f);
    then consider s being Element of Funcs(NAT, REAL) such that
A1: s = t and
A2: ex d,N st d > 0 & for n st n >= N holds d*f.n <= s.n & s.n >= 0;
    consider d,N such that
A3: d > 0 and
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 > 0 by A3;
      let n;
      thus d*f.n <= t.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 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;
        assume n < N;
        then t.n / f.n in B;
        then t.n / f.n >= b by XXREAL_2:def 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 9;
          let n;
          thus b*f.n <= t.n
          proof
            per cases;
            suppose
              n < N;
              hence thesis by A7;
            end;
            suppose
A11:          n >= N;
              f.n > 0 by Def3;
              then
A12:          b*f.n <= d*f.n by A9,XREAL_1:64;
              d*f.n <= t.n by A1,A4,A11;
              hence thesis by A12,XXREAL_0:2;
            end;
          end;
        end;
        suppose
A13:      b > d;
          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;
              hence thesis by A15,XXREAL_0:2;
            end;
            suppose
              n >= N;
              hence thesis by A1,A4;
            end;
          end;
        end;
      end;
    end;
  end;
  given d such that
A16: d > 0 and
A17: for n holds d*f.n <= t.n;
  t is Element of Funcs(NAT, REAL) & for n st n >= 0 holds d*f.n <= t.n &
  t.n >= 0 by A17,Def3,FUNCT_2:8;
  hence thesis by A16;
end;
