Alphabeta Math
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

✓ 10 results · all verified · 1 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full by a delegated reviewing agent on the owner's instruction; the judge is an additional, independent cross-model AI review of the proofs. The 9 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Inclusion–Exclusion, the Pigeonhole Principle and Double Counting: Examples and Counterexamples

1 · Prerequisites

2 · Summary

3 · Logical flowchart

4 · Definitions, theorems and proofs

None yet.

5 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

The sieve run in full on three explicit finite sets and then on four, with every nonempty intersection listed

Example

Take the ambient set X:=8={0,1,2,3,4,5,6,7} and the subsets

A0:={0,1,2,3},A1:={2,3,4,5},A2:={3,4,6},A3:={5,6,7}.

First the family (Ai)i∈3, a sieve family with ambient set X and index set I:=3 (A finite family (Ai)i∈I of subsets of a finite set X, the intersections AJ for J⊆I, and the convention A∅=X). Every intersection AJ for ∅≠J⊆3 is listed:

JAJ∣AJ∣
{0}{0,1,2,3}4
{1}{2,3,4,5}4
{2}{3,4,6}3
{0,1}{2,3}2
{0,2}{3}1
{1,2}{3,4}2
{0,1,2}{3}1

The union is A0∪A1∪A2={0,1,2,3,4,5,6}, of size 7, and the sieve returns (4+4+3)−(2+1+2)+1=7. The complementary form returns 8−(4+4+3)+(2+1+2)−1=1, and indeed X∖(A0∪A1∪A2)={7}.

Now the family (Ai)i∈4, with A3 adjoined and I:=4:

JAJ∣AJ∣
{0}{0,1,2,3}4
{1}{2,3,4,5}4
{2}{3,4,6}3
{3}{5,6,7}3
{0,1}{2,3}2
{0,2}{3}1
{0,3}∅0
{1,2}{3,4}2
{1,3}{5}1
{2,3}{6}1
{0,1,2}{3}1
{0,1,3}∅0
{0,2,3}∅0
{1,2,3}∅0
{0,1,2,3}∅0

The union is now all of X, of size 8, and the sieve returns (4+4+3+3)−(2+1+0+2+1+1)+(1+0+0+0)−0=14−7+1=8. The complementary form returns 8−14+7−1+0=0, and indeed X∖(A0∪A1∪A2∪A3)=∅.

Facts & Assumptions

Given: The ambient set X=8 and the subsets A0,A1,A2,A3 above, together with the two index sets I=3 and I=4 and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L1]

A listed set with distinct entries has as many elements as entries: if x0,…,xk−1 are distinct then j↦xj is a bijection of k onto {x0,…,xk−1}, so that set is finite of cardinality k (The cardinality ∣A∣ of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L2]

For a sieve family with ambient set X, finite index set I, union U=⋃i∈IAi and A∅=X, the sieve identity and its complementary form are ι∣U∣=∑∅≠J⊆I(−1)∣J∣+1ι∣AJ∣,ι∣X∖U∣=∑J⊆I(−1)∣J∣ι∣AJ∣ (Inclusion and exclusion: ι∣⋃i∈IAi∣=∑∅≠J⊆I(−1)∣J∣+1 ι∣AJ∣, together with the complementary form counting the elements in none of the Ai, A finite family (Ai)i∈I of subsets of a finite set X, the intersections AJ for J⊆I, and the convention A∅=X).

[L3]

Every J⊆I is finite with a unique natural cardinality ∣J∣≤∣I∣, while [I]j={J⊆I:∣J∣=j}; hence the levels [I]j for 1≤j≤∣I∣ are pairwise disjoint and have union P(I)∖{∅}. The sign attached to J is (−1)∣J∣+1, positive for odd ∣J∣ and negative for even ∣J∣ (The cardinality ∣A∣ of a finite set, A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A, The set [A]k of k-element subsets and the binomial coefficient (nk):=∣[n]k∣, The sum rule: a finite disjoint union is finite with ∣A∪B∣=∣A∣+∣B∣ and ∣⋃i∈IAi∣=∑i∈I∣Ai∣, and a sum over a finite index set splits along a partition, clause 3, The sum ∑i∈Sai over a finite index set, and its product form, Integer powers am).

[L4]

ι is additive and injective, so the arithmetic of the displayed sums may be carried out on the natural numbers and read in R (Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clauses 0 and 7, Ordered field).

Verification

technique · direct
1.1

The three-set family. A0, A1, A2 are subsets of X=8 with ∣A0∣=4, ∣A1∣=4 and ∣A2∣=3 by [L1], each entry list being strictly increasing and so having distinct entries.

givenL1
1.2

Its intersections. Intersecting the listed sets entry by entry gives A{0,1}={2,3}, A{0,2}={3}, A{1,2}={3,4} and A{0,1,2}={3}, of sizes 2, 1, 2 and 1 by [L1].

givenL1
1.3

Its union and complement. An element of X lies in A0∪A1∪A2 unless it is 7, since 0,1,2,3∈A0, 4,5∈A1 and 6∈A2 while 7 belongs to none of the three listed sets; so the union is {0,1,2,3,4,5,6}, of size 7, and its complement in X is {7}, of size 1.

givenL1
1.4

The four-set family. Adjoining A3={5,6,7}, of size 3, the remaining intersections are A{0,3}=∅, A{1,3}={5}, A{2,3}={6}, A{0,1,3}=A{0,2,3}=A{1,2,3}=∅ and A{0,1,2,3}=∅, of sizes 0, 1, 1, 0, 0, 0 and 0 by [L1] and clause (b) of The cardinality ∣A∣ of a finite set.

givenL1
1.5

The four-set union. Now 7∈A3, so the union is all of X, of size 8, and its complement in X is empty, of size 0.

givenL1
2.1

The sieve for three sets. Grouping by size as in [L3], clause 1 of [L2] reads ι∣A0∪A1∪A2∣=ι(4+4+3)−ι(2+1+2)+ι(1)=ι(11)−ι(5)+ι(1)=ι(7), which matches step 1.3.

