Alphabeta Math
Session-authored (Fable 5 assisted)
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}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}.A_0 := \{0,1,2,3\}, \qquad A_1 := \{2,3,4,5\}, \qquad A_2 := \{3,4,6\}, \qquad A_3 := \{5,6,7\}.

First the family (Ai)i3(A_i)_{i \in 3}, a sieve family with ambient set XX and index set I:=3I := 3 (A finite family (Ai)iI(A_i)_{i \in I} of subsets of a finite set XX, the intersections AJA_J for JIJ \subseteq I, and the convention A=XA_\varnothing = X). Every intersection AJA_J for J3\varnothing \ne J \subseteq 3 is listed:

JJAJA_JAJ\lvert A_J\rvert
{0}\{0\}{0,1,2,3}\{0,1,2,3\}44
{1}\{1\}{2,3,4,5}\{2,3,4,5\}44
{2}\{2\}{3,4,6}\{3,4,6\}33
{0,1}\{0,1\}{2,3}\{2,3\}22
{0,2}\{0,2\}{3}\{3\}11
{1,2}\{1,2\}{3,4}\{3,4\}22
{0,1,2}\{0,1,2\}{3}\{3\}11

The union is A0A1A2={0,1,2,3,4,5,6}A_0 \cup A_1 \cup A_2 = \{0,1,2,3,4,5,6\}, of size 77, and the sieve returns (4+4+3)(2+1+2)+1=7(4+4+3) - (2+1+2) + 1 = 7. The complementary form returns 8(4+4+3)+(2+1+2)1=18 - (4+4+3) + (2+1+2) - 1 = 1, and indeed X(A0A1A2)={7}X \setminus (A_0\cup A_1\cup A_2) = \{7\}.

Now the family (Ai)i4(A_i)_{i \in 4}, with A3A_3 adjoined and I:=4I := 4:

JJAJA_JAJ\lvert A_J\rvert
{0}\{0\}{0,1,2,3}\{0,1,2,3\}44
{1}\{1\}{2,3,4,5}\{2,3,4,5\}44
{2}\{2\}{3,4,6}\{3,4,6\}33
{3}\{3\}{5,6,7}\{5,6,7\}33
{0,1}\{0,1\}{2,3}\{2,3\}22
{0,2}\{0,2\}{3}\{3\}11
{0,3}\{0,3\}\varnothing00
{1,2}\{1,2\}{3,4}\{3,4\}22
{1,3}\{1,3\}{5}\{5\}11
{2,3}\{2,3\}{6}\{6\}11
{0,1,2}\{0,1,2\}{3}\{3\}11
{0,1,3}\{0,1,3\}\varnothing00
{0,2,3}\{0,2,3\}\varnothing00
{1,2,3}\{1,2,3\}\varnothing00
{0,1,2,3}\{0,1,2,3\}\varnothing00

The union is now all of XX, of size 88, and the sieve returns (4+4+3+3)(2+1+0+2+1+1)+(1+0+0+0)0=147+1=8(4+4+3+3) - (2+1+0+2+1+1) + (1+0+0+0) - 0 = 14 - 7 + 1 = 8. The complementary form returns 814+71+0=08 - 14 + 7 - 1 + 0 = 0, and indeed X(A0A1A2A3)=X \setminus (A_0\cup A_1\cup A_2\cup A_3) = \varnothing.

Facts & Assumptions

Given: The ambient set X=8X = 8 and the subsets A0,A1,A2,A3A_0, A_1, A_2, A_3 above, together with the two index sets I=3I = 3 and I=4I = 4 and the canonical natural ι\iota (The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L1]

A listed set with distinct entries has as many elements as entries: if x0,,xk1x_0, \dots, x_{k-1} are distinct then jxjj \mapsto x_j is a bijection of kk onto {x0,,xk1}\{x_0,\dots,x_{k-1}\}, so that set is finite of cardinality kk (The cardinality A\lvert A\rvert of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L2]

For a sieve family with ambient set XX, finite index set II, union U=iIAiU=\bigcup_{i\in I}A_i and A=XA_\varnothing=X, the sieve identity and its complementary form are ιU=JI(1)J+1ιAJ,ιXU=JI(1)JιAJ\iota|U|=\sum_{\varnothing\ne J\subseteq I}(-1)^{|J|+1}\iota|A_J|, \qquad \iota|X\setminus U|=\sum_{J\subseteq I}(-1)^{|J|}\iota|A_J| (Inclusion and exclusion: ιiIAi=JI(1)J+1ιAJ\iota\lvert\bigcup_{i \in I} A_i\rvert = \sum_{\varnothing \ne J \subseteq I}(-1)^{\lvert J\rvert + 1}\,\iota\lvert A_J\rvert, together with the complementary form counting the elements in none of the AiA_i, A finite family (Ai)iI(A_i)_{i \in I} of subsets of a finite set XX, the intersections AJA_J for JIJ \subseteq I, and the convention A=XA_\varnothing = X).

[L4]

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

Verification

technique · direct
1.1

The three-set family. A0A_0, A1A_1, A2A_2 are subsets of X=8X = 8 with A0=4\lvert A_0\rvert = 4, A1=4\lvert A_1\rvert = 4 and A2=3\lvert A_2\rvert = 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,1\}} = \{2,3\}, A{0,2}={3}A_{\{0,2\}} = \{3\}, A{1,2}={3,4}A_{\{1,2\}} = \{3,4\} and A{0,1,2}={3}A_{\{0,1,2\}} = \{3\}, of sizes 22, 11, 22 and 11 by [L1].

givenL1
1.3

Its union and complement. An element of XX lies in A0A1A2A_0\cup A_1\cup A_2 unless it is 77, since 0,1,2,3A00,1,2,3 \in A_0, 4,5A14,5 \in A_1 and 6A26 \in A_2 while 77 belongs to none of the three listed sets; so the union is {0,1,2,3,4,5,6}\{0,1,2,3,4,5,6\}, of size 77, and its complement in XX is {7}\{7\}, of size 11.

givenL1
1.4

The four-set family. Adjoining A3={5,6,7}A_3 = \{5,6,7\}, of size 33, the remaining intersections are A{0,3}=A_{\{0,3\}} = \varnothing, A{1,3}={5}A_{\{1,3\}} = \{5\}, A{2,3}={6}A_{\{2,3\}} = \{6\}, A{0,1,3}=A{0,2,3}=A{1,2,3}=A_{\{0,1,3\}} = A_{\{0,2,3\}} = A_{\{1,2,3\}} = \varnothing and A{0,1,2,3}=A_{\{0,1,2,3\}} = \varnothing, of sizes 00, 11, 11, 00, 00, 00 and 00 by [L1] and clause (b) of The cardinality A\lvert A\rvert of a finite set.

