B7 — Rewriting preserves joint service and exact costs
ProvedAPFLawsOfForm.equivalent_requests_preserve_costsReplacing one form by a derivably equivalent form inside any finite joint request family preserves exactly which complete protocols serve it. It therefore preserves the complete attainable price set, feasibility, every achievable budget, and the infimal cost. The protocol and registered decoder catalogue are retained. This is readout-service equivalence, not equality of arbitrary state-changing operations or a claim of free construction of missing decoders.
import Definitions.Def_APFLawsOfForm_Bridge set_option autoImplicit false open LawsOfForm APFPaper1.Foundation
namespace APFLawsOfForm
theorem equivalent_requests_preserve_costs {Ω D P : Type} (L : Ledger D P) (M : DecoderSystem Ω P)
(r : Nat → Ω → Bool) (e f : Expr) (h : Algebra e f) (F : Finset Expr) :
(∀ p, (formLedger L M r).serves p (insert e F) ↔ (formLedger L M r).serves p (insert f F)) ∧
costs (formLedger L M r) (insert e F) = costs (formLedger L M r) (insert f F) ∧
(Feasible (formLedger L M r) (insert e F) ↔ Feasible (formLedger L M r) (insert f F)) ∧
(∀ b, WithinBudget (formLedger L M r) (insert e F) b ↔ WithinBudget (formLedger L M r) (insert f F) b) ∧
cost (formLedger L M r) (insert e F) = cost (formLedger L M r) (insert f F) := by sorry
end APFLawsOfForm
Read-back
What the Lean code literally says, in plain math · Codex (GPT-6)
For arbitrary types , , and , let be a ledger consisting of a price function with for every , a relation saying that serves a finite subset of , and a relation saying that carries an element of , subject to the following requirements: serving a finite set implies serving each of its subsets; serving a finite set implies carrying every member of that set; and there exists a protocol that serves the empty set and has price zero. Let assign to each a type of records, a function , and a set of registered decoders. Let be any family of Boolean functions. Expressions are finite formal expressions generated by a blank , variables indexed by all natural numbers including zero, a unary constructor written , and a binary constructor written ; these symbols denote syntax until an evaluation is specified. Let and be expressions, assume that they are related by the least equivalence relation on expressions which is preserved by the unary constructor, by replacing either argument of the binary constructor, and by every simultaneous substitution of expressions for variables, and which contains, for every choice of expressions , the identities , , , , and . Here a simultaneous substitution sends each to its assigned expression, leaves the blank fixed, and acts recursively through both constructors. Let be any finite set of expressions. For an expression , define its Boolean function by interpreting the blank as false, at as , the unary constructor as Boolean negation, and the binary constructor as Boolean disjunction. Say that implements when there exists a decoder such that for every . For each finite expression set , define to be the set of all implementing every expression in , and define ; thus the induced expression ledger retains 's prices, serves exactly when its protocol belongs to , and carries an expression exactly when it implements that expression. Writing and , the theorem asserts the conjunction of all five statements: for every , if and only if ; ; there exists a protocol in if and only if there exists a protocol in ; for every real budget , there exists with if and only if there exists with ; and , where each infimum is the real-valued total infimum used to define the ledger's cost, equal to zero for the empty set and otherwise the ordinary infimum of the nonempty set of nonnegative prices. Neither feasibility nor attainment of an infimum is assumed. The finite set may be empty, and may coincide, and either may already belong to ; insertion adds no duplicate element. The types and may be empty, while cannot be empty because the ledger requires . If is empty, the requirement on a decoder's values at all states is vacuous, but membership of some decoder in is still required. Registered decoder sets may be empty and are not assumed to be closed under Boolean operations, and no independence, nonconstancy, or realization condition is imposed on . Budgets range over all real numbers, including negative ones, for which both existence statements are false because all prices are nonnegative; the theorem also includes the case where both inserted request sets are infeasible and both price sets are empty.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.