step 1.1step 1.2step 1.3L2L3L4
2.2

The complementary form for three sets. Clause 2 of [L2] adds the term at J=∅, which is ι∣A∅∣=ι∣X∣=ι(8), and reverses every sign, giving ι(8)−ι(11)+ι(5)−ι(1)=ι(1), which matches the complement computed in step 1.3.

step 1.1step 1.2step 1.3L2L3L4
2.3

The sieve for four sets. The singleton terms now sum to 4+4+3+3=14, the pair terms to 2+1+0+2+1+1=7, the triple terms to 1+0+0+0=1 and the single four-element term is 0; so clause 1 of [L2] reads ι(14)−ι(7)+ι(1)−ι(0)=ι(8), which matches step 1.5, and clause 2 reads ι(8)−ι(14)+ι(7)−ι(1)+ι(0)=ι(0), again matching.

step 1.1step 1.2step 1.4step 1.5L2L3L4
3.1

Both families therefore satisfy both forms of the identity, with every intersection exhibited rather than inferred.

step 2.1step 2.2step 2.3∎

Remarks

  • Adjoining one set changes every level of the sum. Passing from three sets to four adds a singleton term, three pair terms, three triple terms and one four-element term, and the totals at each level move accordingly; what stays fixed is that the alternating combination reproduces the size of the union.

  • The terms that vanish are not omitted. A{0,3} and the three four-element-family triples are empty, so their terms are 0; they are still terms of the sum, and writing them keeps the count of terms at each level equal to the number of subsets of that size, which is what the grouping in [L3] asserts.

  • Where the complementary form gets its extra term. It runs over all subsets of the index set, including ∅, whose term is ι∣X∣. That is the only place the ambient set enters the arithmetic, and it is why the ambient set has to be named as part of the family.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

The surjections from a five-element set onto a three-element set counted by the sieve formula and by direct subtraction

Example

Take A:=5 and B:=3, so n=∣A∣=5 and k=∣B∣=3.

By the formula. The number of surjections from an n-element set onto a k-element set is ∑i<k+1(−1)i(ki)(k−i)n, read in R through ι gives

ι∣Surj⁡(A,B)∣=∑i<4(−1)i ι(3i) ι((3−i)5),

whose four terms are

i(3i)(3−i)5term
0135=243+243
1325=32−96
2315=1+3
3105=0−0

so the count is 243−96+3−0=150.

By direct subtraction. Every function A→B has an image S:=f[A]⊆B, and the sets { f:f[A]=S } for S⊆B partition the set of all 35=243 functions A→B. A function with image exactly S is precisely a surjection A→S, so the number of functions with image of size j is (3j) times the number of surjections from a five-element set onto a j-element set. Those numbers are 0 for j=0, since A≠∅; 1 for j=1, the constant function; and 25−2=30 for j=2, since a function into a two-element set fails to be onto exactly when it is one of the two constants. Hence

243=(30)⋅0+(31)⋅1+(32)⋅30+(33)⋅∣Surj⁡(A,B)∣=0+3+90+∣Surj⁡(A,B)∣,

so ∣Surj⁡(A,B)∣=243−93=150, in agreement.

Facts & Assumptions

Given: A=5, B=3, the set Map⁡(A,B) of all functions A→B, and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L2]
[L3]

If A,B are finite with ∣A∣=n and ∣B∣=k, then ι∣Surj⁡(A,B)∣=∑i<k+1(−1)iι(ki) ι((k−i)n) (The number of surjections from an n-element set onto a k-element set is ∑i<k+1(−1)i(ki)(k−i)n, read in R through ι).

[L4]

The image partition: for f∈Map⁡(A,B) put S:=f[A]; the sets MS:={ f:f[A]=S } for S⊆B are pairwise disjoint subsets of Map⁡(A,B) with union Map⁡(A,B), and MS is in bijection with Surj⁡(A,S) by restriction of the codomain, so ∣MS∣=∣Surj⁡(A,S)∣. If finite S,T have ∣S∣=∣T∣, finite cardinality supplies a bijection ϕ:S→T, and u↦ϕ∘u is a bijection Surj⁡(A,S)→Surj⁡(A,T) with inverse v↦ϕ−1∘v; hence these surjection counts depend only on the codomain cardinality (Injection, surjection, bijection, A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A, The cardinality ∣A∣ of a finite set).

[L6]

ι is additive, multiplicative and injective, and (−1)0=1, (−1)p+1=−(−1)p (Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clauses 0 and 7, Integer powers am, Ordered field).

Verification

technique · direct
1.1

The four terms of the formula. By [L2] and [L1] they are (+1)⋅1⋅243, (−1)⋅3⋅32, (+1)⋅3⋅1 and (−1)⋅1⋅0, the signs coming from [L6].

L1L2L6
1.2

The image partition is a partition, and the number of functions with image of size j is (3j) times the number of surjections onto a fixed j-element subset: [L4] gives equality of the surjection counts for all j-element codomains, and there are (3j) such subsets by [L5].

L4L5
1.3

The three easy image sizes. There is no surjection from the nonempty A onto ∅, so the j=0 contribution is 0; there is exactly one surjection onto a one-element set, the constant, so the j=1 contribution is 3⋅1=3; and a function from A into a two-element set is non-surjective exactly when it is constant, so the number of surjections is 25−2=30 by [L1] and the j=2 contribution is 3⋅30=90.

L1L2L4
2.1

Summing the four terms of step 1.1 gives 243−96+3−0=150, so ∣Surj⁡(A,B)∣=150 by [L3] and the injectivity of ι.

step 1.1L3L6
2.2

Summing the partition of step 1.2 gives 243=0+3+90+∣Surj⁡(A,B)∣ by [L1] and [L5], hence ∣Surj⁡(A,B)∣=150.

step 1.2step 1.3L1L5
3.1

The two computations agree, and each was carried out without reference to the other.

