A Stack Configuration Determines Its Related Packed Tape Configuration
ProvedMonodromy.FormalCompilation.relation_uniqueFor any source ToPartrec code, any configuration of the associated four-stack TM2 representation, and any two configurations of the associated TM1 tape representation, if both TM1 configurations are related to that same TM2 configuration by Mathlib’s stack-to-tape configuration relation TrCfg, then the two TM1 configurations are equal, including control, store and packed tape.
Statement dependencies: Monodromy.FormalCompilation.Alphabet, Monodromy.FormalCompilation.Control1, Monodromy.FormalCompilation.Label2, Monodromy.FormalCompilation.Stack, Monodromy.FormalCompilation.Store, Monodromy.FormalCompilation.Symbol.
Original proof dependencies: Monodromy.FormalCompilation.Alphabet, Monodromy.FormalCompilation.Control1, Monodromy.FormalCompilation.Label2, Monodromy.FormalCompilation.Stack, Monodromy.FormalCompilation.Store, Monodromy.FormalCompilation.Symbol.
Statement elaboration dependencies: Monodromy.FormalCompilation.Alphabet, Monodromy.FormalCompilation.Control1, Monodromy.FormalCompilation.Label2, Monodromy.FormalCompilation.Stack, Monodromy.FormalCompilation.Store, Monodromy.FormalCompilation.Symbol.
Proof elaboration dependencies: Monodromy.FormalCompilation.Alphabet, Monodromy.FormalCompilation.Control1, Monodromy.FormalCompilation.Label2, Monodromy.FormalCompilation.Stack, Monodromy.FormalCompilation.Store, Monodromy.FormalCompilation.Symbol.
module public import Definitions.Def_Monodromy_FormalCompilation public import Lean.Elab.Tactic.Omega public import Mathlib.Analysis.Analytic.Constructions public import Mathlib.Analysis.Analytic.IsolatedZeros public import Mathlib.Analysis.Analytic.Linear public import Mathlib.Analysis.Calculus.DSlope public import Mathlib.Analysis.Calculus.Deriv.Add public import Mathlib.Analysis.Calculus.Deriv.Comp public import Mathlib.Analysis.Calculus.Deriv.Mul public import Mathlib.Analysis.Calculus.Deriv.Pow public import Mathlib.Analysis.Complex.Basic public import Mathlib.Analysis.Complex.CoveringMap public import Mathlib.Analysis.Real.Pi.Bounds public import Mathlib.Analysis.SpecialFunctions.Complex.Analytic public import Mathlib.Analysis.SpecialFunctions.Complex.Circle public import Mathlib.Computability.StateTransition public import Mathlib.Computability.TuringMachine.PostTuringMachine public import Mathlib.Computability.TuringMachine.ToPartrec public import Mathlib.Data.Fin.Basic public import Mathlib.Data.Fintype.Card public import Mathlib.Data.Fintype.EquivFin public import Mathlib.Data.Fintype.Sets public import Mathlib.Data.Nat.Digits.Lemmas public import Mathlib.Data.Nat.Factorization.Basic public import Mathlib.Logic.Equiv.Fin.Basic public import Mathlib.Logic.Equiv.Fin.Rotate public import Mathlib.Logic.Function.Basic public import Mathlib.Logic.Function.Conjugate public import Mathlib.RingTheory.RootsOfUnity.Complex public import Mathlib.Tactic.FieldSimp public import Mathlib.Tactic.FinCases public import Mathlib.Tactic.FunProp public import Mathlib.Tactic.Linarith public import Mathlib.Tactic.Ring public import Mathlib.Topology.Homotopy.Lifting @[expose] public section open Monodromy open Monodromy.FormalCompilation open Turing variable (source : ToPartrec.Code)
theorem Monodromy.FormalCompilation.relation_unique
{configuration : TM2.Cfg (fun _ : Stack => Symbol) Label2 Store}
{first second : TM1.Cfg Alphabet (Control1 source) Store}
(first_related : TM2to1.TrCfg configuration first)
(second_related : TM2to1.TrCfg configuration second) : first = second := by sorry
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent agent)
For every partial-recursive code parameter , every stack-machine configuration , and any two tape-machine configurations of the following translator type, if both and represent by the stack-to-tape relation, then as complete configurations. There are four stack indices main, reverse, auxiliary and stack; each is a finite list over the four-symbol set consisting of a list separator, a number separator and two bits; is an optional interpreter label and an optional symbol. The relation says that there is a blank-padded half-tape of vectors of optional symbols such that, for every stack index , the th coordinate sequence of is the reverse of the list obtained by putting some around every element of , modulo trailing none values. The related tape configuration has control mapped to the translator's normal constructor, the same store , a blank left half-tape, and a head/right half obtained from by putting a true bottom-marker at its first cell and false markers at every later cell, while retaining each symbol vector. The theorem compares arbitrary such representations, including halted and empty stacks; it assumes neither execution reachability nor any correctness of a source computation. The code parameter indexes the stated control type but that type's definition itself ignores the code.
Confirmed by the mission captain (proposal self-audit).