Lean / Reader
Lean reader

SquarefreeConditional.lean

48 lines4 declarationsno sorryimports Erdos824.LiZhuang.Main

Lean 4 Web has Mathlib, so it can check files that import only Mathlib. This one also imports Erdos824.LiZhuang.Main, which it does not have: you can read it there, but it will not check. Build the project itself to check it.

  1. import Erdos824.LiZhuang.Main
  2. /-!
  3. # The squarefree variant of Erdős problem 824
  4. Li and Zhuang, Theorem 1.3, observe that their coprime pairs are also squarefree.
  5. The conclusion specializes the strengthened counting argument to the squarefree
  6. variant in Formal Conjectures under the explicitly stated smooth-successor hypothesis.
  7. -/
  8. open Filter
  9. open scoped ArithmeticFunction.sigma
  10. namespace Erdos824
  11. /-- Formal Conjectures' count for the squarefree variant. -/
  12. noncomputable def hSquarefree (x : ℕ) : ℕ :=
  13. ((Finset.Ico 1 x ×ˢ Finset.Ico 1 x).filter fun (a, b) ↦
  14. a < b ∧ Squarefree a ∧ Squarefree b ∧ σ 1 a = σ 1 b).card
  15. private theorem coprimeSquarefree_le_squarefree (x : ℕ) :
  16. LiZhuang.hCoprimeSquarefree x ≤ hSquarefree x := by
  17. apply Finset.card_le_card
  18. intro p hp
  19. obtain ⟨hm, hlt, _, ha, hb, hsig⟩ := Finset.mem_filter.mp hp
  20. exact Finset.mem_filter.mpr ⟨hm, hlt, ha, hb, hsig⟩
  21. /-- Coprime pairs that are squarefree in both coordinates satisfy the near-quadratic bound. -/
  22. theorem coprime_squarefree_of_smooth_successors (H : LiZhuang.SmoothSuccessorHypWeak) :
  23. ∀ ε : ℝ, 0 < ε → ∀ᶠ x : ℕ in atTop,
  24. (x : ℝ) ^ (2 - ε) < (LiZhuang.hCoprimeSquarefree x : ℝ) := by
  25. intro ε hε
  26. obtain ⟨X, hX⟩ := LiZhuang.erdos824_of_smoothSuccessorWeak_squarefree
  27. H ε hε
  28. refine eventually_atTop.2 ⟨⌈X⌉₊, fun n hn ↦ hX n ?_⟩
  29. exact (Nat.le_ceil X).trans (by exact_mod_cast hn)
  30. /-- The squarefree variant in Formal Conjectures under the smooth-successor hypothesis. -/
  31. theorem squarefree_of_smooth_successors (H : LiZhuang.SmoothSuccessorHypWeak) :
  32. ∀ ε : ℝ, 0 < ε → ∀ᶠ x : ℕ in atTop, (x : ℝ) ^ (2 - ε) < (hSquarefree x : ℝ) := by
  33. intro ε hε
  34. filter_upwards [coprime_squarefree_of_smooth_successors H ε hε] with x hx
  35. exact hx.trans_le (by exact_mod_cast coprimeSquarefree_le_squarefree x)
  36. end Erdos824
  37. #print axioms Erdos824.squarefree_of_smooth_successors