step 2.1step 2.2∎

Remarks

  • The second route is not a rearrangement of the first. It partitions the functions by their image and uses the surjection counts onto smaller sets, which at sizes 0, 1 and 2 are established directly rather than by the formula. So the agreement is a genuine check on the formula at n=5, k=3.

  • The last term of the formula is 0 and it is not decoration. At i=k the factor is 0n, which vanishes because n≥1; at n=0 it would be 00=1 instead, and that is the single point where the convention of Exponentiation of natural numbers, mn, and its agreement with the integer power in R is load bearing for this formula.

ExampleConstruction: AI-adaptedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

All nine derangements of a four-element set listed, and the count checked against the formula and both recurrences

Example

Take A:=4={0,1,2,3} and write a bijection f:A→A as the tuple (f(0),f(1),f(2),f(3)). The derangements of A (The derangement number Dn: the number of bijections of an n-element set with no fixed point) are exactly

(1,0,3,2)(1,2,3,0)(1,3,0,2)(2,0,3,1)(2,3,0,1)(2,3,1,0)(3,0,1,2)(3,2,0,1)(3,2,1,0)

so D4=9. Each tuple lists four distinct values, hence is a bijection, and no entry equals its position.

Against the formula. ι(Dn)=ι(n!)∑i<n+1(−1)i/ι(i!), with the term at i=0 equal to 1 and D0=1 gives

ι(D4)=ι(4!)∑i<5(−1)iι(i!)=24(1−1+12−16+124)=24⋅924=9.

Against the two recurrences. The earlier values are D0=1, D1=0, D2=1 and, by the first recurrence, D3=3 D2+(−1)3=3−1=2. Then ι(Dn)=ι(n) ι(Dn−1)+(−1)n for n≥1, and Dn=(n−1)(Dn−1+Dn−2) for n≥2 gives ι(D4)=ι(4) ι(D3)+(−1)4=4⋅2+1=9 from its first clause, and D4=3 (D3+D2)=3 (2+1)=9 from its second.

Facts & Assumptions

Given: A=4={0,1,2,3}, the tuple notation above, and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L2]

For every finite set B, Der⁡(B) is the set of bijections f:B→B with f(b)≠b for every b∈B, and ∣Der⁡(B)∣=D∣B∣; hence D4=∣Der⁡(A)∣ because ∣A∣=4 (The derangement number Dn: the number of bijections of an n-element set with no fixed point, The cardinality ∣A∣ of a finite set, clause (a)). The values D0=1, D1=0 and D2=1 are also recorded in the cited definition.

[L3]

For every n∈N, ι(Dn)=ι(n!)∑i<n+1(−1)i/ι(i!). For n≥1, ι(Dn)=ι(n)ι(Dn−1)+(−1)n; and for n≥2, Dn=(n−1)(Dn−1+Dn−2) (ι(Dn)=ι(n!)∑i<n+1(−1)i/ι(i!), with the term at i=0 equal to 1 and D0=1, ι(Dn)=ι(n) ι(Dn−1)+(−1)n for n≥1, and Dn=(n−1)(Dn−1+Dn−2) for n≥2).

[L4]

Factorials: 0!=1, 1!=1, 2!=2, 3!=6, 4!=24 (The factorial n! and the falling factorial nk‾, defined by recursion in N).

[L5]

Real finite sums and the arithmetic of R: recursion clause, additivity and scaling (Finite sums and finite products, by recursion, Laws of finite sums and finite products, Ordered field); and (−1)0=1, (−1)p+1=−(−1)p (Integer powers am).

[L6]

Cardinality of a listed set with distinct entries (The cardinality ∣A∣ of a finite set, clauses (a) and (c)).

[L7]

The canonical natural ι:N→R is additive, multiplicative and injective (Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clauses 0 and 7).

Verification

technique · cases
1.1

Each of the nine listed tuples has four distinct entries and no entry equal to its position, so each is a derangement of A by [L1] and [L2]; and the nine tuples are pairwise distinct, so the listed set has nine elements by [L6].

givenL1L2L6
1.2

The enumeration is complete, and the cases are indexed by the value f(0), which is 1, 2 or 3 since f(0)≠0.

givenL2
2.1

Case f(0)=1. Then f(1)∈{0,2,3}. If f(1)=0 the remaining values {2,3} go to positions 2 and 3 with f(2)≠2, forcing (1,0,3,2). If f(1)=2 the remaining values are {0,3} with f(3)≠3, forcing (1,2,3,0). If f(1)=3 the remaining values are {0,2} with f(2)≠2, forcing (1,3,0,2).

assume-case onestep 1.2L2
2.2

Case f(0)=2. Then f(1)∈{0,3}. If f(1)=0 the remaining values {1,3} go to positions 2 and 3 with f(3)≠3, forcing (2,0,3,1). If f(1)=3 the remaining values are {0,1} and neither placement is excluded, giving (2,3,0,1) and (2,3,1,0).

assume-case twostep 1.2L2
2.3

Case f(0)=3. Then f(1)∈{0,2}. If f(1)=0 the remaining values {1,2} go to positions 2 and 3 with f(2)≠2, forcing (3,0,1,2). If f(1)=2 the remaining values are {0,1} and neither placement is excluded, giving (3,2,0,1) and (3,2,1,0).

assume-case threestep 1.2L2
3.1

The three cases are exhaustive and produce exactly the nine listed tuples, so D4=9.

step 1.1step 2.1step 2.2step 2.3cases-exhaustiveL2
4.1

Against the formula. By [L3] and [L4], ι(D4)=ι(24)(1−1+1/2−1/6+1/24); the bracket is 9/24 by [L5], so ι(D4)=9, matching step 3.1.

step 3.1L3L4L5
4.2

Against the recurrences. By [L2] and the first clause of [L3], ι(D3)=ι(3)ι(D2)+(−1)3=ι(3)−ι(1)=ι(2), so D3=2 by injectivity of ι. Then ι(D4)=ι(4)ι(D3)+(−1)4=ι(8)+ι(1)=ι(9); by the second clause, D4=3(D3+D2)=3⋅3=9. Both match step 3.1.