givenL1
1.5

The four-set union. Now 7A37 \in A_3, so the union is all of XX, of size 88, and its complement in XX is empty, of size 00.

givenL1
2.1

The sieve for three sets. Grouping by size as in [L3], clause 1 of [L2] reads ιA0A1A2=ι(4+4+3)ι(2+1+2)+ι(1)=ι(11)ι(5)+ι(1)=ι(7)\iota\lvert A_0\cup A_1\cup A_2\rvert = \iota(4+4+3) - \iota(2+1+2) + \iota(1) = \iota(11) - \iota(5) + \iota(1) = \iota(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=J = \varnothing, which is ιA=ιX=ι(8)\iota\lvert A_\varnothing\rvert = \iota\lvert X\rvert = \iota(8), and reverses every sign, giving ι(8)ι(11)+ι(5)ι(1)=ι(1)\iota(8) - \iota(11) + \iota(5) - \iota(1) = \iota(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=144+4+3+3 = 14, the pair terms to 2+1+0+2+1+1=72+1+0+2+1+1 = 7, the triple terms to 1+0+0+0=11+0+0+0 = 1 and the single four-element term is 00; so clause 1 of [L2] reads ι(14)ι(7)+ι(1)ι(0)=ι(8)\iota(14) - \iota(7) + \iota(1) - \iota(0) = \iota(8), which matches step 1.5, and clause 2 reads ι(8)ι(14)+ι(7)ι(1)+ι(0)=ι(0)\iota(8) - \iota(14) + \iota(7) - \iota(1) + \iota(0) = \iota(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}A_{\{0,3\}} and the three four-element-family triples are empty, so their terms are 00; 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 \varnothing, whose term is ιX\iota\lvert X\rvert. 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:=5A := 5 and B:=3B := 3, so n=A=5n = \lvert A\rvert = 5 and k=B=3k = \lvert B\rvert = 3.

By the formula. The number of surjections from an nn-element set onto a kk-element set is i<k+1(1)i(ki)(ki)n\sum_{i<k+1}(-1)^{i}\binom{k}{i}(k-i)^{n}, read in R\mathbb{R} through ι\iota gives

ιSurj(A,B)=i<4(1)iι(3i)ι((3i)5),\iota\lvert\operatorname{Surj}(A,B)\rvert = \sum_{i<4}(-1)^{i}\,\iota\binom{3}{i}\,\iota\big((3-i)^{5}\big),

whose four terms are

ii(3i)\binom{3}{i}(3i)5(3-i)^{5}term
001135=2433^{5} = 243+243+243
113325=322^{5} = 3296-96
223315=11^{5} = 1+3+3
331105=00^{5} = 00-0

so the count is 24396+30=150243 - 96 + 3 - 0 = 150.

By direct subtraction. Every function ABA \to B has an image S:=f[A]BS := f[A] \subseteq B, and the sets {f:f[A]=S}\{\, f : f[A] = S \,\} for SBS \subseteq B partition the set of all 35=2433^{5} = 243 functions ABA \to B. A function with image exactly SS is precisely a surjection ASA \to S, so the number of functions with image of size jj is (3j)\binom{3}{j} times the number of surjections from a five-element set onto a jj-element set. Those numbers are 00 for j=0j = 0, since AA \ne \varnothing; 11 for j=1j = 1, the constant function; and 252=302^{5} - 2 = 30 for j=2j = 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),243 = \binom{3}{0}\cdot 0 + \binom{3}{1}\cdot 1 + \binom{3}{2}\cdot 30 + \binom{3}{3}\cdot \lvert\operatorname{Surj}(A,B)\rvert = 0 + 3 + 90 + \lvert\operatorname{Surj}(A,B)\rvert,

so Surj(A,B)=24393=150\lvert\operatorname{Surj}(A,B)\rvert = 243 - 93 = 150, in agreement.

Facts & Assumptions

Given: A=5A = 5, B=3B = 3, the set Map(A,B)\operatorname{Map}(A,B) of all functions ABA \to B, and the canonical natural ι\iota (The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L2]

(30)=(33)=1\binom{3}{0} = \binom{3}{3} = 1 and (31)=(32)=3\binom{3}{1} = \binom{3}{2} = 3 (The set [A]k[A]^{k} of kk-element subsets and the binomial coefficient (nk):=[n]k\binom{n}{k} := \lvert [n]^{k}\rvert).

[L3]

If A,BA,B are finite with A=n|A|=n and B=k|B|=k, then ιSurj(A,B)=i<k+1(1)iι(ki)ι((ki)n)\iota|\operatorname{Surj}(A,B)|=\sum_{i<k+1}(-1)^i\iota\binom{k}{i}\,\iota((k-i)^n) (The number of surjections from an nn-element set onto a kk-element set is i<k+1(1)i(ki)(ki)n\sum_{i<k+1}(-1)^{i}\binom{k}{i}(k-i)^{n}, read in R\mathbb{R} through ι\iota).

[L4]

The image partition: for fMap(A,B)f \in \operatorname{Map}(A,B) put S:=f[A]S := f[A]; the sets MS:={f:f[A]=S}M_S := \{\, f : f[A] = S \,\} for SBS \subseteq B are pairwise disjoint subsets of Map(A,B)\operatorname{Map}(A,B) with union Map(A,B)\operatorname{Map}(A,B), and MSM_S is in bijection with Surj(A,S)\operatorname{Surj}(A,S) by restriction of the codomain, so MS=Surj(A,S)\lvert M_S\rvert = \lvert\operatorname{Surj}(A,S)\rvert. If finite S,TS,T have S=T|S|=|T|, finite cardinality supplies a bijection ϕ:ST\phi:S\to T, and uϕuu\mapsto\phi\circ u is a bijection Surj(A,S)Surj(A,T)\operatorname{Surj}(A,S)\to\operatorname{Surj}(A,T) with inverse vϕ1vv\mapsto\phi^{-1}\circ v; hence these surjection counts depend only on the codomain cardinality (Injection, surjection, bijection, A subset of a finite set is finite, with BA\lvert B\rvert \le \lvert A\rvert, and equality holds if and only if B=AB = A, The cardinality A\lvert A\rvert of a finite set).

[L6]

ι\iota is additive, multiplicative and injective, and (1)0=1(-1)^{0} = 1, (1)p+1=(1)p(-1)^{p+1} = -(-1)^{p} (Laws of finite sums and products in N\mathbb{N}, and ι(k<nak)=k<nι(ak)\iota\big(\sum_{k<n} a_k\big) = \sum_{k<n} \iota(a_k), clauses 0 and 7, Integer powers ama^m, Ordered field).

Verification

technique · direct
1.1

The four terms of the formula. By [L2] and [L1] they are (+1)1243(+1)\cdot 1\cdot 243, (1)332(-1)\cdot 3\cdot 32, (+1)31(+1)\cdot 3\cdot 1 and (1)10(-1)\cdot 1\cdot 0, the signs coming from [L6].

L1L2L6
1.2

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

L4L5
1.3

The three easy image sizes. There is no surjection from the nonempty AA onto \varnothing, so the j=0j = 0 contribution is 00; there is exactly one surjection onto a one-element set, the constant, so the j=1j = 1 contribution is 31=33\cdot 1 = 3; and a function from AA into a two-element set is non-surjective exactly when it is constant, so the number of surjections is 252=302^{5} - 2 = 30 by [L1] and the j=2j = 2 contribution is 330=903\cdot 30 = 90.

L1L2L4
2.1

Summing the four terms of step 1.1 gives 24396+30=150243 - 96 + 3 - 0 = 150, so Surj(A,B)=150\lvert\operatorname{Surj}(A,B)\rvert = 150 by [L3] and the injectivity of ι\iota.

step 1.1L3L6
2.2

Summing the partition of step 1.2 gives 243=0+3+90+Surj(A,B)243 = 0 + 3 + 90 + \lvert\operatorname{Surj}(A,B)\rvert by [L1] and [L5], hence Surj(A,B)=150\lvert\operatorname{Surj}(A,B)\rvert = 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 00, 11 and 22 are established directly rather than by the formula. So the agreement is a genuine check on the formula at n=5n = 5, k=3k = 3.

  • The last term of the formula is 00 and it is not decoration. At i=ki = k the factor is 0n0^{n}, which vanishes because n1n \ge 1; at n=0n = 0 it would be 00=10^{0} = 1 instead, and that is the single point where the convention of Exponentiation of natural numbers, mnm^{n}, and its agreement with the integer power in R\mathbb{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}A := 4 = \{0,1,2,3\} and write a bijection f:AAf : A \to A as the tuple (f(0),f(1),f(2),f(3))\big(f(0), f(1), f(2), f(3)\big). The derangements of AA (The derangement number DnD_n: the number of bijections of an nn-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)\begin{array}{lll} (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) \end{array}

so D4=9D_4 = 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!)\iota(D_n) = \iota(n!)\sum_{i<n+1}(-1)^{i}/\iota(i!), with the term at i=0i = 0 equal to 11 and D0=1D_0 = 1 gives

