Bounded universality, priced #
A universal evaluator is usually produced as an existence statement: some code computes what any other code computes. Such a witness has no constructor skeleton, so nothing about it can be priced — and a capacity-graded semantics needs exactly that price.
This module states the priced form. UniversalAt F says a code exists that runs the reference
dynamics within workspace F of the run's own width. Three things about the statement are
deliberate.
It prices against the reference, not the witness. The cost is charged against
stepUFn, the mathematical layer that specifies what the machine does, and against
the widths that run passes through. Nothing in the definition mentions how a witness represents a
configuration, so two witnesses with different internals are compared on the same terms.
Grade-relativity is the width hypothesis. "Executes code within capacity" is the named
hypothesis ∀ σ ≤ τ, Nat.size (stepUFn^[σ] (initConfig p x)) ≤ W: on runs whose configurations stay
within W bits, the workspace is affine in W. It has to be a hypothesis rather than a derived
quantity — a frame stores the values a simulated recursion has accumulated, which are outputs of the
computation being run, not functions of the code's shape, so nothing bounds them from the code
alone.
The semantics is anchored elsewhere, on purpose. That the reference dynamics computes eval
is machine_sound and machine_complete, both independent of any
witness. Folding them into this definition would make the predicate about a particular machine
rather than about the price of running one, so they are cited rather than absorbed.
The iteration count enters only through Nat.size τ: the recursor carries its own counter, and the
workspace measure charges the width of every value a node touches. No leading term depends on how
far the run has gone.
Bounded universality at a price. Some code runs the reference dynamics, and does so within
workspace F of the widest of: the run's own configurations, its argument, and its counter.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The price the constructed interpreter actually pays: affine, with both constants inherited from the step's own workspace law. They are upper bounds and are not claimed to be tight.
Equations
- ReflectiveSubsystems.universalCost m = 524300 * m + 131120
Instances For
Bounded universality holds, at an affine price, with a structural witness. The witness is
runU — a prec code built from constructors, which is what makes it priceable at
all.