step 3.1L2L3L5L7
5.1

The list, the formula and the two recurrences therefore all give D4=9.

step 3.1step 4.1step 4.2∎

Remarks

  • The case analysis is on f(0) and then on f(1), and the remaining two positions are then forced or free according to whether the two leftover values can be placed without creating a fixed point. Where exactly one placement avoids a fixed point the tuple is determined; where both do, the subcase splits. The branching pattern therefore differs between the cases even though each contributes the same number of derangements.

  • The recurrences are checked at their first legal indices too. The first recurrence is used at n=3 and at n=4, both at least 1; the second at n=4, which is at least 2. Neither is evaluated where its hypothesis fails.

ExampleConstruction: AI-adaptedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

The ratio ι(Dn)/ι(n!) computed for small n as a quotient of two counts, with no probability space claimed

Example

For n∈N consider the real number

rn  :=  ι(Dn)ι(n!),

the quotient of the count of derangements of an n-element set (The derangement number Dn: the number of bijections of an n-element set with no fixed point) by the count of all its bijections, ∣Bij⁡(n)∣=n! (The factorial n! and the falling factorial nk‾, defined by recursion in N). The quotient is legitimate because n!≠0. Dividing the derangement formula by ι(n!) gives

rn  =  ∑i<n+1(−1)iι(i!),

so rn is the truncated alternating sum itself. Its first values, obtained from D0=1, D1=0, D2=1 and the first recurrence ι(Dn)=ι(n)ι(Dn−1)+(−1)n (ι(Dn)=ι(n) ι(Dn−1)+(−1)n for n≥1, and Dn=(n−1)(Dn−1+Dn−2) for n≥2), are

nDnn!rn
0111
1010
2121/2
3261/3
49243/8
54412011/30
626572053/144

This is a ratio of two counts and nothing else. Nothing among this page's declared prerequisites defines a probability space, a measure or an expectation, so rn is not called a probability here and no statement about random behaviour is made. What is asserted is exactly that the numerator counts the fixed-point-free bijections, that the denominator counts all of them, and that the quotient is the displayed alternating sum.

Facts & Assumptions

Given: The derangement numbers Dn, the factorials n!, and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L1]

The derangement formula: ι(Dn)=ι(n!)∑i<n+1(−1)i/ι(i!) (ι(Dn)=ι(n!)∑i<n+1(−1)i/ι(i!), with the term at i=0 equal to 1 and D0=1).

[L4]

R is an ordered field, so division by a nonzero element is available and the displayed arithmetic is legitimate (Ordered field, Field); (−1)p+1=−(−1)p and (−1)0=1 (Integer powers am); and real finite sums obey the recursion clause (Finite sums and finite products, by recursion, Laws of finite sums and finite products).

[L5]

Factorials: 0!=1, 1!=1, 2!=2, 3!=6, 4!=24, 5!=120, 6!=720 (The factorial n! and the falling factorial nk‾, defined by recursion in N).

Verification

technique · direct
1.1

The quotient form. Dividing the identity of [L1] by the nonzero ι(n!) gives rn=∑i<n+1(−1)i/ι(i!) for every n∈N.

L1L2L4
1.2

The derangement numbers up to 6. From D2=1 and [L3]: ι(D3)=3⋅1−1=2, ι(D4)=4⋅2+1=9, ι(D5)=5⋅9−1=44 and ι(D6)=6⋅44+1=265; since ι is injective these are the natural numbers D3=2, D4=9, D5=44, D6=265.

L2L3L4
2.1

The tabulated ratios. Dividing the base values in [L3] and the values from step 1.2 by the factorials of [L5] gives r0=1/1=1, r1=0/1=0, r2=1/2, r3=2/6=1/3, r4=9/24=3/8, r5=44/120=11/30 and r6=265/720=53/144.

step 1.2L3L4L5
2.2

A cross-check at n=4 through step 1.1: ∑i<5(−1)i/ι(i!)=1−1+1/2−1/6+1/24=9/24=3/8, which is r4.

step 1.1L4L5
3.1

So rn is the truncated alternating sum, and its values through n=6 are as tabulated.

step 2.1step 2.2∎

Remarks

  • The alternation is visible in the table. r1=0 is below r2=1/2, which is above r3=1/3, which is below r4=3/8; each successive value differs from the previous one by the single term (−1)n/ι(n!), whose sign alternates and whose size decreases.

  • No limit is claimed. The quotient is computed at each n from two counts, and nothing here asserts convergence or names a limiting value; the exponential function that would be needed to state such a limit is not among this page's declared prerequisites.

  • Why the division is legitimate at every n, including n=0. The denominator is ι(n!) and n! is never 0, its recursion starting at 0!=1 and multiplying by nonzero successors.

ExampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

In a finite set with a symmetric irreflexive relation and at least two elements, two elements have equally many neighbours

Example

Let V be a finite set with N:=∣V∣≥2, and let R⊆V×V be symmetric and irreflexive (A relation R⊆X×Y between finite sets, its row fibres Rx and its column fibres Ry, clause (d)). Write d(x):=∣Rx∣ for the number of neighbours of x. Then there are x≠y in V with d(x)=d(y).

The point is that the possible values of d are 0,1,…,N−1, which is as many values as V has elements, so counting alone does not settle it. What settles it is that the two extreme values cannot both occur: if some x0 has no neighbour then no y can be a neighbour of everything else, since it would then be a neighbour of x0.

Concretely, with V:=3={0,1,2} and R:={(0,1),(1,0)}, the neighbour counts are d(0)=1, d(1)=1 and d(2)=0, and the elements 0 and 1 have equally many neighbours.

Facts & Assumptions

Given: A finite set V with N=∣V∣≥2, a symmetric irreflexive relation R⊆V×V, and the neighbour counts d(x)=∣Rx∣.

[L4]

