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.
Finite Counting, Factorials and Binomial Coefficients
1 · Prerequisites
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Countability and Uncountability
- Foundations of the Real Numbers for Analysis
- Relations, Functions, and Quotients
- Roots, Rational Powers, and Classical Inequalities
- The ZFC Axioms and the Basic Set Constructions
2 · Summary
Objective. This page builds finite counting from the ground up: what means, the two rules that every count is assembled from, and the factorials and binomial coefficients they produce. It ends with the binomial and multinomial theorems and with stars and bars. Everything is proved from this page's declared prerequisites — the countability page and the page on roots and rational powers — together with the naturals and the ordered-field foundations below them; nothing is imported from later in the reading order.
The starting point is The cardinality of a finite set. A set is finite when it is equinumerous with a natural number, and the pigeonhole principle says it is equinumerous with exactly one, so names a single natural number. Four consequences are proved there and used constantly: , exactly for the empty set, transport of cardinality along a bijection, and the equivalence of with . The workhorse that follows, A subset of a finite set is finite, with , and equality holds if and only if , says that a subset of a finite set is finite with no larger cardinality, that equal cardinality forces equality of the sets, and that an injection or a surjection of a finite set onto itself is a bijection. That last clause is where finiteness is spent; the successor map on shows what happens without it.
Several items on this page exist because of a gap in the published library, and it is worth saying which. The finite sums already in the library are real valued: Finite sums and finite products, by recursion opens with a sequence . Every count on this page is a natural number, so the sum rule, the row sums of Pascal's triangle, the condition on a multinomial coefficient and the stars-and-bars count all need a sum that stays in . That is Finite sums and finite products of natural numbers, and in , built by the same recursion, together with Laws of finite sums and products in , and , which proves the usual laws and the bridge and the injectivity of . Those two clauses are the licence used throughout: an identity between counts may be proved in , where subtraction and division exist, and carried back. The third minted item is A finite sum is unchanged by a permutation of its index range: for every bijection . The published law list has additivity, scaling, splitting, monotonicity, telescoping and the product laws, and no permutation-invariance clause; without one, the sum over a finite index set is not well posed. It is proved here for all four of , , , by a single argument, and The sum over a finite index set, and its product form is then well defined, with an explicit bridge back to the sum over an initial segment.
The two counting rules follow. The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition splices two enumerations into one; disjointness is used at exactly one step, the injectivity of the splice, and that step is named so the false statement on the companion page can point at it. The same splice, used as an enumeration, splits a sum along a partition of its index set, which is what the multinomial theorem later needs. The product rule: , and then counts by slicing it over and adding, which needs no arithmetic at all, and iterates to a finite product of sets. Exponentiation of naturals is minted in Exponentiation of natural numbers, , and its agreement with the integer power in , again because Integer powers is real valued, and it carries the bridge and the agreement . With it, The set of functions between finite sets is finite, with gives , both degenerate cases included, and for finite gives together with , deduced from Cantor's theorem rather than left beside it.
The factorial and the falling factorial , defined by recursion in defines and by recursion inside . is the base clause of that recursion, not an imported convention: the monoid version of the empty product comes later in the reading order, so it could not be cited here even if one wanted to. The agreement with the empty product is then proved, and so is , which is what keeps this factorial and the real-valued one used elsewhere in the library a single object. The number of injections from a -element set into an -element set is counts injections as , with both boundary regimes checked, and A finite set with has exactly bijections onto itself, and bijections onto any set of the same cardinality gets as the case . That theorem is stated about a set of bijections, with no group vocabulary anywhere, because the symmetric group is later in the reading order; it is on this page rather than among the examples so that a later page may cite it.
The set of -element subsets and the binomial coefficient defines as the count of -element subsets. Integrality is then free and the familiar quotient is a theorem: for ; hence , the quotient is a natural number, and counts the bijections of twice, once directly and once by the image of an initial segment, and gets , the relation , the quotient formula in , and the symmetry by complementation. Pascal's rule , and the hockey-stick identity follows by splitting the -subsets according to whether they contain a fixed point, and carries the hockey-stick identity as its second clause. A finite set with elements has exactly two-element subsets, and records the count of unordered pairs, , checked at and ; it is stated purely as a count, since no graph is defined anywhere in the library at this point.
The binomial theorem in : is proved by induction from Pascal's rule. It is stated in , with the coefficient written , because a binomial coefficient is a natural number and not an element of the field; the commutative-ring version is a separate statement, to be made where rings exist. , and for draws the row sum , proved twice on purpose, once by partitioning the power set and once through the theorem, and the alternating row sum, which is only for : at the sum is , and that is exactly where stops being . Vandermonde's identity is a double count over a disjoint union, chosen in preference to generating functions and to coefficient comparison, both of which need machinery far later in the reading order.
The last block generalises. The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes counts the colourings of a finite set with prescribed fibre sizes, the condition being part of the definition rather than a side remark, and The multinomial coefficient equals , and in gives both the closed formula and the expansion of a power of a sum, its outer sum indexed by the finite set of tuples summing to . Compositions and weak compositions of a natural number into a fixed number of parts names those tuples and records the counts at , and For the number of weak compositions of into parts is , and the number of compositions is for computes them: weak compositions for , and compositions for and . The stars-and-bars bijection is exhibited explicitly and shown injective; surjectivity is read off from the count, which spares an appeal to the increasing enumeration of an arbitrary subset. Conventions fixed on this page, and what counting is deliberately not done here closes the page with every convention it fixes and with what is deliberately left to later pages, inclusion and exclusion among them.
Two habits are enforced throughout. Every sum, product and index range is checked at its first index, because contains here. Three results carry a hypothesis for that reason alone: the alternating row sum needs , the weak-composition count needs and the composition count needs . The first two have a matching false statement on the companion page; the third is recorded in the theorem's own Statement. And every count is kept in , with written whenever a count is used inside , so that the two sides of an identity always live in the same set.
3 · Logical flowchart
4 · Definitions, theorems and proofs
The cardinality of a finite set
Definition
Throughout this page is the set of von Neumann naturals (The natural numbers (von Neumann)): , , and is itself the set of its predecessors, the order being the additive order of Order on the natural numbers identified with membership in On the order is membership: . Write when a bijection exists (Equinumerous sets, and , Injection, surjection, bijection). A set is finite when for some (Finite, countably infinite, countable, uncountable).
Definition. Let be a finite set. Then there is exactly one with , and we write
the cardinality, or number of elements, of . The notation is defined for finite only, and its value is a natural number.
Why exactly one, which is the whole content of the definition. At least one such exists: that is literally what " is finite" says. At most one exists: if and with , then , because the inverse of a bijection is a bijection, and hence , because a composition of bijections is a bijection (Injection, surjection, bijection); and forces by claim 3 of The pigeonhole principle on . So names a single natural number and not a family of choices.
Four consequences, proved here because everything on this page uses them.
(a) for every . The identity map is a bijection , so ; thus is finite and the unique natural equinumerous with it is itself.
(b) , and a finite satisfies if and only if . Since , part (a) gives . Conversely, if then there is a bijection ; were some , the value would be an element of , and has none, so .
(c) Transport along a bijection. If is finite and is a bijection, then is finite and . Indeed through and , so by transitivity.
(d) Equality of cardinalities is equinumerosity. For finite and : if and only if . If the cardinalities agree then ; conversely gives by (c).
Remarks
-
contains here, and that is not a detail. Every index range on this page starts at , a one-element set has cardinality , and is never a positive-integer-only object. A statement about that is true only for must say so.
-
is a natural number, not a cardinal number. The theory of cardinals (Cardinal (initial ordinal) and cardinality ↗) is developed much later in the library and nothing here uses it, or any cardinal arithmetic: the pointer is orientation only. What makes the notation legitimate at this point in the reading order is exactly claim 3 of The pigeonhole principle on , and nothing more.
-
What the definition does not supply. It asserts that some bijection exists; it does not single one out, and nothing in the library does. Two sets can have equal cardinality with no distinguished bijection between them, which is the point of the counterexample on this page's companion.
A subset of a finite set is finite, with , and equality holds if and only if
Statement
Let be a finite set (Finite, countably infinite, countable, uncountable) and let . Then:
- is finite;
- (The cardinality of a finite set);
- if and only if ;
- every injection is a bijection, and every surjection is a bijection.
Clause 3 is the finite form of the Dedekind statement: a finite set is not equinumerous with a proper subset of itself. Clause 4 is its working form, and finiteness is exactly the hypothesis that fails in general: the successor map is an injection of into itself that is not surjective, which is the false statement recorded on this page's companion.
Facts & Assumptions
Given: A finite set , its cardinality , and a subset . Throughout, and , the latter because (Addition of natural numbers).
Induction: a property holding at and inherited by successors holds at every natural (The principle of mathematical induction).
On the order is membership: , , and ; also (On the order is membership: , Order on the natural numbers, The natural numbers (von Neumann)). By the definition of the strict order, is impossible.
Cardinality (The cardinality of a finite set): is the unique natural with ; ; ; and if is finite and then is finite with (transport).
Maps and equinumerosity (Injection, surjection, bijection, Equinumerous sets, and , Finite, countably infinite, countable, uncountable): is finite when for some ; the restriction of an injection to a subset of its domain is an injection; an injection is a bijection onto its image; inverses and composites of bijections are bijections; and for a bijection and contained in its domain.
Order and successor: implies , and implies (Order is compatible with addition, Addition is cancellative, with ).
Discreteness: (Discreteness: is the immediate successor).
Well-ordering: every nonempty subset of has a least element (The well-ordering principle).
Proof
The whole theorem rests on the special case where the ambient set is a natural number, which we call : for every and every , the set is finite, , and implies . It is proved by induction on .
Base case . Since , a subset satisfies ; so is finite with , and indeed gives .
Inductive hypothesis. Fix and assume holds for : every is finite with , and implies .
Let and put , so that , and when while with when . By the inductive hypothesis of step 1.3 the set is finite; write , so , and forces .
Case . Here is finite with , and gives ; moreover is impossible, since would give by [L6], so the third assertion of holds vacuously in this case.
Case . Choose a bijection , which exists because , and define by for and ; the two clauses do not conflict, since . Then is injective, because is injective and takes its values in , so no value equals ; and is surjective onto . Hence , so is finite with .
In the case we therefore have , because ; and if then , so , so and therefore .
The two cases are exhaustive, so holds at whenever it holds at ; with the base case this gives for every .
Clauses 1 and 2 in general. Fix a bijection , available since . Then , and the restriction of to is a bijection of onto , so . By the set is finite with , hence is finite with .
Clause 3. If then . Conversely assume . Then by transport, so by , and therefore , because is a bijection of onto .
Clause 4, the injective half. Let be injective. Then is a bijection of onto its image , so by transport, and clause 3 gives . Thus is surjective, hence a bijection.
Clause 4, the surjective half. Let be surjective. For each the set is nonempty, so it has a least element by [L7]; let be the value of at that least element. No choice principle is used, since each is determined by rather than selected. By construction , that is for every ; and is injective, since gives . So is a bijection by step 8.1.
Composing on the right with gives , which is a bijection; so a surjection of onto itself is a bijection, and in particular an injection.
Clauses 1 and 2 are step 6.1, clause 3 is step 7.1, and clause 4 is steps 8.1 and 10.1, each resting on the induction that establishes .
Remarks
-
Where finiteness is spent. Only in , and there only through the base case and the fact that removing the top point of leaves . Clause 4 then follows formally, which is why the failure of clause 4 for is a failure of finiteness and of nothing else.
-
The surjective half needs no choice. The obvious argument, "pick a preimage of each ", would need a choice function on the fibres. Transporting the fibres into and taking least elements replaces the choice by a determination, which is what The well-ordering principle is for.
-
Clause 2 is not the pigeonhole principle restated. The pigeonhole principle on is about injections between natural numbers, and it is what makes The cardinality of a finite set well posed in the first place; clause 2 compares the cardinalities of a set and a subset, and is proved here by induction directly.
Finite sums and finite products of natural numbers, and in
Definition
Let , written for , with addition and multiplication of natural numbers as in Addition of natural numbers and Multiplication of natural numbers. Finite sums and finite products of inside are defined by recursion on the upper index, which is legitimate by the recursion theorem (The recursion theorem).
That theorem produces a function of one variable, so the running index has to be carried inside the value. Apply it to the set , the starting element and the function : there is a unique with
Write for its two coordinates.
The first coordinate is the index itself, and that is an induction, not an observation (The principle of mathematical induction). Indeed ; and if then , so . Only now may the second coordinates of the two displayed clauses be read off, and doing so gives
is moreover the unique function with those two properties: if also has them then satisfies the two clauses defining , hence equals by the uniqueness clause of The recursion theorem, so . We write
The same construction with starting element and , with the same induction on the first coordinate and the same uniqueness argument, gives the unique with
and we write .
The empty sum is and the empty product is , by the base clause of the recursion and by nothing else: no convention is imported from anywhere.
Notation. We abbreviate and likewise for products, using . Only finitely many values of enter , so the notation is also used for a list of naturals given without reference to any extension to all of : extend the list by (respectively ) for and apply the definition. Where the two kinds of finite sum have to be told apart, we write and for the ones defined here and , for those of Finite sums and finite products, by recursion; elsewhere the ambient set is fixed by the terms being summed.
Truncated difference, fixed here for the whole page. For we write for the unique with when , and for when . Existence in the first case is the definition of (Order on the natural numbers) and uniqueness is commutativity with cancellation (Addition is commutative, Addition is cancellative). The two cases are exhaustive and mutually exclusive, since exactly one of , , holds (Trichotomy of the order on ), so the notation names a single natural number for every and . Every use of on this page is this operation; no negative number is ever formed, and where a statement is true only under that hypothesis is written out.
Remarks
-
Why a second finite sum is needed at all. Finite sums and finite products, by recursion defines for a sequence of reals, and its value is a real number. Every count on this page is a natural number, so the sum rule, the row sums of Pascal's triangle, the condition on a multinomial coefficient and the stars-and-bars count all need a sum that stays in . The two notions are related, not rival: the bridge is proved in the next item, and it is what lets an identity between counts be read inside and back.
-
The monoid version, later. The same recursion is carried out in an arbitrary monoid in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity ↗, which comes later in the reading order; and are instances of it, and the agreement is immediate because the recursion clauses are identical. That pointer is orientation only: nothing here depends on it, and the notion defined above is complete as it stands.
-
is an index. runs over , so and . A claim about must be checked at , where it is a claim about , and a claim about at , where it is a claim about .
Laws of finite sums and products in , and
Statement
Let , let , and let , with and as in Finite sums and finite products of natural numbers, and in and , as in Finite sums and finite products, by recursion. Let be the canonical natural of The canonical natural of a field, so and . Then:
- is additive and multiplicative. , and and for all , the cases where a factor is included.
- Additivity. .
- Constants. , the summand being the constant list.
- Splitting. If and , then , and .
- Monotonicity. If for every then ; and for every .
- Products. ; and if for every then .
- The bridge into . and .
- is strictly increasing, hence injective. if and only if , and if and only if .
Clauses 6 and 7 together are the licence used everywhere below: an identity between natural numbers may be proved by proving the corresponding identity between their canonical naturals in , and conversely a real identity whose two sides are canonical naturals is an identity in .
Facts & Assumptions
Given: Lists , a natural , naturals , and the ambient ordered field . Recall and the truncated difference of Finite sums and finite products of natural numbers, and in .
Induction: a property holding at and inherited by successors holds at every natural (The principle of mathematical induction).
Recursion clauses in (Finite sums and finite products of natural numbers, and in ): , , , .
Recursion clauses in (Finite sums and finite products, by recursion): , , and likewise , .
Arithmetic of : addition and multiplication are associative and commutative, and , and , multiplication distributes over addition, and (Addition is associative, Addition is commutative, Left identity for addition, Multiplication is associative, Multiplication is commutative, Zero and one under multiplication, Distributivity and the successor law for multiplication, Addition of natural numbers, Multiplication of natural numbers).
Order of : means for some , that is unique, , and , so is the same as ; exactly one of , , holds (Order on the natural numbers, Addition is cancellative, Order is compatible with addition, Discreteness: is the immediate successor, Trichotomy of the order on ). Transitivity of follows from the definition and associativity: and give .
The canonical natural (The canonical natural of a field): and ; is also written .
For , with defined by and : , and and for all (Canonical naturals are positive and strictly increasing). These identities are asserted for only; the cases with a zero argument are checked separately below.
In a field, (Multiplication by zero: ); and is an ordered field, so its addition and multiplication are associative and commutative with identities and , and its order is total and compatible with addition (Field, Ordered field).
Cancellation in : with implies (Cancellation for multiplication by a nonzero factor); and , so (The von Neumann naturals form a Peano system).
Proof
Every clause is proved by induction on the upper index, using only the recursion clauses [L2], [L3] and the arithmetic [L4], [L8]; the inductions are written out one clause at a time.
The two notations agree: for every . At , ; and the successor clauses of the two recursions coincide, and . So the two agree at every by induction, and [L7] may be read as a statement about .
Clause 1 at : both sides are the empty sum, .
Clause 1, inductive hypothesis: assume for a fixed and all lists .
Clause 2, by induction on . At both sides are , since . If , then , the last equality being the successor law of [L4].
Clause 3, by induction on , with fixed and . At we have and the second sum is empty, so the claim reads . Assuming it at , and using , we get . The product form is the same argument with replaced by and by .
Clause 5, by induction on . At both sides are ; and by associativity and commutativity. For the second assertion, note first that a product of two nonzero naturals is nonzero: if with , then , so by [L9]. Now induct: by [L9], and is a product of two nonzero naturals.
Clause 1, inductive step. Using [L2] twice and the associativity and commutativity of addition, , where the inductive hypothesis of step 1.4 was used at the second equality.
Clause 0. First , computed in step 1.2. For the two identities are [L7], read through step 1.2. If then , and by [L8]; the case follows from these by the commutativity of addition and multiplication in and in . So both identities hold for all .
Clause 4. Monotonicity is an induction: at both sums are ; and if and , then by [L5], so by transitivity. For the second assertion let , so ; splitting at and then splitting the tail at , and using , gives for some , and because plus something equals it.
Clause 1 holds for every , by step 1.3 and step 2.1 together with induction.
Clause 7. If put , so and , hence and by [L7]; then by step 2.2. Conversely, if then and are both excluded, the first because the order of is irreflexive and the second by what was just proved, so by trichotomy in . The statement about equality follows by trichotomy on both sides.
Clause 6, by induction on . At , . Assuming the identity at , , the second equality by step 2.2. The product form is the same induction, starting from and using multiplicativity.
Clause 0 is step 2.2, clause 1 is step 3.1, clause 2 is step 1.5, clause 3 is step 1.6, clause 4 is step 2.3, clause 5 is step 1.7, clause 6 is step 3.3 and clause 7 is step 3.2.
Remarks
-
Why the zero cases are done by hand. Canonical naturals are positive and strictly increasing states and for only, because the notation is introduced there by a recursion that starts at . Every count on this page can be , so the two one-line checks at in step 2.2 are not pedantry: without them clause 0 would be a citation to a statement that was not made.
-
The real-valued laws are the same list. Laws of finite sums and finite products proves additivity, scaling, splitting, monotonicity, telescoping and the product laws for sums of reals. The clauses above are their -valued counterparts, proved from the same recursion, and clause 6 is what ties the two lists together. Neither list contains a permutation-invariance clause; that is proved separately in the next item, and it is what the sum over a finite index set needs.
-
What clause 7 buys. Because is injective, a proof may cross into , use subtraction or division there, and come back: if with then . The binomial theorem below lives in for exactly this reason, while every coefficient in it is a count.
A finite sum is unchanged by a permutation of its index range: for every bijection
Statement
Let and let be a bijection (Injection, surjection, bijection). Then:
- for every list , and (Finite sums and finite products, by recursion);
- for every list , and (Finite sums and finite products of natural numbers, and in ).
This is not in Laws of finite sums and finite products. That item proves additivity, scaling, splitting, monotonicity, telescoping and the product laws, and states no invariance clause; the same is true of the -valued list on this page. Permutation invariance is exactly what makes a sum over a finite set of indices well posed, which is the next item, so it is proved here first.
Facts & Assumptions
Given: A natural number , a bijection , and a list of length . Throughout, , , and denotes any one of the four operations , , , , with the corresponding identity element , , , . Write for the associated iterated operation, that is, for in the two additive cases and in the two multiplicative ones.
Induction (The principle of mathematical induction).
The four iterated operations obey the same two recursion clauses: and (Finite sums and finite products, by recursion, Finite sums and finite products of natural numbers, and in ).
Each of the four operations is associative and commutative on its set and has as a two-sided identity (Field, Ordered field for ; Addition is associative, Addition is commutative, Multiplication is associative, Multiplication is commutative, Left identity for addition, Zero and one under multiplication for ). These three properties are the only facts about used below, which is why one argument proves all four clauses.
Order and membership: , , , , and (On the order is membership: , The natural numbers (von Neumann), Order on the natural numbers).
Discreteness and successors: ; every nonzero natural is for a unique (Discreteness: is the immediate successor, Every nonzero natural number is a successor, The von Neumann naturals form a Peano system).
Maps: a composite of bijections is a bijection; a bijection restricted to a subset of its domain is a bijection onto the image of that subset (Injection, surjection, bijection).
Proof
For and define by for and for ; this is the increasing enumeration of . It is a bijection of onto : its values lie in and avoid , since in the first clause and in the second; it is injective, being strictly increasing on each clause and satisfying across them; and it is surjective, since with has and , while is nonzero, so with by [L5] and because , giving .
Claim at : for a list of length and the only admissible index , both sides of read , since and .
Inductive hypothesis for : fix and assume that for every list of length and every one has .
The main claim at : the only bijection is the empty map and both sides are the empty iterate .
Inductive step for . Let be a list of length and let . If then is the identity of , so the right-hand side is , which is the left-hand side by [L2]. If instead , apply the hypothesis of step 1.3 to the restriction of to to get ; hence by [L3]. Finally agrees with on and sends to , because , so the inner bracket is by [L2], which is the right-hand side at .
Claim therefore holds for every : for every list of length and every , . Informally, any single entry may be moved to the end without changing the value.
Inductive step for the main claim. Assume it at , for every list of length and every bijection of . Let be a bijection, let be a list of length , and put . Applying to the list at the index gives with and . Now is a bijection of onto : is a bijection of onto by step 1.1, and restricts to a bijection of onto . So the inductive hypothesis applies to and gives , whence .
By induction the main claim holds for every , every list of length and every bijection .
Since was any one of the four operations of the Given, and [L3] holds for each of them, step 5.1 is exactly clauses 1 and 2.
Remarks
-
Where the deletion map earns its keep. The usual textbook proof says "move the term to the end and delete it", and leaves the resulting map on the shorter index range unexamined. That map is composed with , and checking that it really is a bijection of onto is the only place where anything can go wrong; step 1.1 writes it down and verifies it in both directions.
-
One proof, four statements. Only associativity, commutativity, the identity and the two recursion clauses are used, so the argument is indifferent to which of the four operations is meant. The same observation is what later licenses the identical statement in an arbitrary monoid, where it belongs; nothing here needs that generality.
-
No choice is used. The index is determined, not selected, because is a bijection.
The sum over a finite index set, and its product form
Definition
Let be a finite set, (The cardinality of a finite set), and let or , written for . Choose a bijection , which exists because (Equinumerous sets, and ), and set
the right-hand sides being the iterated operations of Finite sums and finite products, by recursion when the values are real and of Finite sums and finite products of natural numbers, and in when they are natural.
Independence of the enumeration, which is the content of the definition. Let be two bijections. Then is a bijection (Injection, surjection, bijection), and for every . Applying A finite sum is unchanged by a permutation of its index range: for every bijection to the list gives
and identically for products. So the value does not depend on which bijection is used, and is a single well-determined element.
No choice principle is involved. The definition does not select an enumeration: it asserts that all enumerations give the same value, and that value is what the notation names. Only one bijection is ever produced at a time, from a set already known to be nonempty.
Three clauses, recorded here because the page uses them constantly.
(a) The bridge to the old notation. Taking and , which is legitimate since , gives
So the new notation extends the sum over an initial segment rather than competing with it, and every law proved for the latter is available for the former whenever the index set is a natural number.
(b) Reindexing along a bijection. If is a bijection of finite sets, then , and likewise for products. Indeed by transport (The cardinality of a finite set), and if is a bijection then is one, so .
(c) The empty index set and a constant summand. , so and by the base clause of the recursion. And for a constant , clause (a) together with the constant clause of Laws of finite sums and products in , and in , or clause 2 of Laws of finite sums and finite products in , gives
the second with written out because is a natural number and not an element of (The canonical natural of a field).
Remarks
-
This is a different object from , and the bridge is what keeps them one notion. The sum over an initial segment is indexed by a natural number and needs no well-definedness argument; the sum over a finite set is indexed by an arbitrary finite set and is well posed only because a finite sum is permutation invariant. Clause (a) is the statement that the second restricts to the first.
-
Splitting the index set — the identity for disjoint finite and , and its version for a finite partition — is not proved here but in The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition, the next item, whose splice bijection is exactly what such a proof needs. Keeping the two together avoids building the same bijection twice.
-
Three notions of finite sum will exist in the library: over an initial segment (Finite sums and finite products, by recursion), over a finite index set (here), and in an arbitrary monoid (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity ↗, later in the reading order). Each is introduced with its bridge to the previous one, which is what stops them drifting apart.
The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition
Statement
- Two blocks. If and are finite and disjoint, then is finite and (The cardinality of a finite set).
- A finite partition. If is a finite set and is a family of finite sets that are pairwise disjoint, then is finite and , the sum being that of The sum over a finite index set, and its product form.
- Splitting a sum along a partition of its index set. Let be finite, let be finite, and let be pairwise disjoint subsets of with . Then for or , In particular for disjoint finite and .
Disjointness is a hypothesis and not a formality. It is spent at exactly one step, the injectivity of the splice map, and dropping it makes clause 1 false; the companion page carries that false statement with its smallest witness.
Facts & Assumptions
Given: Finite sets as in the statement, and the truncated difference and the two finite sums of Finite sums and finite products of natural numbers, and in . Throughout, denotes either or on or on , the corresponding identity, and the associated iterated operation; the four cases are proved by one argument, as in A finite sum is unchanged by a permutation of its index range: for every bijection .
Induction (The principle of mathematical induction).
Cardinality (The cardinality of a finite set): is the unique natural with ; ; ; a bijection transports finiteness and cardinality.
Sums over a finite index set (The sum over a finite index set, and its product form): for any bijection , the value being independent of ; ; reindexing along a bijection leaves the value unchanged; and .
Recursion clauses: and (Finite sums and finite products of natural numbers, and in , Finite sums and finite products, by recursion).
Splitting at an index: for and , (clause 3 of Laws of finite sums and products in , and , clause 3 of Laws of finite sums and finite products).
Order and addition in : gives a unique with ; ; addition is commutative; (Order on the natural numbers, Addition is cancellative, Order is compatible with addition, Addition is commutative, Addition of natural numbers, On the order is membership: ).
Maps (Injection, surjection, bijection, Equinumerous sets, and ): composites and inverses of bijections are bijections, and an injective surjection is a bijection.
A subset of a finite set is finite (A subset of a finite set is finite, with , and equality holds if and only if , clause 1).
Proof
The splice map. Let , be finite and disjoint, put , , and fix bijections and . Define by when , and, when , by for the unique with ; that satisfies because . The map is well defined by [L6], it is surjective because every element of is some or some , and it is injective: two indices below are separated by the injectivity of , two indices at least by the injectivity of together with the uniqueness of , and an index below from one at least because , and . The last of these three cases is the only use of disjointness in the whole proof.
Base cases of the two inductions below, at . A family indexed by has empty union, so ; and a partition of indexed by forces , so both sides of clause 3 are .
Inductive hypothesis for both inductions, at : for pairwise disjoint finite the union is finite with cardinality ; and for a partition of a finite set into pairwise disjoint one has .
Clause 1. By step 1.1 the map is a bijection , so ; hence is finite and .
Clause 3 for two blocks. Let , be finite and disjoint and defined on . With , and the bijections of step 1.1 for the pair , , step 2.1 gives , so may be used as the enumeration in [L3]. Then , using [L5] at the second equality.
Inductive step for clause 2, in the case of an index set . Let be pairwise disjoint and finite. Then , and these two sets are disjoint because each with is disjoint from . By the hypothesis of step 1.3 the first is finite with cardinality , so clause 1 makes the union finite with cardinality by [L4].
Clause 2. By step 1.2, step 3.2 and induction, the statement holds for every family indexed by a natural number . For a general finite index set take a bijection with ; then and by the definition of the sum over a finite index set, so the two statements coincide.
Inductive step for clause 3, index set . Let be finite and partitioned into pairwise disjoint , and put , which is finite by [L8] and disjoint from . The hypothesis of step 1.3 applies to the partition of into , and step 3.1 applies to the disjoint pair , , giving by [L4].
Clause 3. By step 1.2, step 5.1 and induction it holds for every index set that is a natural number, and the general finite follows by reindexing along a bijection exactly as in step 4.1. The two-block form is step 3.1.
Clause 1 is step 2.1, clause 2 is step 4.1 and clause 3 is step 6.1; since was an arbitrary one of the four operations, both the sum and the product forms of clause 3 are proved.
Remarks
-
Why the splice map is built once. The same bijection proves clause 1 and, used as an enumeration, proves the two-block case of clause 3. Building it twice, once for cardinalities and once for sums, would be two chances to get the index arithmetic wrong.
-
The subtraction in the splice is legitimate. Writing for means: the unique with , which exists by the definition of and is unique by cancellation. No negative number is formed anywhere.
-
Clause 3 is what the multinomial theorem needs. Its outer sum is indexed by the set of weak compositions of into parts, and the induction on partitions that index set by the value of the last part. Without clause 3 that step could not be taken.
The product rule: , and
Statement
- If and are finite then is finite and (The cardinality of a finite set).
- Let and let be finite sets. Write Then is finite and , the right-hand product being the -valued one of Finite sums and finite products of natural numbers, and in .
At clause 2 reads : there is exactly one function with domain , the empty function, and the empty product is . Both sides are computed, not stipulated.
Facts & Assumptions
Given: Finite sets , and a finite list of finite sets. Recall and .
Induction (The principle of mathematical induction).
Cardinality (The cardinality of a finite set): is the unique natural with ; ; and a bijection transports finiteness and cardinality.
The sum rule (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition): a family of pairwise disjoint finite sets indexed by a finite set has finite union, whose cardinality is the sum over that index set of the cardinalities.
Sums over a finite index set (The sum over a finite index set, and its product form): for a constant .
Recursion clause for the -valued product (Finite sums and finite products of natural numbers, and in ): and .
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection, and composites of bijections are bijections.
Arithmetic: multiplication of naturals is commutative (Multiplication is commutative, Multiplication of natural numbers); and , , (On the order is membership: , The natural numbers (von Neumann)).
Proof
The slices. For put . The map is a bijection of onto , with inverse the first projection, so is finite with ; and the family is pairwise disjoint, since an element of has second coordinate . Moreover .
Base case of clause 2, at . A function with domain is the empty function and there is exactly one of them, so , which is finite with cardinality because is a bijection of onto it; and by [L5].
Inductive hypothesis for clause 2: fix and assume that for every finite list of finite sets the set is finite with cardinality .
Clause 1. By step 1.1 and [L3], is finite and , using [L4] for the constant summand and commutativity for the last step.
Inductive step for clause 2. Let be finite. Define by , where is the restriction of to . Its inverse is , a function with domain because ; the two composites are the identity, so is a bijection. By the hypothesis of step 1.3 and clause 1, the codomain is finite with cardinality , and transport carries this to .
By step 1.2, step 3.1 and induction, clause 2 holds for every .
Clause 1 is step 2.1 and clause 2 is step 4.1.
Remarks
-
No arithmetic is needed for clause 1. Slicing over and applying the sum rule replaces the usual bijection , which would have to be proved bijective by division with remainder. Division with remainder lives later in the reading order, so the slicing argument is not merely shorter here, it is the one available.
-
The empty cases are computed. With and arbitrary, clause 1 reads , which is right because . With , clause 2 reads . Neither is a convention.
-
The infinite analogue of clause 1 fails in the shape a reader expects. A product of two infinite sets need not be strictly larger than either factor: (). The companion page records that as a false statement, with finiteness located as the hypothesis that fails.
Exponentiation of natural numbers, , and its agreement with the integer power in
Definition
Let . By the recursion theorem (The recursion theorem) applied to the set , the starting element and the function (Multiplication of natural numbers), there is a unique function , written , with
Both the base and the value are natural numbers, so for all . In particular and .
Why a new item is needed. Integer powers defines for a real base , so its value is a real number. The counts on this page, and among them, are natural numbers, and an identity between them has to be an identity in . The two operations are related by clause (d) below and by nothing weaker.
(a) and for . The first is the base clause. For the second, , the clause being definitional (Multiplication of natural numbers), and every is a successor.
(b) for every . Induction: , and (Zero and one under multiplication, The principle of mathematical induction).
(c) and . Both by induction on , using associativity and commutativity of multiplication (Multiplication is associative, Multiplication is commutative). For the first, at we have , and , using (Addition of natural numbers). For the second, at both sides are , and .
(d) The bridge into . With the canonical natural (The canonical natural of a field) and the integer power of Integer powers ,
Induction on : at both sides are , since ; and , the second equality being the multiplicativity of (clause 0 of Laws of finite sums and products in , and ) and the last the recursion clause of Integer powers .
(e) is a constant product. , the -valued product of the constant list (Finite sums and finite products of natural numbers, and in ). Induction: at both sides are , and .
Remarks
-
, and the empty product are one convention, not three. The value here is the base clause of the recursion above; by clause (e) it is the empty product of Finite sums and finite products of natural numbers, and in ; and Integer powers adopts for every real , included, so clause (d) is consistent at . The reasons for the convention are set out in Integer powers and are not repeated here.
-
The laws are the same laws. Clause (c) is the -valued form of clause 1 of Laws of integer exponents, which states , and for a base in a field. Only the two identities actually used on this page are proved above; the third is available in through clause (d) whenever it is wanted.
-
The exponent stays a natural number. Following the convention of Finite sums and finite products, by recursion, the identification of a natural with its canonical natural is deliberately not made in an exponent: in and in the exponent is a natural number, never a real.
The set of functions between finite sets is finite, with
Statement
Let and be finite sets and write
Then is finite and , the power being the -valued exponentiation of Exponentiation of natural numbers, , and its agreement with the integer power in .
Both degenerate cases are covered and neither is a stipulation. If there is exactly one function , the empty function, so even when . If and there is no function at all, so with .
Facts & Assumptions
Given: Finite sets and , and . Here is the SET of functions ; it carries no further structure.
Induction (The principle of mathematical induction).
Cardinality (The cardinality of a finite set): is the unique natural with ; ; exactly when ; and a bijection transports finiteness and cardinality.
The sum rule for two disjoint blocks: (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition, clause 1).
The product rule: for finite , (The product rule: , and , clause 1).
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection.
A subset of a finite set is finite (A subset of a finite set is finite, with , and equality holds if and only if , clause 1); cancellation in : implies (Addition is cancellative); and , (The natural numbers (von Neumann), On the order is membership: ).
Proof
Base case . Then by [L2], and a function is the empty function, of which there is exactly one whatever is; so , which is finite with cardinality because is a bijection of onto it. And by [L5].
Inductive hypothesis: fix and assume that for every finite and every finite with the set is finite with .
Inductive step. Let . Then by [L2], so fix and put , which is finite by [L7]. Since with and , [L3] gives , hence by cancellation. Define by ; its inverse is , which is a function on because , and the two composites are the identity, so is a bijection. By the hypothesis of step 1.2 and by [L4] the codomain is finite with cardinality , and transport carries this to .
By induction on the statement holds for every pair of finite sets , .
The two degenerate readings are instances of it: gives by step 1.1, valid for as well; and with gives , which is right because a function would have to supply a value in for some element of .
Remarks
-
Where the choice of sits. A single element is taken from a single nonempty set, which is an ordinary existential instantiation and not a choice principle. Nothing in the argument selects a point of every member of a family.
-
here is a bare set. The same set carries a vector space structure over a field in The vector space of all functions with pointwise operations, and as the case ↗, much later in the reading order; that structure is not used, and this theorem is a count and nothing more.
-
The exponent notation is not an accident. counts the functions , and is by clause (e) of Exponentiation of natural numbers, , and its agreement with the integer power in the product of copies of : one factor for each element of the domain, which is exactly what the inductive step does one point at a time.
for finite
Statement
Let be a finite set and . Then the power set is finite and
the power being the -valued exponentiation of Exponentiation of natural numbers, , and its agreement with the integer power in . Moreover .
The last inequality is the quantitative form, for finite , of Cantor's theorem (Cantor's theorem: ), which holds for every set whatsoever. The two statements are consistent and the proof below derives the inequality from Cantor's theorem rather than leaving them side by side.
Facts & Assumptions
Given: A finite set with , and as a von Neumann natural (The natural numbers (von Neumann)). Write for the set of functions .
for finite , , and is finite (The set of functions between finite sets is finite, with ).
Cardinality (The cardinality of a finite set): for a natural ; a bijection transports finiteness and cardinality; and for finite , one has if and only if .
Cantor's theorem: , that is, there is an injection and no bijection (Cantor's theorem: , Equinumerous sets, and ).
Pigeonhole, claim 2: if then there is no injection (The pigeonhole principle on ).
Trichotomy: exactly one of , , holds (Trichotomy of the order on , Order on the natural numbers).
Maps (Injection, surjection, bijection): a map with a two-sided inverse is a bijection; a composite of injections is an injection; and .
Proof
The characteristic function. For define by when and otherwise, and let be . Let be . Both composites are the identity: ; and for and the value is or , so exactly when and otherwise, that is . Hence is a bijection and .
Therefore is finite and , using [L1] and from [L2].
The inequality. By [L3] there is an injection ; composing with bijections and , which exist by [L2] and step 2.1, gives an injection . So is impossible by [L4], and by [L5]. Also : otherwise , hence by [L2], contradicting [L3].
The two assertions are step 2.1 and step 3.1, so and .
Remarks
-
The finiteness of is part of the statement, and it is what makes finite in the next definition: a set of -element subsets is a subset of .
-
Cantor's theorem is not weakened here. holds for every set, finite or infinite, and needs no counting; what the finite case adds is the value of the gap, against . The inequality above is deduced from Cantor's theorem, so no independent argument can disagree with it.
The factorial and the falling factorial , defined by recursion in
Definition
The factorial. By the recursion theorem (The recursion theorem) applied to the set , the starting element and the function , and by the same induction on the first coordinate as in Finite sums and finite products of natural numbers, and in , there is a unique with
We write . Thus , , , , , , .
is the base clause of this recursion, not a convention imported from elsewhere. Nothing about empty products is presupposed; the agreement with the empty product is proved below, in clause (a), rather than assumed.
Truncated difference. Throughout, is the operation fixed in Finite sums and finite products of natural numbers, and in : the unique with when , and when .
The falling factorial. For define by recursion on , by the recursion theorem applied to with starting element and :
So and , and for the value is the product of the topmost factors.
Four facts, proved here because the page uses each of them.
(a) The factorial is the product of the first positive naturals. , the -valued product of Finite sums and finite products of natural numbers, and in . Induction (The principle of mathematical induction): at both sides are , the empty product and the base clause agreeing; and . So the empty-product reading and the base-clause reading are the same reading, and neither was assumed.
(b) , and . For the first, (The von Neumann naturals form a Peano system) and is a product of two nonzero naturals, which is nonzero: if with then (Zero and one under multiplication) and cancellation gives (Cancellation for multiplication by a nonzero factor). So for every by induction. For the second, apply the bridge clause 6 of that lemma to clause (a) above. This is what makes the factorial of this page and the real-valued product used elsewhere in the library one object seen twice, rather than two unrelated notions.
(c) for . Induction on , for all at once. At this reads . Assume it at and let ; then , and writing we have and , since ; so for a unique (Every nonzero natural number is a successor), and , that is (Addition is cancellative). Therefore , using commutativity and associativity of multiplication (Multiplication is associative, Multiplication is commutative) and the recursion clause for the factorial.
(d) Boundary values. for every , by the base clause; , since clause (c) at gives and ; and whenever . For the last, gives , the clause being definitional (Multiplication of natural numbers), and if then as well, so for every by induction.
Remarks
-
Why is not imported. The empty-product convention of an arbitrary monoid is fixed in The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity ↗, which comes later in the reading order, so citing it here would be a dependency pointing the wrong way. Taking as the base clause of the factorial's own recursion costs nothing and owes nothing, and clause (a) then records the agreement.
-
The library's other factorial. For every real , ↗, later in the reading order, works with a real-valued factorial defined as the product in . Clause (b) says that this is exactly , so the two agree and no second notion has been created. That pointer is orientation only.
-
Check every clause at and at . The falling factorial is defined by two regimes, one for and one beyond, and the recursion above covers both because the truncated difference is past the end. The two values that get used constantly are and , and both are clause (d).
The number of injections from a -element set into an -element set is
Statement
Let and be finite sets, and , and write
Then is finite and (The factorial and the falling factorial , defined by recursion in ).
The two boundary readings are part of the statement. At there is exactly one injection, the empty function, and . For there is none, and .
Facts & Assumptions
Given: Finite sets , with and . The truncated difference is that of Finite sums and finite products of natural numbers, and in .
Induction (The principle of mathematical induction).
Cardinality (The cardinality of a finite set): exactly when ; a bijection transports finiteness and cardinality; .
The falling factorial (The factorial and the falling factorial , defined by recursion in ): , , and for .
is finite for finite , (The set of functions between finite sets is finite, with ), and a subset of a finite set is finite, with (A subset of a finite set is finite, with , and equality holds if and only if , clauses 1 and 2).
The sum rule (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition): for disjoint finite , ; and a pairwise disjoint family of finite sets indexed by a finite set has finite union with cardinality the sum of the cardinalities. Together with (The sum over a finite index set, and its product form).
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection; the restriction of an injection is an injection; an injection is a bijection onto its image.
Order and cancellation in : implies ; if then ; trichotomy (Addition is cancellative, Order on the natural numbers, Trichotomy of the order on ).
Proof
Base case . Then , and the only function is the empty function, which is injective because injectivity is a condition on pairs of points of the domain and there are none. So has cardinality .
Inductive hypothesis: fix and assume that for all finite , with and the set is finite with cardinality .
Setting up the inductive step. Let , so ; fix and put , which is finite with by [L4], [L5] and cancellation, exactly as in the count of . Put and define by ; this lands in because is injective and for , so . The map is a two-sided inverse: the extension is injective precisely because . So is a bijection. Finally is finite by [L4].
The case . Then by [L3], so the hypothesis of step 1.2 gives , that is ; hence and by step 1.3, so its cardinality is . And as well, so by [L3]. Both sides are .
The case . For each the image is a subset of with , since is a bijection onto its image; and is the disjoint union of and , so by [L5] and therefore by [L7]. Now is the union of the pairwise disjoint sets indexed by , each of cardinality because is a bijection; so [L5] gives , using the hypothesis of step 1.2 and [L3]. With step 1.3 this is .
The two cases are exhaustive by trichotomy, so the statement holds at whenever it holds at ; with step 1.1 it holds for every , and the two boundary readings are step 1.1 and step 2.1.
Remarks
-
The two regimes of the falling factorial are the two cases of the proof. was defined by a single recursion whose factor is truncated at , and step 2.1 is exactly the regime where that truncation bites. Writing the cases out is what keeps the theorem true past instead of only up to it.
-
Pigeonhole is not needed. That no injection exists when is here a consequence of the induction rather than a citation of The pigeonhole principle on ; the two agree, and the lemma remains what makes well posed in the first place.
-
The count is of a set of functions. is a subset of , so its finiteness comes from The set of functions between finite sets is finite, with and A subset of a finite set is finite, with , and equality holds if and only if rather than being assumed.
A finite set with has exactly bijections onto itself, and bijections onto any set of the same cardinality
Statement
Let be a finite set with and write
Then is finite and (The factorial and the falling factorial , defined by recursion in ).
More generally, for finite sets and write for the set of bijections . If then is finite with elements, and if then .
Facts & Assumptions
Given: Finite sets , , , with .
, and is finite (The number of injections from a -element set into an -element set is ).
Every injection of a finite set into itself is a bijection (A subset of a finite set is finite, with , and equality holds if and only if , clause 4).
Cardinality (The cardinality of a finite set): a bijection transports finiteness and cardinality, and for finite , one has if and only if .
Maps (Injection, surjection, bijection, Equinumerous sets, and ): composites and inverses of bijections are bijections, and every bijection is an injection.
Proof
The two sets coincide: . Every bijection is an injection, and by [L2] every injection is a bijection, being finite.
Hence is finite with , by [L1] with and by [L3].
The two-set form. Suppose . Then by [L4], so fix a bijection . The map sends into and has the two-sided inverse , so it is a bijection; hence is finite with by step 2.1 and [L4]. If instead then by [L4], so no bijection exists at all.
The first assertion is step 2.1 and the second is step 3.1.
Remarks
-
No group vocabulary is used or needed. is written here as a set of bijections. Composition makes it a group, and that structure, together with the name symmetric group, is introduced in The symmetric group : the bijections of a set under composition ↗ later in the reading order; the pointer is orientation only and nothing above rests on it. The count proved here is what a later page needs in order to say that the symmetric group on letters has elements.
-
Why this is on the main page and not among the examples. Later pages consume this count, and an examples page is a leaf that nothing else may depend on.
-
The two-set form costs one line and is used immediately. The closed formula for counts the bijections between an initial segment and an arbitrary -element subset, which is exactly with .
The set of -element subsets and the binomial coefficient
Definition
For a finite set and put
the set of -element subsets of . Every is finite (A subset of a finite set is finite, with , and equality holds if and only if ), so the condition makes sense for every subset.
is finite. It is a subset of , which is finite by for finite , so A subset of a finite set is finite, with , and equality holds if and only if applies.
depends only on . Let be a bijection of finite sets. The direct image map carries into , because restricted to is a bijection of onto and so by the transport clause of The cardinality of a finite set; the map is its two-sided inverse, since and for a bijection . So and the two have the same cardinality.
Definition. For set
the binomial coefficient. By the previous paragraph and ,
is a count, so it is a natural number by construction. It is not defined as : that expression involves a division, hence lives in , and the assertion that its value is a natural number is a theorem, proved in for ; hence , the quotient is a natural number, and . Defining the coefficient as a count makes integrality free and leaves the closed formula something to prove.
Boundary values, read off the definition and not stipulated.
- for every , including : the subsets of of cardinality are exactly the subsets equal to (The cardinality of a finite set, clause (b)), so , a one-element set. No empty-product convention is involved.
- : if has then by clause 3 of A subset of a finite set is finite, with , and equality holds if and only if , so .
- for : a subset has by clause 2 of A subset of a finite set is finite, with , and equality holds if and only if , so is impossible and (Trichotomy of the order on ).
- : a subset of cardinality is for exactly one , since means ; so its unique element is a bijection .
- and for , both instances of the above.
Remarks
-
Notation. is standard for the set of -element subsets; it is unrelated to the notation for a set of functions, which appears on this page as well. Where confusion is possible the words are used in full.
-
Symmetry is not visible yet. is proved in for ; hence , the quotient is a natural number, and by exhibiting the complementation bijection ; from the definition alone there is no reason for the two counts to agree.
-
is a legitimate value of and of . Every boundary clause above is checked at , which is where a statement about binomial coefficients most often goes wrong in this library's index convention.
for ; hence , the quotient is a natural number, and
Statement
Let with . Then, in ,
and consequently:
- (The factorial and the falling factorial , defined by recursion in );
- integrality: in , , so the familiar quotient is the canonical natural of a natural number, namely of the count ;
- symmetry: .
Here is the canonical natural of The canonical natural of a field and the truncated difference, which for is the ordinary one.
Facts & Assumptions
Given: Naturals with ; the initial segment , which satisfies ; and for the set of bijections .
for every finite with ; is finite (The set of -element subsets and the binomial coefficient ).
when , and such a set is finite (A finite set with has exactly bijections onto itself, and bijections onto any set of the same cardinality).
The product rule (The product rule: , and ).
Factorials (The factorial and the falling factorial , defined by recursion in ): for every ; for .
Cardinality and subsets (The cardinality of a finite set, A subset of a finite set is finite, with , and equality holds if and only if ): transport along a bijection; ; a subset of a finite set is finite.
Arithmetic of : multiplication is associative and commutative, and with gives (Multiplication is associative, Multiplication is commutative, Cancellation for multiplication by a nonzero factor); determines (Order on the natural numbers, Addition is cancellative).
The embedding is multiplicative and injective, and for (clauses 0 and 7 of Laws of finite sums and products in , and , The canonical natural of a field); a nonzero element of a field has a unique inverse, so division by it is legitimate (Identities and inverses in a field are unique, Field).
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection; a bijection of carries a subset onto a subset and the complement onto the complement.
Proof
The set to be counted twice is , of cardinality by [L2]. For put . These sets are pairwise disjoint, since determines , and their union over is all of , because is a subset of of cardinality for every bijection of .
For any with one has : the sets and are disjoint with union , so by [L3], and [L7] identifies the second summand as .
for every . Indeed maps to : if then restricted to is a bijection onto , and, being a bijection of , it carries onto . The map is a two-sided inverse, the union of the two functions being a function on and a bijection onto . Since and by step 1.2, [L2] and [L4] give the cardinality .
Symmetry. The map sends into by step 1.2, and sends into , again by step 1.2 together with , which holds because . The two are mutually inverse, since for . Hence .
Counting by the blocks of step 1.1 and using [L3], , the summand being constant.
Clause 1. By [L5], , so by step 3.1 and associativity; since , cancellation gives .
Clause 2. Applying to step 3.1 and using multiplicativity, . Both and are nonzero by [L5] and [L8], so their product is invertible in and . The left-hand side is the canonical natural of the count , which is what the word integrality means here.
The displayed identity is step 3.1, clause 1 is step 4.1, clause 2 is step 4.2 and clause 3 is step 2.2.
Remarks
-
Why the symmetry is proved by a bijection. Complementation is shorter than manipulating the closed formula, it needs no hypothesis beyond , and it is the argument that survives to the multinomial coefficient, where no single closed formula is available until the analogous count has been made.
-
Where is used. In step 1.1, so that is a subset of of cardinality and is nonempty; and in step 1.2, so that is a genuine difference. For both sides of the displayed identity are still defined, but the left-hand side is while is not, so the hypothesis is not removable.
-
The quotient formula is a theorem about a natural number. A reader who starts from has to prove that the division comes out exact. Starting from the count, the exactness is what step 3.1 says, and the quotient is a consequence.
Pascal's rule , and the hockey-stick identity
Statement
For all :
- Pascal's rule. , with no restriction relating to ;
- The hockey-stick identity. , the sum being the -valued finite sum of Finite sums and finite products of natural numbers, and in over .
Facts & Assumptions
Given: Naturals , ; ; and for any finite with .
Induction (The principle of mathematical induction).
Binomial coefficients (The set of -element subsets and the binomial coefficient ): ; ; for ; ; .
The sum rule for two disjoint blocks, and the recursion clause (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition, Finite sums and finite products of natural numbers, and in ).
Cardinality (The cardinality of a finite set, A subset of a finite set is finite, with , and equality holds if and only if ): transport along a bijection; a subset of a finite set is finite; ; exactly when .
Cancellation and order in : implies ; trichotomy (Addition is cancellative, Trichotomy of the order on , Order on the natural numbers).
Maps (Injection, surjection, bijection): a map with a two-sided inverse is a bijection.
Naturals: and (The natural numbers (von Neumann)).
Proof
Fix and , let be a set with , and fix , possible because by [L4]. Put , which is finite with : indeed is a disjoint union, so by [L3], and [L5] applies. Split into and , which are disjoint with union .
The two blocks are counted by and . First, , since a subset of avoiding is exactly a subset of ; so by [L2]. Second, maps into : for the set is the disjoint union of and , so and by [L5]. Its two-sided inverse is , which lands in because gives by [L3]. Hence by [L2] and [L4].
Base case of clause 2, at . The left-hand side is by [L3], and the right-hand side is . If both are , by and from [L2]. If then and , so both are by [L2].
Inductive hypothesis for clause 2: fix and assume for every .
Clause 1. By step 1.1, step 1.2 and the sum rule, . No relation between and was used, and the identity is correct beyond the range as well: for all three coefficients are by [L2], and at it reads , which is .
Inductive step for clause 2. Using the recursion clause and then the hypothesis of step 1.4, , and clause 1 applied with in place of says exactly that this is .
By step 1.3, step 3.1 and induction, clause 2 holds for every and every .
Clause 1 is step 2.1 and clause 2 is step 4.1.
Remarks
-
The rule needs no range hypothesis because the boundary values of The set of -element subsets and the binomial coefficient make every out-of-range coefficient rather than undefined. Both edges were checked in step 2.1 rather than assumed.
-
The hockey stick sums a column, not a row. The index runs over with fixed, and the terms with vanish, so the identity is a statement about the entries of one column of Pascal's triangle. The base case is the only place where the two readings and have to be separated.
-
Everything here is an identity in . No embedding into is used or needed; the sum is the -valued one.
A finite set with elements has exactly two-element subsets, and
Statement
Let be a finite set with . Then the set of two-element subsets of is finite with
and, for every , the identity
holds in , the difference being the truncated one. Equivalently, in , for every .
Facts & Assumptions
Given: A finite set with , and . The difference is the truncated one, equal to at .
, is finite, and for (The set of -element subsets and the binomial coefficient , The cardinality of a finite set).
for ( for ; hence , the quotient is a natural number, and , clause 1).
Falling factorials and factorials (The factorial and the falling factorial , defined by recursion in ): , , and .
Arithmetic of : multiplication is commutative, , (Multiplication is commutative, Zero and one under multiplication, Multiplication of natural numbers); and (Order on the natural numbers).
The embedding is additive, multiplicative and injective, and for (clauses 0 and 7 of Laws of finite sums and products in , and , The canonical natural of a field); is an ordered field, so a nonzero element is invertible (Field, Ordered field).
Trichotomy in (Trichotomy of the order on ).
Proof
The first assertion is the definition: is finite and by [L1], because .
The falling factorial at : and , using [L3] and [L4].
Let . Then [L2] with gives , that is by step 1.2 and ; commutativity turns this into .
The two remaining values of . If then , so by [L1], and the right-hand side is by [L4]. If then , so , and the right-hand side is . In both cases , so with step 2.1 and trichotomy the identity holds for every .
The real form. For we have , so and ; applying to step 3.1 then gives , and is invertible, so . At both sides are , the left by step 3.1 and the right because .
The count is step 1.1, the identity in is step 3.1, and its real form is step 4.1.
Remarks
-
This is a count of unordered pairs, stated purely as a count. No geometric or relational vocabulary appears, because none is available at this point in the reading order. Later pages will want exactly this quantity, and they may cite it from here.
-
Both small cases are checked. At and there are no two-element subsets and both sides are ; the truncated difference is what makes the right-hand side come out rather than undefined at .
-
The real form is not the definition. is a real number that happens to be the canonical natural of a count; the identity in is the primary statement and the division is a convenience.
The binomial theorem in :
Statement
For all and every ,
where the powers are the integer powers of Integer powers , the sum is the real finite sum of Finite sums and finite products, by recursion over , the difference is a genuine one because throughout the range, and is the canonical natural of The canonical natural of a field.
The coefficient is and not . A binomial coefficient is a natural number, that is a von Neumann natural, that is a set; it is not an element of , and it enters the field through .
The identity is stated in and only in . The same proof uses nothing but commutativity, associativity, distributivity and natural-number multiples of a ring element, so a commutative-ring version is available wherever rings are; rings are not available at this point in the reading order, and the ring statement is a separate statement, to be made where they are. See the Remarks below.
Facts & Assumptions
Given: Reals ; a natural ; and the abbreviation for every , so that whenever .
Induction (The principle of mathematical induction).
Integer powers (Integer powers ): for every real , including , and . An immediate induction gives .
Real finite sums (Finite sums and finite products, by recursion): and ; additivity , scaling , and splitting for (Laws of finite sums and finite products, clauses 1, 2 and 3).
is additive and multiplicative with and (clause 0 of Laws of finite sums and products in , and , The canonical natural of a field).
Binomial coefficients (The set of -element subsets and the binomial coefficient ): and for ; Pascal's rule for all (Pascal's rule , and the hockey-stick identity , clause 1).
Field arithmetic of : associativity, commutativity, distributivity, (Field, Ordered field, Multiplication by zero: ).
Arithmetic of : for , , and hence and ; every nonzero natural is a successor (Order on the natural numbers, Addition is cancellative, Every nonzero natural number is a successor, Finite sums and finite products of natural numbers, and in for the truncated difference).
Proof
Both sides are functions of with fixed, and the induction is on . Note first that , since .
Base case . The left-hand side is by [L2]. The right-hand side is , using [L3], , and [L2]. This is correct at and at as well, because for every real .
Inductive hypothesis: fix and assume for all .
Expanding one factor. By [L2] and distributivity, , using the hypothesis of step 1.3; and by the scaling clause of [L3] together with and this equals with and .
Rewriting . For one has by [L7], so . Extending the range by one term costs nothing: by the recursion clause of [L3], , and by step 1.1, so the added term is by [L6] and .
Rewriting . Define a list of length by and for ; every index below is or a successor with , by [L7], so is well defined. Splitting at by [L3] and using and , .
Adding the two. By step 3.1, step 3.2 and the additivity clause of [L3], . Evaluate the general term. At it is , both coefficients being . At with it is , and by [L7], so the term equals by the additivity of and Pascal's rule. Hence , which is the claim at .
By step 1.2, step 4.1 and induction the identity holds for every and all reals , ; in particular at or , where the convention of Integer powers is what makes the extreme terms come out right and no exceptional case is needed.
Remarks
-
Two index traps, both checked. The sum runs over , that is , so the exponent is never a truncated difference in disguise; and the inductive step needs the coefficient , which is by the boundary values of The set of -element subsets and the binomial coefficient rather than undefined. Step 1.1 records that once and both rewritings use it.
-
Where matters. At the term with is , and the identity reads . A treatment leaving undefined would have to state the theorem with exceptions; Integer powers fixes for every real , so there are none.
-
The ring version is a different statement. It says the same thing about in a commutative ring, with replaced by the -fold multiple of the ring element. Making it requires rings, which come later in the reading order; the pointer to Ring: an abelian group under addition and a monoid under multiplication, with multiplication distributing over addition on both sides ↗ is orientation only and nothing above rests on it.
, and for
Statement
- The row sum. For every , in ,
- The alternating row sum. For every , in ,
Clause 2 is false at , where the sum has the single term . The hypothesis is therefore part of the statement, and this page's companion records the version that drops it as a false statement.
Facts & Assumptions
Given: A natural , a finite set with , and the canonical natural (The canonical natural of a field).
The binomial theorem: for reals , (The binomial theorem in : ).
( for finite ), and , with for (The set of -element subsets and the binomial coefficient ).
The sum rule for a partition indexed by a finite set (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition), the bridge for an index set that is a natural number (The sum over a finite index set, and its product form), and the -valued recursion clauses (Finite sums and finite products of natural numbers, and in ).
is additive, multiplicative and injective, and (clauses 0, 6 and 7 of Laws of finite sums and products in , and ).
Powers: (Exponentiation of natural numbers, , and its agreement with the integer power in , clause (d)); and , so and for (Integer powers , Multiplication by zero: , Field).
Real finite sums: the recursion clauses and the scaling clause (Finite sums and finite products, by recursion, Laws of finite sums and finite products).
Subsets of a finite set are finite and have cardinality at most (A subset of a finite set is finite, with , and equality holds if and only if , The cardinality of a finite set); induction (The principle of mathematical induction).
Proof
Clause 1, by counting. Every satisfies by [L7], so is the union of the sets for ; these are pairwise disjoint, since determines . By [L3] and [L2], , the last equality being the bridge for an index set that is a natural number.
Clause 2. Apply [L1] with and . The left-hand side is , which is because ([L5]). The right-hand side is , using from [L5]. Hence the alternating sum is .
Clause 1 again, from the binomial theorem, as a check that the two routes agree. Taking in [L1] gives , and the right-hand side is by the bridge clause of [L4], while the left-hand side is by [L5]. Since is injective, , which is step 1.1.
The hypothesis of clause 2 is not removable. At the sum is , by [L6], and . What fails in the argument of step 1.2 is exactly one thing: rather than .
Clause 1 is step 1.1, confirmed by step 2.1; clause 2 is step 1.2, and step 2.2 shows why it carries the hypothesis .
Remarks
-
Two proofs of the same identity, deliberately. The counting proof is a statement about natural numbers and uses no embedding at all, while the analytic proof goes through and comes back by the injectivity of . Recording both is what makes the agreement of the two readings visible rather than assumed.
-
Where the hypothesis of clause 2 is spent. In , and nowhere else. The convention is not a defect here: it is what makes the binomial theorem hold at , and the price is that the alternating sum identity acquires a hypothesis. Both facts are consequences of the same convention.
-
The alternating sum is stated in because is not a natural number. The unsigned row sum, by contrast, is an identity between counts and is stated in .
Vandermonde's identity
Statement
For all , in ,
the sum running over and being an ordinary difference throughout that range. No restriction relating to and is needed: the terms with or vanish because the corresponding binomial coefficients are (The set of -element subsets and the binomial coefficient ).
Facts & Assumptions
Given: Naturals , , ; the disjoint sets and ; and .
Binomial coefficients (The set of -element subsets and the binomial coefficient ): for finite , and is finite.
Cardinality (The cardinality of a finite set): transport along a bijection; iff for finite , .
The product rule (The product rule: , and ).
Subsets (A subset of a finite set is finite, with , and equality holds if and only if ): a subset of a finite set is finite with cardinality at most that of the set.
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection.
Arithmetic: if then , since is defined additively and addition is cancellative; and for every , so (Order on the natural numbers, Addition is cancellative, On the order is membership: ). The cardinalities and are not assumed here; they are computed in step 1.1.
Proof
A disjoint pair with the right cardinalities. Put and . These are disjoint, since an element of has second coordinate and one of has second coordinate ; and and are bijections from and onto them, so and by [L2]. Hence by [L3], and by [L1].
The partition. For put . Every lies in exactly one , because gives by [L5], that is ; and the are pairwise disjoint since determines .
Counting a block. Fix . The map sends into : for the sets and are disjoint with union , since , so by [L3] and by [L7]. The map is a two-sided inverse: and are disjoint, so by [L3], and , . Hence and by [L1], [L2] and [L4].
Adding the blocks. By step 1.2 the family is a pairwise disjoint family of finite sets with union , so [L3] gives , using step 2.1 and the bridge for an index set that is a natural number.
No range restriction is needed: if then and , and if then , so those blocks are empty and contribute nothing, exactly as the identity says.
Remarks
-
Why disjointness is arranged rather than assumed. The counting argument needs and disjoint, and two arbitrary sets of cardinalities and need not be. Replacing them by and costs one line and the transport clause of The cardinality of a finite set, and it is what makes the sum rule applicable.
-
Not by generating functions, and not by comparing coefficients. Both of the usual quick proofs need machinery that is far later in the reading order: formal power series in the first case, and a polynomial ring in the second. The double count needs neither.
-
Pascal's rule is the special case , read through and for : for the identity collapses to , while at the sum has the single term . The restriction is not cosmetic: is the truncated difference throughout this page (Finite sums and finite products of natural numbers, and in ), so writing the collapsed identity at would read as and assert .
The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes
Definition
Let . Write
the set of -tuples of naturals summing to , the sum being the -valued one of Finite sums and finite products of natural numbers, and in .
is finite. If then each by the monotonicity clause of Laws of finite sums and products in , and (a term of a sum of naturals is at most the sum), so is a subset of the set of functions , which is finite by The set of functions between finite sets is finite, with ; now apply A subset of a finite set is finite, with , and equality holds if and only if .
Block decompositions as colourings. For a finite set and put
A colouring is the same thing as an ordered decomposition of into the blocks ; presenting it as a function makes the blocks a partition of automatically, so that The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition and The set of functions between finite sets is finite, with apply verbatim. is a subset of the finite set , hence finite.
The hypothesis is part of the definition, and it is forced. The fibres , , are pairwise disjoint with union , so The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition gives for any . Hence unless , and the coefficient is defined only under that hypothesis.
depends only on . If is a bijection then maps to , because has the same cardinality as (The cardinality of a finite set); and is its two-sided inverse.
Definition. For set
abbreviated when the tuple is named. By the previous paragraph, for every finite with . Like the binomial coefficient, it is defined as a count, so it is a natural number by construction.
Boundary cases.
- . The empty sum is , so is nonempty only for , where its single element is the empty tuple. And contains exactly the empty function, so .
- A block of size is allowed: simply means .
- recovers the binomial coefficient: for , . The map sends into , and the colouring taking the value on and off it is its two-sided inverse, the second fibre having cardinality by The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition. So the two notations do not collide.
Remarks
-
Nonemptiness in the other direction. Conversely, if then . This is not proved here and is not needed for the definition: it follows from The multinomial coefficient equals , and in , whose clause 1 gives , so the count is nonzero and the set it counts is nonempty.
-
Why a colouring and not a tuple of sets. An -tuple of pairwise disjoint sets with union carries exactly the same information, but the disjointness and the covering would then be side conditions to be checked at every use. As fibres of a function they hold by construction.
-
will get a name. Its elements are the weak compositions of into parts, and they are counted in For the number of weak compositions of into parts is , and the number of compositions is for ; Compositions and weak compositions of a natural number into a fixed number of parts fixes the terminology. The set is introduced here because the multinomial coefficient cannot be stated without it.
The multinomial coefficient equals , and in
Statement
Let and , that is with (The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes). Then:
- The closed formula, in . so in the quotient is , the canonical natural of a count.
- The expansion, in . For , the outer sum being the sum over the finite index set (The sum over a finite index set, and its product form) and the inner product the real finite product of Finite sums and finite products, by recursion.
As with the binomial theorem, the identity is stated in ; the commutative-ring version is a separate statement, to be made where rings exist. See the Remarks of The binomial theorem in : .
Facts & Assumptions
Given: Naturals , , a tuple , a list , and a finite set with . For write for the shifted tuple .
Induction (The principle of mathematical induction).
Multinomial coefficients (The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes): ; and are finite; for the empty tuple; and is for and for .
The sum rule, in particular the splitting of a sum over a finite index set along a partition of that index set (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition, clause 3), together with the reindexing and constant clauses of The sum over a finite index set, and its product form.
The binomial closed formula for ( for ; hence , the quotient is a natural number, and ) and the binomial theorem (The binomial theorem in : ).
Finite sums and products: the recursion clauses in and in , the splitting clause at index , and the scaling and additivity clauses in (Finite sums and finite products of natural numbers, and in , Finite sums and finite products, by recursion, Laws of finite sums and finite products, Laws of finite sums and products in , and ).
Factorials: , and a product of nonzero naturals is nonzero; cancellation by a nonzero natural (The factorial and the falling factorial , defined by recursion in , Cancellation for multiplication by a nonzero factor, Multiplication is associative, Multiplication is commutative).
is additive, multiplicative, injective, and commutes with finite sums and products (clauses 0, 6, 7 of Laws of finite sums and products in , and , The canonical natural of a field); is a field (Field); powers obey , (Integer powers ).
Binomial coefficients and cardinality: (The set of -element subsets and the binomial coefficient ); transport (The cardinality of a finite set); a subset of a finite set is finite (A subset of a finite set is finite, with , and equality holds if and only if , The set of functions between finite sets is finite, with ); the product rule (The product rule: , and ); two-sided inverses give bijections (Injection, surjection, bijection); every nonzero natural is a successor (Every nonzero natural number is a successor); for (Order on the natural numbers, Addition is cancellative).
Proof
Notation for both inductions. For and , splitting the sum at index ([L5]) gives , so and ; the same splitting for products gives .
Base case of clause 1, at . Then is nonempty only for , and there , the empty product of factorials is and , so the identity reads .
Inductive hypothesis for clause 1: fix and assume for every and every .
Base case of clause 2, at . The left-hand side is . If this is , and the right-hand side is the single term . If then and , so the right-hand side is an empty sum, equal to .
Inductive step for clause 1. Let , , and let be finite with . The map , where is the unique with for , sends to the set of pairs with and ; it is well defined because off the first fibre, every nonzero natural is a unique successor, and . Its two-sided inverse sends to the colouring equal to on and to off . The pairs form the union of the pairwise disjoint sets indexed by , and by [L3], so each has elements. Hence by [L3] and [L8]. Multiplying by and using the hypothesis of step 1.3 at gives by [L4], since .
Clause 1 holds for every , by step 1.2, step 2.1 and induction. The real form follows: applying gives , and each is nonzero by [L6] and [L7], so the product is invertible in .
Inductive step for clause 2. Assume clause 2 at , for every and every list of length . Let , put and , so by [L5]. The map , where restricts to on and , is a bijection from the disjoint union of the sets , , onto : it lands there because , and its inverse sends to the pair , the two constructions being mutually inverse by [L8]. Moreover : by step 3.1 and [L4], both and become after multiplication by the nonzero natural , so they are equal by cancellation. And by the product recursion clause. Now [L4] gives ; substituting the inductive hypothesis for , distributing the scalar over the inner sum by the scaling clause of [L5], and then applying [L3] to the partition of into the images of the sets under yields .
By step 1.4, step 4.1 and induction, clause 2 holds for every , every and every list .
Clause 1 is step 3.1 and clause 2 is step 5.1.
Remarks
-
The index set of the outer sum has to be finite, and it is. It is , which The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes shows finite by injecting it into the set of functions . Without that the outer sum would not be defined, which is the reason The sum over a finite index set, and its product form exists.
-
The small cases are computed, not waved at. At the left-hand side is and the right-hand side is an empty sum or a single term, and the two match only because . At the only tuple is , the coefficient is by clause 1, and the identity reads .
-
Clause 1 is again an identity between natural numbers, so integrality of is free; the quotient form is a consequence obtained through , exactly as for the binomial coefficient.
Compositions and weak compositions of a natural number into a fixed number of parts
Definition
Let .
- A weak composition of into parts is a function with , the sum being the -valued one of Finite sums and finite products of natural numbers, and in . The set of them is the set introduced in The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes.
- A composition of into parts is a weak composition all of whose parts are nonzero, that is for every (Discreteness: is the immediate successor). Write
The parts are ordered: is a function on , so and are different compositions of into parts.
Both sets are finite. Every has for each , because a term of a sum of naturals is at most the sum (clause 4 of Laws of finite sums and products in , and ); so is a subset of the set of functions , which is finite by The set of functions between finite sets is finite, with , and A subset of a finite set is finite, with , and equality holds if and only if applies. is a subset of , hence finite too.
The case , which is exactly where the next item's hypothesis lives. There is precisely one function , the empty function, and its sum is the empty sum, . Hence
and the same two values for , since the condition "every part is nonzero" is vacuous for the empty tuple. Saying this here is what lets For the number of weak compositions of into parts is , and the number of compositions is for carry the hypothesis honestly: at the count is not given by the formula, and the true value is recorded above.
Small values of . , the unique weak composition being ; and for while .
Remarks
-
The same object under two names. is the index set of the outer sum of The multinomial coefficient equals , and in . That theorem and this definition therefore speak about one set, and the count supplied by For the number of weak compositions of into parts is , and the number of compositions is for is the number of terms in the multinomial expansion.
-
Weak versus strict. Much of the literature reserves composition for tuples of positive parts and says weak composition when zeros are allowed; that is the convention adopted here. The count of the weak ones is the primary result, and the strict count is obtained from it by subtracting from every part.
-
Nothing here is about unordered partitions. The number of ways of writing as an unordered sum is a different and much harder count, and it is not developed at this point in the reading order.
For the number of weak compositions of into parts is , and the number of compositions is for
Statement
Let and write , so . Then for every
and the map is a bijection of onto the set of -element subsets of .
Moreover, for and ,
The hypothesis is not decoration. At the expression would require the value at , and Compositions and weak compositions of a natural number into a fixed number of parts records the true counts there: and for . The hypothesis in the second display is equally load bearing: at , the formula would give while .
Facts & Assumptions
Given: Naturals and with ; the sets and of Compositions and weak compositions of a natural number into a fixed number of parts; and the truncated difference of Finite sums and finite products of natural numbers, and in .
Induction (The principle of mathematical induction).
Finite sums in (Finite sums and finite products of natural numbers, and in , Laws of finite sums and products in , and ): the recursion clauses; additivity; the constant clause ; splitting at ; and the fact that a partial sum with satisfies , which is splitting together with .
Binomial coefficients (The set of -element subsets and the binomial coefficient ): ; ; for .
The hockey-stick identity (Pascal's rule , and the hockey-stick identity , clause 2).
The sum rule and sums over a finite index set (The sum rule: a finite disjoint union is finite with and , and a sum over a finite index set splits along a partition, The sum over a finite index set, and its product form).
Cardinality and subsets (The cardinality of a finite set, A subset of a finite set is finite, with , and equality holds if and only if ): transport; a subset of a finite set is finite; a subset of the same cardinality as the whole is the whole.
Maps (Injection, surjection, bijection, Equinumerous sets, and ): a map with a two-sided inverse is a bijection; an injection is a bijection onto its image.
Arithmetic and order in : ; ; addition is commutative and cancellative; and give ; trichotomy; is the same as (Order on the natural numbers, Addition is cancellative, Addition is commutative, Order is compatible with addition, Trichotomy of the order on , Discreteness: is the immediate successor, The natural numbers (von Neumann)).
Every nonempty subset of has a least element (The well-ordering principle).
Proof
The last-part decomposition, valid for every and every . The map sends into the union of the pairwise disjoint sets for : writing , the recursion clause gives , so and . Its two-sided inverse sends to the tuple extending by the value at , whose sum is . Hence by [L5].
Base case, , that is . A weak composition of into one part is a function with , and there is exactly one such function; so by [L3].
Inductive hypothesis: fix and assume for every .
A reindexing identity: . Split the right-hand side at , legitimate since : it becomes . The first sum vanishes, every term being for by [L3] and a sum of zeros being by the constant clause; and , because .
Inductive step. Applying step 1.1 with in place of , then the hypothesis of step 1.3, then step 1.4 and finally the hockey-stick identity [L4] with and : , the last equality because . That is the claim at .
By step 1.2, step 2.1 and induction, for every and every , which is the first display since and .
The explicit bijection. For and put and . The list is strictly increasing, since ; and , since by [L2] and . So is a subset of with exactly elements, and maps into . It is injective: a strictly increasing list enumerating a finite subset of is determined by that subset, since its first entry is the least element and each later entry is the least element strictly above the previous one ([L9] and induction), so forces for all ; then and recover on , and recovers the last part. Since both sets have elements by step 3.1 and [L3], the image of is a subset of of the same cardinality, hence all of it by [L6]. So is a bijection.
The count of compositions, for and . If , the map with sends into : each , so , and by additivity and the constant clause, whence . Its two-sided inverse adds to every part. So by step 3.1, and because and with . If instead , then every would satisfy by monotonicity, which is false; so , and as well, since gives . In both cases .
The count of weak compositions is step 3.1, the bijection realising it is step 4.1, and the count of compositions is step 4.2.
Remarks
- The picture behind . Lay out stars and bars in a row of places; the bars split the stars into runs, whose lengths are the parts. The set is the set of positions of the bars, and step 4.1 is that picture made precise. Surjectivity is obtained from the count rather than by constructing the inverse directly, which spares an appeal to the increasing enumeration of an arbitrary subset.
tikz \begin{tikzpicture}[x=0.85cm,y=1cm] \node at (2.55,1.25) {$k=(2,0,3)$}; \node at (0,0) {$\star$}; \node at (0.85,0) {$\star$}; \draw[line width=1pt] (1.7,-0.3) -- (1.7,0.3); \draw[line width=1pt] (2.55,-0.3) -- (2.55,0.3); \node at (3.4,0) {$\star$}; \node at (4.25,0) {$\star$}; \node at (5.1,0) {$\star$}; \node at (0,-0.65) {$0$}; \node at (0.85,-0.65) {$1$}; \node at (1.7,-0.65) {$2$}; \node at (2.55,-0.65) {$3$}; \node at (3.4,-0.65) {$4$}; \node at (4.25,-0.65) {$5$}; \node at (5.1,-0.65) {$6$}; \node at (2.55,-1.35) {$S(k)=\{2,3\}\subseteq 7$}; \end{tikzpicture}
-
Why the count is proved by induction and not by the bijection alone. Building the inverse of by hand needs the increasing enumeration of an arbitrary -element subset of , which is more machinery than the hockey-stick induction. The induction gives the number, and the number then gives the surjectivity of .
-
Both hypotheses are visible. The failure at is recorded on the companion page as a false statement; the failure at of the composition formula is recorded in the Statement above.
Conventions fixed on this page, and what counting is deliberately not done here
This item is the page's ledger: every convention the page fixes, with the item that fixes it, and a statement of what is deliberately left to later pages.
Conventions fixed here
contains . Every index range on this page starts at , so runs over and over . A cardinality may be , a part of a composition may be , and a claim true only from the second index onwards is false as stated. Three items exist only because of this: the alternating row sum of , and for carries the hypothesis , For the number of weak compositions of into parts is , and the number of compositions is for carries , and the composition count carries .
is defined for finite only, and is a natural number. The cardinality of a finite set fixes this, and what makes it well posed is claim 3 of the pigeonhole principle. It is not a cardinal number: Cardinal (initial ordinal) and cardinality ↗ is a later and different object and nothing here uses it or any cardinal arithmetic.
The empty sum is , the empty product is , and are one convention. Each is the base clause of a recursion carried out on this page, in Finite sums and finite products of natural numbers, and in , The factorial and the falling factorial , defined by recursion in and Exponentiation of natural numbers, , and its agreement with the integer power in respectively, and each agrees with the already-published Finite sums and finite products, by recursion and Integer powers . Nothing was imported and nothing was stipulated twice.
Counts live in ; identities involving subtraction or division live in . A natural number is a von Neumann natural, hence a set, and is not an element of ; it enters through the canonical natural . That is why the binomial theorem's coefficient is , and why Laws of finite sums and products in , and proves that commutes with finite sums and products and is injective. Injectivity is the licence to prove an identity between counts by proving it in .
is a count, and integrality is a theorem. The set of -element subsets and the binomial coefficient defines it as , so it is a natural number by construction; that it also equals is for ; hence , the quotient is a natural number, and . The same holds for the multinomial coefficient (The multinomial coefficient as the number of ordered partitions of an -set into blocks of prescribed sizes).
Three notions of finite sum will coexist in the library, and each is introduced with a bridge to the previous one: over an initial segment (Finite sums and finite products, by recursion), over a finite index set (The sum over a finite index set, and its product form, well posed because of A finite sum is unchanged by a permutation of its index range: for every bijection ), and in an arbitrary monoid (The product of a finite list in a monoid, by recursion, with the empty product () equal to the identity ↗, later in the reading order). The bridges are what stop them drifting into three unrelated notions.
Truncated difference. On this page always means the unique with when , and otherwise. No negative number is ever formed, and each statement true only under says so.
What is deliberately not here
These are statements about the reading order, not about the library as a whole.
- Inclusion and exclusion, the systematic repair of a count whose blocks overlap. The sum rule needs disjointness, and the companion page shows what goes wrong without it; the correction term belongs to the next page of this track.
- The number of surjections, and the counting of set partitions and of unordered partitions of an integer. All are natural sequels to the material here and none is available yet.
- The binomial theorem for a commutative ring. The proof given here uses only commutativity, associativity, distributivity and natural-number multiples, so the ring statement is true; it cannot be stated until rings exist (Ring: an abelian group under addition and a monoid under multiplication, with multiplication distributing over addition on both sides ↗).
- Group vocabulary for . The count is proved here, about a set of bijections. The group structure and the name symmetric group are The symmetric group : the bijections of a set under composition ↗, later in the reading order, and a page there may cite the count from here.
- Asymptotics of , Stirling's formula among them. These need the logarithm and a good deal of integration, all far later in the reading order.
Every forward pointer above is orientation only: no item on this page depends on anything named in this section.
5 · Examples, counterexamples and false statements
None yet.
Sources
- Cardinality (Wikipedia)
- Finite set (Wikipedia)
- P. Halmos, Naive Set Theory, §13
- Dedekind-infinite set (Wikipedia)
- J. Sylvestre, Elementary Foundations 12.02, Properties of finite sets and their cardinality (LibreTexts)
- Summation (Wikipedia)
- Empty product (Wikipedia)
- Recursive definition (Wikipedia)
- Natural number (Wikipedia)
- T. Tao, Analysis I, 3rd ed., §7.1
- Permutation (Wikipedia)
- R. Stanley, Enumerative Combinatorics, Vol. 1, Ch. 1
- Rule of sum (Wikipedia)
- Rule of product (Wikipedia)
- Cartesian product (Wikipedia)
- Exponentiation (Wikipedia)
- Function (mathematics) (Wikipedia)
- Twelvefold way (Wikipedia)
- Power set (Wikipedia)
- Cantor's theorem (Wikipedia)
- Factorial (Wikipedia)
- Falling and rising factorials (Wikipedia)
- Binomial coefficient (Wikipedia)
- Combination (Wikipedia)
- Double counting (proof technique) (Wikipedia)
- Pascal's rule (Wikipedia)
- Hockey-stick identity (Wikipedia)
- Pascal's triangle (Wikipedia)
- Binomial theorem (Wikipedia)
- Vandermonde's identity (Wikipedia)
- Bijective proof (Wikipedia)
- Multinomial theorem (Wikipedia)
- Multinomial distribution (Wikipedia)
- Composition (combinatorics) (Wikipedia)
- Stars and bars (combinatorics) (Wikipedia)