Documentation

Linglib.Theories.Semantics.Dynamic.Core.CCP

@[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
          Instances For
            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

              CCPs form a monoid under sequential composition

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

              seq_absurd: anything followed by absurd is absurd

              def Semantics.Dynamic.Core.CCP.conj {P : Type u_1} (u v : CCP P) :
              CCP P

              Dynamic conjunction: alias for sequential composition

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

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

                This is the standard dynamic negation of @cite{heim-1982}, @cite{veltman-1996}: ¬φ(s) = s if φ(s) = ∅, else ∅. Does not validate DNE.

                Equations
                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
                  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
                    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
                      Instances For
                        noncomputable def Semantics.Dynamic.Core.CCP.disj {P : Type u_1} (φ ψ : CCP P) :
                        CCP P

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

                        @cite{heim-1983}: the local context for the second disjunct is the global context updated with ¬φ. This yields the standard Karttunen projection pattern for inclusive disjunction.

                        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 (@cite{kirkpatrick-2024}), 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.

                                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: might φ = ¬(¬φ)

                                  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.

                                      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) (ψ : φ) (s t : InfoStateOf P) (h : s t) :
                                          updateFromSat sat ψ s updateFromSat sat ψ t

                                          Update is monotone: larger input states yield larger output states.

                                          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 Assignment.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) :
                                                  @[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

                                                              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

                                                                  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
                                                                    def Semantics.Dynamic.Core.InfoState.filterWorlds {W : Type u_1} {E : Type u_2} (s : InfoState W E) (pred : WBool) :

                                                                    Filter state by a world predicate.

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

                                                                      Filter state by an assignment predicate.

                                                                      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.

                                                                        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
                                                                                    Equations
                                                                                    • One or more equations did not get rendered due to their size.
                                                                                    Instances For
                                                                                      theorem Semantics.Dynamic.Core.InfoState.subsistsIn_refl {W : Type u_1} {E : Type u_2} (s : InfoState W E) :
                                                                                      s s

                                                                                      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') :
                                                                                      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' φ) :
                                                                                          s φ

                                                                                          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, neg, 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 DRS S = S → S → Prop from DynProp is the primary dynamic semantic type. Every DRS 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 (neg, might, must) test the whole input state and have no direct DRS counterpart — they are genuine additions of the set-transformer perspective.

                                                                                                Lift a relational DRS 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 DRS 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.DRS 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 [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 [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.