Add a witness for Map being an intersect semilattice
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
d3e0db449c
commit
990a785463
11
Lattice.agda
11
Lattice.agda
|
@ -238,6 +238,9 @@ module IsSemilatticeInstances where
|
||||||
_⊔_ : Map → Map → Map
|
_⊔_ : Map → Map → Map
|
||||||
m₁ ⊔ m₂ = union _⊔₂_ m₁ m₂
|
m₁ ⊔ m₂ = union _⊔₂_ m₁ m₂
|
||||||
|
|
||||||
|
_⊓_ : Map → Map → Map
|
||||||
|
m₁ ⊓ m₂ = intersect _⊔₂_ m₁ m₂
|
||||||
|
|
||||||
module MapEquiv = IsEquivalenceInstances.ForMap A B ≡-dec-A _≈₂_ (IsSemilattice.≈-equiv sB)
|
module MapEquiv = IsEquivalenceInstances.ForMap A B ≡-dec-A _≈₂_ (IsSemilattice.≈-equiv sB)
|
||||||
|
|
||||||
MapIsUnionSemilattice : IsSemilattice Map _≈_ _⊔_
|
MapIsUnionSemilattice : IsSemilattice Map _≈_ _⊔_
|
||||||
|
@ -248,6 +251,14 @@ module IsSemilatticeInstances where
|
||||||
; ⊔-idemp = union-idemp _≈₂_ ≈₂-refl ≈₂-sym _⊔₂_ ⊔₂-idemp
|
; ⊔-idemp = union-idemp _≈₂_ ≈₂-refl ≈₂-sym _⊔₂_ ⊔₂-idemp
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MapIsIntersectSemilattice : IsSemilattice Map _≈_ _⊓_
|
||||||
|
MapIsIntersectSemilattice = record
|
||||||
|
{ ≈-equiv = MapEquiv.LiftEquivalence
|
||||||
|
; ⊔-assoc = intersect-assoc _≈₂_ ≈₂-refl ≈₂-sym _⊔₂_ ⊔₂-assoc
|
||||||
|
; ⊔-comm = intersect-comm _≈₂_ ≈₂-refl ≈₂-sym _⊔₂_ ⊔₂-comm
|
||||||
|
; ⊔-idemp = intersect-idemp _≈₂_ ≈₂-refl ≈₂-sym _⊔₂_ ⊔₂-idemp
|
||||||
|
}
|
||||||
|
|
||||||
module IsLatticeInstances where
|
module IsLatticeInstances where
|
||||||
module ForNat where
|
module ForNat where
|
||||||
open Nat
|
open Nat
|
||||||
|
|
Loading…
Reference in New Issue
Block a user