Symmetry: x∈Ry if and only if y∈Rx (A relation R⊆X×Y between finite sets, its row fibres Rx and its column fibres Ry, clause (d)).

[L5]

The counting form of the strong pigeonhole principle: if ∣A∣>1⋅∣B∣ then some fibre of any f:A→B has more than one element (If ∣A∣>k∣B∣ then every f:A→B has a fibre with more than k elements, and for nonempty B some fibre has at least ⌈∣A∣/∣B∣⌉ elements, clause 1, Injection, surjection, bijection).

[L6]

Order and membership in N: k≤N−2 if and only if k<N−1, that is k∈N−1; N≥2 gives N−1≥1 and (N−1)−1=N−2; and exactly one of p<q, p=q, q<p holds (On N the order is membership: m<n  ⟺  m∈n, Order on the natural numbers, Trichotomy of the order on N, Order is compatible with addition, The natural numbers N (von Neumann), Finite sums and finite products of natural numbers, ∑k<nak and ∏k<nak in N).

[L7]

Every natural number is a finite set whose cardinality is itself; in particular ∣N−1∣=N−1 (The cardinality ∣A∣ of a finite set, clause (a)).

Verification

technique · cases
1.1

By [L1] and [L2], d(x)≤N−1 for every x∈V; and N≥2, so N−1≥1 by [L6].

givenL1L2L6
1.2

The two extreme values cannot both be attained. Suppose d(x0)=0 and d(y)=N−1 for some x0,y∈V. Then x0≠y, since 0≠N−1 by [L6]; by [L3] we have Ry=V∖{y}, so x0∈Ry, so y∈Rx0 by [L4], so d(x0)≥1, contradicting d(x0)=0.

L1L3L4L6
2.1

Case (a): no x∈V has d(x)=0. Then 1≤d(x)≤N−1 for every x, so d(x)−1≤N−2, that is d(x)−1∈N−1 by [L6]; thus x↦d(x)−1 maps V into the set N−1, whose cardinality is N−1. Since N>N−1, [L5] gives two distinct x≠y with d(x)−1=d(y)−1, and since both counts are at least 1 this forces d(x)=d(y).

assume-case posstep 1.1L5L6L7
2.2

Case (b): some x0∈V has d(x0)=0. Then by step 1.2 no y has d(y)=N−1, so d(x)≤N−2 for every x by [L1], [L2] and [L6], that is d(x)∈N−1; thus d maps V into the set N−1, of cardinality N−1. Since N>N−1, [L5] gives two distinct x≠y with d(x)=d(y).

assume-case zerostep 1.1step 1.2L1L2L5L6L7
3.1

The two cases are exhaustive, so in either case two distinct elements of V have equally many neighbours.

step 2.1step 2.2cases-exhaustive∎

Remarks

  • Where N≥2 is spent. Twice: to make N−1 at least 1, so that the set of possible values is nonempty and the shift by 1 in case (a) lands inside N−1; and to make 0 and N−1 different, which is what step 1.2 needs.

  • Why the naive count is not enough. The values of d lie in a set of N naturals and V has N elements, so the pigeonhole principle says nothing until the range is cut down. Both cases cut it to N−1 values, one by removing 0 and one by removing N−1, and the exclusion of the other extreme is what licenses the cut.

  • Symmetry and irreflexivity are both used. Irreflexivity gives the bound d(x)≤N−1; symmetry is what turns "x0 is a neighbour of y" into "y is a neighbour of x0" in step 1.2. Neither can be dropped.

ExampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

For a finite symmetric irreflexive relation the sum of the neighbour counts is twice the number of unordered related pairs

Example

Let V be a finite set and R⊆V×V symmetric and irreflexive (A relation R⊆X×Y between finite sets, its row fibres Rx and its column fibres Ry, clause (d)), with neighbour counts d(x):=∣Rx∣. Put

E  :=  { S∈[V]2 : S={x,y} for some (x,y)∈R },

the set of two-element subsets of V whose elements are related. Then, in N,

∑x∈Vd(x)  =  2 ∣E∣.

A concrete instance. With V:=4={0,1,2,3} and R the symmetric irreflexive relation whose related unordered pairs are {0,1}, {1,2} and {2,3}, the neighbour counts are d(0)=1, d(1)=2, d(2)=2, d(3)=1, summing to 6=2⋅3, and ∣E∣=3.

0123d(0)=1d(1)=2d(2)=2d(3)=1Eachsegmentfx;yg2Erepresents(x;y)and(y;x)inR.

The extreme instance. If R relates every pair of distinct elements of V then E=[V]2 and d(x)=N−1 for every x, where N:=∣V∣; the identity then reads N (N−1)=2(N2), which is A finite set with n elements has exactly (n2) two-element subsets, and 2(n2)=n(n−1).

Facts & Assumptions

Given: A finite set V, a symmetric irreflexive relation R⊆V×V, the neighbour counts d(x)=∣Rx∣, and the set E above.

[L4]

If x≠y, then 0↦x, 1↦y is a bijection 2→{x,y}, so ∣{x,y}∣=∣2∣=2; more generally, a bijection from a finite set transports its cardinality to the codomain (The cardinality ∣A∣ of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L5]

∣[V]2∣=(N2) and 2(N2)=N(N−1) for every N∈N (A finite set with n elements has exactly (n2) two-element subsets, and 2(n2)=n(n−1)).

Verification

technique · direct
1.1

The pairing map. For (x,y)∈R irreflexivity gives x≠y, so {x,y} has exactly two elements by [L4] and lies in E; write Ψ(x,y):={x,y}, a map R→E. It is surjective, since every S∈E is {x,y} for some (x,y)∈R by the definition of E.

givenL2L4construct
1.2

Every fibre of Ψ has exactly two elements. Let S={x,y}∈E with x≠y. A pair (u,v)∈R with {u,v}=S has u≠v, so (u,v) is (x,y) or (y,x); and both of these lie in R, since at least one of them does and R is symmetric. So Ψ−1[{S}]={(x,y),(y,x)}, which has two elements because x≠y.

