Recording preserves absence of the source step
ProvedMonodromy.Counter.Reversible.Recording.step_encode_none_iffFor arbitrary natural n,m, every n-counter program P, source configuration s and natural history h, the reversible recording table has no optional step from encode(s,h) if and only if P has no optional step from s. The encoding retains the source counters, history and zero workspace at the corresponding recording dispatch.
Statement dependencies: Monodromy.Counter.Configuration, Monodromy.Counter.Program, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.encode, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.step, Monodromy.Counter.step.
Original proof dependencies: Monodromy.Counter.Configuration, Monodromy.Counter.Instruction, Monodromy.Counter.Program, Monodromy.Counter.Reversible.Action, Monodromy.Counter.Reversible.Action.enabled, Monodromy.Counter.Reversible.Edge, Monodromy.Counter.Reversible.Edge.enabled, Monodromy.Counter.Reversible.Radix.edges, Monodromy.Counter.Reversible.Radix.entry, Monodromy.Counter.Reversible.Radix.size, Monodromy.Counter.Reversible.Recording.Active, Monodromy.Counter.Reversible.Recording.Arc, Monodromy.Counter.Reversible.Recording.Extra, Monodromy.Counter.Reversible.Recording.Node, Monodromy.Counter.Reversible.Recording.arcEdge, Monodromy.Counter.Reversible.Recording.arcEquiv, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.encode, Monodromy.Counter.Reversible.Recording.extraEdge, Monodromy.Counter.Reversible.Recording.extraOperation, Monodromy.Counter.Reversible.Recording.extraOperation_dec, Monodromy.Counter.Reversible.Recording.extraOperation_inc, Monodromy.Counter.Reversible.Recording.extraOrigin, Monodromy.Counter.Reversible.Recording.extraOrigin_dec, Monodromy.Counter.Reversible.Recording.extraOrigin_inc, Monodromy.Counter.Reversible.Recording.frame, Monodromy.Counter.Reversible.Recording.frame_old, Monodromy.Counter.Reversible.Recording.halt_no_outgoing, Monodromy.Counter.Reversible.Recording.nodeEquiv, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.Recording.table_arc, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.step, Monodromy.Counter.Reversible.step_none_iff, Monodromy.Counter.step, Monodromy.Counter.step_halt.
Statement elaboration dependencies: Monodromy.Counter.Configuration, Monodromy.Counter.Program, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.encode, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.step, Monodromy.Counter.step.
Proof elaboration dependencies: Monodromy.Counter.Configuration, Monodromy.Counter.Instruction, Monodromy.Counter.Program, Monodromy.Counter.Reversible.Action, Monodromy.Counter.Reversible.Action.enabled, Monodromy.Counter.Reversible.Edge, Monodromy.Counter.Reversible.Edge.enabled, Monodromy.Counter.Reversible.Radix.edges, Monodromy.Counter.Reversible.Radix.entry, Monodromy.Counter.Reversible.Radix.size, Monodromy.Counter.Reversible.Recording.Active, Monodromy.Counter.Reversible.Recording.Arc, Monodromy.Counter.Reversible.Recording.Extra, Monodromy.Counter.Reversible.Recording.Node, Monodromy.Counter.Reversible.Recording.arcEdge, Monodromy.Counter.Reversible.Recording.arcEquiv, Monodromy.Counter.Reversible.Recording.base, Monodromy.Counter.Reversible.Recording.dispatch, Monodromy.Counter.Reversible.Recording.edges, Monodromy.Counter.Reversible.Recording.encode, Monodromy.Counter.Reversible.Recording.extraEdge, Monodromy.Counter.Reversible.Recording.extraOperation, Monodromy.Counter.Reversible.Recording.extraOperation_dec, Monodromy.Counter.Reversible.Recording.extraOperation_inc, Monodromy.Counter.Reversible.Recording.extraOrigin, Monodromy.Counter.Reversible.Recording.extraOrigin_dec, Monodromy.Counter.Reversible.Recording.extraOrigin_inc, Monodromy.Counter.Reversible.Recording.frame, Monodromy.Counter.Reversible.Recording.frame_old, Monodromy.Counter.Reversible.Recording.framed, Monodromy.Counter.Reversible.Recording.halt_no_outgoing, Monodromy.Counter.Reversible.Recording.nodeEquiv, Monodromy.Counter.Reversible.Recording.size, Monodromy.Counter.Reversible.Recording.table, Monodromy.Counter.Reversible.Recording.table_arc, Monodromy.Counter.Reversible.State, Monodromy.Counter.Reversible.step, Monodromy.Counter.Reversible.step_none_iff, Monodromy.Counter.step, Monodromy.Counter.step_halt.
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.step_encode_none_iff (program : Counter.Program n m)
(state : Counter.Configuration n m) (history : ℕ) :
step (table program) (encode state history) = none ↔ Counter.step program state = none := 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 natural configuration and every natural history , the recording-table step at has no successor if and only if the source natural-counter step at has no successor. On the source side a step has no successor precisely when is halt; on the recording side the step is the finite search for an enabled edge of . Thus the equivalence concerns this encoded state with workspace and a natural history, and places no assertion on arbitrary off-encoding integer states. It includes history and configurations with zero counter values. 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).