ι(D4)=ι(4!)i<5(1)iι(i!)=24(11+1216+124)=24924=9.\iota(D_4) = \iota(4!)\sum_{i<5}\frac{(-1)^{i}}{\iota(i!)} = 24\Big(1 - 1 + \tfrac{1}{2} - \tfrac{1}{6} + \tfrac{1}{24}\Big) = 24\cdot\tfrac{9}{24} = 9 .

Against the two recurrences. The earlier values are D0=1D_0 = 1, D1=0D_1 = 0, D2=1D_2 = 1 and, by the first recurrence, D3=3D2+(1)3=31=2D_3 = 3\,D_2 + (-1)^{3} = 3 - 1 = 2. Then ι(Dn)=ι(n)ι(Dn1)+(1)n\iota(D_n) = \iota(n)\,\iota(D_{n-1}) + (-1)^{n} for n1n \ge 1, and Dn=(n1)(Dn1+Dn2)D_n = (n-1)(D_{n-1} + D_{n-2}) for n2n \ge 2 gives ι(D4)=ι(4)ι(D3)+(1)4=42+1=9\iota(D_4) = \iota(4)\,\iota(D_3) + (-1)^{4} = 4\cdot 2 + 1 = 9 from its first clause, and D4=3(D3+D2)=3(2+1)=9D_4 = 3\,(D_3 + D_2) = 3\,(2+1) = 9 from its second.

Facts & Assumptions

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

[L2]

For every finite set BB, Der(B)\operatorname{Der}(B) is the set of bijections f:BBf:B\to B with f(b)bf(b)\ne b for every bBb\in B, and Der(B)=DB|\operatorname{Der}(B)|=D_{|B|}; hence D4=Der(A)D_4=|\operatorname{Der}(A)| because A=4|A|=4 (The derangement number DnD_n: the number of bijections of an nn-element set with no fixed point, The cardinality A\lvert A\rvert of a finite set, clause (a)). The values D0=1D_0=1, D1=0D_1=0 and D2=1D_2=1 are also recorded in the cited definition.

[L3]

For every nNn\in\mathbb N, ι(Dn)=ι(n!)i<n+1(1)i/ι(i!)\iota(D_n)=\iota(n!)\sum_{i<n+1}(-1)^i/\iota(i!). For n1n\ge1, ι(Dn)=ι(n)ι(Dn1)+(1)n\iota(D_n)=\iota(n)\iota(D_{n-1})+(-1)^n; and for n2n\ge2, Dn=(n1)(Dn1+Dn2)D_n=(n-1)(D_{n-1}+D_{n-2}) (ι(Dn)=ι(n!)i<n+1(1)i/ι(i!)\iota(D_n) = \iota(n!)\sum_{i<n+1}(-1)^{i}/\iota(i!), with the term at i=0i = 0 equal to 11 and D0=1D_0 = 1, ι(Dn)=ι(n)ι(Dn1)+(1)n\iota(D_n) = \iota(n)\,\iota(D_{n-1}) + (-1)^{n} for n1n \ge 1, and Dn=(n1)(Dn1+Dn2)D_n = (n-1)(D_{n-1} + D_{n-2}) for n2n \ge 2).

[L4]

Factorials: 0!=10! = 1, 1!=11! = 1, 2!=22! = 2, 3!=63! = 6, 4!=244! = 24 (The factorial n!n! and the falling factorial nkn^{\underline{k}}, defined by recursion in N\mathbb{N}).

[L5]

Real finite sums and the arithmetic of R\mathbb{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)^{0} = 1, (1)p+1=(1)p(-1)^{p+1} = -(-1)^{p} (Integer powers ama^m).

[L6]

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

[L7]

The canonical natural ι:NR\iota:\mathbb N\to\mathbb R is additive, multiplicative and injective (Laws of finite sums and products in N\mathbb{N}, and ι(k<nak)=k<nι(ak)\iota\big(\sum_{k<n} a_k\big) = \sum_{k<n} \iota(a_k), 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 AA 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)f(0), which is 11, 22 or 33 since f(0)0f(0) \ne 0.

givenL2
2.1

