B8 — Compile forms with registered Boolean operations
ProvedAPFLawsOfForm.registered_decoder_compilationIf a complete APF protocol serves all primitive labels occurring in a form, its registered decoders realize the original serving relation, and its already provided decoder catalogue contains false and is closed under Boolean complement and binary disjunction, that same protocol serves the form at its existing bill. The result supplies an actual budget witness and bounds the infimum by that bill. Closure is an explicit resource/interface hypothesis, not a conclusion that all physical postprocessing is free.
import Definitions.Def_APFLawsOfForm_Bridge set_option autoImplicit false open LawsOfForm APFPaper1.Foundation
namespace APFLawsOfForm
theorem registered_decoder_compilation {X Q D P : Type} [DecidableEq D]
(I : PhysicalInterface X Q D P) (g : Nat → D)
(M : DecoderSystem (PhysicalState I.profile) P) (hM : RealizesLedger I M)
(e : Expr) (p : P) (hp : I.ledger.serves p (primitiveSupport g e)) (hc : BooleanClosed M p) :
(formLedger I.ledger M (interfaceReadouts I g)).serves p {e} ∧
WithinBudget (formLedger I.ledger M (interfaceReadouts I g)) {e} (I.ledger.price p) ∧
cost (formLedger I.ledger M (interfaceReadouts I g)) {e} ≤ I.ledger.price p := by sorry
end APFLawsOfForm
Read-back
What the Lean code literally says, in plain math · Codex (GPT-6)
For every four types , with decidable equality on , let consist of a map , the quotient where means , an injective assignment of binary distinctions to elements of , and a ledger on and : each distinction has a readout with for some ; the ledger has a real price for every , a relation for finite that is closed under passing to subsets, and a relation such that serving implies carrying every ; and some protocol serves the empty set at price zero. The interface also requires, for each , that some protocol serves and that , where every cost in this statement is the real infimum of the set of serving protocols' prices. Let be any function, and let assign to every protocol a type of records, a record map , and a set of registered decoders. Assume that for every and every finite , holds if and only if, for each , there exists a decoder satisfying for every ; these decoders may depend on . Let be any finite formal expression built from a blank, variables indexed by natural numbers including zero, a unary crossing operation, and a binary beside operation, and let . Write for the finite set of variable indices occurring in , defined by , , , and . Assume that serves the finite image , and that contains the constant-false decoder, contains the pointwise Boolean negation of each of its members, and contains the pointwise Boolean disjunction of every pair of its members, with these closure conditions holding as functions on all of . For any expression , define by interpreting the blank as false, variable as , crossing as Boolean negation, and beside as Boolean disjunction. Define a ledger on expressions and the same protocols by keeping price , declaring that serves a finite expression set exactly when, for every , there is some with for all , and declaring that carries exactly when such a decoder exists for . Then all three conclusions hold together: serves in ; there exists a protocol that serves in and satisfies ; and . The quantified expression may have no variables or may evaluate to a constant; repeated indices and repeated values of are discarded in the support set, need not be injective, and no joint realizability of arbitrary assignments to primitive readouts is assumed. If is empty, the stated serving hypothesis concerns the empty set, and the global equivalence assumption makes every protocol serve that set. The decoder equality is required on every quotient state, whereas decoder closure is required even on records outside the image of the record map. The decoder and budget witnesses need not be unique, and the infimum need not be attained; for the concluding cost, the first conclusion makes its defining set nonempty and nonnegative prices make it bounded below. Although the types are universally quantified without separate nonemptiness assumptions, forces to be inhabited, the ledger forces to be inhabited, and the nonconstant readout of forces at least two distinct quotient states, so empty or , empty or , or a constant profile cannot satisfy the full hypotheses.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.