Compiler theorem

FPRD-T101

Source-selecting stack machines compile to distance-two scaffolds

Exact statement

Every finite deterministic letter-synchronous fixed-slot source-selecting stack machine compiles to an exact Loff--Moreira--Reis scaffolding automaton. Each output slot may simultaneously push onto, keep, or pop any source slot from the preceding round. The compiler appends one self-free node per input symbol, has degree (s) and distance two, and preserves finite control, every decoded stack, acceptance, and the empty word.

StatusMechanically checked and internally audited
External reviewNo documented external or specialist review of this FPRD result is recorded.

Context

The source model makes persistent branch sharing explicit: several output slots may select one preceding source stack and apply different simultaneous updates.

Hypotheses and scope

  • The number of slots is fixed and positive, and the source alphabet, stack alphabet, and control are finite at the published boundary.
  • One input symbol is consumed per transition, all assignments are simultaneous, and acceptance depends only on finite control.

Proof or evidence

Lean formalizes source configurations and runs, the depth-two observation functions, distance and SELF constraints, initialization, one-step preservation, all-prefix induction, exact control and stack correspondence, and Boolean language equality including epsilon.

Verification notes

The all-prefix proof was independently decomposed into exact top observation, one-step root-sharing preservation, invariant preservation, and list induction. Initialization, epsilon readout, simultaneous source selection, finite-control acceptance, formal endpoints, the two-slot calibration, and proof-hole scan were checked against the pinned source.

Limitations

  • The theorem does not construct a source-selecting machine from an arbitrary PDA or its bounded frontier.
  • It assumes rather than derives a stationary finite-control slot allocator, including any equality-sensitive deduplication policy.
  • Finiteness and positive degree remain explicit obligations at the LMR-to-PEG boundary.

Open work

Seek external review of the all-prefix simulation and continue beyond the known finite causal allocator tiers.

Notes

Lean 4.30.0 checks the source configuration/run semantics, depth-two observation functions, distance and SELF constraints, simulation initialization, one-step preservation, all-prefix induction, exact control/stack correspondence, and equality of Boolean readout. A two-slot calibration derives [7] and [8] from the same preceding source slot in one round. The theorem does not construct such a machine from a bounded PDA frontier. A stationary finite-control slot allocator, including any equality-sensitive deduplication, remains an explicit hypothesis. Finiteness of the carriers and positive degree are external obligations at the published LMR boundary. This opens no M34 and does not edit the paused EPAL publication.