S6 — Compile every form on its actual primitive record
ProvedAPFLoFStrengthening.compile_on_recordThe protocol containing the distinct labels that occur syntactically in a form actually serves that form, supplies a budget witness at its unchanged full price, and bounds the infimal cost from above. This uses the accepted registered-decoder compilation theorem with the now-proved model realization and Boolean closure. The syntactic support price is an upper bound, not necessarily the minimum.
import Definitions.Def_APFLoFStrengthening_Model import Definitions.Def_APFLoFStrengthening_Symmetry import Mathlib.Tactic import Theorems.Thm_APFLoFStrengthening_realized_boolean_ledger import Theorems.Thm_APFLawsOfForm_registered_decoder_compilation set_option autoImplicit false set_option linter.unusedSectionVars false set_option maxRecDepth 100000 set_option maxHeartbeats 4000000 open LawsOfForm APFPaper1.Foundation APFLawsOfForm
namespace APFLoFStrengthening
theorem compile_on_record (D : Type) [DecidableEq D] (g : Nat → D) (e : Expr) :
(formLedger (ledger D) (system D) (interfaceReadouts (interface D) g)).serves
(primitiveSupport g e) {e} ∧
WithinBudget (formLedger (ledger D) (system D) (interfaceReadouts (interface D) g))
{e} (price D (primitiveSupport g e)) ∧
cost (formLedger (ledger D) (system D) (interfaceReadouts (interface D) g))
{e} ≤ price D (primitiveSupport g e) := by sorry
end APFLoFStrengthening
Read-back
What the Lean code literally says, in plain math · Fresh isolated Codex reader; exact model ID not recorded
compile_on_record — independent code readback
For every D : Type with DecidableEq D, every total g : Nat → D, and every finite syntax expression e, set S = primitiveSupport g e: the image under g of the finite set of variable indices occurring in e. The theorem asserts three conjuncts for the form ledger built from ledger D, system D, and the interface’s readouts: protocol S serves the singleton request {e}; some serving protocol has price at most price D S; and the real infimum of all serving-protocol prices is at most price D S. The second assertion is WithinBudget and contains an existential protocol; the first already identifies S as a particular serving protocol.
In this model a protocol records precisely its finite set of Boolean coordinates, every Boolean decoder on that record is registered, and price D S is the real cast of |S| + choose(|S|, 2). Serving {e} means that there is a registered decoder on this one record whose output equals e’s Boolean denotation at every quotient state. Blank evaluates to false, crossing to negation, and beside to disjunction. A decoder is selected for the fixed e and must work for all states.
No injectivity assumption on g is imposed. Repeated variable occurrences and different variable indices mapped to the same coordinate contribute only once to S. An expression with no variables has S = ∅ and receives a zero budget and zero upper bound; nonnegative ledger prices then give zero infimum. A semantically constant expression may nevertheless have nonempty syntactic support, so the stated upper bound is not a general equality or a minimal-support assertion. For empty D there is no total g to supply, including for a variable-free e. There is no bound on the total size of D, decoder runtime, number of syntax operations, or physical resources. The declaration’s placeholder is not evidence that the statement has been proved.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.