Use named modules to avoid having to pass redundant parameters
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -8,7 +8,10 @@ open import Data.List using (List)
|
||||
open import Data.Nat using (ℕ)
|
||||
open import Utils using (Unique)
|
||||
|
||||
module _ (fhB : FiniteHeightLattice B) where
|
||||
module FromFiniteHeightLattice (fhB : FiniteHeightLattice B)
|
||||
{ks : List A} (uks : Unique ks)
|
||||
(≈₂-dec : Decidable (FiniteHeightLattice._≈_ fhB)) where
|
||||
|
||||
open Lattice.FiniteHeightLattice fhB using () renaming
|
||||
( _≈_ to _≈₂_; _⊔_ to _⊔₂_; _⊓_ to _⊓₂_
|
||||
; height to height₂
|
||||
@@ -16,13 +19,12 @@ module _ (fhB : FiniteHeightLattice B) where
|
||||
; fixedHeight to fixedHeight₂
|
||||
)
|
||||
|
||||
module _ {ks : List A} (uks : Unique ks) (≈₂-dec : Decidable _≈₂_) where
|
||||
import Lattice.FiniteValueMap A B _≈₂_ _⊔₂_ _⊓₂_ ≡-dec-A isLattice₂ as FVM
|
||||
import Lattice.FiniteMap
|
||||
module FM = Lattice.FiniteMap A B _≈₂_ _⊔₂_ _⊓₂_ ≡-dec-A isLattice₂
|
||||
open FM.WithKeys ks public
|
||||
|
||||
FiniteHeightType = FVM.FiniteMap ks
|
||||
|
||||
finiteHeightLattice = FVM.IterProdIsomorphism.finiteHeightLattice uks ≈₂-dec height₂ fixedHeight₂
|
||||
open FiniteHeightLattice finiteHeightLattice public
|
||||
|
||||
≈-dec = FVM.≈-dec ks ≈₂-dec
|
||||
import Lattice.FiniteValueMap
|
||||
module FVM = Lattice.FiniteValueMap A B _≈₂_ _⊔₂_ _⊓₂_ ≡-dec-A isLattice₂
|
||||
open FVM.IterProdIsomorphism.WithUniqueKeysAndFixedHeight uks ≈₂-dec height₂ fixedHeight₂ public
|
||||
|
||||
≈-dec = ≈₂-dec⇒≈-dec ≈₂-dec
|
||||
|
||||
Reference in New Issue
Block a user