Get started on a semilattice instances for products

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2023-07-14 18:42:29 -07:00
parent bac68b95f1
commit 2b3d429631

View File

@@ -187,3 +187,12 @@ private module NatInstances where
; absorb-⊓-⊔ = λ x y → minmax-absorb {x} {y}
}
}
ProdSemilattice : {a : Level} → {A B : Set a} → {{ Semilattice A }} → {{ Semilattice B }} → Semilattice (A × B)
ProdSemilattice {a} {A} {B} {{slA}} {{slB}} = record
{ _≼_ = λ (a₁ , b₁) (a₂ , b₂) → Semilattice._≼_ slA a₁ a₂ × Semilattice._≼_ slB b₁ b₂
; _⊔_ = λ (a₁ , b₁) (a₂ , b₂) → (Semilattice._⊔_ slA a₁ a₂ , Semilattice._⊔_ slB b₁ b₂)
; isSemilattice = record
{
}
}