The exact 2-adic valuation.
ProvedJacSign.W_mod_fouraether-catalogtropical
The exact 2-adic valuation. For p ≡ 1 (mod 4) the statistic is twice an odd
number: W p ≡ 2 (mod 4).
theorem JacSign.W_mod_four(hp : p ≠ 2) (h1 : p % 4 = 1) : ∃ s : ℤ, W p = 2 * s ∧ ¬ (2 : ℤ) ∣ s := by sorry
Formalization Note Transplanted verbatim from the Aether Catalog source Tropical/JacobiSignedTwoAdic.lean; the statement is byte-identical to the source declaration, elaborated with autoImplicit disabled in the platform environment.
Preamble
-- Thm stub generated from Tropical/JacobiSignedTwoAdic.lean
import Mathlib
import Definitions.Def_Tropical_JacobiSignedWeilFloorCore
/-!
# The exact 2-adic valuation of the Jacobi-signed circle count
Every observed value of the statistic is `2` times an *odd* number
(`-2, -6, 10, -10, 6, -14, -18, 22, 26, 34, ...`). This is not a coincidence: we prove
`p ≡ 1 (mod 4) → W p ≡ 2 (mod 4)` (`JacSign.W_mod_four`),
i.e. `v₂(W p) = 1` exactly. The argument is a parity count over the "lower half" of the
residues: `W p = 2 S` with `S` a sum of `(p-1)/2` values in `{0, ±1}`, exactly one of which
(the term `x = 1`) vanishes, so `S ≡ (p-1)/2 - 1 ≡ 1 (mod 2)`.
Combined with the Jacobsthal identity of `JacobiSignedTwoSquares.lean` this pins down the
classical normalisation of Fermat's two-square decomposition: `p = a² + b²` with
`a = W p / 2` **odd**.
-/
open Finset
open JacSign
variable (p : ℕ) [Fact p.Prime]Formal statement
theorem JacSign.W_mod_four(hp : p ≠ 2) (h1 : p % 4 = 1) : ∃ s : ℤ, W p = 2 * s ∧ ¬ (2 : ℤ) ∣ s := by sorry
Source