module Subsumption where
open import Data.Function
using ( id )
open import Relation.Binary.Core
using ( Reflexive
; Transitive )
open import Ctx
open import Modalities
open import Predicates
open import Syntax
open import Vars
infix 0 _⊇_
_⊇_ : EndoRel (Ctx Type)
Γ ⊇ Δ = Box (Var Γ) Δ
⊇-refl : Reflexive _⊇_
⊇-refl = tabulate id
⊇-trans : Transitive _⊇_
⊇-trans ρ₁ ρ₂ = map (lookup ρ₁) ρ₂
▸-incr : ∀ {Γ Δ α} → Γ ⊇ Δ → Γ ▸ α ⊇ Δ
▸-incr ρ = map vs ρ
▸-mono : ∀ {Γ Δ α} → Γ ⊇ Δ → Γ ▸ α ⊇ Δ ▸ α
▸-mono ρ = map vs ρ ▸ vz
▸-step : ∀ {Γ} {α} → Γ ▸ α ⊇ Γ
▸-step = ▸-incr ⊇-refl