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

Depends on

Used by

Nothing in the library uses this result yet.

Dependency tree · two levels

57 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