-
Notifications
You must be signed in to change notification settings - Fork 253
[ add ] Relation.Binary.Properties.PartialSetoid
#2678
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 1 commit
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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Additional properties for setoids | ||
------------------------------------------------------------------------ | ||
|
||
{-# OPTIONS --cubical-compatible --safe #-} | ||
|
||
open import Relation.Binary.Bundles using (PartialSetoid) | ||
|
||
module Relation.Binary.Properties.PartialSetoid | ||
{a ℓ} (S : PartialSetoid a ℓ) where | ||
|
||
open import Data.Product.Base using (_,_; _×_) | ||
open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_) | ||
|
||
open PartialSetoid S | ||
|
||
private | ||
variable | ||
x y z : Carrier | ||
|
||
------------------------------------------------------------------------ | ||
-- Proofs for partial equivalence relations | ||
|
||
trans-reflˡ : x ≡ y → y ≈ z → x ≈ z | ||
trans-reflˡ ≡.refl p = p | ||
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. Do we actually need to match on the proof here? Is this not just a variant of 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. Oh... |
||
|
||
trans-reflʳ : x ≈ y → y ≡ z → x ≈ z | ||
trans-reflʳ p ≡.refl = p | ||
|
||
p-reflˡ : x ≈ y → x ≈ x | ||
jamesmckinna marked this conversation as resolved.
Show resolved
Hide resolved
|
||
p-reflˡ p = trans p (sym p) | ||
|
||
p-reflʳ : x ≈ y → y ≈ y | ||
p-reflʳ p = trans (sym p) p | ||
|
||
p-refl : x ≈ y → x ≈ x × y ≈ y | ||
p-refl p = p-reflˡ p , p-reflʳ p | ||
|
||
p-reflexiveˡ : x ≈ y → x ≡ z → x ≈ z | ||
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. This is 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. Hmmm... I see what you mean... Will ponder this for a bit! 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. So... my reasoning (with a bit of post hoc rationalisation...) was as follows:
Possibly a bit convoluted, so I'm open to 'better' names! 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. This is not This is an extremely weird property which basically says: if x is related to something (anything) and we have evidence of that, and x and z are identical, then we can get evidence that x and z are related. I'm at a loss for what to name it. 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 don't know about 'weird'... these properties are characteristic of being a PER rather than a full 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. As to names: I could call it (something like) 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. Weird likely because I generically find PERs weird. However, your comment hits the real issue on the head: only on its domain of definition. We really ought to define an 'is defined' construction (a la At least now I understand this combinator's meaning (when x is defined, then equality that involve it is reflexive), and that is no longer weird at all. 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. Not sure I see clearly what the Cf. Scott's "Identity and Existence in Intuitionistic Logic" (LNM 753) which explores variations on the theme of |
||
p-reflexiveˡ p ≡.refl = p-reflˡ p | ||
|
||
p-reflexiveʳ : x ≈ y → y ≡ z → y ≈ z | ||
p-reflexiveʳ p ≡.refl = p-reflʳ p | ||
|
Uh oh!
There was an error while loading. Please reload this page.