Variable assignments #
A variable assignment maps variables to values. Three registers share this file: total assignments (Tarski-style, [HK98], [HMT71]), partial assignments (variables may be unvalued, [Spe25], [BK01]), and plural assignments (sets of partial assignments — the information states of plural dynamic semantics, [vdB96], [Bra08], [HD20]).
Main definitions #
Assignment E: total assignmentsℕ → E, on the Heim–Kratzer ℕ-register.PartialAssign Var D: partial assignmentsVar → Option D.PluralAssign Var D: sets of partial assignments, with the [Spe25] / [HD20] operatorsrestrict,singularAt,singular,sumDref.
Implementation notes #
PartialAssignis the decidable counterpart of mathlib's partial functionsVar →. D:Part-valued partiality would forfeitDecidableEqon assignments, whichFinset-state systems (QBSML) anddecide-checked studies need.- Update is mathlib's
Function.update;PartialAssign.updateonly fuses thesome(cf.Finsupp.update), and its lemmas are one-step consequences of theFunction.update_*laws. Definedness is(g x).isSome— there is no wrapper predicate. The Heim–Kratzer notationg[n ↦ x]for total update is declared inSemantics/Intensional/Variables.lean. - Use these names only for the variable-binding role — the state that
quantifiers
updateand free variables look up. Aℕ → Ethat is not variable-binding state (interpretation tables, lookup arrays) should stay a plain function type.
Total assignments #
Total variable assignment on the ℕ-register: instantiated at the
entity type for entity pronouns, at indices for situation pronouns, at
Time for temporal variables. Update is Function.update directly —
no parallel API.
Equations
- Assignment E = (ℕ → E)
Instances For
Partial assignments #
Partial assignment: g x = none means x is unvalued. Trivalent
systems read the gap as the third value; state-based systems
(QBSML.Index) carry one per world–assignment index.
Equations
- PartialAssign Var D = (Var → Option D)
Instances For
Update at x: Function.update with the value wrapped in some.
Equations
- g.update x d = Function.update g x (some d)
Instances For
Updating at x to its existing value is a no-op — the
partial-assignment face of Function.update_eq_self, for proofs that
recover the witness as (g x).get.
Plural assignments #
Plural assignment: a set of partial assignments, the plural
information state of [vdB96]-style dynamic semantics
(Plural CDRT, PPCDRT) and of [Spe25]'s static reuse. The full
Set API applies: ∅, Set.univ, {g}, ∪, ⊆,
Set.Nonempty, …
Equations
- PluralAssign Var D = Set (PartialAssign Var D)
Instances For
The assignments in G mapping x to a ([Spe25] §6.2:
G_{x=a}).
Equations
- G.restrict x a = {g : PartialAssign Var D | g ∈ G ∧ g x = some a}
Instances For
G assigns x uniquely to d: some assignment maps x to d, and
every assignment valuing x agrees ([Spe25] §6.2). Assignments
leaving x unvalued may coexist — only the valued rows must agree,
which is the reading Spector's static reuse needs.
Equations
- G.singularAt x d = ((∃ (g : PartialAssign Var D), g ∈ G ∧ g x = some d) ∧ ∀ (g : PartialAssign Var D), g ∈ G → (g x).isSome = true → g x = some d)
Instances For
G assigns x uniquely to some value — [Spe25]'s atomic(x).
Equations
- G.singular x = ∃ (d : D), G.singularAt x d
Instances For
The values x takes across G — [HD20]'s ∪u
operator.
Equations
- G.sumDref x = {d : D | ∃ (g : PartialAssign Var D), g ∈ G ∧ g x = some d}