Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Actual-orbit affine coefficients and mechanical certificate interfaces

Definition
CollatzWork_QuarterGapStatement

by Sodelin · Sep 8, 2026 · Mathlib 0df444a (Lean v4.33.1)

collatz-work-import

Let T:N→NT:\mathbb N\to\mathbb NT:N→N be the shortcut Collatz map: T(n)=n/2T(n)=n/2T(n)=n/2 for even nnn and T(n)=(3n+1)/2T(n)=(3n+1)/2T(n)=(3n+1)/2 for odd nnn. Write TkT^kTk for its kkk-fold iterate, with T0(n)=nT^0(n)=nT0(n)=n. Let qk(n)q_k(n)qk​(n) count the odd inputs among the first kkk shortcut steps, and let R0(n)=0R_0(n)=0R0​(n)=0; recursively Rk+1(n)=Rk(n)R_{k+1}(n)=R_k(n)Rk+1​(n)=Rk​(n) for an even input Tk(n)T^k(n)Tk(n) and Rk+1(n)=3Rk(n)+2kR_{k+1}(n)=3R_k(n)+2^kRk+1​(n)=3Rk​(n)+2k for an odd input.

For s∈Ns\in\mathbb Ns∈N, define M(0)=0M(0)=0M(0)=0, M(s+1)=3M(s)+2⌊log⁡2(3s)⌋M(s+1)=3M(s)+2^{\lfloor\log_2(3^s)\rfloor}M(s+1)=3M(s)+2⌊log2​(3s)⌋, and e(s)=⌊log⁡2(3s)⌋+1e(s)=\lfloor\log_2(3^s)\rfloor+1e(s)=⌊log2​(3s)⌋+1.

The intended exact affine relation is

2kTk(n)=3qk(n)n+Rk(n).2^kT^k(n)=3^{q_k(n)}n+R_k(n).2kTk(n)=3qk​(n)n+Rk​(n).

A first coefficient contraction at time kkk means k>0k>0k>0, 3qk(n)<2k3^{q_k(n)}<2^k3qk​(n)<2k, and 2j≤3qj(n)2^j\le3^{q_j(n)}2j≤3qj​(n) for every j<kj<kj<k. Its existence is a hypothesis. The bundle defines the orbit identity, the pre-crossing mechanical envelope, arithmetic certificate soundness, and finite-range quarter-gap propositions. These statement definitions do not assert that any crossing exists.

Definition code
import Std
import Init.Grind.Ordered.Module
import Definitions.Def_CollatzWork_ConvergenceStatement
import Definitions.Def_CollatzWork_InverseWordBoundaryStatement
namespace CollatzWork

/-!
Trusted integer statements for the L9/L15 certificate path. The orbit is
the existing one-division Collatz map; no alternative transition is introduced.
The universal rotation bound is deliberately not assumed as a project axiom.
-/

/-- Number of odd branches in the first `k` actual shortcut steps. -/
def orbitOddCount (n : Nat) : Nat → Nat
  | 0 => 0
  | k + 1 => orbitOddCount n k +
      if shortcutIter k n % 2 = 0 then 0 else 1

/-- Exact affine remainder along the first `k` actual shortcut steps. -/
def orbitRemainder (n : Nat) : Nat → Nat
  | 0 => 0
  | k + 1 => if shortcutIter k n % 2 = 0 then orbitRemainder n k
      else 3 * orbitRemainder n k + 2 ^ k

/-- The first strict coefficient contraction, including every prior barrier. -/
def FirstCoefficientContraction (n k : Nat) : Prop :=
  0 < k ∧ 3 ^ orbitOddCount n k < 2 ^ k ∧
    ∀ j : Nat, j < k → 2 ^ j ≤ 3 ^ orbitOddCount n j

/-- Integer-only L9 mechanical extremal remainder. -/
def mechanicalMax : Nat → Nat
  | 0 => 0
  | s + 1 => 3 * mechanicalMax s + 2 ^ Nat.log2 (3 ^ s)

/-- First power-of-two exponent strictly above `3^s`. -/
def coefficientCrossingExponent (s : Nat) : Nat := Nat.log2 (3 ^ s) + 1

def OrbitAffineStatement : Prop :=
  ∀ n k : Nat, 2 ^ k * shortcutIter k n =
    3 ^ orbitOddCount n k * n + orbitRemainder n k

def MechanicalEnvelopeStatement : Prop :=
  ∀ n k : Nat,
    (∀ j : Nat, j < k → 2 ^ j ≤ 3 ^ orbitOddCount n j) →
    orbitRemainder n k ≤ mechanicalMax (orbitOddCount n k)

/-- General arithmetic certificate soundness, independent of Collatz. -/
def AffineQuarterCertificateStatement : Prop :=
  ∀ n d a b C s : Nat, 0 < n → a < b →
    b * (n + d) = a * n + C → 4 * C ≤ s * b → 4 * d < s

def SmallMechanicalCertificateStatement : Prop :=
  ∀ s : Nat, 1 ≤ s → s ≤ 107 →
    4 * mechanicalMax s ≤ s * 2 ^ coefficientCrossingExponent s

/-- Actual Collatz first contractions with at most 107 odd steps. -/
def SmallFirstContractionQuarterGapStatement : Prop :=
  ∀ n k d : Nat, 0 < n → FirstCoefficientContraction n k →
    orbitOddCount n k ≤ 107 → shortcutIter k n = n + d →
    4 * d < orbitOddCount n k ∧ d ≤ (orbitOddCount n k - 1) / 4

end CollatzWork
Source
https://github.com/Sodelin/Collatz-Conjecture-Work/blob/026aa4ad4be6453a005ab950b160a9f2204c5271/lean/CollatzWork/QuarterGapStatement.lean#L1-L60

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me