Source code on Github{-# OPTIONS --cubical-compatible #-}
module Class.SeparationAlgebra where
open import Function.Definitions using (Injective)
open import Data.Maybe using (Is-just)
open import Relation.Unary renaming (Irrelevant to Irrelevant¹)
open import Class.Prelude
open import Class.Core
open import Class.Setoid.Core
open import Class.Setoid.Instances
open import Class.PartialSemigroup
open import Class.PartialMonoid
record SeparationAlgebra
(Σ : Type ℓ) ⦃ _ : ISetoid Σ ⦄ ⦃ _ : SetoidLaws Σ ⦄ : Type (ℓ ⊔ relℓ {A = Σ}) where
field
⦃ ps ⦄ : PartialSemigroup Σ
⦃ ps-laws ⦄ : PartialSemigroupLaws Σ
⦃ pm ⦄ : PartialMonoid Σ
⦃ pm-laws ⦄ : PartialMonoidLaws Σ
cancellative : ∀ (x : Σ) → Injective _≈_ _≈_ (x ◆_)
_#_ : Rel Σ _
x # y = Is-just (x ◆ y )
_≼_ : Rel Σ _
x ≼ z = ∃ λ y → (x ◆ y) ≈ just z
ℙ : Type _
ℙ = Pred Σ _
emp : ℙ
emp = _≈ ε◆
_∗_ : ℙ → ℙ → Pred Σ _
(p ∗ q) σ = ∃ λ (σ₀ : Σ) → ∃ λ (σ₁ : Σ)
→ (σ₀ # σ₁)
× (σ₀ ∈ p)
× (σ₁ ∈ q)
Prec : Pred ℙ _
Prec p = ∀ σ → Irrelevant¹ (λ σₚ → (σₚ ∈ p) × (σₚ ≼ σ))
open SeparationAlgebra ⦃...⦄ public