givenL4
2.1

Counting R by the fibres of Ψ. The fibres of Ψ are pairwise disjoint finite sets indexed by the finite set E, with union R, so [L3] gives ∣R∣=∑S∈E∣Ψ−1[{S}]∣=∑S∈E2=∣E∣⋅2.

step 1.1step 1.2L2L3
3.1

Combining with [L1], ∑x∈Vd(x)=∣R∣=2 ∣E∣, which is the identity. In the extreme case where R relates every pair of distinct elements, E=[V]2 and the neighbours of x are exactly V∖{x}, so d(x)=N−1 by [L3]; the identity therefore reads N(N−1)=2(N2) by [L3] and [L5].

step 2.1L1L3L5given∎

Remarks

  • Where symmetry is spent. Only in step 1.2, to know that both ordered pairs over a related unordered pair lie in R; without it a fibre could have one element and the factor 2 would be wrong. Irreflexivity is spent in step 1.1, to know that {x,y} really is a two-element set.

  • This is double counting of one set, not two computations of two sets. The relation R is counted once by its row fibres, which gives the sum of the neighbour counts, and once by the fibres of Ψ, which gives twice the number of related unordered pairs. Both are instances of the sum rule over a partition.

  • No graph vocabulary is used. The data are a finite set and a symmetric irreflexive relation on it, and E is a set of two-element subsets. Nothing among this page's declared prerequisites defines a graph, and nothing here needs one.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

Distributing a finite set over a finite set of boxes, with the ceiling bound computed and attained

Example

Take A:=17 and B:=5, so ∣A∣=17 and ∣B∣=5.

The ceiling. ⌈17/5⌉=4: the least q with 17≤5q is 4, since 5⋅3=15<17 while 5⋅4=20≥17 (⌈m/n⌉ for naturals m and n≥1: the least q∈N with m≤nq). So If ∣A∣>k∣B∣ then every f:A→B has a fibre with more than k elements, and for nonempty B some fibre has at least ⌈∣A∣/∣B∣⌉ elements says that every f:A→B has a fibre with at least 4 elements.

The bound is attained. Partition A into the blocks

P0:={0,1,2,3},P1:={4,5,6,7},P2:={8,9,10},P3:={11,12,13},P4:={14,15,16},

and let f:A→B send each i to the unique b with i∈Pb. The fibre sizes are 4,4,3,3,3, summing to 17, and the largest of them is 4. So no f:A→B has all its fibres smaller than 4, and some f has none larger than 4: the ceiling bound is exactly right for this pair of sizes and cannot be raised to 5.

44333b=0b=1b=2b=3b=4jf¡1[fbg]j:4+4+3+3+3=17.

The counting form behind it. 17>3⋅5=15, so clause 1 of If ∣A∣>k∣B∣ then every f:A→B has a fibre with more than k elements, and for nonempty B some fibre has at least ⌈∣A∣/∣B∣⌉ elements already gives a fibre with more than 3 elements, that is with at least 4; and 17>4⋅5=20 is false, so clause 1 gives nothing at k=4, which matches the witness above.

Facts & Assumptions

Given: A=17, B=5, the blocks P0,…,P4 above, and the function f:A→B they define.

[L1]

The ceiling: ⌈m/n⌉ is the least q∈N with m≤nq, for n≥1 (⌈m/n⌉ for naturals m and n≥1: the least q∈N with m≤nq).

[L2]

If f:A→B maps finite sets and k∈N, then (i) ∣A∣>k∣B∣ implies some fibre has more than k elements, and (ii), when B≠∅, some fibre has at least ⌈∣A∣/∣B∣⌉ elements (If ∣A∣>k∣B∣ then every f:A→B has a fibre with more than k elements, and for nonempty B some fibre has at least ⌈∣A∣/∣B∣⌉ elements, Injection, surjection, bijection).

[L3]

A listed set with distinct entries has as many elements as entries (The cardinality ∣A∣ of a finite set, clauses (a) and (c), Injection, surjection, bijection); and ∣17∣=17, ∣5∣=5.

[L5]

Arithmetic and order of N: 5⋅3=15, 5⋅4=20, 15<17≤20, and exactly one of p<q, p=q, q<p holds (Multiplication of natural numbers, Order on the natural numbers, Trichotomy of the order on N).

Verification

technique · direct
1.1

The blocks are pairwise disjoint with union A, each entry of A=17 appearing in exactly one of them, and their cardinalities are 4, 4, 3, 3, 3 by [L3]. So f is a well-defined function A→B and its fibres are exactly the blocks: f−1[{b}]=Pb.

givenL3construct
1.2

The ceiling is 4. By [L5], 5⋅3=15<17, and likewise 5⋅0=0, 5⋅1=5 and 5⋅2=10, all of them less than 17, so no q<4 satisfies 17≤5q; and 5⋅4=20≥17, so 4 does. Hence ⌈17/5⌉=4 by [L1].

L1L5
2.1

Every f:A→B has a fibre with at least 4 elements, by clause 2 of [L2] with B≠∅ and the value computed in step 1.2; equivalently, by clause 1 of [L2] with k=3, since 17>3⋅5=15.

step 1.2L2L5
2.2

The witness of step 1.1 has no fibre with more than 4 elements, its fibre sizes being 4,4,3,3,3; and these sum to 17=∣A∣, in agreement with [L4].

step 1.1L3L4
3.1

So the ceiling bound of step 1.2 is attained and cannot be improved for this pair of sizes: every function has a fibre of size at least 4, and some function has every fibre of size at most 4.

step 2.1step 2.2∎

Remarks

  • Why the counting form stops at k=3. Clause 1 needs ∣A∣>k∣B∣, and 17>20 is false, so it says nothing at k=4. That is exactly right: a fibre with more than 4 elements is not forced, as the witness shows. The ceiling form is the counting form used at the largest k for which the hypothesis still holds.

  • The unequal block sizes are unavoidable. A function with all fibres of size 3 would give ∣A∣=15, and one with all fibres of size 4 would give 20; since 17 lies strictly between, the fibre sizes of any f cannot all be equal.

CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (z-ai/glm-5.2)verified 2026-07-29 (claude-fable-5)Open item page →

A three-set count that drops the triple intersection and returns the wrong answer

Statement refuted

Refuted claim: the sieve identity for three sets with its triple term deleted, that is FALSE: the real-valued three-set inclusion-exclusion identity remains true after deleting the triple-intersection term:

ι∣A∪B∪C∣=ι∣A∣+ι∣B∣+ι∣C∣−ι∣A∩B∣−ι∣A∩C∣−ι∣B∩C∣.

The witness is a family of overlapping but unequal sets, so that no cardinality in the computation is degenerate. Inside X:=5={0,1,2,3,4} take

A:={0,1,2},B:={1,2,3},C:={2,3,4}.

The truncated right-hand side returns 4, while the union has 5 elements; the missing triple term is ∣A∩B∩C∣=1, and restoring it gives 5.

Facts & Assumptions

Given: X=5, A={0,1,2}, B={1,2,3}, C={2,3,4}, and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L1]

A listed set with distinct entries has as many elements as entries (The cardinality ∣A∣ of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L3]

ι is additive and injective, so the arithmetic below may be carried out on natural numbers and read in R, where subtraction is available (Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clauses 0 and 7, Ordered field, Field).

Counterexample

technique · constructive
1.1

The three sets are subsets of X with ∣A∣=∣B∣=∣C∣=3 by [L1], their entry lists being strictly increasing and so having distinct entries.

givenL1construct
1.2

The intersections. Comparing the listed sets entry by entry gives A∩B={1,2}, A∩C={2}, B∩C={2,3} and A∩B∩C={2}, of sizes 2, 1, 2 and 1 by [L1].

givenL1
1.3

The union. Every element of X lies in one of the three sets: 0,1,2∈A, 3∈B and 4∈C. So A∪B∪C=X, of size 5 by [L1].

givenL1
2.1

The truncated right-hand side. By steps 1.1 and 1.2 it is 3+3+3−2−1−2=4, while the left-hand side is 5 by step 1.3. Since 4≠5 in R by [L3], the refuted claim fails on this family.

step 1.1step 1.2step 1.3L3
3.1

The correct computation. By [L2] the sieve sum carries the triple term with sign (−1)4=+1, so it reads 3+3+3−2−1−2+1=5, which is ι∣A∪B∪C∣ by step 1.3. The discrepancy of step 2.1 is exactly ∣A∩B∩C∣=1, the element 2 lying in all three sets.

step 1.2step 2.1L2L3discharge-construct∎

Remarks

  • Every set in the witness is a proper subset of X and no two of them are equal, so the failure is not an artefact of a degenerate family. What makes the truncated formula wrong is only that the triple intersection is nonempty.

  • The direction of the error. The truncation at depth 2 under-counts, by exactly the size of the triple intersection. That is the direction the Bonferroni inequalities predict for an even truncation, and the size of the gap here is the single term that the next level of the sieve would add.

CounterexampleConstruction: AI-adaptedVerification: AI-adaptedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

A list of six distinct reals with no strictly increasing sublist of length four and no strictly decreasing sublist of length three

Statement refuted

Refuted claim: FALSE: every list of mn pairwise distinct reals has a strictly increasing sublist of length m+1 or a strictly decreasing sublist of length n+1 at m=3 and n=2, that is, the assertion that every pairwise distinct list of mn=6 reals has a strictly increasing sublist of length m+1=4 or a strictly decreasing sublist of length n+1=3.

The witness is the list a:6→R with values

(a0,a1,a2,a3,a4,a5)=(ι(2),ι(1),ι(4),ι(3),ι(6),ι(5)),

that is 2,1,4,3,6,5 read through the canonical natural (The canonical natural ι(n)=n⋅1F of a field). It is the instance at m=3, n=2 of the construction of For all m and n there is a list of mn pairwise distinct reals with no strictly increasing sublist of length m+1 and no strictly decreasing sublist of length n+1: three blocks of two positions each, decreasing inside a block and increasing across blocks.

Its longest strictly increasing sublist has length 3, for example a0,a2,a4, and its longest strictly decreasing sublist has length 2, for example a0,a1.

positionvalue214365P0P1P2decreasingblocksoflength2theincreasingsublist2;4;6

Facts & Assumptions

Given: The list a:6→R above, and the three index blocks P0:={0,1}, P1:={2,3}, P2:={4,5}, with blk(i):=b for i∈Pb.

[L1]

A sublist of length L is a strictly increasing s:L→6. It is strictly increasing when as(p)<as(q) for every p<q<L, and strictly decreasing when as(p)>as(q) for every such pair (A finite list of reals, and its strictly increasing and strictly decreasing sublists, Injection, surjection, bijection).

[L2]

ι is strictly increasing, so the comparisons between the six values are those between 1,2,3,4,5,6 in N; natural order satisfies trichotomy, so distinct indices can be put in increasing order and K<L fails exactly when L≤K (Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clause 7, Ordered field, Order on the natural numbers, Trichotomy of the order on N).

[L3]

If a finite set S has ∣S∣=K<L, there is no injection L→S: composing one with a bijection S→K supplied by finite cardinality would contradict the natural-number pigeonhole principle (The cardinality ∣A∣ of a finite set, Injection, surjection, bijection, The pigeonhole principle on N, clause 2).

Counterexample

technique · constructive
1.1

The list is pairwise distinct: its values are ι(2),ι(1),ι(4),ι(3),ι(6),ι(5), and the naturals 1,2,3,4,5,6 are pairwise distinct, so their canonical naturals are too by [L2].

givenL2construct
1.2

Inside a block the values decrease. a0=ι(2)>ι(1)=a1, a2=ι(4)>ι(3)=a3 and a4=ι(6)>ι(5)=a5, by [L2].

