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

PDF cleanup: Fig 36 (improved) #250

Merged
merged 1 commit into from
Oct 18, 2023
Merged

PDF cleanup: Fig 36 (improved) #250

merged 1 commit into from
Oct 18, 2023

Conversation

WhatisRT
Copy link
Collaborator

Description

Remove sp-∘ from that figure, introduce a notation for division where division by zero gets mapped to zero and remove some unused pieces.

Checklist

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

@WhatisRT WhatisRT mentioned this pull request Oct 18, 2023
5 tasks
\end{code}
\begin{code}
getStakeDist : GovRole → ℙ VDeleg → StakeDistrs → VDeleg ⇀ Coin
getStakeDist CC cc _ = constMap (filterˢ isCCProp cc) 1
getStakeDist DRep _ record { stakeDistr = dist } = filterᵐ (sp-∘ isDRepProp proj₁) dist
getStakeDist SPO _ record { stakeDistr = dist } = filterᵐ (sp-∘ isSPOProp proj₁) dist
getStakeDist DRep _ record { stakeDistr = dist } = filterKeys isDRepProp dist
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice.

votes' = actualVotes Γ cc votes action pparams
t = maybe id ℚ.0ℚ $ threshold pparams (proj₂ <$> cc) action role
in acceptedStakeRatio role (dom votes') (RatifyEnv.stakeDistrs Γ) votes' ℚ.≥ t

Copy link
Contributor

Choose a reason for hiding this comment

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

Very nice. I think this is better than my attempt to simplify acceptedBy and accepted (#248), so I'll close that PR.

@williamdemeo williamdemeo changed the title Cleanup Fig 36 PDF cleanup: Fig 36 (improved) Oct 18, 2023
Copy link
Collaborator

@omelkonian omelkonian left a comment

Choose a reason for hiding this comment

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

LGTM

@WhatisRT WhatisRT merged commit d1b9eef into master Oct 18, 2023
3 checks passed
@WhatisRT WhatisRT deleted the andre/cleanup-fig-36 branch October 18, 2023 11:09
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.

3 participants