Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Actual two-tape word reversal in exactly 2n+3 transitions

Proved
IntMul.TapeReverse.reverse_first_operand

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

algorithmsfixed-tape-routinginteger-multiplicationturing-machines

For arbitrary binary operands x,y, the fixed two-tape, five-symbol, four-state reversal machine halts with exact output reverse(x) in 2|x|+3 actual transitions. It leaves the entire input x#y unchanged, the input head at the original start marker, the output head just after reverse(x), and the complete final configuration equal to the specified frame. Empty words and arbitrary second operands are included. Scanning to the delimiter, changing direction, all reverse-copy steps and halting are charged; the table uses only finite state and scanned symbols.

Preamble
import Definitions.Def_IntMul_TapeReverse
import Mathlib.Data.List.GetD
import Mathlib.Data.List.TakeDrop
import Mathlib.Tactic

open IntMul.TapeReverse

Formal statement
theorem IntMul.TapeReverse.reverse_first_operand (x y : List Bool) :
    machine.HaltsWithOutput x y (2*x.length+3) x.reverse ∧
      machine.step^[2*x.length+3] (machine.initCfg x y)=frame x y 0 .halt := by sorry
Source
Original fixed-tape word reversal for least-significant-first digit routing in the integer multiplication construction. 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