givenL2
1.3

Across blocks the values increase. Every value at a position of P0 is ι(1) or ι(2), every value at a position of P1 is ι(3) or ι(4), and every value at a position of P2 is ι(5) or ι(6); so b<b′ implies that every value on Pb is smaller than every value on Pb′, by [L2]. Also i<i′ implies blk(i)≤blk(i′), since the blocks list the positions in increasing order.

givenL2
2.1

No strictly increasing sublist of length 4. Let s:L→6 be a strictly increasing sublist. If p<q<L had blk(s(p))=blk(s(q)), then s(p)<s(q) lie in one block, so as(p)>as(q) by step 1.2, contradicting that the values increase. Natural trichotomy in [L2] makes this sufficient for blk∘s to be an injection of L into 3; [L3] and [L2] then give L≤3, hence L≠4.

step 1.2L1L2L3
2.2

No strictly decreasing sublist of length 3. Let s:L→6 be a strictly decreasing sublist and let p<q<L. Then s(p)<s(q), so blk(s(p))≤blk(s(q)) by step 1.3; and a strict inequality there would give as(p)<as(q) by step 1.3, contradicting that the values decrease. So all positions of s lie in one block, and s is an injection of L into a two-element set; [L3] and natural trichotomy in [L2] give L≤2, hence L≠3.

step 1.3L1L2L3
3.1

The list of step 1.1 is therefore a pairwise distinct list of 6=3⋅2 reals with neither of the two sublists the refuted claim asserts, so that claim is false at m=3, n=2; what holds instead is [L4] at length 3⋅2+1=7.

step 1.1step 2.1step 2.2L4discharge-construct∎

Remarks

  • The two bounds come from the two block counts. An increasing sublist takes at most one position from each block, so its length is bounded by the number of blocks; a decreasing sublist stays inside one block, so its length is bounded by the block size. Exchanging the roles of the block count and the block size would give a witness for the pair (2,3) instead.

  • Both bounds are attained, by a0,a2,a4 and by a0,a1 respectively, so the witness is not merely short of the two thresholds: it sits exactly one below each.

CounterexampleConstruction: AI-generatedVerification: AI-generatedprecheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)Open item page →

A relation whose row fibres all differ from the average size, so the averaging principle gives a bound that no fibre meets exactly

Statement refuted

Refuted claim: that the averaging principle produces a row fibre of exactly the average size, that is, that for every relation R⊆X×Y between finite sets with X≠∅ there is x∈X with

ι(∣Rx∣)  =  μ  :=  ι(∣R∣)ι(∣X∣).

What If X is nonempty, some row fibre is at least the average size and some row fibre is at most the average size asserts is only that some row fibre is at least μ and some row fibre is at most μ; equality is not claimed, and it can fail, because μ is a real number while a fibre size is a natural number.

The witness is X:=2={0,1}, Y:=3={0,1,2} and

R:={ (0,0), (1,0), (1,1) }⊆X×Y.

Here ∣R∣=3 and ∣X∣=2, so μ=3/2, while the row fibres have sizes 1 and 2.

Facts & Assumptions

Given: X=2, Y=3, R={(0,0),(1,0),(1,1)}, and the canonical natural ι (The canonical natural ι(n)=n⋅1F of a field).

[L2]

A listed set with distinct entries has as many elements as entries (The cardinality ∣A∣ of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L4]

If R⊆X×Y is a finite incidence relation with X≠∅ and μ=ι(∣R∣)/ι(∣X∣), then some x+∈X satisfies ι(∣Rx+∣)≥μ and some x−∈X satisfies ι(∣Rx−∣)≤μ (If X is nonempty, some row fibre is at least the average size and some row fibre is at most the average size).

[L5]

R is an ordered field, so μ is defined once ι(∣X∣)≠0, and ι is strictly increasing with ι(0)=0, ι(1)=1, ι(2)=1+1, ι(3)=1+1+1 (Ordered field, Field, Laws of finite sums and products in N, and ι(∑k<nak)=∑k<nι(ak), clauses 0 and 7).

Counterexample

technique · constructive
1.1

The fibres. R0={0} and R1={0,1}, so ∣R0∣=1 and ∣R1∣=2 by [L1] and [L2]; and ∣R∣=3, the three listed pairs being distinct.

givenL1L2construct
1.2

The average. ∣X∣=2≠0, so μ=ι(3)/ι(2) is defined by [L5]; and ι(2) ι(1)=ι(2)<ι(3)<ι(2)+ι(2)=ι(2) ι(2), so dividing by the positive ι(2) gives ι(1)<μ<ι(2) by [L5].

givenL2L5
1.3

The column fibres check the count. R0={0,1}, R1={1} and R2=∅, of sizes 2, 1 and 0, and 2+1+0=3=∣R∣, in agreement with [L3].

givenL1L2L3
2.1

No row fibre has size μ. The values ι(∣R0∣)=ι(1) and ι(∣R1∣)=ι(2) are the only candidates by step 1.1, and step 1.2 places μ strictly between them. So the refuted claim fails on this relation.

step 1.1step 1.2L5
3.1

What [L4] does give here, and it is sharp as stated: x+:=1 has ι(∣R1∣)=ι(2)>μ, and x−:=0 has ι(∣R0∣)=ι(1)<μ. Both inequalities hold strictly, and neither can be improved to an equality by another choice of x, since step 1.1 lists all the row fibres.

step 1.1step 1.2step 2.1L4discharge-construct∎

Remarks

  • Why equality was never available. μ is a quotient of two natural numbers formed in R, and nothing forces it to be the canonical natural of a natural number. Here ∣X∣ does not divide ∣R∣ in any sense the page supplies, and the average falls strictly between two consecutive fibre sizes.

  • The two elements produced by the averaging principle are distinct here, and in general they need not be: if every fibre has the same size then a single x serves as both. What the witness shows is only that neither inequality can be strengthened to an equality in general.

Sources