Variable Assignments #
@cite{heim-kratzer-1998} @cite{henkin-monk-tarski-1971} @cite{spector-2025} @cite{beaver-krahmer-2001}
Tarski-style total assignments and their partial extension. The polymorphic substrate shared by extensional Heim-Kratzer composition, DPL-style register state, CDRT, Charlow continuations, and trivalent partial-valuation systems.
Assignment E := ℕ → E is pre-intensional — pure Tarski variable mapping —
so it lives at the top of Core rather than inside Core.Logic.Intensional.
The intensional substrate (Frame, SitAssignment F := Assignment F.Index,
DenotGS) builds on this in Core/Logic/Intensional/.
When to use Assignment E vs raw Nat → E #
A struct field, function parameter, or local definition should use
Assignment E (or PartialAssign E) precisely when its semantic role is
Tarski-style variable assignment / register state / discourse-referent
embedding — the same role that gets updated by quantifier binders and
looked-up by free variables.
It should not be Assignment E when the structural shape Nat → E
happens for an unrelated reason — e.g., model-theoretic name
interpretation functions (Name_M in Kamp & Reyle), arity-indexed
interpretation tables, lookup arrays, or any Nat → α that doesn't
participate in variable-binding semantics. Renaming those would conflate
distinct primitives. (KRModel.names : Nat → E in
Theories/Semantics/Dynamic/DRT/Basic.lean documents one such case.)
Out of scope #
- Discourse referents as named atomic symbols (Kamp & Reyle 1993 DRT proper).
The ℕ-indexed register encoding is the DPL/CDRT reading; faithful K&R
embeddings would need an opaque
DReftype. - File cards (Heim 1982 FCS). Heim's files carry an explicit domain
Dom(F) ⊆ ℕ—PartialAssigncovers the valuation side, but the domain-as-type-level commitment of FCS lives in the FCS study file. - Proof-relevant context (Bekki DTS, Asher TYS) — not a
Nat → α. - Continuation state (Heim file cards, sequence-of-binders update
semantics) — handled in the FCS / DPL study files. Continuation
environments (Barker, Shan, Charlow paycheck composition) DO use
Assignmentas the Reader environment; that case is in scope.
Variable assignment: a function from natural-number indices to values in
E. Instantiated at F.Entity for entity pronouns (Heim & Kratzer
1998), at F.Index for situation pronouns (Hanink 2021 / Bondarenko 2023),
at Time for temporal variables, and at any other carrier whenever a
framework needs Tarski-style variable interpretation.
Equations
- Core.Assignment E = (ℕ → E)
Instances For
Pointwise update g[n↦d]: set register n to d, leaving all other
registers fixed.
Equations
- g.update n d m = if m = n then d else g m
Instances For
Partial assignment: variables may be undefined (none).
Used in trivalent semantics (@cite{spector-2025}, @cite{beaver-krahmer-2001})
where g(x) = none means variable x is not valued. The trivalent
application rule that turns this into the third value # lives with
the predicate machinery in Theories/Semantics/Presupposition/, not here.
Equations
- Core.PartialAssign D = (ℕ → Option D)
Instances For
A partial assignment that values no variables.
Equations
- Core.PartialAssign.empty x✝ = none
Instances For
Update a partial assignment at index n.
Equations
- g.update n d m = if m = n then some d else g m
Instances For
Updating a partial assignment at n to its existing value is a no-op:
g.update n a = g whenever g n = some a. The partial-assignment analogue
of Assignment.update_self for total assignments above; needed by formalisations
that recover the witness as g(x).get (e.g., Mandelkern's bounded theory
§5.6 atomic bound-equivalence proofs).
Coerce a total assignment to a partial assignment (always valued).
Equations
- Core.PartialAssign.ofTotal g n = some (g n)
Instances For
Plural assignment: a set of atomic (partial) assignments.
Originates in plural dynamic semantics (@cite{van-den-berg-1996}, @cite{nouwen-2003}, @cite{brasoveanu-2008}). The plural information state is the basic carrier of Plural CDRT (Brasoveanu, Dotlačil) and its partial extension PPCDRT (Haug 2014, @cite{haug-dalrymple-2020}). Spector's static reuse (@cite{spector-2025}) is the trivalent point of this primitive: variables that are singular across the plural state behave classically; variables that are not are gappy.
Wrapped in a structure so the bespoke Membership instance is found
by typeclass search instead of mathlib's Set instances.
Consumers: Phenomena/Anaphora/Studies/Spector2025.lean (trivalent),
Theories/Semantics/Dynamic/PPCDRT/ (plural partial CDRT).
- pred : PartialAssign D → Prop
The membership predicate on atomic assignments.
Instances For
Equations
- Core.PluralAssign.instMembershipPartialAssign = { mem := fun (G : Core.PluralAssign D) (g : Core.PartialAssign D) => G.pred g }
Whether G contains at least one atomic assignment.
Named IsNonempty rather than Nonempty to avoid shadowing
_root_.Nonempty.
Equations
- G.IsNonempty = ∃ (g : Core.PartialAssign D), g ∈ G
Instances For
Restrict a plural assignment to atomic assignments mapping x to a.
Spector §6.2: G_{x=a} is the subset of G where g(x) = a.
Equations
- G.restrict x a = { pred := fun (g : Core.PartialAssign D) => g ∈ G ∧ g x = some a }
Instances For
Whether any atomic assignment in G is defined for x.
Equations
- G.defined x = ∃ (g : Core.PartialAssign D), g ∈ G ∧ (g x).isSome = true
Instances For
The universal plural assignment: contains every partial assignment. Spector §6: the starting context contains all pairs.
Equations
- Core.PluralAssign.null = { pred := fun (x : Core.PartialAssign D) => True }
Instances For
Build a plural assignment from a predicate.
Equations
- Core.PluralAssign.ofPred p = { pred := p }
Instances For
The singleton plural assignment containing exactly g. The minimal
plural state — used for the singleton-collapse bridges between PPCDRT
and the singular CDRT-style semantics.
Equations
- Core.PluralAssign.singleton g = { pred := fun (g' : Core.PartialAssign D) => g' = g }
Instances For
Witness-level singularity: G assigns x uniquely to d.
Spector §6.2: at least one atomic assignment maps x to d,
and all assignments in G that define x agree on d.
NOTE: this allows assignments where x is undefined to coexist
with assignments where x = d (only the defined rows are required
to agree). The all-defined reading would be stronger; the present
reading is the one Spector's static reuse of plural states needs.
Equations
- G.singularAt x d = ((∃ (g : Core.PartialAssign D), g ∈ G ∧ g x = some d) ∧ ∀ (g : Core.PartialAssign D), g ∈ G → (g x).isSome = true → g x = some d)
Instances For
singular G x ↔ there is some d such that G assigns x uniquely to it.
Spector's atomic(x) predicate; replaces U(x) from the simplified system.
Equations
- G.singular x = ∃ (d : D), G.singularAt x d
Instances For
Sum-of-values for dref n across the plural state. Spector §6.2 and
@cite{haug-dalrymple-2020}'s ∪u operator (paper §2.1, eq 8): the set
of values that n takes across all atomic assignments in G.
Equations
- G.sumDref n = {d : D | ∃ (g : Core.PartialAssign D), g ∈ G ∧ g n = some d}