Home / Input Output / formal-ledger-specifications
May 08, 1-2 PM (1)
May 08, 2-3 PM (1)
May 08, 3-4 PM (0)
May 08, 4-5 PM (0)
May 08, 5-6 PM (0)
May 08, 6-7 PM (0)
May 08, 7-8 PM (0)
May 08, 8-9 PM (0)
May 08, 9-10 PM (5)
May 08, 10-11 PM (0)
May 08, 11-12 AM (0)
May 09, 12-1 AM (0)
May 09, 1-2 AM (0)
May 09, 2-3 AM (0)
May 09, 3-4 AM (0)
May 09, 4-5 AM (0)
May 09, 5-6 AM (0)
May 09, 6-7 AM (0)
May 09, 7-8 AM (0)
May 09, 8-9 AM (0)
May 09, 9-10 AM (0)
May 09, 10-11 AM (0)
May 09, 11-12 PM (0)
May 09, 12-1 PM (0)
May 09, 1-2 PM (0)
May 09, 2-3 PM (0)
May 09, 3-4 PM (0)
May 09, 4-5 PM (0)
May 09, 5-6 PM (0)
May 09, 6-7 PM (0)
May 09, 7-8 PM (0)
May 09, 8-9 PM (1)
May 09, 9-10 PM (0)
May 09, 10-11 PM (0)
May 09, 11-12 AM (0)
May 10, 12-1 AM (0)
May 10, 1-2 AM (0)
May 10, 2-3 AM (0)
May 10, 3-4 AM (0)
May 10, 4-5 AM (0)
May 10, 5-6 AM (0)
May 10, 6-7 AM (0)
May 10, 7-8 AM (0)
May 10, 8-9 AM (0)
May 10, 9-10 AM (0)
May 10, 10-11 AM (0)
May 10, 11-12 PM (0)
May 10, 12-1 PM (0)
May 10, 1-2 PM (0)
May 10, 2-3 PM (0)
May 10, 3-4 PM (0)
May 10, 4-5 PM (0)
May 10, 5-6 PM (0)
May 10, 6-7 PM (0)
May 10, 7-8 PM (0)
May 10, 8-9 PM (0)
May 10, 9-10 PM (0)
May 10, 10-11 PM (0)
May 10, 11-12 AM (0)
May 11, 12-1 AM (0)
May 11, 1-2 AM (0)
May 11, 2-3 AM (0)
May 11, 3-4 AM (0)
May 11, 4-5 AM (0)
May 11, 5-6 AM (0)
May 11, 6-7 AM (0)
May 11, 7-8 AM (1)
May 11, 8-9 AM (1)
May 11, 9-10 AM (0)
May 11, 10-11 AM (0)
May 11, 11-12 PM (0)
May 11, 12-1 PM (2)
May 11, 1-2 PM (1)
May 11, 2-3 PM (9)
May 11, 3-4 PM (4)
May 11, 4-5 PM (0)
May 11, 5-6 PM (0)
May 11, 6-7 PM (0)
May 11, 7-8 PM (0)
May 11, 8-9 PM (0)
May 11, 9-10 PM (0)
May 11, 10-11 PM (0)
May 11, 11-12 AM (0)
May 12, 12-1 AM (0)
May 12, 1-2 AM (0)
May 12, 2-3 AM (0)
May 12, 3-4 AM (0)
May 12, 4-5 AM (6)
May 12, 5-6 AM (1)
May 12, 6-7 AM (0)
May 12, 7-8 AM (3)
May 12, 8-9 AM (2)
May 12, 9-10 AM (0)
May 12, 10-11 AM (0)
May 12, 11-12 PM (0)
May 12, 12-1 PM (0)
May 12, 1-2 PM (0)
May 12, 2-3 PM (0)
May 12, 3-4 PM (0)
May 12, 4-5 PM (0)
May 12, 5-6 PM (0)
May 12, 6-7 PM (0)
May 12, 7-8 PM (0)
May 12, 8-9 PM (0)
May 12, 9-10 PM (0)
May 12, 10-11 PM (0)
May 12, 11-12 AM (0)
May 13, 12-1 AM (0)
May 13, 1-2 AM (0)
May 13, 2-3 AM (0)
May 13, 3-4 AM (0)
May 13, 4-5 AM (0)
May 13, 5-6 AM (0)
May 13, 6-7 AM (0)
May 13, 7-8 AM (2)
May 13, 8-9 AM (0)
May 13, 9-10 AM (0)
May 13, 10-11 AM (0)
May 13, 11-12 PM (0)
May 13, 12-1 PM (0)
May 13, 1-2 PM (0)
May 13, 2-3 PM (0)
May 13, 3-4 PM (0)
May 13, 4-5 PM (0)
May 13, 5-6 PM (0)
May 13, 6-7 PM (1)
May 13, 7-8 PM (0)
May 13, 8-9 PM (0)
May 13, 9-10 PM (0)
May 13, 10-11 PM (0)
May 13, 11-12 AM (0)
May 14, 12-1 AM (0)
May 14, 1-2 AM (0)
May 14, 2-3 AM (0)
May 14, 3-4 AM (7)
May 14, 4-5 AM (0)
May 14, 5-6 AM (0)
May 14, 6-7 AM (0)
May 14, 7-8 AM (0)
May 14, 8-9 AM (0)
May 14, 9-10 AM (0)
May 14, 10-11 AM (0)
May 14, 11-12 PM (0)
May 14, 12-1 PM (1)
May 14, 1-2 PM (3)
May 14, 2-3 PM (1)
May 14, 3-4 PM (0)
May 14, 4-5 PM (0)
May 14, 5-6 PM (0)
May 14, 6-7 PM (2)
May 14, 7-8 PM (0)
May 14, 8-9 PM (0)
May 14, 9-10 PM (0)
May 14, 10-11 PM (0)
May 14, 11-12 AM (1)
May 15, 12-1 AM (4)
May 15, 1-2 AM (11)
May 15, 2-3 AM (1)
May 15, 3-4 AM (0)
May 15, 4-5 AM (1)
May 15, 5-6 AM (0)
May 15, 6-7 AM (0)
May 15, 7-8 AM (0)
May 15, 8-9 AM (0)
May 15, 9-10 AM (0)
May 15, 10-11 AM (0)
May 15, 11-12 PM (0)
May 15, 12-1 PM (0)
May 15, 1-2 PM (0)
72 commits this week May 08, 2026 - May 15, 2026
[Dijkstra] CIP-159: Update CERTS PoV proofs for new DirectDeposits type
Following the merge of CIP-159 PR #1197 (DirectDeposits keyed by
RewardAddress; applyDirectDeposits and applyWithdrawals refactored
through a shared applyToRewards fold) and the agda-sets cleanup
PR #1196 (Conway Equivalence.Map utilities moved into Ledger.Prelude),
this commit updates the Dijkstra CERTS preservation-of-value proofs
to compile against the new APIs.

