-
Notifications
You must be signed in to change notification settings - Fork 20
Don't count pool deposits when reregistering pools #973
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
base: master
Are you sure you want to change the base?
Conversation
| open import Relation.Binary.Reasoning.PartialOrder ⊆-Poset | ||
| open import Relation.Binary.Structures using (IsEquivalence) | ||
| module ≡ᵉA = IsEquivalence (≡ᵉ-isEquivalence {A = A}) | ||
| open import Relation.Binary.Reasoning.Syntax | ||
| open ⊆-syntax _IsRelatedTo_ _IsRelatedTo_ ≤-go public |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup is longer than the proof. Maybe we should create a module
Axiom.Set.Reasoning to reexport these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another option is just to use the same style as in the proofs below:
dom∪ˡˡ a∈ = begin→ a∈ $
a ∈ dom (m ˢ) →⟨ ∪-⊆ˡ ⟩
a ∈ dom (m ˢ) ∪ dom (rhs-∪ˡ ˢ) →⟨ proj₂ dom∪ ⟩
a ∈ dom ((m ˢ) ∪ (rhs-∪ˡ ˢ)) →⟨ id ⟩
a ∈ dom ((m ∪ˡ m') ˢ)
∎→There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the latest version I rewrote this with Function.Reasoning._|>_:. Thanks to @javierdiaz72 for pointing it.
@WhatisRT suggested using EquivalenceReasoning from Function.Related.Propositional, but I couldn't figure out how to use it with implication yet.
dom∪ˡˡ {a} a∈ = a∈ |> id ∶
a ∈ dom (m ˢ) |> ∪-⊆ˡ ∶
a ∈ dom (m ˢ) ∪ dom (rhs-∪ˡ ˢ) |> proj₂ dom∪ ∶
a ∈ dom ((m ˢ) ∪ (rhs-∪ˡ ˢ)) |> id ∶
a ∈ dom ((m ∪ˡ m') ˢ)| _∎→ : ∀ (A : Type) → A → A | ||
| A ∎→ = id | ||
| infix 3 _∎→ | ||
| _→⟨_⟩_ : ∀ (x : Type) {y z : Type} → (x → y) → (y → z) → x → z | ||
| _ →⟨ f ⟩ g = g ∘ f | ||
| infixr 2 _→⟨_⟩_ | ||
| begin→ : ∀ {A B : Type} → A → (A → B) → B | ||
| begin→ a f = f a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are used in the proofs below. Do they belong here or in some more general place?
80a957a to
8f29a25
Compare
Reducing the scope of the equation in which POOLREAP is pattern matched reduces type checking time an order of magnitude.
8f29a25 to
7a868c3
Compare
2163de1 to
edb257b
Compare
This PR modifies updates
updateCertDepositsso pool deposits are not counted again when reregistering a pool. This is the function used by the UTXO rule to update deposits.The change to the function is fairly simple, but then there are a few broken proofs that are fixed in later commits.