Skip to content

WIP -- [Dijkstra] CIP-159: Prove Gov preservation-of-value facts (#1276) - #1278

Draft
williamdemeo wants to merge 4 commits into
1185-dijkstra-NEW-ENTITIES-certs-povfrom
1276-dijkstra-gov-pov
Draft

WIP -- [Dijkstra] CIP-159: Prove Gov preservation-of-value facts (#1276)#1278
williamdemeo wants to merge 4 commits into
1185-dijkstra-NEW-ENTITIES-certs-povfrom
1276-dijkstra-gov-pov

Conversation

@williamdemeo

@williamdemeo williamdemeo commented Jul 29, 2026

Copy link
Copy Markdown
Member

Description

Closes #1276. Stacked on #1210 (base: 1185-dijkstra-NEW-ENTITIES-certs-pov); GitHub retargets it as the PRs below merge.

Discharges the two governance-deposit parameters of the LEDGER-PoV contract (#1203): rmOrphanDRepVotes-coinFromGovDeposit and GOVS-coinFromGovDeposit.

What lands

  • Gov.Properties.PoV (one new module) and its registration in Gov.Properties.
  • Property catalog: dijkstra-gov-pov now derives as proved.
  • Ledger.Properties.PoV rewiring: the two gov parameters are deleted and the facts imported from Gov.Properties.PoV (contract from 12 to 10 parameters).
  • No CHANGELOG entry: property module only, no semantic spec change.

Key points for review

  • GOVS is the indexed reflexive-transitive closure of GOV, so the induction is stated over the primed relation _⊢_⇀⟦_⟧ᵢ*'_, generalized over the index, then specialized to 0.
  • proposalsOf and its extraction lemma now have their single home in Gov.Properties.PoV; the rewiring commit deletes the consumer's copies.

Verification

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Any semantic changes to the specifications are documented in CHANGELOG.md (none in this PR)
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

🤖 AI-assisted development: Claude Fable 5 (Anthropic)

@williamdemeo williamdemeo changed the title [Dijkstra] CIP-159: Prove Gov preservation-of-value facts (#1276) WIP -- [Dijkstra] CIP-159: Prove Gov preservation-of-value facts (#1276) Jul 29, 2026
@williamdemeo
williamdemeo force-pushed the 1276-dijkstra-gov-pov branch 2 times, most recently from cd63a6e to 020bae4 Compare July 31, 2026 05:41
@williamdemeo
williamdemeo requested a review from Copilot July 31, 2026 05:47
@williamdemeo
williamdemeo marked this pull request as ready for review July 31, 2026 05:49
@williamdemeo
williamdemeo marked this pull request as draft July 31, 2026 05:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Dijkstra-era governance PoV properties module that discharges the two LEDGER-PoV governance-deposit accounting assumptions: (1) rmOrphanDRepVotes preserves coinFromGovDeposit, and (2) a GOVS step increases coinFromGovDeposit by exactly govProposalsDeposits of the proposals in the step’s signals. It integrates the new module into the Gov.Properties registration path and records the work in the WIP changelog.

Changes:

  • Add Ledger.Dijkstra.Specification.Gov.Properties.PoV proving rmOrphanDRepVotes-coinFromGovDeposit and GOVS-coinFromGovDeposit (plus local proposalsOf and helper lemmas).
  • Register the new PoV properties module from Ledger.Dijkstra.Specification.Gov.Properties.
  • Add a WIP CHANGELOG.md entry describing the new proofs and their role in discharging LEDGER-PoV parameters.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/Ledger/Dijkstra/Specification/Gov/Properties/PoV.lagda.md New Gov PoV module proving the two governance-deposit accounting lemmas used by LEDGER-pov.
src/Ledger/Dijkstra/Specification/Gov/Properties.lagda.md Registers the new Gov PoV module so it is reachable from the Dijkstra specification root.
CHANGELOG.md Documents the new Gov PoV proofs under WIP and links them to #1276 / #1277.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@williamdemeo
williamdemeo force-pushed the 1276-dijkstra-gov-pov branch from 020bae4 to bfd965c Compare August 10, 2026 19:56
@williamdemeo
williamdemeo force-pushed the 1276-dijkstra-gov-pov branch from bfd965c to 3a97d65 Compare August 13, 2026 03:37
@williamdemeo williamdemeo added property Ledger property (tracked in the catalog) era: dijkstra labels Aug 13, 2026
Base automatically changed from 1187-dijkstra-NEW-ENTITIES-ledger-pov to master September 4, 2026 03:21
@williamdemeo
williamdemeo changed the base branch from master to 1185-dijkstra-NEW-ENTITIES-certs-pov September 8, 2026 19:57
…s.PoV (#1276)

Discharge the two governance-deposit module parameters of LEDGER-PoV
(Ledger.Properties.PoV):

- rmOrphanDRepVotes-coinFromGovDeposit: rmOrphanDRepVotes rewrites only the
  gvDRep votes of each action, so coinFromGovDeposit is unchanged (list
  induction; the record update leaves .deposit definitionally intact).

- GOVS-coinFromGovDeposit: a GOVS step grows coinFromGovDeposit by exactly
  govProposalsDeposits of its signal's proposals.  Proved by induction over
  the primed indexed RTC generalized over the environment-index pair (the
  GOVS wrapper fixes index 0 but BS-ind's tail runs at suc n), then
  specialized to 0.  Per step: GOV-Vote preserves the total (addVote is
  opaque and deposit-preserving; proof unfolds it), GOV-Propose adds one
  govActionDeposit on both sides (insertGovAction lemma with a priority
  if-split on the state side, foldl accumulator-shift lemma on the
  accounting side).

proposalsOf and proposalsOf-Proposals+Votes are defined here with clauses
identical to Ledger.Properties.PoV's copies: importing that module here
would become an import cycle once #1277 rewires it to import this module,
at which point its copies should be deleted in favour of these.

Pure +-rearrangements are discharged with the reflective ring solver over
raw _+N_, per the pattern established in Ledger.Properties.PoV.

Green under --safe; no module parameters, no postulates.

Closes #1276

AI-assisted development: Claude Fable 5 (Anthropic)
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.

AI-assisted development: Claude Fable 5 (Anthropic)
…their parameters

rmOrphanDRepVotes-coinFromGovDeposit and GOVS-coinFromGovDeposit are theorems
on this branch, so LEDGER-PoV now imports Gov.Properties.PoV instead of
assuming them.  proposalsOf and proposalsOf-Proposals+Votes now have their
single home in Gov.Properties.PoV; the consumer's copies are deleted.

AI-assisted development: Claude Fable 5 (Anthropic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

era: dijkstra property Ledger property (tracked in the catalog)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Dijkstra] Gov PoV: GOVS-coinFromGovDeposit and rmOrphanDRepVotes-coinFromGovDeposit (Gov.Properties.PoV)

2 participants