Case f(0)=1f(0) = 1. Then f(1){0,2,3}f(1) \in \{0,2,3\}. If f(1)=0f(1) = 0 the remaining values {2,3}\{2,3\} go to positions 22 and 33 with f(2)2f(2) \ne 2, forcing (1,0,3,2)(1,0,3,2). If f(1)=2f(1) = 2 the remaining values are {0,3}\{0,3\} with f(3)3f(3) \ne 3, forcing (1,2,3,0)(1,2,3,0). If f(1)=3f(1) = 3 the remaining values are {0,2}\{0,2\} with f(2)2f(2) \ne 2, forcing (1,3,0,2)(1,3,0,2).

assume-case onestep 1.2L2
2.2

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

assume-case twostep 1.2L2
2.3

Case f(0)=3f(0) = 3. Then f(1){0,2}f(1) \in \{0,2\}. If f(1)=0f(1) = 0 the remaining values {1,2}\{1,2\} go to positions 22 and 33 with f(2)2f(2) \ne 2, forcing (3,0,1,2)(3,0,1,2). If f(1)=2f(1) = 2 the remaining values are {0,1}\{0,1\} and neither placement is excluded, giving (3,2,0,1)(3,2,0,1) and (3,2,1,0)(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=9D_4 = 9.

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

Against the formula. By [L3] and [L4], ι(D4)=ι(24)(11+1/21/6+1/24)\iota(D_4) = \iota(24)\big(1 - 1 + 1/2 - 1/6 + 1/24\big); the bracket is 9/249/24 by [L5], so ι(D4)=9\iota(D_4) = 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)\iota(D_3) = \iota(3)\iota(D_2) + (-1)^{3} = \iota(3) - \iota(1) = \iota(2), so D3=2D_3=2 by injectivity of ι\iota. Then ι(D4)=ι(4)ι(D3)+(1)4=ι(8)+ι(1)=ι(9)\iota(D_4) = \iota(4)\iota(D_3) + (-1)^{4} = \iota(8) + \iota(1) = \iota(9); by the second clause, D4=3(D3+D2)=33=9D_4 = 3(D_3 + D_2) = 3\cdot 3 = 9. Both match step 3.1.

step 3.1L2L3L5L7
5.1

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

step 3.1step 4.1step 4.2

Remarks

  • The case analysis is on f(0)f(0) and then on f(1)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=3n = 3 and at n=4n = 4, both at least 11; the second at n=4n = 4, which is at least 22. 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!)\iota(D_n)/\iota(n!) computed for small nn as a quotient of two counts, with no probability space claimed

Example

For nNn \in \mathbb{N} consider the real number

rn  :=  ι(Dn)ι(n!),r_n \;:=\; \frac{\iota(D_n)}{\iota(n!)},

the quotient of the count of derangements of an nn-element set (The derangement number DnD_n: the number of bijections of an nn-element set with no fixed point) by the count of all its bijections, Bij(n)=n!\lvert\operatorname{Bij}(n)\rvert = n! (The factorial n!n! and the falling factorial nkn^{\underline{k}}, defined by recursion in N\mathbb{N}). The quotient is legitimate because n!0n! \ne 0. Dividing the derangement formula by ι(n!)\iota(n!) gives

rn  =  i<n+1(1)iι(i!),r_n \;=\; \sum_{i<n+1}\frac{(-1)^{i}}{\iota(i!)} ,

so rnr_n is the truncated alternating sum itself. Its first values, obtained from D0=1D_0 = 1, D1=0D_1 = 0, D2=1D_2 = 1 and the first recurrence ι(Dn)=ι(n)ι(Dn1)+(1)n\iota(D_n) = \iota(n)\iota(D_{n-1}) + (-1)^{n} (ι(Dn)=ι(n)ι(Dn1)+(1)n\iota(D_n) = \iota(n)\,\iota(D_{n-1}) + (-1)^{n} for n1n \ge 1, and Dn=(n1)(Dn1+Dn2)D_n = (n-1)(D_{n-1} + D_{n-2}) for n2n \ge 2), are

nnDnD_nn!n!rnr_n
00111111
11001100
2211221/21/2
3322661/31/3
449924243/83/8
55444412012011/3011/30
6626526572072053/14453/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 rnr_n 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 DnD_n, the factorials n!n!, and the canonical natural ι\iota (The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L1]

The derangement formula: ι(Dn)=ι(n!)i<n+1(1)i/ι(i!)\iota(D_n) = \iota(n!)\sum_{i<n+1}(-1)^{i}/\iota(i!) (ι(Dn)=ι(n!)i<n+1(1)i/ι(i!)\iota(D_n) = \iota(n!)\sum_{i<n+1}(-1)^{i}/\iota(i!), with the term at i=0i = 0 equal to 11 and D0=1D_0 = 1).

[L4]

