Definition negligible(f : nat -> Rat) :=
  forall c, exists n, forall x (pf_nz : nz x),
    x > n ->
    ~ ((1 / expnat x c) <= f x)%rat.

(* Specifications: *)
Lemma negligible_le : forall f1 f2, (forall n, f2 n <= f1 n)%rat -> negligible f1 -> negligible f2.
Lemma negligible_plus : forall f1 f2, negligible f1 -> negligible f2 -> negligible (fun n => f1 n + f2 n)%rat.
Theorem double_log_plus_3_le_h : forall y x, y = Nat.log2 x -> y >= 4 -> 2 * y + 3 <= x.
Theorem S_log_square_lt_h : forall y x, y = Nat.log2 x -> 6 <= Nat.log2 x-> S y * S y <= x.
Theorem S_log_square_lt : forall x, Nat.pow 2 6 <= x-> S (Nat.log2 x) * S (Nat.log2 x) <= x.
Theorem log_square_lt : forall x, Nat.pow 2 6 <= x-> Nat.log2 x * Nat.log2 x < x.
Theorem poly_lt_exp_ge_6 : forall c x, x >= (Nat.pow 2 c) -> x >= (Nat.pow 2 6) -> Nat.pow x c < Nat.pow 2 x.
Theorem poly_lt_exp : forall c, exists x, forall y, y >= x -> expnat y c < expnat 2 y.
Theorem negligible_exp_den : negligible (fun n => 1 / expnat 2 n)%rat.
Theorem negligible_const_mult : forall (n : nat) d f, negligible f -> negligible (fun x => (RatIntro n d) * (f x))%rat.
Theorem negligible_mult_ident : forall f, negligible f -> negligible (fun x => (x / 1) * (f x))%rat.
Theorem negligible_exp : forall z, negligible (fun n => expnat n z / expnat 2 n)%rat.
Theorem negligible_const_num : forall k, negligible (fun n => k / expnat 2 n)%rat.
Theorem negligible_poly_num : forall f, polynomial f -> negligible (fun n => f n / expnat 2 n)%rat.