Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Boolean-stack simulation of a finite-alphabet TM2 machine on the campaign encodings

Proved
QuantumMaxCutEnergy.tm2_to_boolean_stacks

by marwahaha · Nov 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

energy-estimationquantum-max-cutturing-machines

Let α\alphaα be an encoded input type with encoding eαe_\alphaeα​, and let f:α→Q≥0f:\alpha\to\mathbb{Q}_{\ge0}f:α→Q≥0​ admit a polynomial-time certificate on the campaign's canonical output encoding in Mathlib's multi-tape model Turing.TM2ComputableInPolyTime, whose stack alphabets are arbitrary finite types. Then fff is computed, in polynomial time, by a program of the library's Boolean-stack language PolyProgram that keeps the same input and output encodings.

In words: a finite-alphabet multi-tape machine with a polynomial step bound can be simulated, step for step with polynomial overhead, by a machine all of whose stacks are Boolean. Each symbol of a finite stack alphabet is written as a fixed block of bits, using an injection into {0,1}b\{0,1\}^{b}{0,1}b for a suitable bbb; a simulated step then pops one constant-size block from each of the finitely many stacks that the instruction touches and pushes the blocks prescribed by the simulated transition. Constant overhead per simulated step preserves polynomial time, and the input and output tapes carry lists of bits in the campaign encodings already, so no re-encoding is needed here.

This isolates the machine-model simulation from the output-frame conversion, which is the separate lemma QuantumMaxCutEnergy.ratio_frame_recode.

Preamble
import Definitions.Def_QuantumMaxCutEnergyEstimationModel
import Definitions.Def_QuantumMaxCutFiniteNumericRuntime
import Mathlib
open scoped BigOperators
Formal statement
theorem QuantumMaxCutEnergy.tm2_to_boolean_stacks
    {α : Type} (ea : α → List Bool) (f : α → ℚ≥0)
    (h : Nonempty (Turing.TM2ComputableInPolyTime ea QuantumMaxCutEnergy.encodeValue f)) :
    Nonempty (OAI.MetricKMedian.Binary.PolyProgram ea QuantumMaxCutEnergy.encodeValue f) := by sorry
Source
Not a quoted paper result. Simulation direction missing from Mathlib 0df444a (`Turing.TM2ComputableInPolyTime.comp` is a `proof_wanted` there) and from the campaign runtime module, which supplies only `OAI.MetricKMedian.Binary.PolyProgram.stock` (program to machine). Needed, together with the ratio-frame recoding, for `QuantumMaxCutEnergy.exists_polyProgram_of_tm2InPolyTime`, hence for the polynomial-time certificates of Anshu--Gosset--Morenz, TQC 2020, Theorem 3 (https://doi.org/10.4230/LIPIcs.TQC.2020.7).

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