R\mathbb{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(-1)^{p+1} = -(-1)^{p} and (1)0=1(-1)^{0} = 1 (Integer powers ama^m); 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!=10! = 1, 1!=11! = 1, 2!=22! = 2, 3!=63! = 6, 4!=244! = 24, 5!=1205! = 120, 6!=7206! = 720 (The factorial n!n! and the falling factorial nkn^{\underline{k}}, defined by recursion in N\mathbb{N}).

Verification

technique · direct
1.1

The quotient form. Dividing the identity of [L1] by the nonzero ι(n!)\iota(n!) gives rn=i<n+1(1)i/ι(i!)r_n = \sum_{i<n+1}(-1)^{i}/\iota(i!) for every nNn \in \mathbb{N}.

L1L2L4
1.2

The derangement numbers up to 66. From D2=1D_2 = 1 and [L3]: ι(D3)=311=2\iota(D_3) = 3\cdot 1 - 1 = 2, ι(D4)=42+1=9\iota(D_4) = 4\cdot 2 + 1 = 9, ι(D5)=591=44\iota(D_5) = 5\cdot 9 - 1 = 44 and ι(D6)=644+1=265\iota(D_6) = 6\cdot 44 + 1 = 265; since ι\iota is injective these are the natural numbers D3=2D_3 = 2, D4=9D_4 = 9, D5=44D_5 = 44, D6=265D_6 = 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=1r_0 = 1/1 = 1, r1=0/1=0r_1 = 0/1 = 0, r2=1/2r_2 = 1/2, r3=2/6=1/3r_3 = 2/6 = 1/3, r4=9/24=3/8r_4 = 9/24 = 3/8, r5=44/120=11/30r_5 = 44/120 = 11/30 and r6=265/720=53/144r_6 = 265/720 = 53/144.

step 1.2L3L4L5
2.2

A cross-check at n=4n = 4 through step 1.1: i<5(1)i/ι(i!)=11+1/21/6+1/24=9/24=3/8\sum_{i<5}(-1)^{i}/\iota(i!) = 1 - 1 + 1/2 - 1/6 + 1/24 = 9/24 = 3/8, which is r4r_4.

step 1.1L4L5
3.1

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

step 2.1step 2.2

Remarks

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

  • No limit is claimed. The quotient is computed at each nn 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 nn, including n=0n = 0. The denominator is ι(n!)\iota(n!) and n!n! is never 00, its recursion starting at 0!=10! = 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 VV be a finite set with N:=V2N := \lvert V\rvert \ge 2, and let RV×VR \subseteq V \times V be symmetric and irreflexive (A relation RX×YR \subseteq X \times Y between finite sets, its row fibres RxR_x and its column fibres RyR^y, clause (d)). Write d(x):=Rxd(x) := \lvert R_x\rvert for the number of neighbours of xx. Then there are xyx \ne y in VV with d(x)=d(y)d(x) = d(y).

The point is that the possible values of dd are 0,1,,N10, 1, \dots, N-1, which is as many values as VV has elements, so counting alone does not settle it. What settles it is that the two extreme values cannot both occur: if some x0x_0 has no neighbour then no yy can be a neighbour of everything else, since it would then be a neighbour of x0x_0.

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

Facts & Assumptions

Given: A finite set VV with N=V2N = \lvert V\rvert \ge 2, a symmetric irreflexive relation RV×VR \subseteq V \times V, and the neighbour counts d(x)=Rxd(x) = \lvert R_x\rvert.

[L1]

RxV{x}R_x \subseteq V \setminus \{x\} by irreflexivity, and RxR_x is finite, so d(x)V{x}d(x) \le \lvert V\setminus\{x\}\rvert (A relation RX×YR \subseteq X \times Y between finite sets, its row fibres RxR_x and its column fibres RyR^y, A subset of a finite set is finite, with BA\lvert B\rvert \le \lvert A\rvert, and equality holds if and only if B=AB = A, clauses 1 and 2).

[L4]

Symmetry: xRyx \in R_y if and only if yRxy \in R_x (A relation RX×YR \subseteq X \times Y between finite sets, its row fibres RxR_x and its column fibres RyR^y, clause (d)).

[L5]

The counting form of the strong pigeonhole principle: if A>1B\lvert A\rvert > 1\cdot\lvert B\rvert then some fibre of any f:ABf : A \to B has more than one element (If A>kB\lvert A\rvert > k\lvert B\rvert then every f:ABf : A \to B has a fibre with more than kk elements, and for nonempty BB some fibre has at least A/B\lceil \lvert A\rvert / \lvert B\rvert\rceil elements, clause 1, Injection, surjection, bijection).

[L6]

Order and membership in N\mathbb{N}: kN2k \le N-2 if and only if k<N1k < N-1, that is kN1k \in N-1; N2N \ge 2 gives N11N-1 \ge 1 and (N1)1=N2(N-1)-1 = N-2; and exactly one of p<qp<q, p=qp=q, q<pq<p holds (On N\mathbb{N} the order is membership: m<n    mnm < n \iff m \in n, Order on the natural numbers, Trichotomy of the order on N\mathbb{N}, Order is compatible with addition, The natural numbers N\mathbb{N} (von Neumann), Finite sums and finite products of natural numbers, k<nak\sum_{k<n} a_k and k<nak\prod_{k<n} a_k in N\mathbb{N}).

[L7]

Every natural number is a finite set whose cardinality is itself; in particular N1=N1|N-1|=N-1 (The cardinality A\lvert A\rvert of a finite set, clause (a)).

Verification

technique · cases
1.1

By [L1] and [L2], d(x)N1d(x) \le N-1 for every xVx \in V; and N2N \ge 2, so N11N-1 \ge 1 by [L6].

givenL1L2L6
1.2

The two extreme values cannot both be attained. Suppose d(x0)=0d(x_0) = 0 and d(y)=N1d(y) = N-1 for some x0,yVx_0, y \in V. Then x0yx_0 \ne y, since 0N10 \ne N-1 by [L6]; by [L3] we have Ry=V{y}R_y = V\setminus\{y\}, so x0Ryx_0 \in R_y, so yRx0y \in R_{x_0} by [L4], so d(x0)1d(x_0) \ge 1, contradicting d(x0)=0d(x_0) = 0.

L1L3L4L6
2.1

Case (a): no xVx \in V has d(x)=0d(x) = 0. Then 1d(x)N11 \le d(x) \le N-1 for every xx, so d(x)1N2d(x) - 1 \le N-2, that is d(x)1N1d(x)-1 \in N-1 by [L6]; thus xd(x)1x \mapsto d(x)-1 maps VV into the set N1N-1, whose cardinality is N1N-1. Since N>N1N > N-1, [L5] gives two distinct xyx \ne y with d(x)1=d(y)1d(x)-1 = d(y)-1, and since both counts are at least 11 this forces d(x)=d(y)d(x) = d(y).

assume-case posstep 1.1L5L6L7
2.2

Case (b): some x0Vx_0 \in V has d(x0)=0d(x_0) = 0. Then by step 1.2 no yy has d(y)=N1d(y) = N-1, so d(x)N2d(x) \le N-2 for every xx by [L1], [L2] and [L6], that is d(x)N1d(x) \in N-1; thus dd maps VV into the set N1N-1, of cardinality N1N-1. Since N>N1N > N-1, [L5] gives two distinct xyx \ne y with d(x)=d(y)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 VV have equally many neighbours.

step 2.1step 2.2cases-exhaustive

Remarks

  • Where N2N \ge 2 is spent. Twice: to make N1N-1 at least 11, so that the set of possible values is nonempty and the shift by 11 in case (a) lands inside N1N-1; and to make 00 and N1N-1 different, which is what step 1.2 needs.

  • Why the naive count is not enough. The values of dd lie in a set of NN naturals and VV has NN elements, so the pigeonhole principle says nothing until the range is cut down. Both cases cut it to N1N-1 values, one by removing 00 and one by removing N1N-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)N1d(x) \le N-1; symmetry is what turns "x0x_0 is a neighbour of yy" into "yy is a neighbour of x0x_0" 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 VV be a finite set and RV×VR \subseteq V \times V symmetric and irreflexive (A relation RX×YR \subseteq X \times Y between finite sets, its row fibres RxR_x and its column fibres RyR^y, clause (d)), with neighbour counts d(x):=Rxd(x) := \lvert R_x\rvert. Put

E  :=  {S[V]2 : S={x,y} for some (x,y)R},E \;:=\; \{\, S \in [V]^{2} \ :\ S = \{x,y\} \text{ for some } (x,y) \in R \,\},

the set of two-element subsets of VV whose elements are related. Then, in N\mathbb{N},

xVd(x)  =  2E.\sum_{x \in V} d(x) \;=\; 2\,\lvert E\rvert .

