Skip to content

Commit 3a97d65

Browse files
williamdemeoclaude
andcommitted
[Dijkstra] Gov PoV: align module prose with the review policy
Per the review policy established on the base PR: issue numbers, status admonitions, and rewiring instructions move to the PR description; the ring-solver/HasAdd explanation duplicated from Ledger.Properties.PoV becomes a cross-reference. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 2ae23d7 commit 3a97d65

1 file changed

Lines changed: 9 additions & 18 deletions

File tree

  • src/Ledger/Dijkstra/Specification/Gov/Properties

src/Ledger/Dijkstra/Specification/Gov/Properties/PoV.lagda.md

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ source_path: src/Ledger/Dijkstra/Specification/Gov/Properties/PoV.lagda.md
77

88
This module proves the two governance-deposit accounting facts that the top-level
99
preservation-of-value proof (`LEDGER-pov`{.AgdaFunction} in
10-
`Ledger.Properties.PoV`{.AgdaModule}) assumes as module parameters (#1276):
10+
`Ledger.Properties.PoV`{.AgdaModule}) assumes as module parameters:
1111

1212
+ `rmOrphanDRepVotes-coinFromGovDeposit`{.AgdaFunction}:
1313
`rmOrphanDRepVotes`{.AgdaFunction} only rewrites the `gvDRep`{.AgdaField} votes of
@@ -21,12 +21,8 @@ preservation-of-value proof (`LEDGER-pov`{.AgdaFunction} in
2121
for the new action, and `GOV-Vote`{.AgdaInductiveConstructor} never changes a
2222
deposit.
2323

24-
??? note "**Status: complete**"
25-
26-
Both facts typecheck under `--safe`, with no module parameters and no postulates.
27-
Their statements match the corresponding `LEDGER-PoV`{.AgdaModule} module
28-
parameters (modulo this module's own `proposalsOf`{.AgdaFunction} copy; see
29-
below), so the rewiring (#1277) can instantiate them directly.
24+
Their statements match the corresponding `LEDGER-PoV`{.AgdaModule} module
25+
parameters (modulo this module's own `proposalsOf`{.AgdaFunction} copy; see below).
3026

3127
<!--
3228
```agda
@@ -61,11 +57,9 @@ The right injections of a list of sums, used (at `GovVote ⊎ GovProposal`) to e
6157
the proposals from a mixed `GOVS`{.AgdaDatatype} signal list.
6258
`Ledger.Properties.PoV`{.AgdaModule} defines an identical function for stating its
6359
`GOVS-coinFromGovDeposit`{.AgdaFunction} parameter, but importing it here would
64-
create an import cycle once #1277 rewires `Ledger.Properties.PoV`{.AgdaModule} to
60+
create an import cycle once `Ledger.Properties.PoV`{.AgdaModule} is rewired to
6561
import *this* module. So we keep a local copy (clause-for-clause identical),
66-
together with the `proposalsOf-Proposals+Votes`{.AgdaFunction} extraction lemma; the
67-
rewiring should delete the copies in `Ledger.Properties.PoV`{.AgdaModule} and import
68-
these.
62+
together with the `proposalsOf-Proposals+Votes`{.AgdaFunction} extraction lemma.
6963

7064
```agda
7165
proposalsOf : ∀ {A B : Type} → List (A ⊎ B) → List B
@@ -96,13 +90,10 @@ proposalsOf-Proposals+Votes t = go (ListOfGovProposalsOf t) (ListOfGovVotesOf t)
9690
## Arithmetic helpers
9791

9892
The two pure `+`-rearrangements below are discharged by the reflective ring solver
99-
over the commutative semiring of naturals (`Data.Nat.Tactic.RingSolver`). The
100-
solver recognises the ring's operations *syntactically*, so the
101-
`Ledger.Prelude`{.AgdaModule} overloaded `_+_` (a `HasAdd`{.AgdaRecord} method,
102-
which merely *reduces* to `Data.Nat._+_`) defeats it. The solver-facing statements
103-
are therefore written with the raw natural-number addition, imported as `_+ᴺ_`
104-
definitionally equal to `_+_` at `Coin`, so the lemmas discharge `_+_` goals
105-
unchanged.
93+
(`Data.Nat.Tactic.RingSolver`), with the solver-facing statements written over the
94+
raw natural-number addition `_+ᴺ_`; see `Ledger.Properties.PoV`{.AgdaModule} for
95+
the solver conventions and the reason the overloaded `_+_` cannot appear in
96+
solver-facing statements.
10697

10798
```agda
10899
swap-head : ∀ a b c → a +ᴺ (b +ᴺ c) ≡ b +ᴺ (a +ᴺ c)

0 commit comments

Comments
 (0)