import Mathlib.Analysis.SpecialFunctions.Pow.Realimport Mathlib.Order.Filter.AtTopBot.Basicimport Mathlib.Tacticnamespace Erdos824Cutoffopen Filter/-- The strict real upper bound on the second member of a pair. -/theorem mem_cutoff {b : ℕ} {x : ℝ} : (b : ℝ) < x ↔ b < ⌈x⌉₊ :=Nat.lt_ceil.symm/-- For any count using a strict upper cutoff, integer and real formulationsof the near-quadratic lower bound are equivalent. -/theorem nat_iff_real (h : ℕ → ℕ) :(∀ ε : ℝ, 0 < ε → ∀ᶠ n : ℕ in atTop, (n : ℝ) ^ (2 - ε) < (h n : ℝ)) ↔(∀ ε : ℝ, 0 < ε → ∀ᶠ x : ℝ in atTop, x ^ (2 - ε) < (h ⌈x⌉₊ : ℝ)) := byconstructor· intro hn ε hεlet δ := min ε 1have hδ : 0 < δ := lt_min hε zero_lt_oneobtain ⟨N, hN⟩ := eventually_atTop.1 (hn δ hδ)refine eventually_atTop.2 ⟨max (N : ℝ) 1, ?_⟩intro x hxhave hx₁ : 1 ≤ x := (le_max_right _ _).trans hxhave hNx : (N : ℝ) ≤ x := (le_max_left _ _).trans hxhave hnceil : N ≤ ⌈x⌉₊ := by exact_mod_cast hNx.trans (Nat.le_ceil x)have hδ₁ : δ ≤ 1 := min_le_right _ _calcx ^ (2 - ε) ≤ x ^ (2 - δ) :=Real.rpow_le_rpow_of_exponent_le hx₁ (sub_le_sub_left (min_le_left _ _) _)_ ≤ (⌈x⌉₊ : ℝ) ^ (2 - δ) :=Real.rpow_le_rpow (zero_le_one.trans hx₁) (Nat.le_ceil x) (by linarith)_ < (h ⌈x⌉₊ : ℝ) := hN _ hnceil· intro hr ε hεobtain ⟨X, hX⟩ := eventually_atTop.1 (hr ε hε)refine eventually_atTop.2 ⟨⌈X⌉₊, ?_⟩intro n hnhave hXn : X ≤ (n : ℝ) := (Nat.le_ceil X).trans (by exact_mod_cast hn)simpa using hX n hXn#print axioms Erdos824Cutoff.nat_iff_realend Erdos824Cutoff