Structural operations on DRSs #
This file develops the structural theory of the DRSs of DRS/Defs.lean, namely the renaming of
discourse referents, the merge algebra, the transport of the extension relation along renaming,
and occurring and free referents. Renaming along a bijection gives Kamp and Reyle's alphabetic
variants (the prose preceding Def. 1.4.8).
Main declarations #
DRS.map: renaming alongf : V → W, functorial.DRS.varFinset,DRS.freeVarFinset: occurring and free referents.DRS.IsProper: no free referent (Def. 1.4.2–1.4.3); decidable.DRS.ReuseFreeAt: no referent declared twice along a nesting path.
Main statements #
DRS.isProper_merge: merging a proper DRS with an increment whose free referents it declares is proper.
Implementation notes #
Renaming, occurring and free referents, and reuse-freeness are each three mutually recursive
functions, on DRSs, conditions and condition lists, by structural recursion through the
nesting, so the kernel evaluates them and decide settles them on concrete DRSs.
References #
Renaming #
K.map f renames the discourse referents of K along f.
Equations
- DRT.DRS.map f { referents := U, conditions := cs } = { referents := Finset.image f U, conditions := DRT.Condition.mapList f cs }
Instances For
c.map f renames the discourse referents of c along f.
Equations
- DRT.Condition.map f (DRT.Condition.atom a) = DRT.Condition.atom (FirstOrder.Language.Atom.map f a)
- DRT.Condition.map f (DRT.Condition.eq a b) = DRT.Condition.eq (f a) (f b)
- DRT.Condition.map f (DRT.Condition.neg K) = DRT.Condition.neg (DRT.DRS.map f K)
- DRT.Condition.map f (DRT.Condition.imp a c) = DRT.Condition.imp (DRT.DRS.map f a) (DRT.DRS.map f c)
- DRT.Condition.map f (DRT.Condition.dis l r) = DRT.Condition.dis (DRT.DRS.map f l) (DRT.DRS.map f r)
Instances For
Condition.mapList f cs renames each condition of cs along f.
Equations
- DRT.Condition.mapList f [] = []
- DRT.Condition.mapList f (c :: cs) = DRT.Condition.map f c :: DRT.Condition.mapList f cs
Instances For
Renaming a condition along the identity is the identity.
Renaming and extension #
Extension along a renamed DRS is extension of the precompositions.
The extensions of f at K.map e are the extensions of f ∘ e at K,
via precomposition.
The ∀ analogue of DRS.exists_extends_map.
Renaming a DRS along the identity is the identity.
Occurring and free referents #
The occurring referents of a DRS are its universe and those of its conditions.
Equations
- DRT.DRS.varFinset { referents := U, conditions := cs } = U ∪ DRT.Condition.varFinsetL cs
Instances For
Occurring referents (free or bound) in a condition, as a Finset — the DRS
analogue of mathlib's Term.varFinset.
Equations
- (DRT.Condition.atom a).varFinset = Finset.image a.args Finset.univ
- (DRT.Condition.eq a b).varFinset = {a, b}
- (DRT.Condition.neg K).varFinset = DRT.DRS.varFinset K
- (DRT.Condition.imp a c).varFinset = DRT.DRS.varFinset a ∪ DRT.DRS.varFinset c
- (DRT.Condition.dis l r).varFinset = DRT.DRS.varFinset l ∪ DRT.DRS.varFinset r
Instances For
Occurring referents in a list of conditions.
Equations
- DRT.Condition.varFinsetL [] = ∅
- DRT.Condition.varFinsetL (c :: cs) = c.varFinset ∪ DRT.Condition.varFinsetL cs
Instances For
The free discourse referents of a DRS occur in its conditions and are bound neither by its
universe nor by an ancestor reachable "left and up" (the antecedent of a ⇒ threads its
referents into the consequent). K.freeVarFinset ⊆ b says every referent of K is bound in
context b.
Equations
- DRT.DRS.freeVarFinset { referents := U, conditions := cs } = DRT.Condition.freeVarFinsetL cs \ U
Instances For
The free discourse referents of a condition (Def. 1.4.2); the consequent of a ⇒ also has
the antecedent's universe bound.
Equations
- (DRT.Condition.atom a).freeVarFinset = Finset.image a.args Finset.univ
- (DRT.Condition.eq a b).freeVarFinset = {a, b}
- (DRT.Condition.neg K).freeVarFinset = DRT.DRS.freeVarFinset K
- (DRT.Condition.imp a c).freeVarFinset = DRT.DRS.freeVarFinset a ∪ DRT.DRS.freeVarFinset c \ a.referents
- (DRT.Condition.dis l r).freeVarFinset = DRT.DRS.freeVarFinset l ∪ DRT.DRS.freeVarFinset r
Instances For
Free referents of a list of conditions.
Equations
- DRT.Condition.freeVarFinsetL [] = ∅
- DRT.Condition.freeVarFinsetL (c :: cs) = c.freeVarFinset ∪ DRT.Condition.freeVarFinsetL cs
Instances For
A condition's occurring referents are among its list's.
A condition's free referents are among its list's.
A DRS's conditions' occurring referents are among the DRS's.
A box's free referents are supplied by X iff its conditions' are supplied by the
grown base, the characteristic form of the referential presupposition.
Free referents of a condition occur.
Free referents occur.
The list analogue of Condition.freeVarFinset_subset_varFinset.
Merge algebra #
A merge's free referents are supplied by X when the context's are and the increment's
are supplied by the grown base.
A DRS is proper iff it has no free discourse referent (Def. 1.4.2–1.4.3).
Equations
- K.IsProper = (K.freeVarFinset = ∅)
Instances For
Equations
- K.instDecidableIsProper = decidable_of_iff (K.freeVarFinset = ∅) ⋯
Merging preserves properness when the increment's free referents are supplied by the context DRS's universe.
Reuse-freeness #
No discourse referent is declared twice along a nesting path: each universe is
fresh for the ambient declarations, threaded through sub-boxes the way
verification threads the base (the antecedent of a ⇒ feeds its referents
into the consequent). This is the hypothesis under which the total
agree-off-universe semantics and the persistence semantics coincide
(DRS.trueRel_iff_toRelAt in DRS/Indexed.lean).
A DRS is reuse-free at ambient declarations X when its universe avoids X and its
conditions are reuse-free at the grown set.
Equations
- DRT.DRS.ReuseFreeAt X { referents := U, conditions := cs } = (Disjoint X U ∧ DRT.Condition.ReuseFreeAllAt (X ∪ U) cs)
Instances For
A condition is reuse-free at ambient declarations X when each sub-box is, the
consequent of a ⇒ at the declarations grown by the antecedent's universe.
Equations
- DRT.Condition.ReuseFreeAt X (DRT.Condition.atom a) = True
- DRT.Condition.ReuseFreeAt X (DRT.Condition.eq a b) = True
- DRT.Condition.ReuseFreeAt X (DRT.Condition.neg K) = DRT.DRS.ReuseFreeAt X K
- DRT.Condition.ReuseFreeAt X (DRT.Condition.imp a c) = (DRT.DRS.ReuseFreeAt X a ∧ DRT.DRS.ReuseFreeAt (X ∪ a.referents) c)
- DRT.Condition.ReuseFreeAt X (DRT.Condition.dis l r) = (DRT.DRS.ReuseFreeAt X l ∧ DRT.DRS.ReuseFreeAt X r)
Instances For
Every condition of the list is reuse-free at X.
Equations
- DRT.Condition.ReuseFreeAllAt X [] = True
- DRT.Condition.ReuseFreeAllAt X (c :: cs) = (DRT.Condition.ReuseFreeAt X c ∧ DRT.Condition.ReuseFreeAllAt X cs)
Instances For
Reuse-freeness of a DRS is decidable.
Equations
- DRT.DRS.decidableReuseFreeAt X { referents := U, conditions := cs } = instDecidableAnd
Reuse-freeness of a condition is decidable.
Equations
- DRT.Condition.decidableReuseFreeAt X (DRT.Condition.atom a) = instDecidableTrue
- DRT.Condition.decidableReuseFreeAt X (DRT.Condition.eq a b) = instDecidableTrue
- DRT.Condition.decidableReuseFreeAt X (DRT.Condition.neg K) = DRT.DRS.decidableReuseFreeAt X K
- DRT.Condition.decidableReuseFreeAt X (DRT.Condition.imp a c) = instDecidableAnd
- DRT.Condition.decidableReuseFreeAt X (DRT.Condition.dis l r) = instDecidableAnd
Reuse-freeness of a list of conditions is decidable.
Equations
- DRT.Condition.decidableReuseFreeAllAt X [] = instDecidableTrue
- DRT.Condition.decidableReuseFreeAllAt X (c :: cs) = instDecidableAnd