Lean / Reader
Lean reader

LewisWon317.lean

70 lines8 declarationsno sorryimports Mathlib.Analysis.SpecialFunctions.Log.Basic Mathlib.Combinatorics.Enumerative.Stirling Mathlib.Tactic.Linarith Mathlib.Tactic.NormNum Mathlib.Tactic.Positivity
  1. import Mathlib.Analysis.SpecialFunctions.Log.Basic
  2. import Mathlib.Combinatorics.Enumerative.Stirling
  3. import Mathlib.Tactic.Linarith
  4. import Mathlib.Tactic.NormNum
  5. import Mathlib.Tactic.Positivity
  6. /-! Lewis–Won, arXiv:2609.03081v1, §3.4, Conjecture 3.17 as printed.
  7. Only a boundary counterexample is proved; there is no assertion about n ≥ 4. -/
  8. namespace LongtailProofs.LewisWon317
  9. /-- Expression (3.1), used on the domain `2*m ≤ n` of Proposition 3.16. -/
  10. def value (n m : ℕ) : ℕ := ∑ i ∈ Finset.range m,
  11. (Nat.stirlingSecond m (i+1) * (i+1)^(n-2*m) * (i+1).factorial)^2
  12. /-- The paper specifies the lower endpoint as the unique positive root. -/
  13. def Endpoint (n : ℕ) (x : ℝ) : Prop :=
  14. 0 < x ∧ (n : ℝ) = Real.log (x+1) / Real.log (1+1/x) + 2*x
  15. def Maximizes (n m : ℕ) : Prop := 2*m ≤ n ∧ ∀ j, 2*j ≤ n → value n j ≤ value n m
  16. /-- There is an admissible maximizer strictly between the lower endpoint
  17. and that endpoint plus two. The endpoint is specified by its defining relation. -/
  18. def Conjecture317 : Prop := ∀ n : ℕ, 0 < n → ∀ x : ℝ, Endpoint n x →
  19. ∃ m : ℕ, Maximizes n m ∧ x < (m : ℝ) ∧ (m : ℝ) < x+2
  20. theorem endpoint_three (x : ℝ) : Endpoint 3 x ↔ x = 1 := by
  21. constructor
  22. · rintro ⟨hx, he⟩
  23. norm_num only [Nat.cast_ofNat] at he
  24. have hd : 0 < Real.log (1 + 1/x) := Real.log_pos (by have := one_div_pos.mpr hx; linarith)
  25. rcases lt_trichotomy x 1 with h | h | h
  26. · have hi : 1 ≤ 1/x := (le_div_iff₀ hx).2 (by linarith)
  27. have hl := Real.log_le_log (show 0 < x+1 by linarith) (show x+1 ≤ 1+1/x by linarith)
  28. have := (div_le_one hd).2 hl
  29. linarith
  30. · exact h
  31. · have hi : 1/x ≤ 1 := (div_le_iff₀ hx).2 (by linarith)
  32. have hl := Real.log_le_log (show 0 < 1+1/x by positivity) (show 1+1/x ≤ x+1 by linarith)
  33. have := (one_le_div hd).2 hl
  34. linarith
  35. · rintro rfl
  36. unfold Endpoint
  37. have h : Real.log 2 ≠ 0 := ne_of_gt (Real.log_pos (by norm_num))
  38. norm_num [div_self h]
  39. theorem values_three : value 3 0 = 0 ∧ value 3 1 = 1 := by decide
  40. theorem maximizes_three (m : ℕ) : Maximizes 3 m ↔ m = 1 := by
  41. obtain ⟨hz, ho⟩ := values_three
  42. constructor
  43. · rintro ⟨hf, h⟩
  44. have h1 := h 1 (by decide)
  45. rcases (show m = 0 ∨ m = 1 by omega) with rfl | rfl
  46. · omega
  47. · rfl
  48. · rintro rfl
  49. refine ⟨by decide, fun j hj => ?_⟩
  50. rcases (show j = 0 ∨ j = 1 by omega) with rfl | rfl <;> omega
  51. theorem not_conjecture317 : ¬ Conjecture317 := by
  52. intro h
  53. obtain ⟨m, hm, hlo, _⟩ := h 3 (by decide) 1 ((endpoint_three 1).2 rfl)
  54. rw [(maximizes_three m).1 hm] at hlo
  55. norm_num at hlo
  56. #print axioms endpoint_three
  57. #print axioms maximizes_three
  58. #print axioms not_conjecture317
  59. end LongtailProofs.LewisWon317