A concrete instance. With V:=4={0,1,2,3}V := 4 = \{0,1,2,3\} and RR the symmetric irreflexive relation whose related unordered pairs are {0,1}\{0,1\}, {1,2}\{1,2\} and {2,3}\{2,3\}, the neighbour counts are d(0)=1d(0) = 1, d(1)=2d(1) = 2, d(2)=2d(2) = 2, d(3)=1d(3) = 1, summing to 6=236 = 2\cdot 3, and E=3\lvert E\rvert = 3.

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

The extreme instance. If RR relates every pair of distinct elements of VV then E=[V]2E = [V]^{2} and d(x)=N1d(x) = N - 1 for every xx, where N:=VN := \lvert V\rvert; the identity then reads N(N1)=2(N2)N\,(N-1) = 2\binom{N}{2}, which is A finite set with nn elements has exactly (n2)\binom{n}{2} two-element subsets, and 2(n2)=n(n1)2\binom{n}{2} = n(n-1).

Facts & Assumptions

Given: A finite set VV, a symmetric irreflexive relation RV×VR \subseteq V \times V, the neighbour counts d(x)=Rxd(x) = \lvert R_x\rvert, and the set EE above.

[L4]

If xyx\ne y, then 0x0\mapsto x, 1y1\mapsto y is a bijection 2{x,y}2\to\{x,y\}, so {x,y}=2=2|\{x,y\}|=|2|=2; more generally, a bijection from a finite set transports its cardinality to the codomain (The cardinality A\lvert A\rvert of a finite set, clauses (a) and (c), Injection, surjection, bijection).

[L5]

[V]2=(N2)\lvert [V]^{2}\rvert = \binom{N}{2} and 2(N2)=N(N1)2\binom{N}{2} = N(N-1) for every NNN \in \mathbb{N} (A finite set with nn elements has exactly (n2)\binom{n}{2} two-element subsets, and 2(n2)=n(n1)2\binom{n}{2} = n(n-1)).

Verification

technique · direct
1.1

The pairing map. For (x,y)R(x,y) \in R irreflexivity gives xyx \ne y, so {x,y}\{x,y\} has exactly two elements by [L4] and lies in EE; write Ψ(x,y):={x,y}\Psi(x,y) := \{x,y\}, a map RER \to E. It is surjective, since every SES \in E is {x,y}\{x,y\} for some (x,y)R(x,y) \in R by the definition of EE.

givenL2L4construct
1.2

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

givenL4
2.1

Counting RR by the fibres of Ψ\Psi. The fibres of Ψ\Psi are pairwise disjoint finite sets indexed by the finite set EE, with union RR, so [L3] gives R=SEΨ1[{S}]=SE2=E2\lvert R\rvert = \sum_{S \in E}\lvert\Psi^{-1}[\{S\}]\rvert = \sum_{S \in E}2 = \lvert E\rvert\cdot 2.

step 1.1step 1.2L2L3
3.1

Combining with [L1], xVd(x)=R=2E\sum_{x \in V}d(x) = \lvert R\rvert = 2\,\lvert E\rvert, which is the identity. In the extreme case where RR relates every pair of distinct elements, E=[V]2E = [V]^{2} and the neighbours of xx are exactly V{x}V\setminus\{x\}, so d(x)=N1d(x)=N-1 by [L3]; the identity therefore reads N(N1)=2(N2)N(N-1) = 2\binom{N}{2} 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 RR; without it a fibre could have one element and the factor 22 would be wrong. Irreflexivity is spent in step 1.1, to know that {x,y}\{x,y\} really is a two-element set.

  • This is double counting of one set, not two computations of two sets. The relation RR is counted once by its row fibres, which gives the sum of the neighbour counts, and once by the fibres of Ψ\Psi, 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 EE 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:=17A := 17 and B:=5B := 5, so A=17\lvert A\rvert = 17 and B=5\lvert B\rvert = 5.

The ceiling. 17/5=4\big\lceil 17/5\big\rceil = 4: the least qq with 175q17 \le 5q is 44, since 53=15<175\cdot 3 = 15 < 17 while 54=20175\cdot 4 = 20 \ge 17 (m/n\lceil m/n \rceil for naturals mm and n1n \ge 1: the least qNq \in \mathbb{N} with mnqm \le n q). So If A>kB\lvert A\rvert > k\lvert B\rvert then every f:ABf : A \to B has a fibre with more than kk elements, and for nonempty BB some fibre has at least A/B\lceil \lvert A\rvert / \lvert B\rvert\rceil elements says that every f:ABf : A \to B has a fibre with at least 44 elements.

The bound is attained. Partition AA 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},P_0 := \{0,1,2,3\},\quad P_1 := \{4,5,6,7\},\quad P_2 := \{8,9,10\},\quad P_3 := \{11,12,13\},\quad P_4 := \{14,15,16\},

and let f:ABf : A \to B send each ii to the unique bb with iPbi \in P_b. The fibre sizes are 4,4,3,3,34, 4, 3, 3, 3, summing to 1717, and the largest of them is 44. So no f:ABf : A \to B has all its fibres smaller than 44, and some ff has none larger than 44: the ceiling bound is exactly right for this pair of sizes and cannot be raised to 55.

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

The counting form behind it. 17>35=1517 > 3\cdot 5 = 15, so clause 1 of If A>kB\lvert A\rvert > k\lvert B\rvert then every f:ABf : A \to B has a fibre with more than kk elements, and for nonempty BB some fibre has at least A/B\lceil \lvert A\rvert / \lvert B\rvert\rceil elements already gives a fibre with more than 33 elements, that is with at least 44; and 17>45=2017 > 4\cdot 5 = 20 is false, so clause 1 gives nothing at k=4k = 4, which matches the witness above.

Facts & Assumptions

Given: A=17A = 17, B=5B = 5, the blocks P0,,P4P_0, \dots, P_4 above, and the function f:ABf : A \to B they define.

[L1]

The ceiling: m/n\lceil m/n\rceil is the least qNq \in \mathbb{N} with mnqm \le nq, for n1n \ge 1 (m/n\lceil m/n \rceil for naturals mm and n1n \ge 1: the least qNq \in \mathbb{N} with mnqm \le n q).

[L2]

If f:ABf:A\to B maps finite sets and kNk\in\mathbb N, then (i) A>kB|A|>k|B| implies some fibre has more than kk elements, and (ii), when BB\ne\varnothing, some fibre has at least A/B\lceil |A|/|B|\rceil elements (If A>kB\lvert A\rvert > k\lvert B\rvert then every f:ABf : A \to B has a fibre with more than kk elements, and for nonempty BB some fibre has at least A/B\lceil \lvert A\rvert / \lvert B\rvert\rceil elements, Injection, surjection, bijection).

[L3]

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

[L5]

