D1 — Supplied record-compatible priced equivalence
DefinitionAPFLoFStrengthening_SymmetryA decoder equivalence gives bijections of states and protocols, plus a bijection between the dependent record types for each corresponding protocol. The record diagram commutes. Pulling a decoder through that record bijection preserves and reflects membership in the decoder catalogue.
A priced form equivalence additionally requires equal complete prices and corresponding primitive readouts. It supplies all these correspondences; a geometric transformation by itself does not prove them. The generic definition does not require the two ledgers to have the same protocol or state types. It introduces no metric, continuous group, quantum pairing, or physical price calibration.
import Definitions.Def_APFLawsOfForm_Bridge
set_option autoImplicit false
namespace APFLoFStrengthening.Symmetry
open LawsOfForm APFPaper1.Foundation APFLawsOfForm
structure DecoderEquivalence {Ω Ω' P P' : Type}
(M : DecoderSystem Ω P) (N : DecoderSystem Ω' P') where
state : Ω ≃ Ω'
protocol : P ≃ P'
records : (p : P) → M.Record p ≃ N.Record (protocol p)
record_commutes : ∀ p x, records p (M.record p x) = N.record (protocol p) (state x)
registered_iff : ∀ p (d : M.Record p → Bool),
d ∈ M.registered p ↔ (fun z => d ((records p).symm z)) ∈ N.registered (protocol p)
structure PricedFormEquivalence {Ω Ω' D D' P P' : Type}
(L : Ledger D P) (K : Ledger D' P')
(M : DecoderSystem Ω P) (N : DecoderSystem Ω' P')
(r : Nat → Ω → Bool) (s : Nat → Ω' → Bool) extends DecoderEquivalence M N where
price_preserved : ∀ p, L.price p = K.price (protocol p)
readouts_preserved : ∀ n x, s n (state x) = r n x
end APFLoFStrengthening.Symmetry
Read-back
What the Lean code literally says, in plain math · Fresh isolated Codex reader; exact model ID not recorded
definition_symmetry — independent code readback
DecoderEquivalence is a structure parameterized by decoder systems M on states Ω and protocols P, and N on states Ω′ and protocols P′. These four types are implicit arbitrary Type parameters, with no equality, finiteness, or nonemptiness instance required. A value supplies a bijection state : Ω ≃ Ω′, a bijection protocol : P ≃ P′, and, for each source protocol p, a bijection records p between its source record type and the target record type at protocol p. For every p and source state x, transforming the recorded value agrees exactly with first transforming the state and then recording it. For every p and every source decoder d, source registration of d is equivalent to target registration of the decoder obtained by precomposing d with the inverse record bijection. This concerns all record values and all decoders, including values that no state produces; it does not merely compare observed runs.
PricedFormEquivalence adds implicit arbitrary distinction types D and D′, source and target ledgers L and K on P and P′, and two total numbered Boolean-readout families r and s. It extends the same DecoderEquivalence data and conditions. For every source protocol p, L.price p equals K.price (protocol p); for every natural-number index n and source state x, s n (state x) equals r n x. These are uniform conditions over all protocols, decoders, indices, and states, rather than conditions chosen separately for one expression or requested family.
The bundled ledgers already require nonnegative real prices, service downward closure, carrying served distinctions, and existence of a protocol serving the empty request at price zero. Decoder systems supply record types, recording functions, and registration sets but do not themselves require Boolean closure or any registered decoder. Neither structure asks for a bijection D ≃ D′ or preservation of the ledgers’ primitive service or carrying relations. The priced extension adds price and readout preservation to the decoder data; it makes no independent empirical symmetry or physical-resource assertion.
An unpriced DecoderEquivalence can have empty protocol types on both sides, making its protocol-indexed conditions vacuous. A priced equivalence cannot have an empty protocol type because each ledger supplies a zero-price protocol. Empty state types are allowed if both sides are empty, in which case state-indexed conditions are vacuous while record bijections and registration conditions still apply for each protocol. Where protocols exist, empty record types can only be bijected with empty record types. Empty distinction types are allowed. This declaration defines the required data and laws; it does not assert that an equivalence exists for arbitrary systems.