Lean / Reader
Lean reader

BealCubeDescent2.lean

67 lines6 declarationsno sorryimports Mathlib.Tactic.Ring Mathlib.Tactic.Linarith Mathlib.Data.ZMod.Basic
  1. import Mathlib.Tactic.Ring
  2. import Mathlib.Tactic.Linarith
  3. import Mathlib.Data.ZMod.Basic
  4. /-!
  5. # Round 9: the elementary steps of Theorem B (extensions of Theorem A)
  6. Theorem B extends Theorem A to `C` with all prime exponents odd and to `C ≡ 6 (mod 9)` with `3 ∥ C`. This file
  7. checks the new identities and congruences; the class-group step and the divisibility arguments are on paper.
  8. -/
  9. namespace BealCubeDescent2
  10. /-- `3 ∣ C`, integral case: with `cv² = Cⁿ/9`, `3X = u(3u² - Cⁿ)`; from `Cⁿ = 27(u² - ε)` this is `3u(9ε - 8u²)`. -/
  11. theorem three_div_identity (u P ε : ℤ) (h : P = 27 * (u ^ 2 - ε)) :
  12. u * (3 * u ^ 2 - P) = 3 * (u * (9 * ε - 8 * u ^ 2)) := by
  13. subst h
  14. ring
  15. /-- `3 ∣ C`, half-integral case: from `Cⁿ = 27(u² + 8)`, `u(3u² - Cⁿ) = -24·u(u² + 9)`. -/
  16. theorem three_div_identity_half (u P : ℤ) (h : P = 27 * (u ^ 2 + 8)) :
  17. u * (3 * u ^ 2 - P) = -24 * (u * (u ^ 2 + 9)) := by
  18. subst h
  19. ring
  20. /-- `8s⁴ - 9` is never a square (mod 8). -/
  21. theorem not_sq_8_minus_9 (s t : ℤ) : t ^ 2 ≠ 8 * s ^ 4 - 9 := by
  22. intro h
  23. have h8 := congrArg (fun z : ℤ => (z : ZMod 8)) h
  24. push_cast at h8
  25. generalize (t : ZMod 8) = a at h8
  26. generalize (s : ZMod 8) = c at h8
  27. revert a c
  28. decide
  29. /-- `72s⁴ - 1` is never a square (mod 8). -/
  30. theorem not_sq_72_minus_1 (s t : ℤ) : t ^ 2 ≠ 72 * s ^ 4 - 1 := by
  31. intro h
  32. have h8 := congrArg (fun z : ℤ => (z : ZMod 8)) h
  33. push_cast at h8
  34. generalize (t : ZMod 8) = a at h8
  35. generalize (s : ZMod 8) = c at h8
  36. revert a c
  37. decide
  38. /-- For odd `s`, `s⁴ + 9` is not a square (mod 8). -/
  39. theorem odd_not_sq_plus_9 (s t : ℤ) (hs : s % 2 = 1) : t ^ 2 ≠ s ^ 4 + 9 := by
  40. intro h
  41. obtain ⟨k, rfl⟩ : ∃ k, s = 2 * k + 1 := ⟨s / 2, by omega⟩
  42. have h8 := congrArg (fun z : ℤ => (z : ZMod 8)) h
  43. push_cast at h8
  44. generalize (t : ZMod 8) = a at h8
  45. generalize (k : ZMod 8) = c at h8
  46. revert a c
  47. decide
  48. /-- Case (b) of `3 ∣ C`: if `3 ∤ v` and `c ≡ 2 (mod 3)`, then `3 ∤ u² - cv²`. -/
  49. theorem mod3_case_b (u v c : ZMod 3) (hv : v ≠ 0) (hc : c = 2) : u ^ 2 - c * v ^ 2 ≠ 0 := by
  50. subst hc
  51. revert u v
  52. decide
  53. end BealCubeDescent2
  54. #print axioms BealCubeDescent2.odd_not_sq_plus_9
  55. #print axioms BealCubeDescent2.three_div_identity