Arithmetic and order of N\mathbb{N}: 53=155\cdot 3 = 15, 54=205\cdot 4 = 20, 15<172015 < 17 \le 20, and exactly one of p<qp<q, p=qp=q, q<pq<p holds (Multiplication of natural numbers, Order on the natural numbers, Trichotomy of the order on N\mathbb{N}).

Verification

technique · direct
1.1

The blocks are pairwise disjoint with union AA, each entry of A=17A = 17 appearing in exactly one of them, and their cardinalities are 44, 44, 33, 33, 33 by [L3]. So ff is a well-defined function ABA \to B and its fibres are exactly the blocks: f1[{b}]=Pbf^{-1}[\{b\}] = P_b.

givenL3construct
1.2

The ceiling is 44. By [L5], 53=15<175\cdot 3 = 15 < 17, and likewise 50=05\cdot 0 = 0, 51=55\cdot 1 = 5 and 52=105\cdot 2 = 10, all of them less than 1717, so no q<4q < 4 satisfies 175q17 \le 5q; and 54=20175\cdot 4 = 20 \ge 17, so 44 does. Hence 17/5=4\lceil 17/5\rceil = 4 by [L1].

L1L5
2.1

Every f:ABf : A \to B has a fibre with at least 44 elements, by clause 2 of [L2] with BB \ne \varnothing and the value computed in step 1.2; equivalently, by clause 1 of [L2] with k=3k = 3, since 17>35=1517 > 3\cdot 5 = 15.

step 1.2L2L5
2.2

The witness of step 1.1 has no fibre with more than 44 elements, its fibre sizes being 4,4,3,3,34, 4, 3, 3, 3; and these sum to 17=A17 = \lvert A\rvert, 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 44, and some function has every fibre of size at most 44.

step 2.1step 2.2

Remarks

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

  • The unequal block sizes are unavoidable. A function with all fibres of size 33 would give A=15\lvert A\rvert = 15, and one with all fibres of size 44 would give 2020; since 1717 lies strictly between, the fibre sizes of any ff 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:

ιABC=ιA+ιB+ιCιABιACιBC.\iota\lvert A \cup B \cup C\rvert = \iota\lvert A\rvert + \iota\lvert B\rvert + \iota\lvert C\rvert - \iota\lvert A \cap B\rvert - \iota\lvert A \cap C\rvert - \iota\lvert B \cap C\rvert .

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}X := 5 = \{0,1,2,3,4\} take

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

The truncated right-hand side returns 44, while the union has 55 elements; the missing triple term is ABC=1\lvert A \cap B \cap C\rvert = 1, and restoring it gives 55.

Facts & Assumptions

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

[L1]

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

[L3]

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

Counterexample

technique · constructive
1.1

The three sets are subsets of XX with A=B=C=3\lvert A\rvert = \lvert B\rvert = \lvert C\rvert = 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 AB={1,2}A \cap B = \{1,2\}, AC={2}A \cap C = \{2\}, BC={2,3}B \cap C = \{2,3\} and ABC={2}A \cap B \cap C = \{2\}, of sizes 22, 11, 22 and 11 by [L1].

givenL1
1.3

The union. Every element of XX lies in one of the three sets: 0,1,2A0,1,2 \in A, 3B3 \in B and 4C4 \in C. So ABC=XA \cup B \cup C = X, of size 55 by [L1].

givenL1
2.1

The truncated right-hand side. By steps 1.1 and 1.2 it is 3+3+3212=43 + 3 + 3 - 2 - 1 - 2 = 4, while the left-hand side is 55 by step 1.3. Since 454 \ne 5 in R\mathbb{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(-1)^{4} = +1, so it reads 3+3+3212+1=53+3+3-2-1-2+1 = 5, which is ιABC\iota\lvert A \cup B \cup C\rvert by step 1.3. The discrepancy of step 2.1 is exactly ABC=1\lvert A \cap B \cap C\rvert = 1, the element 22 lying in all three sets.

step 1.2step 2.1L2L3discharge-construct

Remarks

  • Every set in the witness is a proper subset of XX 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 22 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 mnmn pairwise distinct reals has a strictly increasing sublist of length m+1m+1 or a strictly decreasing sublist of length n+1n+1 at m=3m = 3 and n=2n = 2, that is, the assertion that every pairwise distinct list of mn=6mn = 6 reals has a strictly increasing sublist of length m+1=4m+1 = 4 or a strictly decreasing sublist of length n+1=3n+1 = 3.

The witness is the list a:6Ra : 6 \to \mathbb{R} with values

(a0,a1,a2,a3,a4,a5)=(ι(2),ι(1),ι(4),ι(3),ι(6),ι(5)),\big(a_0, a_1, a_2, a_3, a_4, a_5\big) = \big(\iota(2), \iota(1), \iota(4), \iota(3), \iota(6), \iota(5)\big),

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

Its longest strictly increasing sublist has length 33, for example a0,a2,a4a_0, a_2, a_4, and its longest strictly decreasing sublist has length 22, for example a0,a1a_0, a_1.

positionvalue214365P0P1P2decreasingblocksoflength2theincreasingsublist2;4;6

Facts & Assumptions

Given: The list a:6Ra : 6 \to \mathbb{R} above, and the three index blocks P0:={0,1}P_0 := \{0,1\}, P1:={2,3}P_1 := \{2,3\}, P2:={4,5}P_2 := \{4,5\}, with blk(i):=b\mathrm{blk}(i) := b for iPbi \in P_b.

[L1]

A sublist of length LL is a strictly increasing s:L6s:L\to6. It is strictly increasing when as(p)<as(q)a_{s(p)}<a_{s(q)} for every p<q<Lp<q<L, and strictly decreasing when as(p)>as(q)a_{s(p)}>a_{s(q)} for every such pair (A finite list of reals, and its strictly increasing and strictly decreasing sublists, Injection, surjection, bijection).

[L2]

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

[L3]

If a finite set SS has S=K<L|S|=K<L, there is no injection LSL\to S: composing one with a bijection SKS\to K supplied by finite cardinality would contradict the natural-number pigeonhole principle (The cardinality A\lvert A\rvert of a finite set, Injection, surjection, bijection, The pigeonhole principle on N\mathbb{N}, clause 2).

Counterexample

technique · constructive
1.1

The list is pairwise distinct: its values are ι(2),ι(1),ι(4),ι(3),ι(6),ι(5)\iota(2), \iota(1), \iota(4), \iota(3), \iota(6), \iota(5), and the naturals 1,2,3,4,5,61,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)=a1a_0 = \iota(2) > \iota(1) = a_1, a2=ι(4)>ι(3)=a3a_2 = \iota(4) > \iota(3) = a_3 and a4=ι(6)>ι(5)=a5a_4 = \iota(6) > \iota(5) = a_5, by [L2].

