1
------------------------------------------------------------------------
2
-- Some derivable properties
3
------------------------------------------------------------------------
7
module Algebra.Props.Lattice (l : Lattice) where
10
open import Algebra.Structures
11
import Algebra.FunctionProperties as P; open P _≈_
12
import Relation.Binary.EqReasoning as EqR; open EqR setoid
13
open import Data.Function
14
open import Data.Product
16
∧-idempotent : Idempotent _∧_
17
∧-idempotent x = begin
18
x ∧ x ≈⟨ refl ⟨ ∧-cong ⟩ sym (proj₁ absorptive _ _) ⟩
19
x ∧ (x ∨ x ∧ x) ≈⟨ proj₂ absorptive _ _ ⟩
22
∨-idempotent : Idempotent _∨_
23
∨-idempotent x = begin
24
x ∨ x ≈⟨ refl ⟨ ∨-cong ⟩ sym (∧-idempotent _) ⟩
25
x ∨ x ∧ x ≈⟨ proj₁ absorptive _ _ ⟩
28
-- The dual construction is also a lattice.
30
∧-∨-isLattice : IsLattice _≈_ _∧_ _∨_
31
∧-∨-isLattice = record
32
{ isEquivalence = isEquivalence
39
; absorptive = swap absorptive
46
; isLattice = ∧-∨-isLattice