Valuation-sum parity equals the number of states ≡2 mod 3
ProvedCollatzFrontier.syracuse_cycle_valuation_sum_parity_mod_threeReducing each exact step equation 2^{v_i}·x_{i+1} = 3x_i+1 modulo 3 gives 2 ≡ −1, so v_i is even iff x_{i+1} ≡ 1 (mod 3) and odd iff x_{i+1} ≡ 2 (mod 3). The parity of the sum of the v_i therefore equals the parity of the number of residues 2 in the cycle. Kernel-checked.
Preamble
import Mathlib import Definitions.Def_syracuseStep open Nat open scoped BigOperators set_option autoImplicit false set_option maxHeartbeats 0
Formal statement
namespace CollatzFrontier
open scoped BigOperators
/-- In a Syracuse cycle, the parity of the valuation sum K equals the parity of the number of consecutive states `syracuseStep^[i+1] m` congruent to 2 modulo 3. Each step has `2^{v_i}·x_{i+1} = 3x_i+1`, so `v_i` is odd exactly when `x_{i+1} ≡ 2 (mod 3)`. -/
theorem syracuse_cycle_valuation_sum_parity_mod_three (m p : ℕ) (hm : 0 < m) (hp : 0 < p) (hmne : m ≠ 1) (hmodd : Odd m)
(hcyc : syracuseStep^[p] m = m)
(hmin : ∀ i : ℕ, m ≤ syracuseStep^[i] m) :
let f := fun i => (3 * syracuseStep^[i] m + 1).factorization 2
(∑ i ∈ Finset.range p, f i) % 2 =
(Finset.filter (fun i => syracuseStep^[i + 1] m % 3 = 2) (Finset.range p)).card % 2 := by sorry
end CollatzFrontier
Source
Mod-3 valuation parity applied at each step plus a finset parity lemma.