Main changes:

+  Rename `ApplyWithdrawals-PoV` sub-module to `ApplyToRewards-PoV`,
   since it now houses lemmas for both withdrawals and direct deposits.

+  Add `getCoin-∪ˡ-overwrite` bridge lemma: `getCoin (❴ c , v ❵ ∪ˡ acc)
   ≡ v + getCoin (acc ∣ ❴ c ❵ ᶜ)`.  Encapsulates the
   listing-vs-replacement reconciliation between the new `❴ k , v ❵ ∪ˡ
   acc` form (used by `applyToRewards`) and the equivalent
   complement-restricted form used by the existing decomposition
   reasoning.

+  Factor `split-by-lookup` as a top-level lemma decomposing
   `getCoin acc` along a known lookup result.  Used by both
   `applyOne-pov` (subtraction) and the new `applyOne-pov-add`
   (addition).

+  Add the additive parallel: `applyOne-pov-add`,
   `foldl-applyOne-pov-add`, and `applyDirectDeposits-pov`.  Mirrors
   the existing withdrawal chain, sharing `getCoin-∪ˡ-overwrite` and
   `split-by-lookup`.

+  Strengthen the `setToList-Unique` module parameter with a
   `NetworkId` premise on the map's domain (the assumption no longer
   conflates withdrawals-specifically with general
   `RewardAddress ⇀ Coin` maps).

