| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Instances of algebraic structures made by taking two other instances |
| 5 |
-- A and B, and having elements of the new instance be pairs |A| × |B|. |
| 6 |
-- In mathematics, this would usually be written A × B or A ⊕ B. |
| 7 |
-- |
| 8 |
-- From semigroups up, these new instances are products of the relevant |
| 9 |
-- category. For structures with commutative addition (commutative |
| 10 |
-- monoids, Abelian groups, semirings, rings), the direct product is |
| 11 |
-- also the coproduct, making it a biproduct. |
| 12 |
------------------------------------------------------------------------ |
| 13 |
|
| 14 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 15 |
|
| 16 |
module Algebra.Lattice.Construct.DirectProduct where |
| 17 |
|
| 18 |
open import Algebra using (Band) |
| 19 |
open import Algebra.Lattice using (Semilattice) |
| 20 |
import Algebra.Construct.DirectProduct as DirectProduct |
| 21 |
open import Data.Product.Base using (_,_; _<*>_) |
| 22 |
open import Level using (Level; _⊔_) |
| 23 |
|
| 24 |
private |
| 25 |
variable |
| 26 |
a b ℓ₁ ℓ₂ : Level |
| 27 |
|
| 28 |
------------------------------------------------------------------------ |
| 29 |
-- Bundles |
| 30 |
|
| 31 |
semilattice : Semilattice a ℓ₁ → Semilattice b ℓ₂ → |
| 32 |
Semilattice (a ⊔ b) (ℓ₁ ⊔ ℓ₂) |
| 33 |
semilattice L M = record |
| 34 |
{ isSemilattice = record |
| 35 |
{ isBand = Band.isBand (DirectProduct.band L.band M.band) |
| 36 |
; comm = λ x y → (L.comm , M.comm) <*> x <*> y |
| 37 |
} |
| 38 |
} where module L = Semilattice L; module M = Semilattice M |