File tree Expand file tree Collapse file tree 3 files changed +14
-21
lines changed
Relation/Binary/Order/Pseudolattice/Instances Expand file tree Collapse file tree 3 files changed +14
-21
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,20 @@ min-≤-right {zero} {n} = zero-≤
277277min-≤-right {suc m} {zero} = ≤-refl
278278min-≤-right {suc m} {suc n} = subst (_≤ _) (sym minSuc) $ suc-≤-suc $ min-≤-right {m} {n}
279279
280+ maxLUB : ∀ {x} → m ≤ x → n ≤ x → max m n ≤ x
281+ maxLUB {zero} {n} _ n≤x = n≤x
282+ maxLUB {suc m} {zero} sm≤x _ = sm≤x
283+ maxLUB {suc m} {suc n} sm≤x sn≤x with m <ᵇ n
284+ ... | false = sm≤x
285+ ... | true = sn≤x
286+
287+ minGLB : ∀ {x} → x ≤ m → x ≤ n → x ≤ min m n
288+ minGLB {zero} {n} x≤0 _ = x≤0
289+ minGLB {suc m} {zero} _ x≤0 = x≤0
290+ minGLB {suc m} {suc n} x≤sm x≤sn with m <ᵇ n
291+ ... | false = x≤sn
292+ ... | true = x≤sm
293+
280294-- Boolean order relations and their conversions to/from ≤ and <
281295
282296_≤ᵇ_ : ℕ → ℕ → Bool
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ open import Cubical.Data.Int.Order renaming (_≤_ to _≤ℤ_)
88open import Cubical.Relation.Binary.Order.Poset.Instances.Int
99open import Cubical.Relation.Binary.Order.Pseudolattice
1010
11- open PseudolatticeStr
12-
1311ℤ≤Pseudolattice : Pseudolattice ℓ-zero ℓ-zero
1412ℤ≤Pseudolattice = makePseudolatticeFromPoset ℤ≤Poset min max
1513 min≤
Original file line number Diff line number Diff line change @@ -2,31 +2,12 @@ module Cubical.Relation.Binary.Order.Pseudolattice.Instances.Nat where
22
33open import Cubical.Foundations.Prelude
44
5- open import Cubical.Data.Bool.Base
6-
75open import Cubical.Data.Nat
86open import Cubical.Data.Nat.Order renaming (_≤_ to _≤ℕ_)
97
108open import Cubical.Relation.Binary.Order.Poset.Instances.Nat
119open import Cubical.Relation.Binary.Order.Pseudolattice
1210
13- open PseudolatticeStr
14-
15- private
16- minGLB : ∀ {m n x} → x ≤ℕ m → x ≤ℕ n → x ≤ℕ min m n
17- minGLB {zero} {n} x≤0 _ = x≤0
18- minGLB {suc m} {zero} _ x≤0 = x≤0
19- minGLB {suc m} {suc n} x≤sm x≤sn with m <ᵇ n
20- ... | false = x≤sn
21- ... | true = x≤sm
22-
23- maxLUB : ∀ {m n x} → m ≤ℕ x → n ≤ℕ x → max m n ≤ℕ x
24- maxLUB {zero} {n} _ n≤x = n≤x
25- maxLUB {suc m} {zero} sm≤x _ = sm≤x
26- maxLUB {suc m} {suc n} sm≤x sn≤x with m <ᵇ n
27- ... | false = sm≤x
28- ... | true = sn≤x
29-
3011ℕ≤Pseudolattice : Pseudolattice ℓ-zero ℓ-zero
3112ℕ≤Pseudolattice = makePseudolatticeFromPoset ℕ≤Poset min max
3213 min-≤-left
You can’t perform that action at this time.
0 commit comments