The tree of numbers #
This file defines quantifiers on van Benthem's tree of numbers. A conservative quantifier that is
invariant under permutations of the universe holds of finite sets A and B according to the
two numbers a = |A \ B| and b = |A ∩ B| alone, so it is a set of points (a, b). The points
with a + b = n form the n-th row of the tree, the ways of splitting an n-element A.
On this representation inner negation, which negates the scope, swaps the two coordinates, and outer negation is the complement. The four corners of the square of opposition are all, some, no and not all, and the two negations carry each corner to its neighbours.
Van Benthem's postulates of variety, continuity, absence of deadlock and uniformity are each invariant under both negations. That symmetry carries the verification of the postulates, and the proof that the corners are the only quantifiers satisfying them, from all to the other three.
Main definitions #
Quantifier.NumberTree: a quantifier as a relation between|A \ B|and|A ∩ B|.Quantifier.NumberTree.innerNeg: inner negation, the swap of the two coordinates.Quantifier.NumberTree.all,Quantifier.NumberTree.some,Quantifier.NumberTree.no,Quantifier.NumberTree.notAll: the corners of the square of opposition.Quantifier.NumberTree.cardinal: the quantifiers that depend on|A ∩ B|alone.Quantifier.NumberTree.row: the points of a row at which a quantifier holds.Quantifier.NumberTree.ScopeMonotone,Quantifier.NumberTree.ScopeAntitone: monotonicity in the scope, a step along a row of the tree.Quantifier.NumberTree.Asymmetric,Quantifier.NumberTree.StronglyConnected,Quantifier.NumberTree.Euclidean: relational conditions on a quantifier, read off the tree.Quantifier.NumberTree.Variety,Quantifier.NumberTree.Cont,Quantifier.NumberTree.Plus,Quantifier.NumberTree.Uniform: the postulates VAR, CONT, PLUS and UNIF.Quantifier.NumberTree.ofSizes: the tree of a relation between|A ∩ B|and|A|.Quantifier.NumberTree.ofGQ,Quantifier.NumberTree.toGQ: the tree of a generalized quantifier over a finite universe, and the quantifier of a tree, counting withSet.ncard.Quantifier.NumberTree.ConstantOnRow,Quantifier.NumberTree.ConstantBelow: a quantifier that does not depend on its scope for a restrictor of a given size, or on either argument on a universe of a given size.
Main results #
Quantifier.NumberTree.Asymmetric.eq_bot,Quantifier.NumberTree.StronglyConnected.eq_top,Quantifier.NumberTree.Euclidean.eq_top: the only asymmetric quantifier is the empty one, the only strongly connected one is the universal one, and a nonempty Euclidean quantifier is universal.Quantifier.NumberTree.variety_cont_plus_uniform_iff: the quantifiers satisfying the four postulates are exactly the four corners of the square of opposition.Quantifier.NumberTree.ofGQ_iff: a conservative, permutation-invariant generalized quantifier holds ofAandBexactly when its tree holds of|A \ B|and|A ∩ B|.Quantifier.NumberTree.conservative_toGQ,Quantifier.NumberTree.quantityInvariant_toGQ: the quantifier of a tree is conservative and permutation invariant.Quantifier.NumberTree.ScopeMonotone.toGQ,Quantifier.NumberTree.ScopeAntitone.toGQ: the quantifier of a scope-monotone tree is scope monotone, and likewise antitone.Quantifier.NumberTree.dependsOn_toGQ_compl_singleton_iff: the quantifier of a tree depends on whether an individual is in its scope iff the individual is in its restrictor and the tree is not constant on the restrictor's row.Quantifier.NumberTree.card_powerset_points: there are2 ^ ((n + 1) * (n + 2) / 2)sets of points in rows0ton, the number of conservative, permutation-invariant quantifiers on a universe ofnindividuals.
Implementation notes #
Variety asks only that the quantifier hold somewhere and fail somewhere. Van Benthem's VAR is
stronger in both of its versions, so results assuming Variety apply under VAR. The paper asks
for a presence and an absence among the points (0, 0), (1, 0) and (0, 1), and the book's
chapter on quantifiers, which restates the tree and the postulates, asks for both in every row
below the top.
Continuity, absence of deadlock and uniformity each treat presence and absence of the quantifier
alike. Each is stated as a condition on presence (RowConvex, NoDeadlock, Homogeneous) that
is imposed on the quantifier and on its complement.
References #
A quantifier on the tree of numbers is a relation between a = |A \ B| and b = |A ∩ B|.
Equations
- Quantifier.NumberTree = (ℕ → ℕ → Prop)
Instances For
Negations and the square of opposition #
Inner negation negates the scope, which swaps A \ B with A ∩ B.
Equations
- q.innerNeg a b = q b a
Instances For
Equations
- Quantifier.NumberTree.instDecidableRelNatComplForallForallProp a b = { decide := !decide (q a b), reflects_decide := ⋯ }
The quantifier all holds when nothing in A lies outside B.
Equations
- Quantifier.NumberTree.all a x✝ = (a = 0)
Instances For
The quantifier some holds when something in A lies in B.
Equations
- Quantifier.NumberTree.some x✝ b = (b ≠ 0)
Instances For
The quantifier no holds when nothing in A lies in B.
Equations
- Quantifier.NumberTree.no x✝ b = (b = 0)
Instances For
The quantifier not all holds when something in A lies outside B.
Equations
- Quantifier.NumberTree.notAll a x✝ = (a ≠ 0)
Instances For
Equations
- Quantifier.NumberTree.instDecidableRelNatAll a x✝ = { decide := a.beq 0, reflects_decide := ⋯ }
Equations
- Quantifier.NumberTree.instDecidableRelNatSome x✝ b = { decide := !decide (b = 0), reflects_decide := ⋯ }
Equations
- Quantifier.NumberTree.instDecidableRelNatNo x✝ b = { decide := b.beq 0, reflects_decide := ⋯ }
Equations
- Quantifier.NumberTree.instDecidableRelNatNotAll a x✝ = { decide := !decide (a = 0), reflects_decide := ⋯ }
A cardinal quantifier holds according to |A ∩ B| alone, as the numerals do.
Equations
- Quantifier.NumberTree.cardinal s x✝ b = (b ∈ s)
Instances For
The tree of a relation c between |A ∩ B| and |A| holds at (a, b) when c relates b
to a + b, the form in which proportions of the restrictor are stated.
Equations
- Quantifier.NumberTree.ofSizes c a b = c b (a + b)
Instances For
Rows #
Row n of the tree lists the ways of splitting n members of A between B and its complement.
A point of the row is given by the number of members inside B.
The points of row n at which a quantifier holds, each given by |A ∩ B|.
Equations
- q.row n = {b : Fin (n + 1) | q (n - ↑b) ↑b}
Instances For
Scope monotonicity #
Enlarging the scope B by an element of A moves one individual from A \ B to A ∩ B, a step
to the right along a row of the tree.
A quantifier is scope monotone when a step right along a row preserves truth.
Equations
- q.ScopeMonotone = ∀ (a b : ℕ), q (a + 1) b → q a (b + 1)
Instances For
A quantifier is scope antitone when a step left along a row preserves truth.
Equations
- q.ScopeAntitone = ∀ (a b : ℕ), q a (b + 1) → q (a + 1) b
Instances For
Iterated, a scope-monotone quantifier survives moving k individuals into the scope.
A relation closed upwards in |A ∩ B| is scope monotone on the tree.
A relation closed downwards in |A ∩ B| is scope antitone on the tree.
Relational conditions #
A condition on the relation Q A B between sets becomes a condition on the tree once the sets
are replaced by the sizes of the cells of their Venn diagram.
A quantifier is asymmetric when Q A B excludes Q B A. The two share |A ∩ B|, and
|A \ B| and |B \ A| are arbitrary.
Equations
- q.Asymmetric = ∀ (a b c : ℕ), q a c → ¬q b c
Instances For
A quantifier is strongly connected when Q A B or Q B A holds of any two sets.
Equations
- q.StronglyConnected = ∀ (a b c : ℕ), q a c ∨ q b c
Instances For
A quantifier is irreflexive when Q A A never holds.
Equations
- q.Irreflexive = ∀ (n : ℕ), ¬q 0 n
Instances For
A quantifier is Euclidean when Q X Y and Q X Z give Q Y Z. Among the cells of the Venn
diagram of X, Y and Z, p counts X ∩ Y ∩ Z, x the rest of X ∩ Y, y the rest of
X ∩ Z, s the rest of X, t the rest of Y ∩ Z, and u the rest of Y.
Equations
- q.Euclidean = ∀ (p x y s t u : ℕ), q (y + s) (p + x) → q (x + s) (p + y) → q (x + u) (p + t)
Instances For
The only asymmetric quantifier is the empty one.
The only strongly connected quantifier is the universal one.
An irreflexive quantifier for which Q A B and Q B A give Q A A, as transitivity
requires, is asymmetric. So there is no strict partial order among the nonempty quantifiers.
A nonempty Euclidean quantifier is universal.
The postulates #
A quantifier has variety when it holds somewhere and fails somewhere.
Equations
- q.Variety = ((∃ (a : ℕ) (b : ℕ), q a b) ∧ ∃ (a : ℕ) (b : ℕ), ¬q a b)
Instances For
A quantifier is row-convex when it meets each row of the tree in an uninterrupted stretch.
Equations
- q.RowConvex = ∀ ⦃a₁ b₁ a b a₂ b₂ : ℕ⦄, a₁ + b₁ = a + b → a₂ + b₂ = a + b → a₁ ≤ a → a ≤ a₂ → q a₁ b₁ → q a₂ b₂ → q a b
Instances For
The postulate CONT asks that both the presence and the absence of the quantifier be uninterrupted along each row.
Instances For
A quantifier has no deadlock when adding an individual to A can always keep it true.
Equations
- q.NoDeadlock = ∀ ⦃a b : ℕ⦄, q a b → q (a + 1) b ∨ q a (b + 1)
Instances For
The postulate PLUS asks that neither the truth nor the falsity of the quantifier reach a deadlock.
Equations
- q.Plus = (q.NoDeadlock ∧ qᶜ.NoDeadlock)
Instances For
A quantifier is homogeneous when adding an individual to A has the same two outcomes
wherever the quantifier holds.
Equations
- q.Homogeneous = ∀ ⦃a₁ b₁ a₂ b₂ : ℕ⦄, q a₁ b₁ → q a₂ b₂ → (q (a₁ + 1) b₁ ↔ q (a₂ + 1) b₂) ∧ (q a₁ (b₁ + 1) ↔ q a₂ (b₂ + 1))
Instances For
The postulate UNIF asks that adding an individual have the same outcomes wherever the quantifier holds, and the same outcomes wherever it fails.
Equations
- q.Uniform = (q.Homogeneous ∧ qᶜ.Homogeneous)
Instances For
The square of opposition #
The four corners are the only quantifiers with variety that satisfy CONT, PLUS and UNIF.
The quantifiers with variety that satisfy CONT, PLUS and UNIF are exactly all, some, no and not all.
The quantifier at least two is not uniform. Adding an individual to A ∩ B leaves it false
at (0, 0) and makes it true at (0, 1).
Additivity #
A quantifier is additive when its points are closed under coordinatewise addition.
Equations
- q.Additive = ∀ ⦃a b a' b' : ℕ⦄, q a b → q a' b' → q (a + a') (b + b')
Instances For
The tree of a generalized quantifier #
A generalized quantifier counts its arguments with Set.ncard, which asks for no decidability;
the counts are meaningful when the sets are finite.
A quantifier has quantity when Q(A, B) depends only on the four cardinalities |A ∩ B|,
|A \ B|, |B \ A| and |M \ (A ∪ B)|.
Equations
- One or more equations did not get rendered due to their size.
Instances For
On a finite universe a permutation-invariant quantifier has quantity, since equal cell cardinalities give a permutation carrying each cell of one pair onto the same cell of the other.
A quantifier with quantity is permutation invariant, since a permutation preserves the cardinality of each cell.
A conservative, permutation-invariant quantifier on a finite universe holds of A and B
according to |A \ B| and |A ∩ B| alone.
The tree of a generalized quantifier holds of (a, b) when the quantifier holds of some
A and B with |A \ B| = a and |A ∩ B| = b.
Equations
- Quantifier.NumberTree.ofGQ Q a b = ∃ (A : α → Prop) (B : α → Prop), {x : α | A x ∧ ¬B x}.ncard = a ∧ {x : α | A x ∧ B x}.ncard = b ∧ Q A B
Instances For
A conservative, permutation-invariant quantifier on a finite universe holds of A and B
exactly when its tree holds of |A \ B| and |A ∩ B|.
The quantifier of a tree holds of A and B when the tree holds of |A \ B| and
|A ∩ B|.
Equations
- q.toGQ A B = q {x : α | A x ∧ ¬B x}.ncard {x : α | A x ∧ B x}.ncard
Instances For
The quantifier of a tree's inner negation is the inner negation of its quantifier.
On a finite universe the quantifier of a decidable tree is decidable at decidable arguments.
Equations
- Quantifier.NumberTree.toGQ.decidable q A B = decidable_of_iff (q {x : α | A x ∧ ¬B x}.card {x : α | A x ∧ B x}.card) ⋯
The quantifier of a tree is conservative, since A \ B and A ∩ B see only B ∩ A.
The quantifier of a tree has quantity, depending on two of the four cells.
The quantifier of a tree is permutation invariant.
The quantifier of a scope-monotone tree is scope monotone, since enlarging B within A moves
|A \ B ∩ B'| individuals from A \ B to A ∩ B.
The quantifier of a scope-antitone tree is scope antitone.
Counting quantifiers #
The points of rows 0 to n of the tree, each given with its row.
Equations
- Quantifier.NumberTree.points n = (Finset.range (n + 1)).sigma Finset.antidiagonal
Instances For
The conservative, permutation-invariant quantifiers on a universe of n individuals are the
sets of points in rows 0 to n of the tree.
Constant rows and the individuals a quantifier depends on #
A quantifier is constant on the n-th row when whether it holds of an n-element restrictor
does not depend on the scope.
Equations
- q.ConstantOnRow n = ∀ (a b a' b' : ℕ), a + b = n → a' + b' = n → (q a b ↔ q a' b')
Instances For
A quantifier is constant on rows 0 to n when, on a universe of n individuals, it does
not depend on its arguments at all.
Equations
- q.ConstantBelow n = ∀ (a b a' b' : ℕ), a + b ≤ n → a' + b' ≤ n → (q a b ↔ q a' b')
Instances For
A row is constant unless two adjacent points of it differ.
Rows 0 to n are constant unless two adjacent points among them differ.
The quantifier of a tree depends on whether an individual is in its scope only if the individual is in its restrictor and the tree is not constant on the restrictor's row.
The quantifier of a tree, as a function of its restrictor, depends for some scope on whether an individual is in the restrictor iff the tree is not constant below the size of the universe.