Create bundles and add a program to evaluate some code with finite maps

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
2024-03-01 21:58:58 -08:00
parent 97a4165b58
commit ae3e2c28b0
3 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
open import Relation.Binary.PropositionalEquality using (_≡_)
open import Relation.Binary.Definitions using (Decidable)
module Lattice.Bundles.FiniteValueMap (A B : Set) (≡-dec-A : Decidable (_≡_ {_} {A})) where
open import Lattice
open import Data.List using (List)
open import Data.Nat using ()
open import Utils using (Unique)
module _ (fhB : FiniteHeightLattice B) where
open Lattice.FiniteHeightLattice fhB using () renaming
( _≈_ to _≈₂_; _⊔_ to _⊔₂_; _⊓_ to _⊓₂_
; height to height₂
; isLattice to isLattice₂
; fixedHeight to fixedHeight₂
)
module _ {ks : List A} (uks : Unique ks) (≈₂-dec : Decidable _≈₂_) where
import Lattice.FiniteValueMap A B _≈₂_ _⊔₂_ _⊓₂_ ≡-dec-A isLattice₂ as FVM
finiteHeightLattice = FVM.IterProdIsomorphism.finiteHeightLattice uks ≈₂-dec height₂ fixedHeight₂

View File

@@ -0,0 +1,38 @@
open import Lattice
module Lattice.Bundles.IterProd {a} (A B : Set a) where
open import Data.Nat using ()
module _ (lA : Lattice A) (lB : Lattice B) where
open Lattice.Lattice lA using () renaming
( _≈_ to _≈₁_; _⊔_ to _⊔₁_; _⊓_ to _⊓₁_
; isLattice to isLattice₁
)
open Lattice.Lattice lB using () renaming
( _≈_ to _≈₂_; _⊔_ to _⊔₂_; _⊓_ to _⊓₂_
; isLattice to isLattice₂
)
module _ (k : ) where
open import Lattice.IterProd _≈₁_ _≈₂_ _⊔₁_ _⊔₂_ _⊓₁_ _⊓₂_ isLattice₁ isLattice₂ using (lattice) public
module _ (fhA : FiniteHeightLattice A) (fhB : FiniteHeightLattice B) where
open Lattice.FiniteHeightLattice fhA using () renaming
( _≈_ to _≈₁_; _⊔_ to _⊔₁_; _⊓_ to _⊓₁_
; height to height₁
; isLattice to isLattice₁
; fixedHeight to fixedHeight₁
)
open Lattice.FiniteHeightLattice fhB using () renaming
( _≈_ to _≈₂_; _⊔_ to _⊔₂_; _⊓_ to _⊓₂_
; height to height₂
; isLattice to isLattice₂
; fixedHeight to fixedHeight₂
)
module _ (≈₁-dec : IsDecidable _≈₁_) (≈₂-dec : IsDecidable _≈₂_) (k : ) where
import Lattice.IterProd _≈₁_ _≈₂_ _⊔₁_ _⊔₂_ _⊓₁_ _⊓₂_ isLattice₁ isLattice₂ as IP
finiteHeightLattice = IP.finiteHeightLattice k ≈₁-dec ≈₂-dec height₁ height₂ fixedHeight₁ fixedHeight₂