Lean / Reader
Lean reader

BealBaker.lean

154 lines9 declarationsno sorry
  1. import Mathlib
  2. import BealAbc
  3. /-!
  4. # D6: Baker's explicit abc conjecture implies c < rad(abc)^2
  5. Baker (2004) conjectured: for coprime a + b = c, with N = rad(abc) and ω the number of
  6. distinct primes of N, c < (6/5) · N · (log N)^ω / ω!.
  7. We prove, with no assumption, the analytic step: for L ≥ 0 and ω ≥ 1,
  8. (6/5) · L^ω / ω! < exp L.
  9. Taking L = log N gives (6/5) · N · (log N)^ω / ω! < N · N = N², so Baker's bound forces
  10. c < N². The proof compares the ω-th term of the exponential series with its two neighbours:
  11. T_{ω-1} + T_{ω+1} = T_ω · (ω / L + L / (ω + 1)),
  12. and one of the two summands is at least 1/5 (if L ≥ (ω+1)/5 the second; otherwise ω/L > 5/2).
  13. -/
  14. open Real Finset
  15. /-- The three consecutive terms ω-1, ω, ω+1 of the exponential series are bounded by exp L. -/
  16. lemma three_terms_le_exp {L : ℝ} (hL : 0 ≤ L) (k : ℕ) :
  17. L ^ k / k.factorial + L ^ (k + 1) / (k + 1).factorial + L ^ (k + 2) / (k + 2).factorial
  18. ≤ exp L := by
  19. have h := Real.sum_le_exp_of_nonneg hL (k + 3)
  20. have hsub : ({k, k + 1, k + 2} : Finset ℕ) ⊆ range (k + 3) := by
  21. intro i hi; simp only [mem_insert, mem_singleton] at hi; simp only [mem_range]; omega
  22. have hle := Finset.sum_le_sum_of_subset_of_nonneg hsub
  23. (f := fun i => L ^ i / (i.factorial : ℝ)) (fun i _ _ => by positivity)
  24. rw [Finset.sum_insert (by simp), Finset.sum_insert (by simp),
  25. Finset.sum_singleton] at hle
  26. linarith
  27. /-- The analytic core of D6: (6/5) L^ω / ω! < exp L for L ≥ 0 and ω ≥ 1. -/
  28. theorem baker_term_lt_exp {L : ℝ} (hL : 0 ≤ L) {ω : ℕ} (hω : 1 ≤ ω) :
  29. (6 / 5 : ℝ) * (L ^ ω / ω.factorial) < exp L := by
  30. obtain ⟨k, rfl⟩ : ∃ k, ω = k + 1 := ⟨ω - 1, by omega⟩
  31. have h3 := three_terms_le_exp hL k
  32. -- T = middle term, A = left neighbour, B = right neighbour
  33. set T := L ^ (k + 1) / ((k + 1).factorial : ℝ) with hT
  34. have hf1 : ((k + 1).factorial : ℝ) = (k + 1) * k.factorial := by
  35. rw [Nat.factorial_succ]; push_cast; ring
  36. have hf2 : ((k + 2).factorial : ℝ) = (k + 2) * (k + 1).factorial := by
  37. rw [Nat.factorial_succ]; push_cast; ring
  38. have hkf : (0 : ℝ) < k.factorial := by exact_mod_cast Nat.factorial_pos k
  39. have hk1f : (0 : ℝ) < (k + 1).factorial := by exact_mod_cast Nat.factorial_pos (k + 1)
  40. have hTnn : 0 ≤ T := by positivity
  41. rcases eq_or_lt_of_le hL with h0 | hLpos
  42. · -- L = 0: the left side is 0
  43. subst h0
  44. have hT0 : T = 0 := by simp [hT]
  45. rw [hT0, Real.exp_zero]; norm_num
  46. -- right neighbour B = T * L / (k+2)
  47. have hB : L ^ (k + 2) / ((k + 2).factorial : ℝ) = T * (L / (k + 2)) := by
  48. rw [hT, hf2, pow_succ]; field_simp
  49. -- left neighbour A = T * (k+1) / L
  50. have hA : L ^ k / (k.factorial : ℝ) = T * ((k + 1) / L) := by
  51. rw [hT, hf1, pow_succ]; field_simp
  52. rw [hA, hB] at h3
  53. have hTpos : 0 < T := by positivity
  54. rcases le_or_gt ((k + 2 : ℝ) / 5) L with hbig | hsmall
  55. · have : (1 : ℝ) / 5 ≤ L / (k + 2) := by
  56. rw [div_le_div_iff₀ (by norm_num) (by positivity)]; linarith
  57. have hA0 : 0 < T * ((k + 1) / L) := by positivity
  58. have hBT : T * (1 / 5) ≤ T * (L / (k + 2)) := mul_le_mul_of_nonneg_left this hTnn
  59. linarith
  60. · have : (1 : ℝ) / 5 ≤ (k + 1) / L := by
  61. rw [div_le_div_iff₀ (by norm_num) hLpos]; nlinarith
  62. have hB0 : 0 < T * (L / (k + 2)) := by positivity
  63. have hAT : T * (1 / 5) ≤ T * ((k + 1) / L) := mul_le_mul_of_nonneg_left this hTnn
  64. linarith
  65. /-- D6: Baker's explicit bound implies c < N² (for N ≥ 1, ω ≥ 1). -/
  66. theorem baker_implies_rad_sq {c N : ℝ} (hN : 1 ≤ N) {ω : ℕ} (hω : 1 ≤ ω)
  67. (hbaker : c < (6 / 5 : ℝ) * N * (Real.log N) ^ ω / ω.factorial) :
  68. c < N ^ 2 := by
  69. have hL : 0 ≤ Real.log N := Real.log_nonneg hN
  70. have hcore := baker_term_lt_exp hL hω
  71. rw [Real.exp_log (by linarith)] at hcore
  72. have hNpos : 0 < N := by linarith
  73. calc c < (6 / 5 : ℝ) * N * (Real.log N) ^ ω / ω.factorial := hbaker
  74. _ = N * ((6 / 5 : ℝ) * ((Real.log N) ^ ω / ω.factorial)) := by ring
  75. _ < N * N := by exact mul_lt_mul_of_pos_left hcore hNpos
  76. _ = N ^ 2 := by ring
  77. namespace BealBaker
  78. open BealAbc BealPartial
  79. /-- Baker's explicit abc conjecture (2004), as a hypothesis: for coprime `a + b = c` with `c > 2`,
  80. `c < (6/5) N (log N)^ω / ω!` with `N = rad(abc)` and `ω` the number of primes dividing `abc`.
  81. The triple `1 + 1 = 2` must be excluded: there `N = 2`, `ω = 1` and `(6/5)·2·log 2 ≈ 1.66 < 2`, so without the
  82. condition `2 < c` the hypothesis would be false (`baker_unrestricted_false`) and every theorem assuming it would
  83. hold vacuously. Version 5 of the paper had this defect; it was found by the reviewing agent 2kwas. -/
  84. def BakerAbc : Prop :=
  85. ∀ a b c : ℕ, 0 < a → 0 < b → a + b = c → Nat.Coprime a b → 2 < c →
  86. (c : ℝ) < (6 / 5 : ℝ) * (rad (a * b * c) : ℝ) * (Real.log (rad (a * b * c))) ^ (a * b * c).primeFactors.card
  87. / ((a * b * c).primeFactors.card).factorial
  88. lemma rad_two : rad 2 = 2 := by
  89. simp [rad, Nat.prime_two.primeFactors]
  90. /-- The unrestricted statement (without `2 < c`) is false, because of `1 + 1 = 2`. -/
  91. theorem baker_unrestricted_false :
  92. ¬ (∀ a b c : ℕ, 0 < a → 0 < b → a + b = c → Nat.Coprime a b →
  93. (c : ℝ) < (6 / 5 : ℝ) * (rad (a * b * c) : ℝ) * (Real.log (rad (a * b * c))) ^ (a * b * c).primeFactors.card
  94. / ((a * b * c).primeFactors.card).factorial) := by
  95. intro h
  96. have h1 := h 1 1 2 one_pos one_pos rfl (Nat.coprime_one_left 1)
  97. have hpf : (1 * 1 * 2 : ℕ).primeFactors.card = 1 := by
  98. norm_num [Nat.prime_two.primeFactors]
  99. rw [hpf, show (1 * 1 * 2 : ℕ) = 2 by norm_num, rad_two] at h1
  100. have hl := Real.log_two_lt_d9
  101. norm_num at h1
  102. linarith
  103. lemma one_le_rad (n : ℕ) : 1 ≤ rad n := by
  104. unfold rad
  105. exact Nat.one_le_iff_ne_zero.mpr (Finset.prod_ne_zero_iff.mpr fun p hp => (Nat.prime_of_mem_primeFactors hp).ne_zero)
  106. /-- **D6.** Baker's explicit abc conjecture implies `RadSq`. The excluded triple `1 + 1 = 2` satisfies `RadSq`
  107. directly, since `2 < rad(2)^2 = 4`. -/
  108. theorem radSq_of_baker (H : BakerAbc) : RadSq := by
  109. intro a b c ha hb hc hcop
  110. rcases Nat.lt_or_ge 2 c with h2c | h2c
  111. · have h2 : 2 ≤ a * b * c := by
  112. calc 2 ≤ c := by omega
  113. _ ≤ a * b * c := Nat.le_mul_of_pos_left c (Nat.mul_pos ha hb)
  114. have hω : 1 ≤ (a * b * c).primeFactors.card := by
  115. rw [Nat.one_le_iff_ne_zero, Ne, Finset.card_eq_zero, Nat.primeFactors_eq_empty]
  116. omega
  117. have hN : (1 : ℝ) ≤ (rad (a * b * c) : ℝ) := by exact_mod_cast one_le_rad _
  118. have := baker_implies_rad_sq hN hω (H a b c ha hb hc hcop h2c)
  119. exact_mod_cast this
  120. · have ha1 : a = 1 := by omega
  121. have hb1 : b = 1 := by omega
  122. subst ha1 hb1
  123. have hc2 : c = 2 := by omega
  124. subst hc2
  125. rw [show (1 * 1 * 2 : ℕ) = 2 by norm_num, rad_two]
  126. norm_num
  127. /-- Baker's conjecture implies Beal for every signature with `1/x + 1/y + 1/z ≤ 1/2`. -/
  128. theorem beal_of_baker (H : BakerAbc) {x y z : ℕ} (hx : 3 ≤ x) (hy : 3 ≤ y) (hz : 3 ≤ z)
  129. (hs : 2 * (x * y + y * z + z * x) ≤ x * y * z) : BealFor x y z :=
  130. beal_of_radSq (radSq_of_baker H) hx hy hz hs
  131. end BealBaker
  132. #print axioms BealBaker.baker_unrestricted_false
  133. #print axioms BealBaker.radSq_of_baker
  134. #print axioms BealBaker.beal_of_baker