Tweak IterProd to expose more (including a bundle)

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
Danila Fedorin 2024-02-11 20:45:14 -08:00
parent 45f2babfa3
commit a920608bef

View File

@ -47,6 +47,9 @@ private module _ where
_⊓₁_ (Lattice._⊓_ Right)
lA (Lattice.isLattice Right)
module _ (k : ) where
open Lattice.Lattice (IterProdLattice {k}) public
module _ (≈₁-dec : IsDecidable _≈₁_) (≈₂-dec : IsDecidable _≈₂_)
(h₁ h₂ : )
(fhA : FixedHeight₁ h₁) (fhB : FixedHeight₂ h₂) where
@ -81,9 +84,9 @@ module _ (≈₁-dec : IsDecidable _≈₁_) (≈₂-dec : IsDecidable _≈₂_)
IterProdFiniteHeightLattice {0} = BFiniteHeightLattice
IterProdFiniteHeightLattice {suc k'} = record
{ height = h₁ + FiniteHeightAndDecEq.height Right
; _≈_ = _≈_
; _⊔_ = _⊔_
; _⊓_ = _⊓_
; _≈_ = P._≈_
; _⊔_ = P._⊔_
; _⊓_ = P._⊓_
; isFiniteHeightLattice = isFiniteHeightLattice
≈₁-dec (FiniteHeightAndDecEq.≈-dec Right)
h₁ (FiniteHeightAndDecEq.height Right)
@ -97,11 +100,19 @@ module _ (≈₁-dec : IsDecidable _≈₁_) (≈₂-dec : IsDecidable _≈₂_)
_≈₁_ (FiniteHeightAndDecEq._≈_ Right)
_⊔₁_ (FiniteHeightAndDecEq._⊔_ Right)
_⊓₁_ (FiniteHeightAndDecEq._⊓_ Right)
lA (FiniteHeightAndDecEq.isLattice Right)
lA (FiniteHeightAndDecEq.isLattice Right) as P
module _ (k : ) where
open FiniteHeightAndDecEq (IterProdFiniteHeightLattice {k}) using (fixedHeight) public
open FiniteHeightAndDecEq (IterProdFiniteHeightLattice {k}) using (isFiniteHeightLattice) public
-- Expose the computed definition in public.
module _ (k : ) where
open Lattice.Lattice (IterProdLattice {k}) public
private
FHD = IterProdFiniteHeightLattice {k}
finiteHeightLattice : FiniteHeightLattice (IterProd k)
finiteHeightLattice = record
{ height = FiniteHeightAndDecEq.height FHD
; _≈_ = FiniteHeightAndDecEq._≈_ FHD
; _⊔_ = FiniteHeightAndDecEq._⊔_ FHD
; _⊓_ = FiniteHeightAndDecEq._⊓_ FHD
; isFiniteHeightLattice = isFiniteHeightLattice
}