Pointer machines #
Every step loads one record from the heap and allocates one fresh record at the next address.
Each step operates on nine integer variables: the five registers (0..4), the three loaded record
fields (5..7), and the freshly allocated address (8).
The key lemma Mach.gv_iff shows that checking step-by-step causality (Mach.Seq) is equivalent
to the global check Mach.GV (where loads may refer to the full final heap) whenever the initial
heap is closed (Mach.Closed).
Relation to Cslib.PointerMachine #
This model is intentionally distinct from CslibFrontier/Computability/PointerMachine/Defs.lean
(Cslib.PointerMachine, Tarjan's deterministic PC-indexed instruction model with arbitrary Layout
and total operations). Here Uni.Mach A M K is a CommRing-weighted nondeterministic rule
relation over modes M and record kinds K, with fixed 5-register / 3-field bit-sliced records,
finite accepting-run weight sums (Mach.SumTo), and the global-heap relaxation Mach.GV needed by
the universal weighted-automaton reduction in [AnthropicVPVNP2026].
From VP ≠ VNP over every field [Ant26], module Nc.Uni.PM.
Main definitions #
Uni.Mach: a weighted pointer machine with modesM, record kindsK, and weights inA.Uni.rv: embeds register indexFin 5into variable indexFin 9.Uni.Rec: a heap record(kind, ![address, field0, field1, field2]).Uni.Mach.Step,Uni.Mach.ld,Uni.Mach.al,Uni.Mach.wts.Uni.Mach.State,Uni.Mach.Fire,Uni.Mach.nxt,Uni.Mach.Seq.Uni.Mach.GV: globally checked trace condition.Uni.Mach.Closed: heap address-closure invariant.Uni.Mach.SumTo: finite accepting-run weight sum and length bound.
Main results #
Uni.Mach.gv_iff: equivalence between global verificationGVand step-by-stepSeq.Uni.Mach.Seq.le: every variable value in an accepting run is bounded byσ.n + tr.length.Uni.Mach.SumTo.mono,Uni.Mach.SumTo.halt,Uni.Mach.SumTo.fin,Uni.Mach.SumTo.none,Uni.Mach.SumTo.one,Uni.Mach.SumTo.two.
A pointer machine with modes M, record kinds K, and weights in A. The nine variables of
a step are: the five registers (0..4), the three fields of the loaded record (5..7), and the
new address (8).
- Rl : Type
transition rules
- dR : DecidableEq self.Rl
- src : self.Rl → M
mode before the step
- dst : self.Rl → M
mode after the step
optional bit read from the input
- lk : self.Rl → K
kind of the record loaded in this step
register holding the address of the loaded record
- ak : self.Rl → K
kind of the record allocated in this step
three variable indices supplying the new record's fields
variable indices supplying the five updated registers
- wt : self.Rl → A
transition weight
- m0 : M
initial mode
- mh : M
halting mode
- kN : K
kind of the initial record at address
0
Heap records: record kind together with [address, field0, field1, field2].
The product of rule weights along a trace of steps.
A pointer-machine configuration.
- mode : M
current control mode
current values of the five registers
allocated records
- n : ℕ
last allocated address
remaining input bits
Local validity of firing step st from configuration σ.
rule source matches current mode
first five variables match current registers
fresh address equals
σ.n + 1loaded record already exists in the heap
rule consumes a prefix of the remaining input
Runs checked globally: loads may refer to any record in the final heap σ.heap ++ tr.map al.
- regs (i : Fin 5) : ∃ (fin : ℕ), σ.regs i :: List.map (fun (st : P.Step) => st.2 (P.dr st.1 i)) tr = List.map (fun (st : P.Step) => st.2 (rv i)) tr ++ [fin]
each register is threaded across all steps
concatenated input bits read equal
σ.inpevery loaded record appears in the combined initial + allocated heap
Halting case: when no rule starts from P.mh, the unique accepting run is [].
Branching step: finitely many fireable transitions with inductive SumTo bounds.
Deterministic step: a unique transition fires from σ.
Two-way branch: two distinct transitions fire from σ.