Alphabeta Math
ExampleConstruction: AI-adaptedVerification: AI-generatedSession-authored (Fable 5 assisted)precheck passverified 2026-08-03 (gpt-5.6-sol-codex-subscription)
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.

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.

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · next 3 levels

Direct dependencies and their dependencies through the next three levels: 96 results over 32 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.

Sources