Debian Codegraph @

src/Relation/Binary/Lattice/Properties/BoundedLattice.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Properties satisfied by bounded lattice
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --cubical-compatible --safe #-}
8
9 open import Relation.Binary.Lattice
10
11 module Relation.Binary.Lattice.Properties.BoundedLattice
12 {c ℓ₁ ℓ₂} (L : BoundedLattice c ℓ₁ ℓ₂) where
13
14 open import Data.Product.Base using (_,_)
15 open import Relation.Binary.Bundles using (Setoid)
16
17 open BoundedLattice L
18
19 open import Algebra.Definitions _≈_ using (Zero; RightZero; LeftZero)
20 open import Relation.Binary.Lattice.Properties.MeetSemilattice meetSemilattice
21 using (y≤x⇒x∧y≈y; ∧-comm)
22 open import Relation.Binary.Lattice.Properties.JoinSemilattice joinSemilattice
23 using (x≤y⇒x∨y≈y; ∨-comm )
24 open Setoid setoid renaming (trans to ≈-trans)
25
26 ∧-zeroʳ : RightZero ⊥ _∧_
27 ∧-zeroʳ x = y≤x⇒x∧y≈y (minimum x)
28
29 ∧-zeroˡ : LeftZero ⊥ _∧_
30 ∧-zeroˡ x = ≈-trans (∧-comm ⊥ x) (∧-zeroʳ x)
31
32 ∧-zero : Zero ⊥ _∧_
33 ∧-zero = ∧-zeroˡ , ∧-zeroʳ
34
35 ∨-zeroʳ : RightZero ⊤ _∨_
36 ∨-zeroʳ x = x≤y⇒x∨y≈y (maximum x)
37
38 ∨-zeroˡ : LeftZero ⊤ _∨_
39 ∨-zeroˡ x = ≈-trans (∨-comm ⊤ x) (∨-zeroʳ x)
40
41 ∨-zero : Zero ⊤ _∨_
42 ∨-zero = ∨-zeroˡ , ∨-zeroʳ