+  Replace the `∪ˡ-res-lookup-preserve` module parameter (which
   carried a no-longer-needed complement restriction on the right
   operand) with `∪ˡ-lookup-preserve`, stated against the new
   `❴ c , v ❵ ∪ˡ m` form.

+  Add a small top-level helper `∈-dom⇒¬lookup-nothing` to discharge
   the defensive `nothing` case of `foldl-applyOne-pov-add`.

+  Update `POST-CERT-pov` to use the new
   `applyDirectDeposits-pov`; the proof is `sym
   (applyDirectDeposits-pov ...)`.  The CERT-post step's own
   `mapˢ stake (dom dd) ⊆ dom rewards` premise is extracted from the
   pattern rather than threaded as a separate parameter, since the
   pre-CERT* state's `dom rewards` is not preserved across `CERT`
   trace steps (in particular by `DELEG-dereg`).

+  Update `sts-pov` and `CERTS-pov` signatures accordingly: add the
   `DirectDeposits`-`NetworkId` premise, drop the
   membership-of-deposits premise.

The proofs now typecheck on top of master.
Update Certs PoV proofs for direct-deposit application in POST-CERT (CIP-159)
After direct-deposit application moved from LEDGER-V/SUBLEDGER-V into the
POST-CERT rule, the Certs preservation-of-value proofs needed to account for
the `getCoin (DirectDepositsOf Γ)` increase that POST-CERT now produces via
`rewards ∪⁺ directDeposits`.

Statement changes:
- POST-CERT-pov:  getCoin s ≡ getCoin s'
              →  getCoin s + getCoin (DirectDepositsOf Γ) ≡ getCoin s'
- sts-pov:        gains a `+ getCoin (DirectDepositsOf Γ)` term on the LHS
- CERTS-pov:      becomes the symmetric "consumed = produced" form
                  getCoin s₁ + getCoin (DirectDepositsOf Γ)
                  ≡ getCoin sₙ + getCoin (WithdrawalsOf Γ)

Structural changes:
- POST-CERT-pov and sts-pov move into the parameterized `Certs-Pov-lemmas`
  sub-module (alongside PRE-CERT-pov), since they now require a fourth
  module parameter:
    indexedSumᵛ'-∪⁺ : ∀ (m m' : Rewards) → getCoin (m ∪⁺ m') ≡ getCoin m + getCoin m'
  This is the natural ∪⁺ analogue of the existing `indexedSumᵛ'-∪` lemma for
  `∪ˡ` on disjoint domains, but unconditional because `∪⁺` adds (rather than
  drops) values at shared keys.  TODO: upstream to agda-sets.
- `Certs-PoV` (in PoV.lagda.md) gains the same parameter and forwards it.

CERT-pov and PRE-CERT-pov are unchanged: the CERT and PRE-CERT rules did
not change in this refactor.

Closes part of #1185.
Re-parameterize moved Equivalence.Map for src-lib-exts
Now that the file lives at
`src-lib-exts/abstract-set-theory/Axiom/Set/Map/Extra.lagda.md`:

+ Update the top-level module declaration to
  `module abstract-set-theory.Axiom.Set.Map.Extra (th : Theory) where`,
  matching the rest of the abstract-set-theory subtree.
+ Replace `open import Ledger.Prelude` with explicit imports from
  `abstract-set-theory.Prelude` and stdlib modules. `src-lib-exts/`
  cannot depend on `Ledger.Prelude` (upward dependency).
+ Inline the five-line `_≢ᵐ_` definition that previously lived in
  the standalone `Extra.agda`, and delete `Extra.agda`.
+ Convert the file to literate-markdown formatting with brief
  section prose; the module body is otherwise unchanged.
+ Update the single downstream caller
  (`Ledger.Conway.Conformance.Equivalence.Deposits`) to import from
  the new location.

Closes #1194