Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require ppdWellFormed to imply non-empty updateGroups #274

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

WhatisRT
Copy link
Collaborator

@WhatisRT WhatisRT commented Nov 1, 2023

Description

Closes #271. We should probably clean this thing up and expose it in the PDF soon (#273)

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • Code is formatted according to CONTRIBUTING.md
  • Self-reviewed the diff

Copy link
Contributor

@williamdemeo williamdemeo left a comment

Choose a reason for hiding this comment

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

Just a couple of minor questions/comments... but nothing crucial. LGTM!

@@ -156,11 +156,12 @@ HsGovParams : GovParams
HsGovParams = record
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is HsGovParams not called HSGovParams?

None of the other types starts with Hs (i.e. H and lower-case s).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't touch that part in this PR. Since we'll probably be having a bunch of changes in that file soon I'm not going to bother to fix that inconsistency now.

@@ -156,11 +156,12 @@ HsGovParams : GovParams
HsGovParams = record
{ Implementation
Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I wasn't familiar with this syntax. So, does this open up the Implementation module inside the record definition? ...cool!

.updateGroups → λ _ → ∅
.applyUpdate → λ p _ → p
.ppdWellFormed → λ _ → false
.ppdWellFormed⇒hasGroup → λ ()
Copy link
Contributor

Choose a reason for hiding this comment

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

Question: I see that Agda fills in the proof (λ ()) for us, as the antecedent (false ≡ true) is false. However, I thought we could also prove it explicitly using ⊥-elim, but somehow that's not working for me. I would have thought something like λ f≡t → ⊥-elim f≡t (which is obviously just the function ⊥-elim) would work. The proof λ () works here and I think that means the antecedent is equivalent to . What am I missing?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is simply notation for an empty pattern lambda, so this is almost no magic. If you pattern-match on the proof that false = true, refl doesn't work so you don't need a body in the pattern lambda.

@WhatisRT WhatisRT merged commit d9a0661 into master Nov 2, 2023
3 checks passed
@WhatisRT WhatisRT deleted the andre/fix-empty-update-group branch November 2, 2023 11:13
lehins added a commit to IntersectMBO/cardano-ledger that referenced this pull request Nov 2, 2023
This is very important, otherwise we can't figure out the group and thus the
threshold for DReps, making a proposla trivially enactable, with the CC
support that is.

Related change to the spec:
IntersectMBO/formal-ledger-specifications#274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prevent empty PParam update proposals
2 participants