Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

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

Proved
IntMul.ZeroCarry.initialize_zero_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 output and two prepared marked copies of lll, 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+4∣l∣+77N+4|l|+77N+4∣l∣+7

actual transitions. Both countdown/template words are fully restored with their saved cursors; original input cells and head remain unchanged. The final output is bin⁡N(0)\operatorname{bin}_N(0)binN​(0) with head at cell zero. Empty and leading-zero descriptors are allowed. Descriptor preparation and relocation into another carry bank remain separate stages.

Preamble
import Definitions.Def_IntMul_ZeroCarry
import Mathlib.Tactic

open IntMul IntMul.ZeroCarry

Formal statement
theorem IntMul.ZeroCarry.initialize_zero_carry (base : machine.Cfg) (z : List Bool) :
    ∃ t : ℕ, t≤ 7*(val z+1)+4*z.length+7 ∧
      machine.step^[t] (initialFrame base z)=finalFrame base z ∧
      (machine.step^[t] (initialFrame base z)).state=machine.qHalt ∧
      (machine.step^[t] (initialFrame base z)).cells machine.inTape=base.cells machine.inTape ∧
      (machine.step^[t] (initialFrame base z)).head machine.inTape=base.head machine.inTape ∧
      (machine.step^[t] (initialFrame base z)).cells machine.outTape=
        machine.tapeOf ((bin (val z+1) 0).map machine.bitSym) ∧
      (machine.step^[t] (initialFrame base z)).head machine.outTape=0 := 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