new helpers in Ledger.Prelude and Certs PoV
+ Add singleton/union/sum lemmas to Ledger.Prelude
Foundational identities used by the Dijkstra preservation-of-value
proofs (#1187) and likely useful elsewhere. All are stated at the
generic `A ⇀ Coin` (or `List A`) level and are independent of any
ledger-era rule.
Added definitions:
+ ≡ᵉ-getCoin, getCoin-cong, indexedSumᵛ'-∪, res-decomp: lift the
abstract-set-theory equational machinery (≡ᵉ, indexedSum-cong,
indexedSumᵐ-∪) to the `getCoin` interface.
+ getCoin-singleton, ∪ˡsingleton∈dom, ∪ˡsingleton∉dom, ∪ˡsingleton0≡:
left-biased union with a single-entry map, with the zero-valued
specialisation that arises in DELEG-delegate / DELEG-dereg.
+ sumConstZero, indexedSumL-proj₂-zero, setToList-∈: small list/set
bookkeeping used by sumConstZero.
+ sum-map-+, +-interleave: list-of-ℕ algebra that the eventual
LEDGER-pov chain will use to interleave summands.
+ dec-de-morgan: de Morgan rewrite for a decidable conjunction.
No semantic change to any ledger rule.
+ Add Certs preservation-of-value lemmas for Dijkstra
Step 2 of the LEDGER preservation-of-value plan (#1187). In Dijkstra
(post-#1201), CERTS is the plain reflexive-transitive closure of CERT,
with withdrawal and direct-deposit handling having migrated to the
surrounding ENTITIES rule. Consequently the value-preservation
statement for CERTS reduces to
getCoin s ≡ getCoin s'
This commit adds two new modules:
+ Certs.Properties.PoVLemmas: the per-step lemma CERT-pov, with all
four sub-rule cases (CERT-deleg DELEG-delegate, CERT-deleg
DELEG-dereg, CERT-pool, CERT-gov). The proofs use the
singleton/union helpers now in Ledger.Prelude.
+ Certs.Properties.PoV: the closure-level CERTS-pov, by induction on
the reflexive-transitive closure using CERT-pov at each step.
A one-line addition to Certs/Properties.lagda.md re-exports both new
modules from the top-level Properties namespace.
No parameterised wrapper modules. Both lemmas are top-level
definitions and threading-free for consumers.