Debian Codegraph @

src/Relation/Binary/Properties/PartialSetoid.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Additional properties for setoids
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Relation.Binary.Bundles using (PartialSetoid)
10
11 module Relation.Binary.Properties.PartialSetoid
12 {a ℓ} (S : PartialSetoid a ℓ) where
13
14 open import Data.Product.Base using (_,_; _×_)
15 open import Relation.Binary.Definitions using (LeftTrans; RightTrans)
16 open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_)
17
18 open PartialSetoid S
19
20 private
21 variable
22 x y z : Carrier
23
24 ------------------------------------------------------------------------
25 -- Proofs for partial equivalence relations
26
27 trans-reflˡ : LeftTrans _≡_ _≈_
28 trans-reflˡ ≡.refl p = p
29
30 trans-reflʳ : RightTrans _≈_ _≡_
31 trans-reflʳ p ≡.refl = p
32
33 partial-reflˡ : x ≈ y → x ≈ x
34 partial-reflˡ p = trans p (sym p)
35
36 partial-reflʳ : x ≈ y → y ≈ y
37 partial-reflʳ p = trans (sym p) p
38
39 partial-refl : x ≈ y → x ≈ x × y ≈ y
40 partial-refl p = partial-reflˡ p , partial-reflʳ p
41
42 partial-reflexiveˡ : x ≈ y → x ≡ z → x ≈ z
43 partial-reflexiveˡ p ≡.refl = partial-reflˡ p
44
45 partial-reflexiveʳ : x ≈ y → y ≡ z → y ≈ z
46 partial-reflexiveʳ p ≡.refl = partial-reflʳ p
47