The Full Native Program Language Computes Exactly the Partial Recursive Functions
ProvedMonodromy.Structure.continuation_characterizationFor every partial function f:ℕ→Part ℕ, there exists a finite native Program of some positive cover degree whose complete execution realizes f under the fixed inputLabels preparation and outputLabels readout if and only if f is partial recursive. Realization uses equality of the full numeric result graph for every natural input and output value. The quantified programs are the entire Program language, rather than only the reversible compiler image.
Statement dependencies: Monodromy.Structure.Realizable.
Original proof dependencies: Monodromy.Structure.Realizable, Monodromy.Structure.partrec_of_realizable, Monodromy.Structure.realizable_of_partrec.
Statement elaboration dependencies: Monodromy.Structure.Realizable.
Proof elaboration dependencies: Monodromy.Structure.Realizable, Monodromy.Structure.partrec_of_realizable, Monodromy.Structure.realizable_of_partrec.
module public import Definitions.Def_Monodromy_Structure 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.Analysis.SpecialFunctions.Trigonometric.Deriv public import Mathlib.Analysis.SpecialFunctions.Trigonometric.Sinc public import Mathlib.Computability.Halting public import Mathlib.Computability.PartrecCode public import Mathlib.Computability.Primrec.Basic public import Mathlib.Computability.Primrec.List 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.Int.ModEq public import Mathlib.Data.Nat.Digits.Lemmas public import Mathlib.Data.Nat.Factorization.Basic public import Mathlib.Data.Set.Finite.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.Structure open CoupledContinuation NativeInterface
theorem Monodromy.Structure.continuation_characterization (function : ℕ → Part ℕ) :
Realizable function ↔ Partrec function := by sorry
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent agent)
Write . The memory space consists of triples with and ; the integer-labelled point is with principal complex logarithms. A native program of positive degree consists of finite words and Boolean stop flags. Letters are left shift, right shift, left zero probe, right zero probe and control shift, with forward/reverse flags. The respective drivers move one lower base coordinate along or , or the control coordinate along ; unmentioned coordinates are constant. A driver acts by lower exponential lifts starting at , followed by an upper exponential lift starting at over the product of the lower lifts and the control path, and takes the endpoint. Words concatenate these drivers in list order, reversing paths for reversed letters; the empty word is idle. Routing observes and selects values at the roots by , with the divided slope of at divided by its derivative at (the divided slope at is the derivative). Advance executes the routed word; the halt signal selects for true stop flags and otherwise. The optional step is absent exactly when this signal is , and is advance otherwise. Partial evaluation repeatedly takes present steps and returns the first state with absent step; it is undefined if there is no such finite stopping time. The fixed numeric interface uses the four symbols and four tracks main, reverse, auxiliary and stack; its alphabet is a Boolean marker paired with an optional symbol on each track, blank meaning false marker and all tracks empty. To encode a list of naturals, encode each number in binary least-significant-bit first (zero as an empty bit list), append after each number, reverse the resulting symbol list, put its symbols on the main track alone, and set the first letter's marker true (an empty list gives one marked blank). Choose the specified finite alphabet bijection to taking blank to , where is its cardinality, and let be this numeric word for the singleton list . Put and , using a default-zero head for an empty word. To read an alphabet letter from an accumulator , use for main-track , for main-track , and otherwise, ignoring the marker and other tracks. For any integer label triple , let and be the greatest with (so if ). The output starts with and performs exactly iterations of taking the first component modulo , dividing that component by , and applying the corresponding letter-read operation to the accumulator; the unused residue is interpreted as blank , and the final accumulator is the output. Thus this total readout ignores the right and control labels, and negative left labels give output . For every partial function , is partial recursive if and only if there exist a natural and a degree- native program such that for all , is defined with value exactly when there is an integer triple for which 's partial evaluation from returns and . Both sides include partial functions undefined on some or all inputs and total partial-recursive functions; no positive-input or totality restriction appears. Degrees begin at through the predecessor parameter , and the witness program may depend on .
Confirmed by the mission captain (proposal self-audit).