import Mathlib.Tactic.Ringimport Mathlib.Tactic.Linarith/-!# Round 10: the reduction of Theorem C to Bennett–SkinnerWhen a prime of `C` occurs to an even power and does not divide `c` (the squarefree part of `C`), its part of`Y' = fⁿ c^((n-1)/2)` can lie in `3u² - cv²` instead of `v`. This file checks the resulting identities: with`v = ±f₁ⁿ c^((n-1)/2)`, `cv² = (c f₁²)ⁿ`, so the descent equation becomes `xⁿ + yⁿ = 3z²` (integral case) or`xⁿ + 2^α yⁿ = 3z²` (half-integral case), which Bennett–Skinner (Canad. J. Math. 56 (2004), Thms 1.1, 1.2) exclude.-/namespace BealCubeDescent3/-- `c·(f₁ⁿ c^m)² = (c f₁²)ⁿ` when `n = 2m + 1`. -/theorem cv_sq (c f₁ : ℤ) (m : ℕ) : c * (f₁ ^ (2 * m + 1) * c ^ m) ^ 2 = (c * f₁ ^ 2) ^ (2 * m + 1) := byring/-- Integral case: `3u² - cv² = δ w₀ⁿ` and `cv² = Dⁿ` give `3u² = Dⁿ + δ w₀ⁿ`. -/theorem split_eq (u v c D W δ : ℤ) (h1 : 3 * u ^ 2 - c * v ^ 2 = δ * W) (h2 : c * v ^ 2 = D) :3 * u ^ 2 = D + δ * W := bylinarith/-- Half-integral case: `3u² - cv² = 8 δ W` and `cv² = Dⁿ` give `3u² = Dⁿ + 8 δ W`. -/theorem half_split_eq (u v c D W δ : ℤ) (h1 : 3 * u ^ 2 - c * v ^ 2 = 8 * δ * W) (h2 : c * v ^ 2 = D) :3 * u ^ 2 = D + 8 * δ * W := bylinarith/-- For odd `n`, `δ wⁿ = (δ w)ⁿ` when `δ = ±1`, so `Dⁿ + δ wⁿ` is a sum of two `n`-th powers. -/theorem odd_pow_sign (w : ℤ) (m : ℕ) : -(w ^ (2 * m + 1)) = (-w) ^ (2 * m + 1) := byrw [Odd.neg_pow ⟨m, rfl⟩]end BealCubeDescent3#print axioms BealCubeDescent3.cv_sq#print axioms BealCubeDescent3.odd_pow_sign