Alphabeta Math
ExampleConstruction: AI-generatedVerification: 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.

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.

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: 86 results over 29 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