Documentation

Linglib.Theories.Semantics.Quantification.Quantifier

Generalized Quantifiers #

@cite{barwise-cooper-1981} @cite{keenan-stavi-1986} @cite{peters-westerstahl-2006} @cite{van-de-pol-etal-2023} @cite{mostowski-1957}

Determiners have type (e→t) → ((e→t) → t):

Semantic Universals #

Three properties conjectured to hold of all simple (lexicalized) determiners:

@cite{van-de-pol-etal-2023} show quantifiers satisfying these universals have shorter minimal description length, suggesting a simplicity bias explains the universals.

Organization #

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

    A GQ satisfies the Barwise & Cooper monotonicity universals (CONS plus monotone in scope in some direction). Convenience conjunction; Core has Conservative, ScopeUpwardMono, ScopeDownwardMono separately.

    Equations
    Instances For
      @[implicit_reducible]
      instance Semantics.Quantification.Quantifier.decImpl {p q : Prop} [Decidable p] [Decidable q] :
      Decidable (pq)

      Decidability of implication (not in Lean 4 core).

      Equations
      def Semantics.Quantification.Quantifier.count {α : Type} [Fintype α] (P : αProp) [DecidablePred P] :

      Count of elements satisfying a predicate, via Finset.univ.filter.

      Equations
      Instances For
        theorem Semantics.Quantification.Quantifier.A_eq_some_sem (F : Core.Logic.Intensional.Frame) [Fintype F.Entity] (domain : List F.Entity) (hComplete : ∀ (x : F.Entity), x domain) :

        Partee's A (existential closure) = Barwise & Cooper's ⟦some⟧. Both compute λR.λS. ∃x. R(x) ∧ S(x) over a finite domain. A takes the domain explicitly; some_sem uses over the entity type.

        ⟦most⟧(R)(S) = |R ∩ S| > |R \ S|

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

          ⟦few⟧(R)(S) = |R ∩ S| < |R \ S| — a minority of Rs are Ss. Dual of most_sem: few(R,S) ↔ ¬most(R,S) ∧ ¬half(R,S).

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

            ⟦half⟧(R)(S) = 2 * |R ∩ S| = |R| — exactly half of Rs are Ss.

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

              ⟦both⟧(R)(S) = ⟦every⟧(R)(S) ∧ |R| ≥ 2. K&S §2.3: both = every restricted to dual restrictors.

              Equations
              Instances For

                ⟦neither⟧ = gqMeet ⟦no⟧ (|R| ≥ 2) (K&S (83b)).

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

                  ⟦at least n⟧(R)(S) = |R ∩ S| ≥ n

                  Equations
                  Instances For

                    ⟦at most n⟧(R)(S) = |R ∩ S| ≤ n

                    Equations
                    Instances For

                      ⟦exactly n⟧(R)(S) = |R ∩ S| = n

                      Equations
                      Instances For

                        ⟦all but n⟧(R)(S) = |R \ S| = n — exactly n R-elements are non-S. Generalizes "every" (= all but 0). The exceptive counterpart of exactly_n_sem (which counts |R ∩ S| = n).

                        Equations
                        Instances For

                          ⟦between n and k⟧(R)(S) = n ≤ |R ∩ S| ≤ k

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

                            Bridge: toyModel.Entity = ToyEntity is definitional but opaque to instance search.

                            Equations
                            theorem Semantics.Quantification.Quantifier.forall_bij_inv {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] (f : F.EntityF.Entity) (hBij : Function.Bijective f) (P : F.EntityProp) :
                            (∀ (x : F.Entity), P x) ∀ (x : F.Entity), P (f x)

                            ∀ x, P x is invariant under bijective substitution.

                            theorem Semantics.Quantification.Quantifier.exists_bij_inv {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] (f : F.EntityF.Entity) (hBij : Function.Bijective f) (P : F.EntityProp) :
                            (∃ (x : F.Entity), P x) ∃ (x : F.Entity), P (f x)

                            ∃ x, P x is invariant under bijective substitution.

                            theorem Semantics.Quantification.Quantifier.count_bij_inv {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] (f : F.EntityF.Entity) (hBij : Function.Bijective f) {P : F.EntityProp} [DecidablePred P] :
                            count P = count (P f)

                            count P = count (P ∘ f) when f is a bijection.

                            ⟦every⟧ is conservative: ∀x. R(x) → S(x) iff ∀x. R(x) → (R(x) ∧ S(x)).

                            ⟦some⟧ is conservative: ∃x. R(x) ∧ S(x) iff ∃x. R(x) ∧ (R(x) ∧ S(x)).

                            ⟦no⟧ is conservative: ∀x. R(x) → ¬S(x) iff ∀x. R(x) → ¬(R(x) ∧ S(x)).

                            ⟦most⟧ is conservative: the R-elements in S are the R-elements in R∩S.

                            ⟦few⟧ is conservative: the R-elements in S are the R-elements in R∩S.

                            ⟦half⟧ is conservative: depends only on R ∩ S within R.

                            ⟦at least n⟧ is conservative: |R ∩ S| = |R ∩ (R ∩ S)|.

                            ⟦few⟧ is downward monotone in scope: if S ⊆ S' and few(R,S'), then few(R,S). Fewer Ss among Rs means even fewer S-subsets.

                            ⟦most⟧ is upward monotone in scope: if S ⊆ S' and most(R,S), then most(R,S'). |R∩S'| ≥ |R∩S| > |R\S| ≥ |R\S'|.

                            ⟦some⟧ = ⟦at least 1⟧: existential quantification is "at least one".

                            outerNeg ⟦some⟧ = ⟦no⟧: negating existence gives universal negation.

                            ⟦at most n⟧ = outerNeg ⟦at least n+1⟧: duality of lower and upper bounds. This is the counting quantifier instance of the Square of Opposition.

                            ⟦no⟧ = ⟦at most 0⟧. Derived algebraically: no = outerNeg(some) = outerNeg(at_least 1) = at_most 0.

                            ⟦exactly n⟧ = ⟦at least n⟧ ⊓ ⟦at most n⟧ in the GQ lattice. "Exactly n" is the meet of a lower bound and an upper bound.

                            ⟦at least n⟧ is Mon↑ in scope: enlarging B cannot decrease |A ∩ B|.

                            ⟦at most n⟧ is Mon↓ in scope. Derived from duality: outerNeg flips Mon↑ to Mon↓, and at_most = outerNeg(at_least).

                            Quantity / Isomorphism closure: Q(A, B) depends only on the four cardinalities |A ∩ B|, |A \ B|, |B \ A|, |M \ (A ∪ B)|.

                            Equivalently: permuting the domain does not change the quantifier's truth value. This is the type ⟨1,1⟩ (binary) generalization of @cite{mostowski-1957}'s permutation invariance for type ⟨1⟩ (unary) quantifiers; the extension to binary determiners is due to @cite{van-benthem-1984} (building on Lindström 1966).

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

                              Quantity → QuantityInvariant: cardinality-dependence implies bijection-invariance. TODO: proof requires adapting cell-bijection machinery to Prop predicates.

                              QuantityInvariant → Quantity: bijection-invariance implies cardinality-dependence. TODO: proof requires adapting cell-bijection machinery to Prop predicates.

                              A non-conservative quantifier for contrast: ⟦M⟧(A,B) = |A| > |B| (van de Pol et al.'s hypothetical counterpart to "most").

                              Equations
                              Instances For

                                ⟦some⟧ is symmetric: ∃x.R(x)∧S(x) = ∃x.S(x)∧R(x).

                                ⟦no⟧ is symmetric: ¬∃x.R(x)∧S(x) = ¬∃x.S(x)∧R(x).

                                ⟦every⟧ is NOT symmetric. Witness: R=students, S=things (everything). every(students)(things)=true but every(things)(students)=false.

                                ⟦some⟧ is intersective (follows from CONSERV + SYMM).

                                ⟦every⟧ is left anti-additive: every(A∪B, C) = every(A,C) ∧ every(B,C).

                                ⟦no⟧ is left anti-additive: no(A∪B, C) = no(A,C) ∧ no(B,C).

                                ⟦no⟧ is right anti-additive: no(A, B∪C) = no(A,B) ∧ no(A,C). "Nobody saw A-or-B" ↔ "Nobody saw A and nobody saw B". This licenses strong NPIs in scope: "Nobody lifted a finger."

                                @cite{peters-westerstahl-2006} Prop 13: the only non-trivial CONSERV, EXT, and ISOM quantifiers satisfying LAA are every and no (and A = ∅).

                                Inner negation maps every to no: every...not = no. ∀x. R(x) → ¬S(x) = ¬∃x. R(x) ∧ S(x).

                                The dual of every is some: Q̌(every) = some. ¬(∀x. R(x) → ¬S(x)) = ∃x. R(x) ∧ S(x).

                                theorem Semantics.Quantification.Quantifier.every_ext_spectator {F : Core.Logic.Intensional.Frame} (es : List F.Entity) (e : F.Entity) (R S : F.EntityBool) (hR : R e = false) :
                                ((e :: es).all fun (x : F.Entity) => !R x || S x) = es.all fun (x : F.Entity) => !R x || S x

                                every_sem satisfies Extension: spectator elements (outside the restrictor) don't affect truth values.

                                theorem Semantics.Quantification.Quantifier.some_ext_spectator {F : Core.Logic.Intensional.Frame} (es : List F.Entity) (e : F.Entity) (R S : F.EntityBool) (hR : R e = false) :
                                ((e :: es).any fun (x : F.Entity) => R x && S x) = es.any fun (x : F.Entity) => R x && S x

                                some_sem satisfies Extension.

                                theorem Semantics.Quantification.Quantifier.no_ext_spectator {F : Core.Logic.Intensional.Frame} (es : List F.Entity) (e : F.Entity) (R S : F.EntityBool) (hR : R e = false) :
                                ((e :: es).all fun (x : F.Entity) => !R x || !S x) = es.all fun (x : F.Entity) => !R x || !S x

                                no_sem satisfies Extension.

                                theorem Semantics.Quantification.Quantifier.most_ext_spectator {F : Core.Logic.Intensional.Frame} (es : List F.Entity) (e : F.Entity) (R S : F.EntityBool) (hR : R e = false) :
                                List.filter (fun (x : F.Entity) => R x && S x) (e :: es) = List.filter (fun (x : F.Entity) => R x && S x) es List.filter (fun (x : F.Entity) => R x && !S x) (e :: es) = List.filter (fun (x : F.Entity) => R x && !S x) es

                                most_sem satisfies Extension: spectators don't enter either R∩S or R\S, so the cardinality comparison is unchanged.

                                every_sem is positive strong: every(A,A) = true for all A. Proof: R(x) → R(x) for all x.

                                theorem Semantics.Quantification.Quantifier.no_negative_strong_nonempty {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R : F.EntityProp) (hR : ∃ (x : F.Entity), R x) :
                                ¬no_sem F R R

                                no_sem is negative strong on non-empty restrictors: no(A,A) = false for all non-empty A.

                                no_sem is NOT positive strong: no(A,A) = false when A is non-empty. Counterexample: R = {john}.

                                ⟦some⟧ is existential (K&S G3): some(A,B) = some(A∩B, everything). some is natural in there-sentences: "There are some cats."

                                ⟦no⟧ is existential (K&S G3): no(A,B) = no(A∩B, everything).

                                ⟦every⟧ is transitive: A ⊆ B and B ⊆ C implies A ⊆ C.

                                ⟦every⟧ is antisymmetric: A ⊆ B and B ⊆ A implies A = B.

                                ⟦some⟧ is quasi-reflexive: A∩B ≠ ∅ implies A∩A ≠ ∅ (i.e., A ≠ ∅).

                                ⟦no⟧ is quasi-universal: A∩A = ∅ (i.e., A = ∅) implies A∩B = ∅ for all B.

                                ⟦every⟧ is restrictor-↓ (anti-persistent). Follows from Zwarts bridge: reflexive + transitive + CONSERV → ↓MON.

                                ⟦some⟧ is restrictor-↑ (persistent): A ⊆ A' and some(A,B) → some(A',B).

                                ⟦no⟧ is restrictor-↓ (anti-persistent): A ⊆ A' and no(A',B) → no(A,B).

                                ⟦every⟧ has double monotonicity ↓MON↑ (@cite{van-benthem-1984} §4.2).

                                ⟦every⟧ is filtrating: every(A,B) ∧ every(A,C) → every(A, B∩C).

                                The six theorems below establish the four Aristotelian relations among GQ denotations (every_sem, some_sem, no_sem, outerNeg every_sem) at fixed restrictor R. They work over Prop-valued predicates, while Core.Logic.Opposition.Aristotelian formulates the same relations over Bool-valued predicates. The two frameworks are mathematically equivalent but type-different; bridging them at the predicate level would require either a Prop-valued version of the Aristotelian relations or a Bool-coercion of the GQ machinery — both architectural decisions beyond this section's scope.

                                For consumers wanting to instantiate the abstract Square (W → Bool) from Core.Opposition.Square, pass decide-coerced versions of the GQ predicates. The downstream Phenomena/Quantification/Studies/BarwiseCooper1981.lean §8 duality theorems are the natural site to package this bridge.

                                Contradiction (A vs O): the A-form and O-form are contradictories.

                                theorem Semantics.Quantification.Quantifier.no_contradicts_some {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R S : F.EntityProp) :
                                no_sem F R S ¬some_sem F R S

                                Contradiction (E vs I): the E-form and I-form are contradictories.

                                theorem Semantics.Quantification.Quantifier.a_e_contrary {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R S : F.EntityProp) :
                                every_sem F R Sno_sem F R S∀ (x : F.Entity), ¬R x

                                Contrariety (A ∧ E): the A-form and E-form can't both hold unless the restrictor is empty.

                                theorem Semantics.Quantification.Quantifier.subalternation_a_i {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R S : F.EntityProp) (hR : ∃ (x : F.Entity), R x) :
                                every_sem F R Ssome_sem F R S

                                Subalternation (A → I): the A-form entails the I-form when the restrictor is non-empty.

                                theorem Semantics.Quantification.Quantifier.subalternation_e_o {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R S : F.EntityProp) (hR : ∃ (x : F.Entity), R x) :

                                Subalternation (E → O): the E-form entails the O-form when the restrictor is non-empty.

                                theorem Semantics.Quantification.Quantifier.subcontrariety_i_o {F : Core.Logic.Intensional.Frame} [Fintype F.Entity] [DecidableEq F.Entity] (R S : F.EntityProp) (hR : ∃ (x : F.Entity), R x) :

                                Subcontrariety (I ∨ O): the I-form and O-form can't both fail when the restrictor is non-empty.

                                Bundled (Prop↔Bool gap closure demo): the canonical A↔O contradiction diagonal, packaged as Core.Opposition.IsContradictory over the Pi-instance Boolean algebra on (F.Entity → Prop) → Prop. For a fixed restrictor R, the GQ semantics every_sem F R and its outer-negation outerNeg (every_sem F) R are pointwise contradictory in the BA-generic sense.

                                This bundling demonstrates that Aristotelian.lean's polymorphic IsContradictory/IsSubaltern/etc. work uniformly on Prop-valued predicates (the GQ convention) and Bool-valued predicates (the Tessler convention), via Pi.instBooleanAlgebra for Prop and Bool respectively. The audit's "Prop↔Bool gap" is closed at the type level. Bundling theorems for the other 5 corners (E↔I, A∧E, A→I, E→O, I∨O) follow the same template.

                                ⟦some⟧ is ↑_SE Mon: adding elements of B to A preserves some(A,B).

                                ⟦some⟧ is ↑_SW Mon: adding elements outside B to A preserves some(A,B).

                                ⟦every⟧ is ↓_NW Mon: removing elements of B from A preserves every(A,B).

                                ⟦every⟧ is ↓_NE Mon: removing elements outside B from A preserves every(A,B).

                                ⟦some⟧ is ↓_NE Mon (direct proof). Removing non-S elements from A preserves ∃x.R(x)∧S(x) since the witness is in S.

                                ⟦some⟧ is smooth (↓_NE + ↑_SE).

                                ⟦every⟧ is ↑_SE Mon (direct proof). Adding B-elements to A preserves ∀x.R(x)→S(x) since the new elements satisfy S.

                                ⟦every⟧ is smooth (↓_NE + ↑_SE).

                                ⟦no⟧ is co-smooth (↓_NW + ↑_SW). Follows from anti-persistence.

                                ⟦most⟧ is ↓_NE Mon (direct proof).

                                ⟦most⟧ is ↑_SE Mon (direct proof).

                                ⟦at least n⟧ is persistent (Mon↑ in restrictor).

                                ⟦at least n⟧ is ↓_NE Mon.

                                ⟦at least n⟧ is smooth (↓_NE + ↑_SE).

                                ⟦at most n⟧ is anti-persistent (Mon↓ in restrictor).

                                ⟦at most n⟧ is co-smooth (↓_NW + ↑_SW).

                                Quantity is closed under gqMeet.

                                ⟦at least n⟧ satisfies Quantity: truth depends only on |A ∩ B|.

                                ⟦at most n⟧ satisfies Quantity: truth depends only on |A ∩ B|.

                                ⟦exactly n⟧ satisfies Quantity.

                                ⟦some⟧ satisfies Quantity.

                                ⟦no⟧ satisfies Quantity.

                                ⟦most⟧ satisfies Quantity.

                                ⟦few⟧ satisfies Quantity.

                                ⟦half⟧ satisfies Quantity.

                                ⟦some⟧ satisfies CONSERV ∧ Mon↑.

                                ⟦every⟧ satisfies CONSERV ∧ Mon↑.

                                ⟦no⟧ satisfies CONSERV ∧ Mon↓.

                                ⟦most⟧ satisfies CONSERV ∧ Mon↑.

                                ⟦few⟧ satisfies CONSERV ∧ Mon↓.

                                ⟦at least n⟧ satisfies CONSERV ∧ Mon↑.

                                ⟦at most n⟧ satisfies CONSERV ∧ Mon↓.

                                ⟦exactly n⟧ satisfies CONSERV (but not MON for n ≥ 1).

                                ⟦all but 0⟧ = ⟦every⟧: zero exceptions means universal.

                                ⟦all but n⟧ satisfies Quantity.

                                ⟦between n and k⟧ is conservative.

                                ⟦between n and k⟧ satisfies Quantity.

                                Proportional: Q's truth value depends only on the ratio |A∩B|/|A\B|.

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

                                  ⟦few⟧ is proportional.

                                  Generalized-Quantifier-Theoretic (GQT) meaning operator #

                                  A parametric truth-conditional GQT operator: given a monotonicity direction and a numerical threshold, gqtMeaning returns the literal GQT denotation as a Bool over a finite "intersection-count" world. Used by quantity-implicature studies (e.g., van Tiel et al. 2021) that plug per-paper threshold parameters into the same GQT machinery.

                                  Rational version of gqtMeaning (1 if true, 0 if false).

                                  Equations
                                  Instances For

                                    Open conjectures (van de Pol et al. 2023) #

                                    TODO: Quantifiers satisfying the B&C semantic universals (conservativity, quantity, monotonicity) have strictly lower complexity (Lempel-Ziv on truth-table representations, or MDL in a language-of-thought grammar) than violators.

                                    TODO: Among the three universals, monotonicity is the strongest predictor of complexity reduction; conservativity is intermediate; quantity shows a weaker but robust effect.

                                    Both were previously stubbed in the deleted Core/Conjectures.lean. Formal content depends on choosing canonical complexity measures (LZ over Boolean truth tables; MDL over LoT grammars) and connecting them to the existing SatisfiesUniversals predicate.