-
Notifications
You must be signed in to change notification settings - Fork 248
Decidable Setoid -> Apartness Relation and Rational Heyting Field #2194
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
JacquesCarette
merged 16 commits into
agda:master
from
cspollard:rational-heyting-field
May 22, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
625f57d
new stuff
cspollard 361e52d
forgot to add bundles for rational instance of Heyting*
cspollard b245af3
one more (obvious) simplification
cspollard 41eb821
a few more simplifications
cspollard 57e851c
comments on DecSetoid properties from jamesmckinna
cspollard d9cbb38
not working, but partially there
cspollard 968ae5e
woo!
cspollard 7b3b12c
fix anonymous instance
cspollard d41712e
fix errant whitespace
cspollard c16e808
Merge branch 'master' into rational-heyting-field
jamesmckinna 17efee2
`fix-whitespace`
jamesmckinna a39d366
rectified wrt `contradiction`
jamesmckinna 37e8e3b
rectified `DecSetoid` properties
jamesmckinna 86e550d
rectified `Group` properties
jamesmckinna 7459d22
inlined lemma; tidied up
jamesmckinna 177394c
Merge branch 'master' into rational-heyting-field
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Every decidable setoid induces tight apartness relation. | ||
------------------------------------------------------------------------ | ||
|
||
{-# OPTIONS --cubical-compatible --safe #-} | ||
|
||
open import Relation.Binary.Bundles using (DecSetoid; ApartnessRelation) | ||
|
||
module Relation.Binary.Properties.DecSetoid {c ℓ} (S : DecSetoid c ℓ) where | ||
|
||
open import Data.Product using (_,_) | ||
open import Data.Sum using (inj₁; inj₂) | ||
jamesmckinna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
open import Relation.Binary.Definitions | ||
using (Cotransitive; Tight) | ||
import Relation.Binary.Properties.Setoid as SetoidProperties | ||
open import Relation.Binary.Structures | ||
using (IsApartnessRelation; IsDecEquivalence) | ||
open import Relation.Nullary.Decidable.Core | ||
using (yes; no; decidable-stable) | ||
|
||
open DecSetoid S using (_≈_; _≉_; _≟_; setoid; trans) | ||
open SetoidProperties setoid | ||
|
||
≉-cotrans : Cotransitive _≉_ | ||
cspollard marked this conversation as resolved.
Show resolved
Hide resolved
|
||
≉-cotrans {x} {y} x≉y z with x ≟ z | z ≟ y | ||
... | _ | no z≉y = inj₂ z≉y | ||
... | no x≉z | _ = inj₁ x≉z | ||
... | yes x≈z | yes z≈y = inj₁ λ _ → x≉y (trans x≈z z≈y) | ||
|
||
≉-isApartnessRelation : IsApartnessRelation _≈_ _≉_ | ||
≉-isApartnessRelation = record | ||
{ irrefl = ≉-irrefl | ||
; sym = ≉-sym | ||
; cotrans = ≉-cotrans | ||
} | ||
|
||
≉-apartnessRelation : ApartnessRelation c ℓ ℓ | ||
≉-apartnessRelation = record { isApartnessRelation = ≉-isApartnessRelation } | ||
|
||
≉-tight : Tight _≈_ _≉_ | ||
≉-tight x y = decidable-stable (x ≟ y) , ≉-irrefl | ||
cspollard marked this conversation as resolved.
Show resolved
Hide resolved
|
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
Oops, something went wrong.
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.