Contexts for dynamic predicate logic #
Visser's contexts type the relations of dynamic predicate logic by the variables they
touch. A context is a triple of finite sets of variables: the inputs I a relation reads, the
blocks B at which it cuts the link between the input and the output value, and the outputs
O it constrains, with I and O agreeing off B. A relation has a context when it changes
only the blocks and membership in it is invariant under agreement on the inputs, on the outputs,
and off the blocks. Contexts compose as relations do, so every formula gets a context by
recursion, whose inputs are the free variables and whose blocks are the active quantifier
variables of Groenendijk and Stokhof, and the formula's interpretation has it.
Main definitions #
DPL.Context: the contexts, a monoid under composition with an information order; the contextsContext.test,Context.reset,Context.impl.DPL.HasContext: the relations a context types.DPL.Formula.context: the context of a formula.
Main results #
DPL.HasContext.mono: the information order is sound for the typing (Theorem 3.5).DPL.HasContext.patch,DPL.HasContext.patch_unique: the output of a typed relation over a varied input exists and is unique (Lemma 3.7).DPL.HasContext.comp,DPL.HasContext.impl,DPL.HasContext.neg,DPL.HasContext.disj,DPL.HasContext.dexists: the typing of the connectives (Theorems 3.8 and 3.9).DPL.HasContext.dependsOn_dom: truth depends only on the inputs.DPL.HasContext.dom_comp: a relation that blocks no input of another commutes with its truth.DPL.Formula.hasContext_eval: a formula's interpretation has its context (Theorem 3.13), withDPL.Formula.context_IandDPL.Formula.context_Bidentifying its inputs and blocks.DPL.Formula.IsScopeBound.mem_dom_eval_iff: on the scope-bound formulas dynamic truth is first-order satisfaction.
Implementation notes #
Coherence is stored in membership form, so that Context V needs no decidable equality; the
paper's I ∪ B = O ∪ B is Context.union_blocks. The patched output of Lemma 3.7 is
Finset.piecewise at the blocks. The paper's language has neither disjunction nor primitive
negation and universal quantification; their contexts are those the paper's definitions of them
yield, tests at the inputs. The context of a formula is not always the least one its
interpretation has, x ≐ x reading x and denoting the identity.
References #
Contexts (Definition 3.1) #
A DPL-context (Definition 3.1) has an input set I of variables the incoming assignment
is read at, a block set B of variables whose input-output link is cut, and an output set O
of variables the outgoing assignment is constrained at, with I and O agreeing off B (the
paper's I ∪ B = O ∪ B, Context.union_blocks).
- I : Finset V
The input set.
- B : Finset V
The block set is the barrier between past and future.
- O : Finset V
The output set.
Off the blocks, inputs and outputs coincide.
Instances For
Equations
- DPL.Context.instOne = { one := { I := ∅, B := ∅, O := ∅, coh := ⋯ } }
The test context at s reads and writes s and blocks nothing. Conditions live here
(hasContext_test), and implication contexts are tests (Context.impl).
Equations
- DPL.Context.test s = { I := s, B := ∅, O := s, coh := ⋯ }
Instances For
The reset context at x, Definition 3.12's c_{∃v}, reads nothing, constrains no output,
and blocks x.
Equations
- DPL.Context.reset x = { I := ∅, B := {x}, O := ∅, coh := ⋯ }
Instances For
Contexts compose by ⟨I,B,O⟩ * ⟨I',B',O'⟩ = ⟨I ∪ (I'∖B), B ∪ B', (O∖B') ∪ O'⟩
(Definition 3.1).
The contexts form a monoid (Theorem 3.3).
Equations
- DPL.Context.instMonoid = { toOne := DPL.Context.instOne, toMul := DPL.Context.instMul, mul_assoc := ⋯, one_mul := ⋯, mul_one := ⋯, npow := npowRecAuto, npow_zero := ⋯, npow_succ := ⋯ }
In the information order on contexts (Definition 3.1), more informative contexts read, write, and block more, with new blocks confined to variables the larger context both reads and writes.
The information order is a partial order (Theorem 3.3).
Equations
- DPL.Context.instPartialOrder = { le := fun (x1 x2 : DPL.Context V) => x1 ≤ x2, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }
The implication context (Definition 3.1) is a test reading the combined inputs.
Equations
- c.impl d = DPL.Context.test (c * d).I
Instances For
c-relations (Definition 3.4) #
A context c is a context for R (Definition 3.4) if R reads its input only at c.I,
constrains its output only at c.O, and changes values only at c.B.
Only blocked variables change.
Instances For
The test V-typed relations are exactly the V-invariant tests —
Definition 2.2's ⟨V⟩-conditions (noted after Definition 3.4).
A condition depending only on V is a Context.test V-relation as a
test (the atomic case of the paper's semantic Theorem 3.13).
A condition that depends only on s is typed as a test at s.
The identity is typed by the unit context.
The order is sound for the typing (Theorem 3.5) #
Larger contexts type more relations (Theorem 3.5(1)), so if c ≤ d and R is a
c-relation, then R is a d-relation.
The unique-output lemma (Lemma 3.7) #
The patch agrees with g at the blocks and wherever the inputs agree (Lemma 3.7,
transfer).
If f' agrees with f on the inputs and f R g, then R relates f' to the patch of
f' by g at the blocks (Lemma 3.7, existence).
The patch is the only output over f' agreeing with g on the blocks (Lemma 3.7,
uniqueness).
Composition and implication typing (Theorems 3.8–3.9) #
The composition of a c-relation and a d-relation is a c * d-relation (Theorem 3.8).
The DPL implication of a c-relation and a d-relation is a (c → d)-relation
(Theorem 3.9).
The DPL generators, typed #
The reset is typed at ⟨∅, {x}, ∅⟩, Definition 3.12's c_{∃v}, which reads nothing,
constrains no output, and blocks x.
Blocking x before a c-relation types ∃x φ (Definition 3.12's c_{∃v} • c_φ).
Truth depends on the inputs #
The domain of a c-relation depends only on the inputs (noted after Lemma 3.7).
A relation that blocks none of the inputs of another preserves the other's truth.
A relation that blocks none of the inputs of another commutes with its truth, so the sequence is true where both are.
An implication from a relation that blocks no input of the consequent is material.
The negation of a c-relation is a test at its inputs.
The disjunction of a c-relation and a d-relation is a test at their inputs.
The context of a formula (Definition 3.12, Theorem 3.13) #
The context of a formula (Definition 3.12). The paper's language has no disjunction and defines negation and the universal; they are typed here as the definitions would be.
Equations
- DPL.Formula.top.context = 1
- (DPL.Formula.rel R ts).context = DPL.Context.test (DPL.Formula.rel R ts).fv
- (DPL.Formula.equal t₁ t₂).context = DPL.Context.test (DPL.Formula.equal t₁ t₂).fv
- φ.neg.context = DPL.Context.test φ.context.I
- (φ.conj ψ).context = φ.context * ψ.context
- (φ.disj ψ).context = DPL.Context.test (φ.context.I ∪ ψ.context.I)
- (φ.imp ψ).context = φ.context.impl ψ.context
- (DPL.Formula.ex x_1 φ).context = DPL.Context.reset x_1 * φ.context
- (DPL.Formula.all x_1 φ).context = (DPL.Context.reset x_1).impl φ.context
Instances For
The interpretation of a formula is typed by its context (Theorem 3.13).
A scope-bound formula is true under the dynamic interpretation exactly where it is satisfied as a first-order formula ([GS91a]'s Fact 19).