@@ -7,7 +7,7 @@ source_path: src/Ledger/Dijkstra/Specification/Gov/Properties/PoV.lagda.md
77
88This module proves the two governance-deposit accounting facts that the top-level
99preservation-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
6157the 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
6561import * 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
7165proposalsOf : ∀ {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
9892The 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
10899swap-head : ∀ a b c → a +ᴺ (b +ᴺ c) ≡ b +ᴺ (a +ᴺ c)
0 commit comments