Retaining a uniform realization witness #
Realizes.Witness retains supplied scratch, factor and emitter data with the same execution
contract as Realizes. Its erasure supplies the existential judgment without discarding the
data used by a concrete backend.
The legacy projections choose one witness of Realizes before any runtime argument, width, memory
or register layout. They use classical choice from a proposition: they do not claim executable
extraction from an arbitrary proof. They let adapters refer to the same emitted native code and
its proved exchange factor, without adding another realization judgment.
Main definitions #
Realizes.scratchSize,Realizes.factor,Realizes.code: select the uniform witness.Realizes.Witness: retain a specified witness and its execution contract.Realizes.Witness.ofRealizes: an existential-only choice fallback.Realizes.Witness.consequence,Realizes.Witness.consequenceValid,Realizes.Witness.congr,Realizes.Witness.reindex: theRealizesadapters, retaining every supplied field.
Main results #
Realizes.code_spec: the selected code has the complete original realization contract.
A specified realization, retaining its resource parameters and emitter as data. Correctness
is the same contract existentially quantified by Realizes, not a new execution semantics.
- scratchSize : ℕ
Auxiliary registers, excluding results and the reserved extra slot.
- factor : ℕ
Exchange factor for memory charges plus local work.
- code {r : ℕ} (frontier : Fin r) : (Fin k → Fin r) → (Fin (l + self.scratchSize + 1) → Fin r) → Code B r
The emitter, fixed before all runtime values and register placements.
- code_spec : Spec B p input output safe work self.scratchSize self.factor fun {r : ℕ} => self.code
The existing execution, whole-memory/frontier and register-frame contract.
Instances For
Forget resource and emitter selection while retaining the original realization judgment.
Number of auxiliary registers, chosen independently of every runtime value.
Instances For
Uniform exchange factor for memory charges plus local work.
Instances For
One emitter, selected before the register layout or any runtime data.
Instances For
The selected witness retains width independence, literal whole-memory semantics, all result coordinates, and the original live-register frame.
Select a witness from an existential realization. This fallback preserves correctness but does not assert concrete scratch, factor or code identities for a particular derivation.
Instances For
Strengthen the entry domain or enlarge local work without reselecting any witness data.
Instances For
The client's own admissible history can discharge a stronger entry domain. The supplied scratch, factor and emitter remain unchanged.
Instances For
Exact source equality changes no witness field or code.
Instances For
Rewire already live input words by a fixed index map, retaining the supplied resources. The pointwise encoding equality charges no new host-side argument computation.
Instances For
A specified frontier-bounded realization, retaining its resource parameters and emitter.
- scratchSize : ℕ
Auxiliary registers, excluding results and the reserved extra slot.
- factor : ℕ
Exchange factor for memory charges plus local work.
- code {r : ℕ} (frontier : Fin r) : (Fin k → Fin r) → (Fin (l + self.scratchSize + 1) → Fin r) → Code B r
The emitter, fixed before all runtime values and register placements.
- code_spec : Realizes.SpecBounded B p input output safe work self.scratchSize self.factor fun {r : ℕ} => self.code
The frontier-bounded execution, whole-memory/frontier and register-frame contract.
Instances For
Forget resource and emitter selection to RealizesBounded.
Erase the frontier bound on a retained witness.
Instances For
Select a witness from an existential RealizesBounded proof.