givenL2
1.3

Across blocks the values increase. Every value at a position of P0P_0 is ι(1)\iota(1) or ι(2)\iota(2), every value at a position of P1P_1 is ι(3)\iota(3) or ι(4)\iota(4), and every value at a position of P2P_2 is ι(5)\iota(5) or ι(6)\iota(6); so b<bb < b' implies that every value on PbP_b is smaller than every value on PbP_{b'}, by [L2]. Also i<ii < i' implies blk(i)blk(i)\mathrm{blk}(i) \le \mathrm{blk}(i'), since the blocks list the positions in increasing order.

givenL2
2.1

No strictly increasing sublist of length 44. Let s:L6s : L \to 6 be a strictly increasing sublist. If p<q<Lp < q < L had blk(s(p))=blk(s(q))\mathrm{blk}(s(p)) = \mathrm{blk}(s(q)), then s(p)<s(q)s(p) < s(q) lie in one block, so as(p)>as(q)a_{s(p)} > a_{s(q)} by step 1.2, contradicting that the values increase. Natural trichotomy in [L2] makes this sufficient for blks\mathrm{blk}\circ s to be an injection of LL into 33; [L3] and [L2] then give L3L \le 3, hence L4L \ne 4.

step 1.2L1L2L3
2.2

No strictly decreasing sublist of length 33. Let s:L6s : L \to 6 be a strictly decreasing sublist and let p<q<Lp < q < L. Then s(p)<s(q)s(p) < s(q), so blk(s(p))blk(s(q))\mathrm{blk}(s(p)) \le \mathrm{blk}(s(q)) by step 1.3; and a strict inequality there would give as(p)<as(q)a_{s(p)} < a_{s(q)} by step 1.3, contradicting that the values decrease. So all positions of ss lie in one block, and ss is an injection of LL into a two-element set; [L3] and natural trichotomy in [L2] give L2L \le 2, hence L3L \ne 3.

step 1.3L1L2L3
3.1

The list of step 1.1 is therefore a pairwise distinct list of 6=326 = 3\cdot 2 reals with neither of the two sublists the refuted claim asserts, so that claim is false at m=3m = 3, n=2n = 2; what holds instead is [L4] at length 32+1=73\cdot 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)(2,3) instead.

  • Both bounds are attained, by a0,a2,a4a_0, a_2, a_4 and by a0,a1a_0, a_1 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 RX×YR \subseteq X \times Y between finite sets with XX \ne \varnothing there is xXx \in X with

ι(Rx)  =  μ  :=  ι(R)ι(X).\iota(\lvert R_x\rvert) \;=\; \mu \;:=\; \frac{\iota(\lvert R\rvert)}{\iota(\lvert X\rvert)} .

What If XX 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 μ\mu and some row fibre is at most μ\mu; equality is not claimed, and it can fail, because μ\mu is a real number while a fibre size is a natural number.

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

R:={(0,0), (1,0), (1,1)}X×Y.R := \{\,(0,0),\ (1,0),\ (1,1)\,\} \subseteq X \times Y .

Here R=3\lvert R\rvert = 3 and X=2\lvert X\rvert = 2, so μ=3/2\mu = 3/2, while the row fibres have sizes 11 and 22.

Facts & Assumptions

Given: X=2X = 2, Y=3Y = 3, R={(0,0),(1,0),(1,1)}R = \{(0,0),(1,0),(1,1)\}, and the canonical natural ι\iota (The canonical natural ι(n)=n1F\iota(n) = n \cdot 1_F of a field).

[L2]

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

[L4]

If RX×YR\subseteq X\times Y is a finite incidence relation with XX\ne\varnothing and μ=ι(R)/ι(X)\mu=\iota(|R|)/\iota(|X|), then some x+Xx_+\in X satisfies ι(Rx+)μ\iota(|R_{x_+}|)\ge\mu and some xXx_-\in X satisfies ι(Rx)μ\iota(|R_{x_-}|)\le\mu (If XX is nonempty, some row fibre is at least the average size and some row fibre is at most the average size).

[L5]

R\mathbb{R} is an ordered field, so μ\mu is defined once ι(X)0\iota(\lvert X\rvert) \ne 0, and ι\iota is strictly increasing with ι(0)=0\iota(0) = 0, ι(1)=1\iota(1) = 1, ι(2)=1+1\iota(2) = 1+1, ι(3)=1+1+1\iota(3) = 1+1+1 (Ordered field, Field, Laws of finite sums and products in N\mathbb{N}, and ι(k<nak)=k<nι(ak)\iota\big(\sum_{k<n} a_k\big) = \sum_{k<n} \iota(a_k), clauses 0 and 7).

Counterexample

technique · constructive
1.1

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

givenL1L2construct
1.2

The average. X=20\lvert X\rvert = 2 \ne 0, so μ=ι(3)/ι(2)\mu = \iota(3)/\iota(2) is defined by [L5]; and ι(2)ι(1)=ι(2)<ι(3)<ι(2)+ι(2)=ι(2)ι(2)\iota(2)\,\iota(1) = \iota(2) < \iota(3) < \iota(2) + \iota(2) = \iota(2)\,\iota(2), so dividing by the positive ι(2)\iota(2) gives ι(1)<μ<ι(2)\iota(1) < \mu < \iota(2) by [L5].

givenL2L5
1.3

The column fibres check the count. R0={0,1}R^{0} = \{0,1\}, R1={1}R^{1} = \{1\} and R2=R^{2} = \varnothing, of sizes 22, 11 and 00, and 2+1+0=3=R2+1+0 = 3 = \lvert R\rvert, in agreement with [L3].

givenL1L2L3
2.1

No row fibre has size μ\mu. The values ι(R0)=ι(1)\iota(\lvert R_0\rvert) = \iota(1) and ι(R1)=ι(2)\iota(\lvert R_1\rvert) = \iota(2) are the only candidates by step 1.1, and step 1.2 places μ\mu 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+:=1x_{+} := 1 has ι(R1)=ι(2)>μ\iota(\lvert R_{1}\rvert) = \iota(2) > \mu, and x:=0x_{-} := 0 has ι(R0)=ι(1)<μ\iota(\lvert R_{0}\rvert) = \iota(1) < \mu. Both inequalities hold strictly, and neither can be improved to an equality by another choice of xx, since step 1.1 lists all the row fibres.

step 1.1step 1.2step 2.1L4discharge-construct

Remarks

  • Why equality was never available. μ\mu is a quotient of two natural numbers formed in R\mathbb{R}, and nothing forces it to be the canonical natural of a natural number. Here X\lvert X\rvert does not divide R\lvert R\rvert 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 xx serves as both. What the witness shows is only that neither inequality can be strengthened to an equality in general.

Sources