Documentation

Linglib.Semantics.Dynamic.Connectives.CCP

Core Dynamic Semantics Infrastructure #

InfoStateOf P (sets of possibilities) and CCP P (context change potentials, the set-transformer view of dynamic meaning), shared by the PLA, DRT, DPL, and CDRT formalizations.

The relational Update S ([GS91], [Mus96]) of Connectives/Defs.lean is the primary dynamic type; CCP connects to it via lift R σ = { j | ∃ i ∈ σ, R i j } and lower φ i j = j ∈ φ {i}, which form a Galois connection. The IsDistributive CCPs — those that process elements independently — are exactly the image of lift; non-distributive operations (CCP.negTest, CCP.might, CCP.must) test the whole input state rather than filtering per-element.

@[reducible, inline]

An InfoState is a set of possibilities.

Different theories instantiate P differently:

  • PLA: Assignment × WitnessSeq
  • DRT: Assignment
  • Intensional: World × Assignment
Equations
Instances For
    @[reducible, inline]
    abbrev Semantics.Dynamic.Core.CCP (P : Type u_1) :
    Type u_1

    A Context Change Potential (CCP) is a function from states to states.

    This is the semantic type for dynamic meanings.

    Equations
    Instances For

      Identity CCP: leaves state unchanged

      Equations
      Instances For

        Absurd CCP: yields empty state

        Equations
        Instances For
          def Semantics.Dynamic.Core.CCP.seq {P : Type u_1} (u v : CCP P) :
          CCP P

          Sequential composition of CCPs

          Equations
          • u.seq v s = v (u s)
          Instances For
            def Semantics.Dynamic.Core.CCP.«term_;;_» :
            Lean.TrailingParserDescr
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              theorem Semantics.Dynamic.Core.CCP.seq_assoc {P : Type u_1} (u v w : CCP P) :
              (u.seq v).seq w = u.seq (v.seq w)
              theorem Semantics.Dynamic.Core.CCP.id_seq {P : Type u_1} (u : CCP P) :
              id.seq u = u
              theorem Semantics.Dynamic.Core.CCP.seq_id {P : Type u_1} (u : CCP P) :
              u.seq id = u
              @[implicit_reducible]

              CCPs form a monoid under sequential composition. Scoped because CCP P is an abbreviation for Set P → Set P: a global instance would attach */1 to a bare function type for every importer. Activate with open scoped Semantics.Dynamic.Core.CCP.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For

                seq_absurd: anything followed by absurd is absurd

                def Semantics.Dynamic.Core.CCP.neg {P : Type u_1} (φ : CCP P) :
                CCP P

                Dynamic negation: complement within the input state.

                This is the standard dynamic negation of [Hei82], [Vel96]: ¬φ(s) = s \ φ(s). Worlds survive iff they do not survive φ. Does not validate DNE on non-eliminative updates. For the whole-state consistency test (must-not), see negTest.

                Equations
                • φ.neg s = s \ φ s
                Instances For
                  noncomputable def Semantics.Dynamic.Core.CCP.negTest {P : Type u_1} (φ : CCP P) :
                  CCP P

                  Test-based negation: passes (returns input) iff φ yields ∅.

                  A whole-state consistency test ("must-not"), NOT [Hei82]'s or [Vel96]'s negation (that is neg, set difference). The two coincide only when φ s = ∅ or φ s = s — see Studies/Beaver2001/ABLE.lean for the proven divergence.

                  Equations
                  • φ.negTest s = if Set.Nonempty (φ s) then else s
                  Instances For
                    noncomputable def Semantics.Dynamic.Core.CCP.might {P : Type u_1} (φ : CCP P) :
                    CCP P

                    Compatibility test ("might"): passes iff φ yields a nonempty result.

                    might(φ)(s) = s if φ(s) ≠ ∅, else ∅

                    Equations
                    • φ.might s = if Set.Nonempty (φ s) then s else
                    Instances For
                      noncomputable def Semantics.Dynamic.Core.CCP.must {P : Type u_1} (φ : CCP P) :
                      CCP P

                      Full support test ("must"): passes iff φ returns input unchanged.

                      must(φ)(s) = s if φ(s) = s, else ∅

                      Equations
                      • φ.must s = if φ s = s then s else
                      Instances For
                        noncomputable def Semantics.Dynamic.Core.CCP.impl {P : Type u_1} (φ ψ : CCP P) :
                        CCP P

                        Dynamic implication test: passes iff output of φ is preserved by ψ.

                        impl(φ,ψ)(s) = s if φ(s) ⊆ ψ(φ(s)), else ∅

                        Equations
                        • φ.impl ψ s = if φ s ψ (φ s) then s else
                        Instances For
                          def Semantics.Dynamic.Core.CCP.disj {P : Type u_1} (φ ψ : CCP P) :
                          CCP P

                          Dynamic disjunction via De Morgan: φ ∨ ψ = ¬(¬φ ; ¬ψ).

                          For eliminative updates this unfolds to φ(s) ∪ ψ(s \ φ(s)): the second disjunct is evaluated in the input updated with the negation of the first — the local-context clause of the satisfaction literature ([Bea01]; [Hei83] itself gives CCPs only for not/and/if).

                          Equations
                          Instances For
                            def Semantics.Dynamic.Core.CCP.entails {P : Type u_1} (φ ψ : CCP P) :

                            Dynamic entailment: φ entails ψ iff ψ adds no information after φ.

                            Equations
                            Instances For

                              Entailment is reflexive

                              An update is eliminative if it never adds possibilities.

                              This is the fundamental property of dynamic semantics: information only grows (possibilities only decrease).

                              Equations
                              Instances For

                                Identity is eliminative

                                theorem Semantics.Dynamic.Core.eliminative_seq {P : Type u_1} (u v : CCP P) (hu : IsEliminative u) (hv : IsEliminative v) :

                                Sequential composition preserves eliminativity

                                An update is expansive if it never removes possibilities.

                                Expansive operations include discourse referent introduction (DRT/DPL), modal horizon expansion ([Kir24]), and accommodation. These are the dual of eliminative operations: where eliminative updates can only shrink the state, expansive updates can only grow it.

                                Equations
                                Instances For

                                  Identity is expansive

                                  theorem Semantics.Dynamic.Core.expansive_seq {P : Type u_1} (u v : CCP P) (hu : IsExpansive u) (hv : IsExpansive v) :

                                  Sequential composition preserves expansiveness

                                  theorem Semantics.Dynamic.Core.eliminative_expansive_id {P : Type u_1} (u : CCP P) (he : IsEliminative u) (hx : IsExpansive u) (s : InfoStateOf P) :
                                  u s = s

                                  A CCP that is both eliminative and expansive is the identity on every input.

                                  theorem Semantics.Dynamic.Core.isEliminative_iff_le_id {P : Type u_1} (u : CCP P) :
                                  IsEliminative u ∀ (s : InfoStateOf P), u s s

                                  Eliminative ↔ antitone on the identity: u s ≤ s for all s.

                                  theorem Semantics.Dynamic.Core.isExpansive_iff_id_le {P : Type u_1} (u : CCP P) :
                                  IsExpansive u ∀ (s : InfoStateOf P), s u s

                                  Expansive ↔ identity below: s ≤ u s for all s.

                                  theorem Semantics.Dynamic.Core.IsEliminative.le_id {P : Type u_1} {u : CCP P} (h : IsEliminative u) (s : InfoStateOf P) :
                                  u s s

                                  Eliminative updates are antitone at the identity: u ≤ id in the pointwise order.

                                  theorem Semantics.Dynamic.Core.IsExpansive.id_le {P : Type u_1} {u : CCP P} (h : IsExpansive u) (s : InfoStateOf P) :
                                  s u s

                                  Expansive updates satisfy id ≤ u in the pointwise order.

                                  A test is a CCP that either passes (returns input) or fails (returns ∅).

                                  Tests don't change information - they check compatibility. Examples: might, must, presupposition triggers.

                                  Equations
                                  Instances For

                                    Tests are eliminative

                                    theorem Semantics.Dynamic.Core.CCP.impl_isTest {P : Type u_1} (φ ψ : CCP P) :
                                    IsTest (φ.impl ψ)

                                    Duality for the test pair: might φ = must-not (must-not φ). The analogous identity fails for set-difference neg (DNE holds instead on eliminative updates).

                                    def Semantics.Dynamic.Core.supportOf {P : Type u_1} {φ : Type u_2} (sat : PφProp) (s : InfoStateOf P) (ψ : φ) :

                                    Support relation: s supports ψ if all possibilities in s satisfy ψ.

                                    This is the fundamental entailment relation of dynamic semantics.

                                    Equations
                                    Instances For
                                      def Semantics.Dynamic.Core.contentOf {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :

                                      Content of a formula: all possibilities satisfying it.

                                      Equations
                                      Instances For
                                        theorem Semantics.Dynamic.Core.support_iff_subset_content {P : Type u_1} {φ : Type u_2} (sat : PφProp) (s : InfoStateOf P) (ψ : φ) :
                                        supportOf sat s ψ s contentOf sat ψ

                                        Galois connection: s ⊆ content ψ ↔ s supports ψ

                                        This is the fundamental duality of dynamic semantics.

                                        theorem Semantics.Dynamic.Core.support_mono {P : Type u_1} {φ : Type u_2} (sat : PφProp) (s t : InfoStateOf P) (ψ : φ) (h : t s) (hs : supportOf sat s ψ) :
                                        supportOf sat t ψ

                                        Support is downward closed: smaller states support more.

                                        theorem Semantics.Dynamic.Core.empty_supports {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :
                                        supportOf sat ψ

                                        Empty state supports everything (vacuously).

                                        theorem Semantics.Dynamic.Core.content_mono {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ₁ ψ₂ : φ) (h : ∀ (p : P), sat p ψ₁sat p ψ₂) :
                                        contentOf sat ψ₁ contentOf sat ψ₂

                                        Content is antitone in entailment.

                                        theorem Semantics.Dynamic.Core.sep_monotone {P : Type u_1} (pred : PProp) :
                                        Monotone fun (s : Set P) => {p : P | p s pred p}

                                        Filtering a set by a predicate is monotone. This is the shared foundation for monotonicity of updateFromSat, atom, pred1, pred2, etc.

                                        theorem Semantics.Dynamic.Core.sep_eliminative {P : Type u_1} (pred : PProp) :
                                        IsEliminative fun (s : Set P) => {p : P | p s pred p}

                                        Filtering a set by a predicate is eliminative.

                                        def Semantics.Dynamic.Core.updateFromSat {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :
                                        CCP P

                                        The standard update construction: filter by satisfaction.

                                        This is how PLA, DRT, DPL all define updates.

                                        Equations
                                        Instances For
                                          theorem Semantics.Dynamic.Core.updateFromSat_eliminative {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :

                                          Standard updates are eliminative

                                          theorem Semantics.Dynamic.Core.mem_updateFromSat {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) (s : InfoStateOf P) (p : P) :
                                          p updateFromSat sat ψ s p s sat p ψ

                                          Standard update membership

                                          theorem Semantics.Dynamic.Core.updateFromSat_eq_inter_content {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) (s : InfoStateOf P) :
                                          updateFromSat sat ψ s = s contentOf sat ψ

                                          Update equals intersection with content

                                          theorem Semantics.Dynamic.Core.support_iff_update_eq {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) (s : InfoStateOf P) :
                                          supportOf sat s ψ updateFromSat sat ψ s = s

                                          Support-Update equivalence

                                          def Semantics.Dynamic.Core.dynamicEntailsOf {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ₁ ψ₂ : φ) :

                                          Dynamic entailment: φ dynamically entails ψ if updating with φ always yields a state that supports ψ.

                                          Equations
                                          Instances For
                                            theorem Semantics.Dynamic.Core.dynamicEntails_refl {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :

                                            Dynamic entailment is reflexive

                                            theorem Semantics.Dynamic.Core.dynamicEntails_trans {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ₁ ψ₂ ψ₃ : φ) (h1 : dynamicEntailsOf sat ψ₁ ψ₂) (h2 : dynamicEntailsOf sat ψ₂ ψ₃) :
                                            dynamicEntailsOf sat ψ₁ ψ₃

                                            Dynamic entailment is transitive

                                            theorem Semantics.Dynamic.Core.updateFromSat_monotone {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :
                                            Monotone (updateFromSat sat ψ)

                                            updateFromSat is monotone in the state argument: larger input states yield larger output states. Uses mathlib's Monotone (i.e., s ≤ t → f s ≤ f t where on Set is ).

                                            structure Semantics.Dynamic.Core.Possibility (W : Type u_1) (E : Type u_2) :
                                            Type (max u_1 u_2)

                                            A possibility: world paired with variable assignment.

                                            This is the concrete state type for world-sensitive dynamic semantics (DPL, DRT, CDRT, PLA). The assignment field uses Assignment E from the CCP infrastructure.

                                            Instances For
                                              def Semantics.Dynamic.Core.Possibility.agreeOn {W : Type u_1} {E : Type u_2} (p q : Possibility W E) (vars : Set ) :

                                              Two possibilities agree on all variables in a set.

                                              Equations
                                              Instances For

                                                Same world, possibly different assignment.

                                                Equations
                                                Instances For
                                                  def Semantics.Dynamic.Core.Possibility.extend {W : Type u_1} {E : Type u_2} (p : Possibility W E) (x : ) (e : E) :

                                                  Extend an assignment at a single variable, using Function.update.

                                                  Equations
                                                  Instances For
                                                    @[simp]
                                                    theorem Semantics.Dynamic.Core.Possibility.extend_at {W : Type u_1} {E : Type u_2} (p : Possibility W E) (x : ) (e : E) :
                                                    (p.extend x e).assignment x = e
                                                    @[simp]
                                                    theorem Semantics.Dynamic.Core.Possibility.extend_other {W : Type u_1} {E : Type u_2} (p : Possibility W E) (x y : ) (e : E) (h : y x) :
                                                    (p.extend x e).assignment y = p.assignment y
                                                    @[simp]
                                                    theorem Semantics.Dynamic.Core.Possibility.extend_world {W : Type u_1} {E : Type u_2} (p : Possibility W E) (x : ) (e : E) :
                                                    (p.extend x e).world = p.world
                                                    @[reducible, inline]
                                                    abbrev Semantics.Dynamic.Core.InfoState (W : Type u_1) (E : Type u_2) :
                                                    Type (max u_2 u_1)

                                                    Information state: set of possibilities.

                                                    This is InfoStateOf (Possibility W E) — a specialization of the generic InfoStateOf to world-assignment possibilities.

                                                    Equations
                                                    Instances For

                                                      The trivial state: all possibilities.

                                                      Equations
                                                      Instances For

                                                        The absurd state: no possibilities.

                                                        Equations
                                                        Instances For

                                                          State is consistent (non-empty).

                                                          Equations
                                                          Instances For

                                                            State is trivial (all possibilities).

                                                            Equations
                                                            Instances For
                                                              def Semantics.Dynamic.Core.InfoState.definedAt {W : Type u_1} {E : Type u_2} (s : InfoState W E) (x : ) :

                                                              Variable x is defined in state s iff all possibilities agree on x's value.

                                                              Equations
                                                              Instances For
                                                                def Semantics.Dynamic.Core.InfoState.definedVars {W : Type u_1} {E : Type u_2} (s : InfoState W E) :
                                                                Set

                                                                The set of defined variables in a state.

                                                                Equations
                                                                Instances For
                                                                  def Semantics.Dynamic.Core.InfoState.novelAt {W : Type u_1} {E : Type u_2} (s : InfoState W E) (x : ) :

                                                                  Variable x is novel in state s iff x is not defined.

                                                                  Equations
                                                                  Instances For
                                                                    theorem Semantics.Dynamic.Core.InfoState.novelAt_iff_disagree {W : Type u_1} {E : Type u_2} (s : InfoState W E) (x : ) (hs : s.consistent) :
                                                                    s.novelAt x (p : Possibility W E), (q : Possibility W E), p s q s p.assignment x q.assignment x

                                                                    In a consistent state, novel means assignments actually disagree.

                                                                    def Semantics.Dynamic.Core.InfoState.worlds {W : Type u_1} {E : Type u_2} (s : InfoState W E) :
                                                                    Set W

                                                                    Project to the set of worlds in the state.

                                                                    Equations
                                                                    Instances For
                                                                      structure Semantics.Dynamic.Core.Context (W : Type u_1) (E : Type u_2) :
                                                                      Type (max u_1 u_2)

                                                                      Context extends InfoState with metadata.

                                                                      • state : InfoState W E
                                                                      • definedVars : Set
                                                                      • domain : Set E
                                                                      Instances For

                                                                        Empty context with all possibilities.

                                                                        Equations
                                                                        Instances For

                                                                          Context is consistent iff its state is.

                                                                          Equations
                                                                          Instances For
                                                                            def Semantics.Dynamic.Core.Context.introduce {W : Type u_1} {E : Type u_2} (c : Context W E) (x : ) :

                                                                            Mark a variable as defined.

                                                                            Equations
                                                                            Instances For
                                                                              def Semantics.Dynamic.Core.Context.narrow {W : Type u_1} {E : Type u_2} (c : Context W E) (s : InfoState W E) :

                                                                              Narrow the state.

                                                                              Equations
                                                                              Instances For

                                                                                State subsistence: s subsists in s' iff every possibility in s has a descendant in s'.

                                                                                Equations
                                                                                • One or more equations did not get rendered due to their size.
                                                                                Instances For
                                                                                  def Semantics.Dynamic.Core.«term_⪯_» :
                                                                                  Lean.TrailingParserDescr
                                                                                  Equations
                                                                                  • One or more equations did not get rendered due to their size.
                                                                                  Instances For

                                                                                    Subsistence is reflexive.

                                                                                    theorem Semantics.Dynamic.Core.InfoState.subset_subsistsIn {W : Type u_1} {E : Type u_2} {s s' : InfoState W E} (h : s s') :

                                                                                    Subset implies subsistence.

                                                                                    def Semantics.Dynamic.Core.InfoState.supports {W : Type u_1} {E : Type u_2} (s : InfoState W E) (φ : WBool) :

                                                                                    State s supports proposition φ iff φ holds at all worlds in s.

                                                                                    Equations
                                                                                    Instances For
                                                                                      Equations
                                                                                      • One or more equations did not get rendered due to their size.
                                                                                      Instances For
                                                                                        theorem Semantics.Dynamic.Core.InfoState.supports_mono {W : Type u_1} {E : Type u_2} {s s' : InfoState W E} (h : s s') (φ : WBool) (hsupp : s'.supports φ) :

                                                                                        Support is preserved by subset.

                                                                                        @[reducible, inline]
                                                                                        abbrev Semantics.Dynamic.Core.State (W : Type u_1) (E : Type u_2) :
                                                                                        Type (max u_2 u_1)

                                                                                        State: set of world-assignment pairs.

                                                                                        Isomorphic to InfoState W E but uses a flat product instead of the Possibility structure. Prefer InfoState for new code.

                                                                                        Equations
                                                                                        Instances For
                                                                                          @[reducible, inline]
                                                                                          abbrev Semantics.Dynamic.Core.StateCCP (W : Type u_1) (E : Type u_2) :
                                                                                          Type (max u_2 u_1)

                                                                                          State-level CCP: context change potential over world-assignment states. Definitionally equal to CCP (W × Assignment E), so all CCP infrastructure (monoid, negation, might, tests, entailment, Galois connection) applies.

                                                                                          Equations
                                                                                          Instances For

                                                                                            A CCP is distributive when it processes each element of the input independently: φ(s) = ⋃_{i∈s} φ({i}).

                                                                                            Equations
                                                                                            Instances For
                                                                                              theorem Semantics.Dynamic.Core.updateFromSat_isDistributive {P : Type u_1} {φ : Type u_2} (sat : PφProp) (ψ : φ) :

                                                                                              updateFromSat is always distributive: it filters per-element.

                                                                                              CCP.might is not distributive: the whole-context test can pass while individual-element tests fail.

                                                                                              Witness: P = Bool, φ keeps only true. might φ {true, false} = {true, false} (whole-context test passes), but per-singleton: might φ {false} = ∅ (test fails on false-only context). So false is in the whole-context result but not the distributive union.

                                                                                              The relational type Update S = S → S → Prop from DynProp is the primary dynamic semantic type. Every Update gives rise to a distributive CCP via the relational image (lift), and every distributive CCP arises this way (lower). The round-trip is the identity in both directions (for distributive CCPs).

                                                                                              Non-distributive CCP operations (negTest, might, must) test the whole input state and have no direct Update counterpart — they are genuine additions of the set-transformer perspective.

                                                                                              Lift a relational Update meaning to a CCP (set transformer).

                                                                                              This is the relational image: given input state σ, collect all outputs reachable from any element of σ. The resulting CCP is always distributive (lift_isDistributive).

                                                                                              Equations
                                                                                              Instances For

                                                                                                Lower a CCP to a relational Update meaning.

                                                                                                lower φ i j holds iff j is in the output of the singleton {i}. This is the inverse of lift for distributive CCPs.

                                                                                                Equations
                                                                                                Instances For
                                                                                                  theorem Semantics.Dynamic.Core.lift_dseq {S : Type u_1} (R₁ R₂ : DynProp.Update S) :
                                                                                                  lift (R₁ R₂) = (lift R₁).seq (lift R₂)

                                                                                                  Lifting preserves sequential composition: lift (R₁ ⨟ R₂) = lift R₁ ;; lift R₂.

                                                                                                  theorem Semantics.Dynamic.Core.lift_test {S : Type u_1} (C : DynProp.Condition S) :
                                                                                                  lift (DynProp.test C) = fun (σ : InfoStateOf S) => {i : S | i σ C i}

                                                                                                  Lifting a test produces a per-element filter: lift (test C) σ = { i ∈ σ | C i }.

                                                                                                  Lifted CCPs are always distributive.

                                                                                                  Round-trip: lower (lift R) = R. The relational type loses no information when lifted and lowered.

                                                                                                  theorem Semantics.Dynamic.Core.lift_lower {S : Type u_1} (φ : CCP S) (hd : IsDistributive φ) :
                                                                                                  lift (lower φ) = φ

                                                                                                  Round-trip: lift (lower φ) = φ for distributive CCPs. Distributive CCPs are exactly the relational images.

                                                                                                  lift (test C) is eliminative: it only removes elements.

                                                                                                  theorem Semantics.Dynamic.Core.updateFromSat_eq_lift_test {P : Type u_2} {φ : Type u_3} (sat : PφProp) (ψ : φ) :
                                                                                                  updateFromSat sat ψ = lift (DynProp.test fun (p : P) => sat p ψ)

                                                                                                  updateFromSat is the lifting of test applied to a satisfaction relation. This connects the CCP-native updateFromSat to the primary relational algebra.