-
Notifications
You must be signed in to change notification settings - Fork 251
Add Raw
bundles to Relation.Binary.*
hierarchy
#2491
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
64eddf0
add `Raw` bundles for binary relation hierarchy
jamesmckinna 3923598
added `rawX` manifest fields to each `X` bundle
jamesmckinna deaf59e
fixed knock-on ambiguity bugs
jamesmckinna da2dd6a
fixed knock-on ambiguity bugs
jamesmckinna c44977a
tighten `import`s
jamesmckinna d9a6a50
response to review feedback: refactor in favou rof a single underlyin…
jamesmckinna 33ec41a
Merge branch 'master' into RawBinary
jamesmckinna File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Raw bundles for homogeneous binary relations | ||
------------------------------------------------------------------------ | ||
|
||
-- The contents of this module should be accessed via `Relation.Binary`. | ||
|
||
{-# OPTIONS --cubical-compatible --safe #-} | ||
|
||
module Relation.Binary.Bundles.Raw where | ||
|
||
open import Function.Base using (flip) | ||
open import Level using (Level; suc; _⊔_) | ||
open import Relation.Binary.Core using (Rel) | ||
open import Relation.Nullary.Negation.Core using (¬_) | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- RawSetoid | ||
------------------------------------------------------------------------ | ||
|
||
record RawSetoid a ℓ : Set (suc (a ⊔ ℓ)) where | ||
infix 4 _≈_ | ||
field | ||
Carrier : Set a | ||
_≈_ : Rel Carrier ℓ | ||
|
||
infix 4 _≉_ | ||
_≉_ : Rel Carrier _ | ||
x ≉ y = ¬ (x ≈ y) | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- RawPreorder | ||
------------------------------------------------------------------------ | ||
|
||
record RawPreorder c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where | ||
infix 4 _≈_ _≲_ | ||
field | ||
Carrier : Set c | ||
_≈_ : Rel Carrier ℓ₁ -- The underlying equality. | ||
_≲_ : Rel Carrier ℓ₂ -- The relation. | ||
|
||
rawSetoid : RawSetoid c ℓ₁ | ||
rawSetoid = record { _≈_ = _≈_ } | ||
|
||
open RawSetoid rawSetoid public | ||
using (_≉_) | ||
|
||
infix 4 _⋦_ | ||
_⋦_ : Rel Carrier _ | ||
x ⋦ y = ¬ (x ≲ y) | ||
|
||
infix 4 _≳_ | ||
_≳_ = flip _≲_ | ||
|
||
infix 4 _⋧_ | ||
_⋧_ = flip _⋦_ | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- RawPartialOrders | ||
------------------------------------------------------------------------ | ||
|
||
record RawPartialOrder c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where | ||
infix 4 _≈_ _≤_ | ||
field | ||
Carrier : Set c | ||
_≈_ : Rel Carrier ℓ₁ | ||
_≤_ : Rel Carrier ℓ₂ | ||
|
||
rawPreorder : RawPreorder c ℓ₁ ℓ₂ | ||
rawPreorder = record { _≈_ = _≈_ ; _≲_ = _≤_ } | ||
|
||
open RawPreorder rawPreorder public | ||
hiding (Carrier; _≈_; _≲_) | ||
renaming (_⋦_ to _≰_; _≳_ to _≥_; _⋧_ to _≱_) | ||
|
||
|
||
record RawStrictPartialOrder c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where | ||
infix 4 _≈_ _<_ | ||
field | ||
Carrier : Set c | ||
_≈_ : Rel Carrier ℓ₁ | ||
_<_ : Rel Carrier ℓ₂ | ||
|
||
rawSetoid : RawSetoid c ℓ₁ | ||
rawSetoid = record { _≈_ = _≈_ } | ||
|
||
open RawSetoid rawSetoid public | ||
using (_≉_) | ||
|
||
infix 4 _≮_ | ||
_≮_ : Rel Carrier _ | ||
x ≮ y = ¬ (x < y) | ||
|
||
infix 4 _>_ | ||
_>_ = flip _<_ | ||
|
||
infix 4 _≯_ | ||
_≯_ = flip _≮_ | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- RawApartnessRelation | ||
------------------------------------------------------------------------ | ||
|
||
record RawApartnessRelation c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where | ||
infix 4 _≈_ _#_ | ||
field | ||
Carrier : Set c | ||
_≈_ : Rel Carrier ℓ₁ | ||
_#_ : Rel Carrier ℓ₂ | ||
|
||
infix 4 _¬#_ | ||
_¬#_ : Rel Carrier _ | ||
x ¬# y = ¬ (x # y) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.