Documentation

Linglib.Theories.Semantics.Conditionals.Counterfactual

def Semantics.Conditionals.Counterfactual.closestWorlds {W : Type u_1} (sim : SimilarityOrdering W) (domain : Set W) (w : W) (A : Set W) :
Set W

The set of closest A-worlds to w according to a similarity ordering.

In @cite{lewis-1973}'s notation: min_{≤_w}(A) = {w' ∈ A : ¬∃w'' ∈ A. w'' <_w w'}

Equations
Instances For
    def Semantics.Conditionals.Counterfactual.closestWorldsB {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (w : W) (A : List W) :

    Computable version for finite world spaces.

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

      Universal Theory #

      @cite{ramotowska-santorio-2025}

      The standard possible-worlds analysis: counterfactuals universally quantify over the closest antecedent-worlds.

      "If A were, B would" is true at w iff every closest A-world satisfies B.

      This predicts:

      def Semantics.Conditionals.Counterfactual.universalCounterfactual {W : Type u_1} (sim : SimilarityOrdering W) (domain : Set W) (A B : WProp) :
      WProp

      Universal counterfactual semantics (@cite{lewis-1973}/Kratzer).

      True at w iff all closest A-worlds satisfy B.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        def Semantics.Conditionals.Counterfactual.universalCounterfactualB {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) :
        WBool

        Decidable version.

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

          Selectional Theory #

          Stalnaker's approach with supervaluation over ties:

          1. A selection function picks THE closest antecedent-world
          2. When multiple worlds are equally close (ties), supervaluate over all choices

          Three-valued semantics:

          This predicts:

          def Semantics.Conditionals.Counterfactual.selectionalCounterfactual {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) :

          Selectional counterfactual semantics (Stalnaker + supervaluation).

          Returns a three-valued truth value based on agreement across selection functions.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Semantics.Conditionals.Counterfactual.cem_selectional {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) :
            have φ := selectionalCounterfactual closer domain A B w; have ψ := selectionalCounterfactual closer domain A (fun (x : W) => !B x) w; φ.join ψ Core.Duality.Truth3.false

            Conditional Excluded Middle (CEM) holds for selectional semantics.

            (A □→ B) ∨ (A □→ ¬B) is always true or gap, never false.

            Proof sketch:

            1. Empty closest: both vacuously true → or = true
            2. All B: φ = true → or = true
            3. All ¬B: ψ = true → or = true
            4. Mixed: both gap → or = gap

            Homogeneity Theory #

            Universal quantification PLUS a homogeneity presupposition:

            When the presupposition fails (mixed closest worlds), the sentence is neither true nor false (presupposition failure).

            This predicts:

            Presupposition status.

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

                Result of evaluating a sentence with presuppositions.

                Instances For
                  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
                      def Semantics.Conditionals.Counterfactual.homogeneityCounterfactual {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) :

                      Homogeneity counterfactual semantics.

                      Presupposes that all closest A-worlds agree on B.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Semantics.Conditionals.Counterfactual.presup_preserved_homogeneity {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) (h : (homogeneityCounterfactual closer domain A B w).presupposition = PresupStatus.satisfied) :
                        (homogeneityCounterfactual closer domain A (fun (x : W) => !B x) w).presupposition = PresupStatus.satisfied

                        Presupposition Preservation for homogeneity semantics.

                        If the presupposition is satisfied for (A □→ B), it's also satisfied for (A □→ ¬B). This is because homogeneity for B (all true or all false) implies homogeneity for ¬B.

                        theorem Semantics.Conditionals.Counterfactual.negation_swap_homogeneity_nonvacuous {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) (h_presup : (homogeneityCounterfactual closer domain A B w).presupposition = PresupStatus.satisfied) (h_nonvac : (closestWorldsB closer domain w (List.filter A domain)).length > 0) :
                        Option.map (fun (x : Bool) => !x) (homogeneityCounterfactual closer domain A B w).assertion = (homogeneityCounterfactual closer domain A (fun (x : W) => !B x) w).assertion

                        Negation Swap holds for homogeneity semantics in the non-vacuous case.

                        When closest worlds are non-empty and presupposition is satisfied: assertion(A □→ B).map (¬·) = assertion(A □→ ¬B)

                        Projection Duality: Why Strength Matters #

                        The deeper insight behind Ramotowska et al.'s findings is that quantifier strength corresponds to a fundamental duality in how semantic values project through operators:

                        Universal-like operators (every, no, □, ∧):

                        Existential-like operators (some, not-every, ◇, ∨):

                        This duality manifests across natural language semantics:

                        DomainUniversal-likeExistential-like
                        Quantified counterfactualsReject on mixedAccept on mixed
                        Presupposition projectionFiltering (universal)Existential accomm.
                        Homogeneity"The Xs P" needs all"Some Xs P" needs one
                        Free Choice□(A∨B) → □A∧□B◇(A∨B) → ◇A∧◇B
                        MonotonicityDownward entailingUpward entailing

                        The selectional theory captures this because three-valued logic with supervaluation naturally implements this projection duality.

                        Quantifier strength as projection type.

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

                            The Projection Duality Theorem.

                            For a list of three-valued results:

                            • Conjunctive projection: TRUE iff all TRUE, FALSE iff any FALSE
                            • Disjunctive projection: TRUE iff any TRUE, FALSE iff all FALSE

                            This directly explains the strength effect: conjunctive operators (strong) are fragile under heterogeneity, disjunctive operators (weak) are robust.

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

                              Conjunctive projection is fragile: one false element yields false.

                              When any element is false, conjunctive projection cannot return true.

                              Disjunctive projection is robust: one true element yields true.

                              When any element is true, disjunctive projection returns true.

                              Galois Connection: Why Duality? #

                              The projection duality is an instance of the adjoint functor relationship:

                              ∃ ⊣ Δ ⊣ ∀
                              

                              where Δ is the diagonal/weakening functor.

                              Category-Theoretic Foundation #

                              Given projection π: D × W → W:

                              The RAPL/LAPC principle:

                              In the Truth Value Lattice #

                              For the three-valued lattice (false < indet < true):

                              The quantifier-projection correspondence:

                              Quantifier TypeLattice OpAdjointProjection
                              every, no⋀ (meet)RIGHTFragile
                              some, not-every⋁ (join)LEFTRobust

                              Linguistic Consequence #

                              Natural language quantifiers inherit their projection behavior from their categorical status as adjoints. This explains cross-linguistic universals:

                              1. All languages have robust existentials and fragile universals
                              2. Polarity doesn't matter (no is strong like every) because both are ∀-like
                              3. Strength = adjoint type, not logical polarity

                              Connection to Other Phenomena #

                              The same adjoint duality explains:

                              The Ramotowska et al. finding that strength determines counterfactual judgments is thus a reflection of deep categorical structure in semantics.

                              Duality Infrastructure #

                              The projection duality used here is an instance of the general Core.Duality infrastructure. See Core/Duality.lean for:

                              The counterfactual case is one instance of this general principle, which also explains:

                              Quantifier Embedding #

                              The three theories make different predictions when counterfactuals are embedded under quantifiers in mixed scenarios (some individuals satisfy the consequent, others don't).

                              SentenceUniversalSelectionalHomogeneity
                              Every d □→FALSEFALSEPRESUP FAIL
                              Some d □→FALSETRUEPRESUP FAIL
                              No d □→TRUEFALSEPRESUP FAIL
                              Not every d □→TRUETRUEPRESUP FAIL

                              The universal and selectional theories agree on "every" and "not every" but DISAGREE on "some" and "no".

                              Evaluate embedded counterfactual under a quantifier via projection. Strong quantifiers (every, no) use conjunctive projection; weak quantifiers (some, not every) use disjunctive projection.

                              Equations
                              Instances For

                                "No" quantifier: conjunctive projection over NEGATED individual results. "No X would V" = "Every X would NOT V" = conjunctive over ¬individual.

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

                                  "Not every" quantifier: disjunctive projection over NEGATED individual results. "Not every X would V" = "∃X. ¬(X would V)" = disjunctive over ¬individual.

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

                                    Selectional Theory: Embedded Determinacy #

                                    The paper's key theoretical insight (§2.2.2): embedded selectional counterfactuals are DETERMINATE even though unembedded ones can be indeterminate. This is because the quantifier operates INSIDE the scope of the selection function — within each selected world, individual results are Bool (true/false), not Truth3.

                                    In the win-some-lose-some lottery scenario, every candidate selection function selects a world with mixed outcomes. The quantifier evaluates WITHIN that world, giving a determinate result. Supervaluating over selection functions then preserves determinacy because all give the same quantified result.

                                    Embedded selectional determinacy: when individual results are all determinate (Bool), the projected result is always determinate.

                                    This is the formal content of the paper's claim that embedded selectional counterfactuals are determinate in mixed scenarios.

                                    Strength determines pattern: under selectional semantics with mixed Bool individual results (some true, some false):

                                    • Conjunctive projection (strong quantifiers) yields .false
                                    • Disjunctive projection (weak quantifiers) yields .true

                                    "No" in mixed scenario gives FALSE under selectional semantics.

                                    "No d would B if A" = ∀d.¬CF(d). In a mixed world where some individuals satisfy B and some don't, negating gives a mixed list of ¬results. Conjunctive projection of a mixed list is FALSE.

                                    "Not every" in mixed scenario gives TRUE under selectional semantics.

                                    "Not every d would B if A" = ∃d.¬CF(d). In a mixed world, negating gives a mixed list. Disjunctive projection of a mixed list is TRUE.

                                    All four quantifiers in mixed scenarios: under selectional semantics with mixed Bool individual results, strong quantifiers (every, no) yield .false and weak quantifiers (some, not every) yield .true.

                                    Universal Theory: All Individual Counterfactuals False #

                                    Under the universal theory in a mixed scenario, EVERY individual counterfactual is false (because not all closest worlds satisfy the consequent for any given individual). The quantifier then operates over a list of all-false values.

                                    This gives DIFFERENT predictions from the selectional theory:

                                    The theories agree on "every" and "not every" but DISAGREE on "some" and "no" — the key empirical discriminators.

                                    Universal theory embedded predictions: when all individual counterfactuals are false (as the universal theory predicts in mixed scenarios), strong quantifiers give false and weak quantifiers ALSO give false.

                                    Contrast with the selectional theory where weak quantifiers give true.

                                    Grounding Selection Functions in Causal Models #

                                    The selection function s(w, A) can be grounded via causal intervention:

                                    s(w, A) = the world that results from intervening to make A true at w

                                    This connects to @cite{nadathur-lauer-2020}:

                                    See Theories/NadathurLauer2020/ for the causal model infrastructure.

                                    Intervention-based selection: Select the world resulting from do(A).

                                    Given a causal dynamics and situation, the selected A-world is the result of normal development after intervening to make A true.

                                    Equations
                                    Instances For

                                      Counterfactual via intervention.

                                      "If A were true, B would be true" using causal model semantics.

                                      Equations
                                      Instances For

                                        Causal counterfactual matches necessity test for negative antecedent.

                                        "If A were false, B would be false" = A is necessary for B. This connects @cite{stalnaker-1968} selection to @cite{lewis-1973}/@cite{nadathur-lauer-2020} counterfactual dependence.

                                        theorem Semantics.Conditionals.Counterfactual.selectional_eq_dist {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) :
                                        selectionalCounterfactual closer domain A B w = Core.Duality.dist (List.map B (closestWorldsB closer domain w (List.filter A domain)))

                                        Selectional counterfactual = dist applied to closest worlds mapped through B. The selectional theory uses the same distributivity operator as DIST_π (@cite{santorio-2018}).

                                        The selectional counterfactual is literally supervaluation (@cite{fine-1975}) over closest worlds. Each closest world is a specification point — a legitimate resolution of the selection-function tie. When all closest worlds agree on B, the counterfactual is definite; when they disagree, it is indefinite.

                                        Combined with `selectional_eq_dist`, this shows three independent
                                        implementations are the same operator:
                                        - `Semantics.Supervaluation.superTrue` (Finset-based, general)
                                        - `Core.Duality.dist` (List-based, `Truth3.lean`)
                                        - `selectionalCounterfactual` (List-based, match on closest worlds) 
                                        
                                        theorem Semantics.Conditionals.Counterfactual.selectional_as_supervaluation {W : Type u_1} [DecidableEq W] (closer : WWWBool) (domain : List W) (A B : WBool) (w : W) (hne : (closestWorldsB closer domain w (List.filter A domain)).toFinset.Nonempty) :
                                        selectionalCounterfactual closer domain A B w = Supervaluation.superTrue B { admissible := (closestWorldsB closer domain w (List.filter A domain)).toFinset, nonempty := hne }

                                        Selectional counterfactual = supervaluation over closest worlds. When the closest-worlds set is non-empty, the selectional semantics equals superTrue B over the closest worlds as a specification space.

                                        This makes explicit that Stalnaker's "supervaluate over ties" IS Fine's supervaluation with Spec = W and admissible = closest(w, A).