| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Properties of min and max operators specified over a total preorder. |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
open import Algebra.Construct.NaturalChoice.Base using (MinOperator; MaxOperator) |
| 10 |
open import Relation.Binary.Bundles using (TotalPreorder) |
| 11 |
|
| 12 |
module Algebra.Lattice.Construct.NaturalChoice.MinMaxOp |
| 13 |
{a ℓ₁ ℓ₂} {O : TotalPreorder a ℓ₁ ℓ₂} |
| 14 |
(minOp : MinOperator O) |
| 15 |
(maxOp : MaxOperator O) |
| 16 |
where |
| 17 |
|
| 18 |
open TotalPreorder O |
| 19 |
open MinOperator minOp |
| 20 |
open MaxOperator maxOp |
| 21 |
|
| 22 |
open import Algebra.Lattice.Structures _≈_ |
| 23 |
open import Algebra.Construct.NaturalChoice.MinMaxOp minOp maxOp |
| 24 |
open import Algebra.Lattice.Bundles using (Lattice; DistributiveLattice) |
| 25 |
open import Relation.Binary.Reasoning.Preorder preorder |
| 26 |
|
| 27 |
------------------------------------------------------------------------ |
| 28 |
-- Re-export properties of individual operators |
| 29 |
|
| 30 |
open import Algebra.Lattice.Construct.NaturalChoice.MinOp minOp public |
| 31 |
open import Algebra.Lattice.Construct.NaturalChoice.MaxOp maxOp public |
| 32 |
|
| 33 |
------------------------------------------------------------------------ |
| 34 |
-- Structures |
| 35 |
|
| 36 |
⊔-⊓-isLattice : IsLattice _⊔_ _⊓_ |
| 37 |
⊔-⊓-isLattice = record |
| 38 |
{ isEquivalence = isEquivalence |
| 39 |
; ∨-comm = ⊔-comm |
| 40 |
; ∨-assoc = ⊔-assoc |
| 41 |
; ∨-cong = ⊔-cong |
| 42 |
; ∧-comm = ⊓-comm |
| 43 |
; ∧-assoc = ⊓-assoc |
| 44 |
; ∧-cong = ⊓-cong |
| 45 |
; absorptive = ⊔-⊓-absorptive |
| 46 |
} |
| 47 |
|
| 48 |
⊓-⊔-isLattice : IsLattice _⊓_ _⊔_ |
| 49 |
⊓-⊔-isLattice = record |
| 50 |
{ isEquivalence = isEquivalence |
| 51 |
; ∨-comm = ⊓-comm |
| 52 |
; ∨-assoc = ⊓-assoc |
| 53 |
; ∨-cong = ⊓-cong |
| 54 |
; ∧-comm = ⊔-comm |
| 55 |
; ∧-assoc = ⊔-assoc |
| 56 |
; ∧-cong = ⊔-cong |
| 57 |
; absorptive = ⊓-⊔-absorptive |
| 58 |
} |
| 59 |
|
| 60 |
⊓-⊔-isDistributiveLattice : IsDistributiveLattice _⊓_ _⊔_ |
| 61 |
⊓-⊔-isDistributiveLattice = record |
| 62 |
{ isLattice = ⊓-⊔-isLattice |
| 63 |
; ∨-distrib-∧ = ⊓-distrib-⊔ |
| 64 |
; ∧-distrib-∨ = ⊔-distrib-⊓ |
| 65 |
} |
| 66 |
|
| 67 |
⊔-⊓-isDistributiveLattice : IsDistributiveLattice _⊔_ _⊓_ |
| 68 |
⊔-⊓-isDistributiveLattice = record |
| 69 |
{ isLattice = ⊔-⊓-isLattice |
| 70 |
; ∨-distrib-∧ = ⊔-distrib-⊓ |
| 71 |
; ∧-distrib-∨ = ⊓-distrib-⊔ |
| 72 |
} |
| 73 |
|
| 74 |
------------------------------------------------------------------------ |
| 75 |
-- Bundles |
| 76 |
|
| 77 |
⊔-⊓-lattice : Lattice _ _ |
| 78 |
⊔-⊓-lattice = record |
| 79 |
{ isLattice = ⊔-⊓-isLattice |
| 80 |
} |
| 81 |
|
| 82 |
⊓-⊔-lattice : Lattice _ _ |
| 83 |
⊓-⊔-lattice = record |
| 84 |
{ isLattice = ⊓-⊔-isLattice |
| 85 |
} |
| 86 |
|
| 87 |
⊔-⊓-distributiveLattice : DistributiveLattice _ _ |
| 88 |
⊔-⊓-distributiveLattice = record |
| 89 |
{ isDistributiveLattice = ⊔-⊓-isDistributiveLattice |
| 90 |
} |
| 91 |
|
| 92 |
⊓-⊔-distributiveLattice : DistributiveLattice _ _ |
| 93 |
⊓-⊔-distributiveLattice = record |
| 94 |
{ isDistributiveLattice = ⊓-⊔-isDistributiveLattice |
| 95 |
} |