MatchingLogic.Boxes #
⟨e⟩ψ := σ(⊤, …, ψ, …, ⊤) with ψ in position i (Definition 3).
Equations
- MatchingLogic.dia e ψ = MatchingLogic.Pattern.app e.fst fun (j : Fin (S.arity e.fst)) => if j = e.snd then ψ else MatchingLogic.Pattern.tp
Instances For
[e]ψ := ⟨e⟩(ψ → ⊥) → ⊥ (Definition 3).
Equations
Instances For
[p]ψ := [e₁]⋯[eₘ]ψ for a word p = e₁⋯eₘ, with [ε]ψ := ψ
(Definition 3). Words are lists of coordinates; every word composes because
there is only one sort.
Equations
- MatchingLogic.boxes [] x✝ = x✝
- MatchingLogic.boxes (e :: p) x✝ = MatchingLogic.box e (MatchingLogic.boxes p x✝)
Instances For
⇝_p for a word p, the relational composite, with ⇝_ε = id
(Definition 2).
Equations
Instances For
The denotation of ⟨e⟩ψ: the points with an e-successor in ψ.
Auxiliary: the denotation of [e]ψ is the points all of whose e-successors
lie in ⟦ψ⟧. This is the complement step of the paper's proof of Lemma 4,
factored out so the word induction below only has to compose it with itself.
Lemma 4 (box semantics). ⟦[p]ψ⟧ = {u | ⇝_p[u] ⊆ ⟦ψ⟧}.
The paper states this for closed ψ, because it writes both sides with ⟦·⟧.
No closedness hypothesis is needed here, and the reason is FV_boxes below:
dia, box and boxes are binder-free, so FV ([p]ψ) = FV ψ exactly and both
sides read ψ's free variables off the same ρ. (Merely "both sides carry the
same valuation" would NOT suffice -- a box that introduced a binder would
evaluate ψ under an updated valuation on the left and not on the right.)
Instantiating at a closed ψ recovers the paper's statement.
Boxing is binder-free, and concatenation decomposes the same way on #
both sides.
FV_boxes is what licenses dropping the closedness hypothesis from Lemma 4,
and is also what Localization.closed_of_mem_localize needs. The two append
lemmas are the real order check: boxes and reachWord must decompose a
concatenated word identically, or a jointly flipped pair would go unnoticed.