Alphabeta Math
TheoremStatement: AI-adaptedProof: AI-adaptedprecheck 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 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 ι

Statement

Let A and B be finite sets, n:=∣A∣ and k:=∣B∣, and write

Surj⁡(A,B):={ f:f is a surjection A→B }

(Injection, surjection, bijection). Then Surj⁡(A,B) is finite and, in R,

ι∣Surj⁡(A,B)∣  =  ∑i<k+1(−1)i ι(ki) ι((k−i) n),

where ι is the canonical natural (The canonical natural ι(n)=n⋅1F of a field), (k−i)n is the N-valued power of Exponentiation of natural numbers, mn, and its agreement with the integer power in R, and k−i is the truncated difference of Finite sums and finite products of natural numbers, ∑k<nak and ∏k<nak in N, which is the ordinary one throughout the range i≤k of the sum.

All three degenerate readings are part of the statement, and each is computed rather than stipulated.

Facts & Assumptions

Given: Finite sets A and B with n:=∣A∣ and k:=∣B∣; the set Map⁡(A,B) of all functions A→B; and, for b∈B, the set Fb:={ f∈Map⁡(A,B):b∉f[A] } of functions missing the value b.

[L1]

Map⁡(A,B) is finite with ∣Map⁡(A,B)∣=k n. This is The set AB of functions B→A between finite sets is finite, with ∣AB∣=∣A∣∣B∣ with its A taken to be B and its B taken to be A, so that its AB is the set of functions A→B and its formula reads ∣B∣∣A∣=k n (Exponentiation of natural numbers, mn, and its agreement with the integer power in R).

[L2]

(Fb)b∈B is a family of subsets of the finite set X:=Map⁡(A,B) indexed by the finite set B, hence a sieve family with ambient set X, and its intersections FJ for J⊆B satisfy F∅=X (A finite family (Ai)i∈I of subsets of a finite set X, the intersections AJ for J⊆I, and the convention A∅=X, 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).

[L3]

f∈Map⁡(A,B) is a surjection exactly when f[A]=B, that is exactly when there is no b∈B with b∉f[A] (Injection, surjection, bijection). Hence Surj⁡(A,B)=X∖⋃b∈BFb, and it is finite as a subset of X (A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A).

[L4]

For a finite sieve family (Fb)b∈B in X with F∅=X, the complementary identity is ι∣X∖⋃b∈BFb∣=∑J∈P(B)(−1)∣J∣ι∣FJ∣ (Inclusion and exclusion: ι∣⋃i∈IAi∣=∑∅≠J⊆I(−1)∣J∣+1 ι∣AJ∣, together with the complementary form counting the elements in none of the Ai, clause 2).

[L6]

Partition of a power set by cardinality: the sets [B]i for i∈σ(k) are pairwise disjoint with union P(B), since a subset of B has exactly one cardinality and it is at most k; and ∣[B]i∣=(ki) (A subset of a finite set is finite, with ∣B∣≤∣A∣, and equality holds if and only if B=A, clause 2, The set [A]k of k-element subsets and the binomial coefficient (nk):=∣[n]k∣, ∣P(A)∣=2∣A∣ for finite A).

[L7]

Splitting a sum along a partition of its index set (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); a constant real summand ∑p∈Sλ=ι(∣S∣)λ and the bridge ∑i∈nui=∑i<nui (The sum ∑i∈Sai over a finite index set, and its product form, clauses (a) and (c)); and the real finite sum itself (Finite sums and finite products, by recursion).

Proof

technique · direct
1.1

The ambient set. Put X:=Map⁡(A,B); it is finite with ∣X∣=k n by [L1].

L1
1.2

The sieve family. For b∈B the set Fb of functions missing b is a subset of X, and by [L3] a function f∈X is a surjection exactly when f∉⋃b∈BFb; so Surj⁡(A,B)=X∖⋃b∈BFb is the complement of the union of the sieve family (Fb)b∈B inside X.

L2L3construct
1.3

The intersections are function sets. For every J⊆B, FJ=Map⁡(A,B∖J): for J≠∅, f∈FJ says that f misses every b∈J, that is that f takes all its values in B∖J; and for J=∅ both sides are Map⁡(A,B), the left by the stipulation F∅=X of [L2]. Hence ∣FJ∣=∣B∖J∣ n=(k−∣J∣) n by [L1] applied to B∖J and by [L5].

L1L2L5
2.1

The sieve. Applying [L4] to the family of step 1.2 and substituting step 1.3, ι∣Surj⁡(A,B)∣=∑J∈P(B)(−1)∣J∣ ι∣FJ∣=∑J∈P(B)(−1)∣J∣ ι((k−∣J∣) n).

step 1.2step 1.3L4
3.1

Grouping the subsets of B by size. Splitting the last sum along the partition of [L6] and using the constant clause of [L7] on each block, where the summand depends on J only through ∣J∣=i, gives ∑J∈P(B)(−1)∣J∣ι((k−∣J∣) n)=∑i<k+1ι(ki) (−1)i ι((k−i) n).

step 2.1L6L7
4.1

Combining steps 2.1 and 3.1 gives ι∣Surj⁡(A,B)∣=∑i<k+1(−1)i ι(ki) ι((k−i) n), and Surj⁡(A,B) is finite by [L3]; since ι is injective, the identity determines the count in N.

step 2.1step 3.1L3L8∎

Remarks

  • The convention 00=1 is load bearing exactly once, at n=0 and k=0, where the formula returns ι(00) and the truth is that the empty function is a surjection onto the empty set. It is not a convenience: it is the base clause of the recursion defining natural exponentiation, and changing it would make the formula false at that single point.

  • Why the family is indexed by B and not by A. The sieve removes the functions that miss a value, and there is one condition per element of the codomain. This is also why the alternating sum runs to k and not to n.

  • The count is a natural number. The identity is stated in R because it carries signs, and ι is injective, so it pins down the natural number ∣Surj⁡(A,B)∣ exactly.

Depends on

Used by

Dependency tree · two levels

61 results within two dependency steps of this one, each drawn at its shortest distance from it. An arrow runs from a result to what uses it, so the chart reads left to right and ends at this result, which carries a heavier outline. Every node is a link to that result. Click elsewhere on the chart to enlarge it.

Sources