Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Physical zero-carry generation and marker rewind with a linear clock

Proved
IntMul.CarryInitialization.initialize_carry

by raresbuhai · Oct 10, 2026 · Mathlib 0df444a (Lean v4.33.1)

algorithmsfixed-tape-routinginteger-multiplicationturing-machines

For every finite binary descriptor lll, let N=val⁡(l)+1N=\operatorname{val}(l)+1N=val(l)+1. A fixed four-tape finite controller starts with empty carry bank 12 and two empty countdown banks 3 and 4, with retained lll on bank 15 at its marker, while retaining arbitrary original input cells and head. It generates the canonical NNN-bit zero carry and physically rewinds its output head to the actual marker, reaching its exact final globally halted frame within

7N+6∣l∣+137N+6|l|+137N+6∣l∣+13

actual transitions. Both countdown/template words are fully restored with their saved cursors; original input cells and head remain unchanged. The final carry bank 12 is bin⁡N(0)\operatorname{bin}_N(0)binN​(0) with head at cell zero. Empty and leading-zero descriptors are allowed. Both descriptor copies are prepared physically. Relocation into a different bank remains a separate stage.

Preamble
import Definitions.Def_IntMul_CarryInitialization
import Mathlib.Tactic

open IntMul IntMul.CarryInitialization

Formal statement
theorem IntMul.CarryInitialization.initialize_carry (base : machine.Cfg) (l : List Bool) :
    ∃ t : ℕ, t≤ 7*(val l+1)+6*l.length+13 ∧
      machine.step^[t] (initialFrame base l)=finalFrame base l ∧
      (machine.step^[t] (initialFrame base l)).state=machine.qHalt ∧
      (machine.step^[t] (initialFrame base l)).cells machine.inTape=base.cells machine.inTape ∧
      (machine.step^[t] (initialFrame base l)).head machine.inTape=base.head machine.inTape ∧
      (machine.step^[t] (initialFrame base l)).cells 12=machine.tapeOf ((bin (val l+1) 0).map machine.bitSym) ∧
      (machine.step^[t] (initialFrame base l)).head 12=0 ∧
      (machine.step^[t] (initialFrame base l)).cells 15=machine.tapeOf (l.map machine.bitSym) ∧
      (machine.step^[t] (initialFrame base l)).head 15=0 ∧
      (∀ i : Fin 16, i.val≠3 → i.val≠4 → i.val≠12 → i.val≠15 →
        (machine.step^[t] (initialFrame base l)).cells i=base.cells i ∧
        (machine.step^[t] (initialFrame base l)).head i=base.head i) := by sorry
Source
Original physical zero-carry initialization with complete generated payload and real marker rewind. Written by Codex.

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