-
Notifications
You must be signed in to change notification settings - Fork 245
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
[ refactor ] Restate, and use, the definitions of Monotonic
etc. operations
#2580
base: master
Are you sure you want to change the base?
Conversation
Thanks - these already are easier to understand. |
How do I remove #1579 from the |
Not sure how you did it, but it's gone for me 🎉 |
mono⇒cong sym reflexive antisym mono x≈y = antisym | ||
(mono (reflexive x≈y)) | ||
(mono (reflexive (sym x≈y))) | ||
|
||
antimono⇒cong : Symmetric ≈₁ → ≈₁ ⇒ ≤₁ → Antisymmetric ≈₂ ≤₂ → | ||
∀ {f} → f Preserves ≤₁ ⟶ (flip ≤₂) → f Preserves ≈₁ ⟶ ≈₂ | ||
∀ {f} → f Preserves ≤₁ ⟶ (flip ≤₂) → Monotonic₁ ≈₁ ≈₂ f |
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.
This unfortunately is stated so as not to be able to exploit the refactoring redefinition of Antitonic₁
in Relation.Binary.Definitions
below (wrong relation gets flip
ped!). Downstream refactoring?
Now that the abstract definitions are mostly in place, can look at the instantiations in |
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.
Coming along nicely.
Remark: all of the |
So this should now be ready, modulo:
|
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.
Otherwise looks really good! Massive improvement.
*-monoʳ-≤ : ∀ n → (n *_) Preserves _≤_ ⟶ _≤_ | ||
*-monoʳ-≤ n m≤o = *-mono-≤ (≤-refl {n}) m≤o | ||
*-monoʳ-≤ : LeftMonotonic _≤_ _≤_ _*_ | ||
*-monoʳ-≤ = mono₂⇒monoˡ {≤₁ = _≤_} {≤₂ = _≤_} {≤₃ = _≤_} ≤-refl *-mono-≤ |
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.
This providing of implicits is annoying. Suggests that some of them should be explicit in the proof?
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.
Yes, I've been scratching my head over how it might be avoided... without a conclusion yet.
+-monoʳ-≤ : ∀ n → (n +_) Preserves _≤_ ⟶ _≤_ | ||
+-monoʳ-≤ n m≤o = +-mono-≤ (≤-refl {n}) m≤o | ||
+-monoʳ-≤ : LeftMonotonic _≤_ _≤_ _+_ | ||
+-monoʳ-≤ = mono₂⇒monoˡ {≤₃ = _≤_} ≤-refl +-mono-≤ |
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.
Same here.
I'll resolve the merge conflict later, meanwhile tricky questions above needing more thought... ;-)... so have converted back to DRAFT. |
Aim: towards tackling #1579
TODO:
Data.Nat.*
UPDATED: unsolved metas suggest some more revision is necessary :-(Data.Integer.*
Data.Rational.*
breaking
changes (v3.0: separate PR once the rest is done?)