Skip to content

Commit 1abebbf

Browse files
committed
add ≤→∧≡Left and ≥→∧≡Right into the Properties module. Add isPropIsPseudolattice into the the Base file
1 parent bb72c98 commit 1abebbf

File tree

2 files changed

+32
-7
lines changed

2 files changed

+32
-7
lines changed

Cubical/Relation/Binary/Order/Pseudolattice/Base.agda

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
module Cubical.Relation.Binary.Order.Pseudolattice.Base where
22

33
open import Cubical.Foundations.Prelude
4+
open import Cubical.Foundations.Function
5+
open import Cubical.Foundations.Equiv
6+
open import Cubical.Foundations.HLevels
47
open import Cubical.Foundations.SIP
58

9+
open import Cubical.Reflection.RecordEquiv
10+
611
open import Cubical.Relation.Binary.Base
7-
open import Cubical.Relation.Binary.Order.Poset renaming (isPseudolattice to pseudolattice)
8-
open import Cubical.Relation.Binary.Order.StrictOrder
12+
open import Cubical.Relation.Binary.Order.Poset renaming (
13+
isPseudolattice to pseudolattice ;
14+
isPropIsPseudolattice to is-prop-is-pseudolattice)
915

1016
open BinaryRelation
1117

@@ -31,6 +37,9 @@ record IsPseudolattice {L : Type ℓ} (_≤_ : L → L → Type ℓ') : Type (
3137
infixl 7 _∧l_
3238
infixl 6 _∨l_
3339

40+
41+
unquoteDecl IsPseudolatticeIsoΣ = declareRecordIsoΣ IsPseudolatticeIsoΣ (quote IsPseudolattice)
42+
3443
record PseudolatticeStr (ℓ' : Level) (L : Type ℓ) : Type (ℓ-suc (ℓ-max ℓ ℓ')) where
3544
constructor pseudolatticestr
3645

@@ -42,6 +51,9 @@ record PseudolatticeStr (ℓ' : Level) (L : Type ℓ) : Type (ℓ-suc (ℓ-max
4251

4352
open IsPseudolattice is-pseudolattice public
4453

54+
55+
unquoteDecl PseudolatticeStrIsoΣ = declareRecordIsoΣ PseudolatticeStrIsoΣ (quote PseudolatticeStr)
56+
4557
Pseudolattice : ℓ ℓ' Type (ℓ-suc (ℓ-max ℓ ℓ'))
4658
Pseudolattice ℓ ℓ' = TypeWithStr ℓ (PseudolatticeStr ℓ')
4759

@@ -59,3 +71,9 @@ makeIsPseudolattice {_≤_ = _≤_} is-setL is-prop-valued is-refl is-trans is-a
5971
PS : IsPseudolattice _≤_
6072
PS .IsPseudolattice.isPoset = isposet is-setL is-prop-valued is-refl is-trans is-antisym
6173
PS .IsPseudolattice.isPseudolattice = is-meet-semipseudolattice , is-join-semipseudolattice
74+
75+
isPropIsPseudolattice : {L : Type ℓ} (_≤_ : L L Type ℓ') isProp (IsPseudolattice _≤_)
76+
isPropIsPseudolattice {L = L} _≤_ = isOfHLevelRetractFromIso 1
77+
IsPseudolatticeIsoΣ $ isPropΣ
78+
(isPropIsPoset _≤_) λ isPoset
79+
is-prop-is-pseudolattice (poset L _≤_ isPoset)

Cubical/Relation/Binary/Order/Pseudolattice/Properties.agda

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ module MeetProperties (L≤ : Pseudolattice ℓ ℓ') where
4949
∧≤R = equivFun isMeet∧ (is-refl _) .snd
5050

5151
∧GLB : {a b x} x ≤ a x ≤ b x ≤ a ∧l b
52-
∧GLB {a} {b} {x} = curry (invEq isMeet∧)
52+
∧GLB = curry (invEq isMeet∧)
5353

5454
isMeet→≡∧ : m
5555
( {x} x ≤ m x ≤ a)
@@ -76,7 +76,13 @@ module MeetProperties (L≤ : Pseudolattice ℓ ℓ') where
7676
≤≃∧ = order≃meet isPoset _ _ _ λ _ isMeet∧
7777

7878
≤→∧ : a ≤ b a ≡ a ∧l b
79-
≤→∧ {a} {b} = equivFun ≤≃∧
79+
≤→∧ = equivFun ≤≃∧
80+
81+
≤→∧≡Left : a ≤ b a ∧l b ≡ a
82+
≤→∧≡Left = sym ∘ ≤→∧
83+
84+
≥→∧≡Right : b ≤ a a ∧l b ≡ b
85+
≥→∧≡Right = sym ∘ (_∙ ∧Comm) ∘ ≤→∧
8086

8187
Pseudolattice→Semigroup∧ : Semigroup ℓ
8288
Pseudolattice→Semigroup∧ .fst = L
@@ -88,6 +94,7 @@ open MeetProperties public
8894

8995
module _ (L≤ : Pseudolattice ℓ ℓ') where
9096
open MeetProperties (DualPseudolattice L≤) public renaming (
91-
isMeet∧ to isJoin∨ ; ∧≤L to L≤∨ ; ∧≤R to R≤∨ ; ∧GLB to ∨LUB
92-
; isMeet→≡∧ to isJoin→≡∨ ; ∧Comm to ∨Comm ; ∧Idem to ∨Idem ; ∧Assoc to ∨Assoc
93-
; ≤≃∧ to ≤≃∨ ; ≤→∧ to ≤→∨ ; Pseudolattice→Semigroup∧ to Pseudolattice→Semigroup∨)
97+
isMeet∧ to isJoin∨ ; ∧≤L to L≤∨ ; ∧≤R to R≤∨ ; isMeet→≡∧ to isJoin→≡∨
98+
; ∧Comm to ∨Comm ; ∧Idem to ∨Idem ; ∧Assoc to ∨Assoc
99+
; ≤≃∧ to ≤≃∨ ; ≤→∧ to ≤→∨ ; ≤→∧≡Left to ≥→∨≡Left ; ≥→∧≡Right to ≤→∨≡Right
100+
; ∧GLB to ∨LUB ; Pseudolattice→Semigroup∧ to Pseudolattice→Semigroup∨)

0 commit comments

Comments
 (0)