Switch maps (and consequently most of the code) to using instances
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
@@ -63,27 +63,29 @@ module TransportFiniteHeight
|
||||
portChain₂ (done₂ a₂≈a₁) = done₁ (g-preserves-≈₂ a₂≈a₁)
|
||||
portChain₂ (step₂ {b₁} {b₂} (b₁≼b₂ , b₁̷≈b₂) b₂≈b₂' c) = step₁ (≈₁-trans (≈₁-sym (g-⊔-distr b₁ b₂)) (g-preserves-≈₂ b₁≼b₂) , g-preserves-̷≈ b₁̷≈b₂) (g-preserves-≈₂ b₂≈b₂') (portChain₂ c)
|
||||
|
||||
isFiniteHeightLattice : IsFiniteHeightLattice B height _≈₂_ _⊔₂_ _⊓₂_
|
||||
isFiniteHeightLattice =
|
||||
let
|
||||
open Chain.Height (IsFiniteHeightLattice.fixedHeight fhlA)
|
||||
using ()
|
||||
renaming (⊥ to ⊥₁; ⊤ to ⊤₁; bounded to bounded₁; longestChain to c)
|
||||
in record
|
||||
{ isLattice = lB
|
||||
; fixedHeight = record
|
||||
{ ⊥ = f ⊥₁
|
||||
; ⊤ = f ⊤₁
|
||||
; longestChain = portChain₁ c
|
||||
; bounded = λ c' → bounded₁ (portChain₂ c')
|
||||
}
|
||||
open Chain.Height (IsFiniteHeightLattice.fixedHeight fhlA)
|
||||
using ()
|
||||
renaming (⊥ to ⊥₁; ⊤ to ⊤₁; bounded to bounded₁; longestChain to c)
|
||||
|
||||
instance
|
||||
fixedHeight = record
|
||||
{ ⊥ = f ⊥₁
|
||||
; ⊤ = f ⊤₁
|
||||
; longestChain = portChain₁ c
|
||||
; bounded = λ c' → bounded₁ (portChain₂ c')
|
||||
}
|
||||
|
||||
finiteHeightLattice : FiniteHeightLattice B
|
||||
finiteHeightLattice = record
|
||||
{ height = height
|
||||
; _≈_ = _≈₂_
|
||||
; _⊔_ = _⊔₂_
|
||||
; _⊓_ = _⊓₂_
|
||||
; isFiniteHeightLattice = isFiniteHeightLattice
|
||||
}
|
||||
isFiniteHeightLattice : IsFiniteHeightLattice B height _≈₂_ _⊔₂_ _⊓₂_
|
||||
isFiniteHeightLattice = record
|
||||
{ isLattice = lB
|
||||
; fixedHeight = fixedHeight
|
||||
}
|
||||
|
||||
finiteHeightLattice : FiniteHeightLattice B
|
||||
finiteHeightLattice = record
|
||||
{ height = height
|
||||
; _≈_ = _≈₂_
|
||||
; _⊔_ = _⊔₂_
|
||||
; _⊓_ = _⊓₂_
|
||||
; isFiniteHeightLattice = isFiniteHeightLattice
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user