Lean reader

Solution.lean

60 lines6 declarationsno sorryimports Erdos319Sharp Submission

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

  1. import Erdos319Sharp
  2. import Submission
  3. /-!
  4. The original fixed-sign maximum and the sharp asymptotic for Erdős 319.
  5. The literal sign condition is defined in Submission.lean. The same sign
  6. function is restricted to every proper nonempty subset.
  7. -/
  8. open Filter
  9. open scoped Topology
  10. namespace Erdos319Jsp
  11. def IsOriginalMaximum (N k : ℕ) : Prop :=
  12. IsGreatest
  13. {j : ℕ | ∃ A : Finset ℕ, A ⊆ Finset.Icc 1 N ∧
  14. Erdos319Submission.LiteralPrimitive A ∧ A.card = j} k
  15. theorem maximum_correspondence (N : ℕ) :
  16. IsOriginalMaximum N (Erdos319Formal.maxSize N) :=
  17. Erdos319Submission.literal_maximum N
  18. theorem sharp_asymptotic :
  19. Tendsto (fun N : ℕ =>
  20. ((N : ℝ) - Erdos319Formal.maxSize N) * Real.log (Real.log N) /
  21. ((N : ℝ) * Real.log (Real.log (Real.log N))))
  22. atTop (𝓝 (Real.exp (-Real.eulerMascheroniConstant))) :=
  23. Erdos319Sharp.erdos319_sharp_deficit
  24. theorem sharp_asymptotic_ratio :
  25. Tendsto (fun N : ℕ =>
  26. ((N : ℝ) - Erdos319Formal.maxSize N) /
  27. (Real.exp (-Real.eulerMascheroniConstant) * (N : ℝ) *
  28. Real.log (Real.log (Real.log N)) / Real.log (Real.log N)))
  29. atTop (𝓝 1) :=
  30. Erdos319Sharp.erdos319_sharp_deficit_ratio
  31. theorem sharp_for_every_literal_maximum (c : ℕ → ℕ)
  32. (hc : ∀ N, IsOriginalMaximum N (c N)) :
  33. Tendsto (fun N : ℕ =>
  34. ((N : ℝ) - c N) * Real.log (Real.log N) /
  35. ((N : ℝ) * Real.log (Real.log (Real.log N))))
  36. atTop (𝓝 (Real.exp (-Real.eulerMascheroniConstant))) := by
  37. have heq : c = Erdos319Formal.maxSize := by
  38. funext N
  39. exact (hc N).unique (maximum_correspondence N)
  40. rw [heq]
  41. exact sharp_asymptotic
  42. theorem full_solution :
  43. (∀ N, IsOriginalMaximum N (Erdos319Formal.maxSize N)) ∧
  44. Tendsto (fun N : ℕ =>
  45. ((N : ℝ) - Erdos319Formal.maxSize N) * Real.log (Real.log N) /
  46. ((N : ℝ) * Real.log (Real.log (Real.log N))))
  47. atTop (𝓝 (Real.exp (-Real.eulerMascheroniConstant))) :=
  48. ⟨maximum_correspondence, sharp_asymptotic⟩
  49. end Erdos319Jsp