Documentation

Linglib.Semantics.Quantification.Counting

Counting generalized quantifiers #

The counting quantifiers most, few, half, both, neither, at least n, at most n, exactly n, all but n and between n and k hold of A and B according to |A \ B| and |A ∩ B| alone, so each is the quantifier of a set of points on van Benthem's tree of numbers. Defined that way they are conservative and permutation invariant by construction, and their monotonicity, smoothness and proportionality are read off the tree. Sizes are Set.ncard, which asks for no decidability. On a finite type with decidable arguments each quantifier is decidable through the Finset count of each size, so a concrete case closes by decide. A quantifier restricted to a finite set s of individuals is the quantifier with restrictor x ∈ s ∧ A x.

Main definitions #

Main results #

References #

The trees of the counting quantifiers #

Most holds when more of A lies inside B than outside it.

Equations
Instances For

    Few holds when less of A lies inside B than outside it.

    Equations
    Instances For

      Half holds when as much of A lies inside B as outside it.

      Equations
      Instances For

        Both holds when A has two members, both in B.

        Equations
        Instances For

          Neither holds when A has two members, neither in B.

          Equations
          Instances For

            At least n holds when at least n members of A lie in B.

            Equations
            Instances For

              At most n holds when at most n members of A lie in B.

              Equations
              Instances For

                Exactly n holds when exactly n members of A lie in B.

                Equations
                Instances For

                  All but n holds when exactly n members of A lie outside B.

                  Equations
                  Instances For

                    Between n and k holds when between n and k members of A lie in B.

                    Equations
                    Instances For

                      The threshold n / d holds when at least that proportion of A lies in B.

                      Equations
                      Instances For

                        The strict threshold n / d holds when more than that proportion of A lies in B.

                        Equations
                        Instances For
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          Equations
                          @[instance_reducible]
                          instance Quantifier.NumberTree.instDecidableRelNatThreshold (n d : ℕ) :
                          DecidableRel (threshold n d)
                          Equations
                          @[instance_reducible]
                          instance Quantifier.NumberTree.instDecidableRelNatThresholdGt (n d : ℕ) :
                          DecidableRel (thresholdGt n d)
                          Equations

                          Proportionality #

                          A tree is proportional when on nonempty rows it depends only on the ratio of b to a.

                          Equations
                          • q.Proportional = ∀ (a b a' b' : ℕ), 0 < a + b → 0 < a' + b' → b * a' = b' * a → (q a b ↔ q a' b')
                          Instances For

                            The counting quantifiers #

                            def Quantifier.GQ.most {α : Type u_1} :
                            GQ α

                            Most A are B when more of the A are B than are not.

                            Equations
                            Instances For
                              def Quantifier.GQ.few {α : Type u_1} :
                              GQ α

                              Few A are B when fewer of the A are B than are not, the inner negation of most.

                              Equations
                              Instances For
                                def Quantifier.GQ.half {α : Type u_1} :
                                GQ α

                                Half the A are B when as many of the A are B as are not.

                                Equations
                                Instances For
                                  def Quantifier.GQ.both {α : Type u_1} :
                                  GQ α

                                  Both is every on a restrictor of two, Keenan and Stavi's each of the two.

                                  Equations
                                  Instances For
                                    def Quantifier.GQ.neither {α : Type u_1} :
                                    GQ α

                                    Neither is no on a restrictor of two, Keenan and Stavi's not one of the two.

                                    Equations
                                    Instances For
                                      def Quantifier.GQ.atLeast {α : Type u_1} (n : ℕ) :
                                      GQ α

                                      At least n A are B when n ≤ |A ∩ B|.

                                      Equations
                                      Instances For
                                        def Quantifier.GQ.atMost {α : Type u_1} (n : ℕ) :
                                        GQ α

                                        At most n A are B when |A ∩ B| ≤ n.

                                        Equations
                                        Instances For
                                          def Quantifier.GQ.exactly {α : Type u_1} (n : ℕ) :
                                          GQ α

                                          Exactly n A are B when |A ∩ B| = n.

                                          Equations
                                          Instances For
                                            def Quantifier.GQ.allBut {α : Type u_1} (n : ℕ) :
                                            GQ α

                                            All but n A are B when |A \ B| = n.

                                            Equations
                                            Instances For
                                              def Quantifier.GQ.between {α : Type u_1} (n k : ℕ) :
                                              GQ α

                                              Between n and k A are B when n ≤ |A ∩ B| ≤ k.

                                              Equations
                                              Instances For
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableMost {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] :
                                                Decidable (most A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableFew {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] :
                                                Decidable (few A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableHalf {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] :
                                                Decidable (half A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableBoth {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] :
                                                Decidable (both A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableNeither {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] :
                                                Decidable (neither A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableAtLeast {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] (n : ℕ) :
                                                Decidable (atLeast n A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableAtMost {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] (n : ℕ) :
                                                Decidable (atMost n A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableExactly {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] (n : ℕ) :
                                                Decidable (exactly n A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableAllBut {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] (n : ℕ) :
                                                Decidable (allBut n A B)
                                                Equations
                                                @[instance_reducible]
                                                instance Quantifier.GQ.instDecidableBetween {α : Type u_1} [Fintype α] (A B : α → Prop) [DecidablePred A] [DecidablePred B] (n k : ℕ) :
                                                Decidable (between n k A B)
                                                Equations
                                                theorem Quantifier.GQ.most_apply {α : Type u_1} {A B : α → Prop} :
                                                most A B ↔ {x : α | A x ∧ ¬B x}.ncard < {x : α | A x ∧ B x}.ncard
                                                theorem Quantifier.GQ.few_apply {α : Type u_1} {A B : α → Prop} :
                                                few A B ↔ {x : α | A x ∧ B x}.ncard < {x : α | A x ∧ ¬B x}.ncard
                                                theorem Quantifier.GQ.half_apply {α : Type u_1} {A B : α → Prop} :
                                                half A B ↔ {x : α | A x ∧ ¬B x}.ncard = {x : α | A x ∧ B x}.ncard
                                                theorem Quantifier.GQ.atLeast_apply {α : Type u_1} {A B : α → Prop} {n : ℕ} :
                                                atLeast n A B ↔ n ≤ {x : α | A x ∧ B x}.ncard
                                                theorem Quantifier.GQ.atMost_apply {α : Type u_1} {A B : α → Prop} {n : ℕ} :
                                                atMost n A B ↔ {x : α | A x ∧ B x}.ncard ≤ n
                                                theorem Quantifier.GQ.exactly_apply {α : Type u_1} {A B : α → Prop} {n : ℕ} :
                                                exactly n A B ↔ {x : α | A x ∧ B x}.ncard = n

                                                Identities #

                                                theorem Quantifier.GQ.atMost_eq_compl_atLeast_succ {α : Type u_1} (n : ℕ) :
                                                atMost n = (atLeast (n + 1))ᶜ

                                                On a finite universe every is the quantifier of the tree's all.

                                                theorem Quantifier.GQ.no_eq_toGQ_no {α : Type u_1} [Finite α] :

                                                On a finite universe no is the quantifier of the tree's no.

                                                theorem Quantifier.GQ.some_eq_atLeast_one {α : Type u_1} [Finite α] :

                                                On a finite universe some is at least one.

                                                theorem Quantifier.GQ.no_eq_atMost_zero {α : Type u_1} [Finite α] :
                                                theorem Quantifier.GQ.allBut_zero_eq_every {α : Type u_1} [Finite α] :

                                                Monotonicity #

                                                theorem Quantifier.GQ.scopeMonotone_atLeast {α : Type u_1} [Finite α] (n : ℕ) :
                                                theorem Quantifier.GQ.scopeAntitone_atMost {α : Type u_1} [Finite α] (n : ℕ) :
                                                theorem Quantifier.GQ.monotone_atLeast {α : Type u_1} [Finite α] (n : ℕ) (A : α → Prop) :
                                                Monotone (atLeast n A)
                                                theorem Quantifier.GQ.antitone_atMost {α : Type u_1} [Finite α] (n : ℕ) (A : α → Prop) :
                                                Antitone (atMost n A)
                                                theorem Quantifier.GQ.not_scopeAntitone_most {α : Type u_1} [Finite α] [Nonempty α] :

                                                On a nonempty finite universe most is not scope antitone, since most ⊤ ⊤ holds and most ⊤ ⊥ fails.

                                                theorem Quantifier.GQ.restrictorAntitone_atMost {α : Type u_1} [Finite α] (n : ℕ) :

                                                Smoothness #

                                                theorem Quantifier.GQ.downNE_most {α : Type u_1} [Finite α] :
                                                theorem Quantifier.GQ.upSE_most {α : Type u_1} [Finite α] :
                                                theorem Quantifier.GQ.smooth_most {α : Type u_1} [Finite α] :
                                                theorem Quantifier.GQ.smooth_atLeast {α : Type u_1} [Finite α] (n : ℕ) :
                                                theorem Quantifier.GQ.coSmooth_atMost {α : Type u_1} [Finite α] (n : ℕ) :

                                                Proportionality #

                                                def Quantifier.GQ.Proportional {α : Type u_1} (q : GQ α) :

                                                A quantifier is proportional when on nonempty restrictors its truth depends only on the ratio of |A ∩ B| to |A \ B|.

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

                                                  The quantifier of a proportional tree is proportional.

                                                  Counterexamples on small universes #

                                                  The proportional quantifiers fail Existential, the condition for felicity in there-sentences, although Barwise and Cooper's Table II labels few and half weak: their truth depends on |A \ B|, not just on |A ∩ B|. Few already fails it on one individual, most and half on two.

                                                  Most fails Existential, by A = ⊤ and B = {0} on two individuals.

                                                  Few fails Existential, by A = ⊤ and B = ∅ on one individual.

                                                  Half fails Existential, by A = ⊤ and B = {0} on two individuals.

                                                  Most is not persistent: enlarging the restrictor from {0} to {0, 2} loses the majority for B = {0}.

                                                  theorem Quantifier.GQ.not_symm_most :
                                                  ¬Std.Symm most

                                                  Most is not symmetric, by A = {0} and B = {0, 1}.

                                                  Half is not scope monotone: with A = {0, 1}, half A {0} holds and half A A fails.

                                                  Half is not scope antitone: with A = {0, 1}, half A {0} holds and half A ∅ fails.

                                                  Half is non-monotone in its scope, neither monotone nor antitone ([vdPLvM+23]).

                                                  theorem Quantifier.GQ.not_monotone_exactly {α : Type u_1} [Fintype α] {n : ℕ} (h : n < Fintype.card α) :
                                                  ¬Monotone (exactly n fun (x : α) => True)

                                                  Over a domain of more than n individuals, exactly n is not monotone in its scope.

                                                  theorem Quantifier.GQ.not_antitone_exactly {α : Type u_1} [Fintype α] {n : ℕ} (hn : n ≠ 0) (h : n ≤ Fintype.card α) :
                                                  ¬Antitone (exactly n fun (x : α) => True)

                                                  Over a domain of at least n individuals, n positive, exactly n is not antitone in its scope.

                                                  theorem Quantifier.GQ.both_fin2 :
                                                  both (fun (x : Fin 2) => True) fun (x : Fin 2) => True

                                                  Both holds of a restrictor of two and fails of one of three.

                                                  theorem Quantifier.GQ.not_both_fin3 :
                                                  ¬both (fun (x : Fin 3) => True) fun (x : Fin 3) => True
                                                  theorem Quantifier.GQ.most_singleton_iff {α : Type u_1} (j : α) (B : α → Prop) :
                                                  most (fun (x : α) => x = j) B ↔ B j

                                                  On a singleton restrictor most is the scope's value at the singleton.

                                                  The families of the canonical denotations #

                                                  Each canonical denotation given on every finite domain, the readings a lexicon entry draws on.

                                                  Family.some is GQ.some on every finite domain.

                                                  Equations
                                                  Instances For

                                                    Family.no is no on every finite domain.

                                                    Equations
                                                    Instances For

                                                      Family.most is most on every finite domain.

                                                      Equations
                                                      Instances For

                                                        Family.few is few on every finite domain.

                                                        Equations
                                                        Instances For

                                                          Family.half is half on every finite domain.

                                                          Equations
                                                          Instances For

                                                            Family.both is both on every finite domain.

                                                            Equations
                                                            Instances For

                                                              Family.atLeast n is atLeast n on every finite domain.

                                                              Equations
                                                              Instances For

                                                                Family.exactly n is exactly n on every finite domain.

                                                                Equations
                                                                Instances For

                                                                  some and every are different families, since on an empty restrictor every holds and some fails.

                                                                  some and no are different families, since on a one-element domain some ⊤ ⊤ holds and no ⊤ ⊤ fails.