The copied history packer avoids earlier dispatches
ProvedMonodromy.Counter.Reversible.Recording.packing_internal_reachesFor any natural n,m, n-counter program P, row r, digit s<2m+1, natural source-register vector v and history h, the recording table has an internal finite run from port(r,s) with registers (v,h,0) to dispatch(r) with registers (v,(2m+1)h+s,0). Each departure state in the run avoids every recording dispatch; s=0 is allowed, and no strict history-growth conclusion is asserted.
Statement dependencies: Monodromy.Counter.Program, Monodromy.Counter.Reversible.Recording.InternalReaches, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.framed, Monodromy.Counter.Reversible.Recording.port.
Original proof dependencies: Monodromy.Counter.Program, Monodromy.Counter.Reversible.Edge, Monodromy.Counter.Reversible.Glue.mapEdge, Monodromy.Counter.Reversible.Glue.mapState, Monodromy.Counter.Reversible.Glue.step_map_live, Monodromy.Counter.Reversible.Radix.edges, Monodromy.Counter.Reversible.Radix.entry, Monodromy.Counter.Reversible.Radix.finish, Monodromy.Counter.Reversible.Radix.point, Monodromy.Counter.Reversible.Radix.reverse_pack, Monodromy.Counter.Reversible.Radix.size, Monodromy.Counter.Reversible.Radix.table, Monodromy.Counter.Reversible.Radix.targetCompatible, Monodromy.Counter.Reversible.Recording.Arc, Monodromy.Counter.Reversible.Recording.Boundary, Monodromy.Counter.Reversible.Recording.Extra, Monodromy.Counter.Reversible.Recording.InternalReaches, Monodromy.Counter.Reversible.Recording.InternalStep, Monodromy.Counter.Reversible.Recording.arcEquiv, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.base_nonzero, Monodromy.Counter.Reversible.Recording.copy, Monodromy.Counter.Reversible.Recording.deterministic, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.frame, Monodromy.Counter.Reversible.Recording.frame_extend, Monodromy.Counter.Reversible.Recording.framed, Monodromy.Counter.Reversible.Recording.historyRegister, Monodromy.Counter.Reversible.Recording.historyRegister_injective, Monodromy.Counter.Reversible.Recording.local_step_not_entry, Monodromy.Counter.Reversible.Recording.not_boundary_copy, Monodromy.Counter.Reversible.Recording.packing, Monodromy.Counter.Reversible.Recording.packing_deterministic, Monodromy.Counter.Reversible.Recording.port, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.Recording.table_arc, Monodromy.Counter.Reversible.RegisterRelocation.embed, Monodromy.Counter.Reversible.RegisterRelocation.mapTable, Monodromy.Counter.Reversible.RegisterRelocation.step_embed, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.Table, Monodromy.Counter.Reversible.reverseTable, Monodromy.Counter.Reversible.reverseTable_deterministic, Monodromy.Counter.Reversible.step.
Statement elaboration dependencies: Monodromy.Counter.Program, Monodromy.Counter.Reversible.Recording.InternalReaches, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.framed, Monodromy.Counter.Reversible.Recording.port.
Proof elaboration dependencies: Monodromy.Counter.Program, Monodromy.Counter.Reversible.Edge, Monodromy.Counter.Reversible.Glue.mapEdge, Monodromy.Counter.Reversible.Glue.mapState, Monodromy.Counter.Reversible.Glue.step_map_live, Monodromy.Counter.Reversible.Radix.edges, Monodromy.Counter.Reversible.Radix.entry, Monodromy.Counter.Reversible.Radix.finish, Monodromy.Counter.Reversible.Radix.point, Monodromy.Counter.Reversible.Radix.reverse_pack, Monodromy.Counter.Reversible.Radix.size, Monodromy.Counter.Reversible.Radix.table, Monodromy.Counter.Reversible.Radix.targetCompatible, Monodromy.Counter.Reversible.Recording.Arc, Monodromy.Counter.Reversible.Recording.Boundary, Monodromy.Counter.Reversible.Recording.Extra, Monodromy.Counter.Reversible.Recording.InternalReaches, Monodromy.Counter.Reversible.Recording.InternalStep, Monodromy.Counter.Reversible.Recording.arcEdge, Monodromy.Counter.Reversible.Recording.arcEquiv, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.base_nonzero, Monodromy.Counter.Reversible.Recording.copy, Monodromy.Counter.Reversible.Recording.deterministic, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.frame, Monodromy.Counter.Reversible.Recording.frame_extend, Monodromy.Counter.Reversible.Recording.framed, Monodromy.Counter.Reversible.Recording.historyRegister, Monodromy.Counter.Reversible.Recording.historyRegister_injective, Monodromy.Counter.Reversible.Recording.local_step_not_entry, Monodromy.Counter.Reversible.Recording.not_boundary_copy, Monodromy.Counter.Reversible.Recording.packing, Monodromy.Counter.Reversible.Recording.packing_deterministic, Monodromy.Counter.Reversible.Recording.port, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.Recording.table_arc, Monodromy.Counter.Reversible.RegisterRelocation.embed, Monodromy.Counter.Reversible.RegisterRelocation.mapTable, Monodromy.Counter.Reversible.RegisterRelocation.step_embed, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.Table, Monodromy.Counter.Reversible.reverseTable, Monodromy.Counter.Reversible.reverseTable_deterministic, Monodromy.Counter.Reversible.step.
module
public import Definitions.Def_Monodromy_Counter
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.Data.Fin.Basic
public import Mathlib.Data.Fintype.Card
public import Mathlib.Data.Fintype.EquivFin
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.Counter
open Monodromy.Counter.Reversible
open Monodromy.Counter.Reversible.Recording
variable {n m : ℕ}
theorem Monodromy.Counter.Reversible.Recording.packing_internal_reaches (program : Counter.Program n m)
(row : Fin m) (symbol : Fin (base m)) (values : Fin n → ℕ) (history : ℕ) :
InternalReaches program
(framed (port row symbol) values history 0)
(framed (dispatch row) values (base m * history + symbol.val : ℕ) 0) := by sorry
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent agent)
Let and let be a natural-counter program with controls and registers, whose instructions are increment-and-jump, zero-test with a nonzero decrement-and-jump, and halt. Put . The recording table uses integer registers: the original registers, a history register and a workspace register . For each source row it contains a copy of the reversed graph on , with dispatch at that graph's input and port at its finish ; it also has a middle control for every row. A source increment of register to row gives an extra edge shifting register by . A decrement/test on register with zero target and nonzero target gives with test , with test , and shifting by . Halt rows have no extra edges. Copies of the reversed radix edges act only on ; reversal swaps endpoints, negates shifts and preserves tests. A table step chooses the least enumerated enabled edge, or has no successor when none is enabled. Write for control , original registers coerced to integers, history and workspace . For every row , digit , original natural-register vector and natural history , the integer state at port with registers reaches the state at dispatch with registers through a finite, possibly zero-length, chain of defined steps, every step's source control differing from every dispatch . This is the reflexive transitive closure of the relation “one defined table step whose source is not a dispatch”; it does not itself require a positive length or require either endpoint to be a dispatch. The digit , history and empty original register family are included, and no condition on the program instruction at row is imposed. The two-integer-counter graph has global vertices and vertices for , , with input and finishes . Its global edges are , , ; for each its other edges are , , , , , , , and , where if and otherwise. Tests leave the counters unchanged, shifts are unconditionally enabled, and a step takes the least enumerated enabled edge or is undefined if none is enabled.
Confirmed by the mission captain (proposal self-audit).