-
Notifications
You must be signed in to change notification settings - Fork 247
[fixes #1214] Add negated ordering relation symbols systematically to Relation.Binary.*
#2095
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
Changes from 18 commits
72fb46f
ba82a9d
568ffc3
3e022d6
cfb537a
e7d0179
b38f78e
d16f453
80b71b7
8c8fdf6
593ee3d
5f1cbe9
91ac637
1d8dd80
ae4be25
6ba0381
5575ab4
b730e8d
3fb6e33
4b52284
a8a8162
ec79e09
d4f2c79
3a354cf
6fd62b0
d098a68
82f00dc
8eb7271
1aaae22
cf720b3
c520340
dfc76ed
c9e7010
976a1d6
47bd7a8
834ed4e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
|
||
{-# OPTIONS --cubical-compatible --safe #-} | ||
|
||
open import Data.Product.Base using (_,_) | ||
open import Function.Base using (flip; _∘_) | ||
open import Relation.Binary.Core using (Rel; _Preserves_⟶_) | ||
open import Relation.Binary.Bundles using (Poset; StrictPartialOrder) | ||
|
@@ -20,7 +21,7 @@ open import Relation.Nullary.Negation using (contradiction) | |
module Relation.Binary.Properties.Poset | ||
{p₁ p₂ p₃} (P : Poset p₁ p₂ p₃) where | ||
|
||
open Poset P renaming (Carrier to A) | ||
open Poset P renaming (Carrier to A; _≰_ to _≰A_) -- issue #1214 see below | ||
|
||
import Relation.Binary.Construct.NonStrictToStrict _≈_ _≤_ as ToStrict | ||
import Relation.Binary.Properties.Preorder preorder as PreorderProperties | ||
|
@@ -62,15 +63,10 @@ open Poset ≥-poset public | |
------------------------------------------------------------------------ | ||
-- Negated order | ||
|
||
infix 4 _≰_ | ||
|
||
_≰_ : Rel A p₃ | ||
x ≰ y = ¬ (x ≤ y) | ||
|
||
≰-respˡ-≈ : _≰_ Respectsˡ _≈_ | ||
≰-respˡ-≈ : _≰A_ Respectsˡ _≈_ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm getting a very weird rendering of the symbol here: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ooh weird. Let me have a closer look at the renaming going on. Obviously didn't appreciate what was going on properly in the first review. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. BTW, something else weird is going on re: renaming/deprecation, on #2099: which I'll re-open temporarily to document. |
||
≰-respˡ-≈ x≈y = _∘ ≤-respˡ-≈ (Eq.sym x≈y) | ||
|
||
≰-respʳ-≈ : _≰_ Respectsʳ _≈_ | ||
≰-respʳ-≈ : _≰A_ Respectsʳ _≈_ | ||
≰-respʳ-≈ x≈y = _∘ ≤-respʳ-≈ (Eq.sym x≈y) | ||
|
||
------------------------------------------------------------------------ | ||
|
@@ -90,7 +86,7 @@ _<_ = ToStrict._<_ | |
} | ||
|
||
open StrictPartialOrder <-strictPartialOrder public | ||
using ( <-resp-≈; <-respʳ-≈; <-respˡ-≈) | ||
using (_≮_; <-resp-≈; <-respʳ-≈; <-respˡ-≈) | ||
renaming | ||
( irrefl to <-irrefl | ||
; asym to <-asym | ||
|
@@ -103,10 +99,10 @@ open StrictPartialOrder <-strictPartialOrder public | |
≤∧≉⇒< : ∀ {x y} → x ≤ y → x ≉ y → x < y | ||
≤∧≉⇒< = ToStrict.≤∧≉⇒< | ||
|
||
<⇒≱ : ∀ {x y} → x < y → ¬ (y ≤ x) | ||
<⇒≱ : ∀ {x y} → x < y → y ≰A x | ||
<⇒≱ = ToStrict.<⇒≱ antisym | ||
|
||
≤⇒≯ : ∀ {x y} → x ≤ y → ¬ (y < x) | ||
≤⇒≯ : ∀ {x y} → x ≤ y → y ≮ x | ||
≤⇒≯ = ToStrict.≤⇒≯ antisym | ||
|
||
------------------------------------------------------------------------ | ||
|
@@ -133,3 +129,20 @@ mono⇒cong = Consequences.mono⇒cong _≈_ _≈_ Eq.sym reflexive antisym | |
|
||
antimono⇒cong : ∀ {f} → f Preserves _≤_ ⟶ _≥_ → f Preserves _≈_ ⟶ _≈_ | ||
antimono⇒cong = Consequences.antimono⇒cong _≈_ _≈_ Eq.sym reflexive antisym | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- DEPRECATED | ||
------------------------------------------------------------------------ | ||
-- Please use the new names as continuing support for the old names is | ||
-- not guaranteed. | ||
|
||
-- Version 2.0 | ||
|
||
-- issue #1214: locally to this module, we rename the relation _≰_, | ||
-- so that we can deprecate it here, yet re-export it elsewhere | ||
infix 4 _≰_ | ||
_≰_ = _≰A_ | ||
{-# WARNING_ON_USAGE _≤_ | ||
"Warning: export of _≰_ from this module was deprecated in v2.0, in favour of a direct public export from Relation.Binary.Bundles.Poset instead" | ||
#-} |
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.
Why are we not mentioning
_≮_
here?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.
Do you mean
\<~n
? Because it was never used in the library before #2099 introduced it as the symbol forPreorder
. But I can do so if you think it adds additional force?This is one of those cases where I didn't account for behaviour that was only introduced in v2.0 (indeed, only a few days after I wrote this
CHANGELOG
entry... and now, o ly another few days after the not-mentioned symbol even got merged into the library!)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.
Just to check: I was confused by your original question, because I do mention
_≮_
here... so I (perhaps mistakenly) presumed you had meant to type an their symbol. Could you restate the question please, so that I can better see the drift of it? Sorry to be obtuse!