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.
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.
-
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.
Depends on
- Compositions and weak compositions of a natural number into a fixed number of parts
- The multinomial coefficient $\binom{n}{k_0,\dots,k_{m-1}}$ as the number of ordered partitions of an $n$-set into blocks of prescribed sizes
- The set $[A]^{k}$ of $k$-element subsets and the binomial coefficient $\binom{n}{k} := \lvert [n]^{k}\rvert$
- Pascal's rule $\binom{n+1}{k+1} = \binom{n}{k} + \binom{n}{k+1}$, and the hockey-stick identity $\sum_{i \le n}\binom{i}{k} = \binom{n+1}{k+1}$
- The sum rule: a finite disjoint union is finite with $\lvert A \cup B\rvert = \lvert A\rvert + \lvert B\rvert$ and $\lvert\bigcup_{i \in I} A_i\rvert = \sum_{i \in I}\lvert A_i\rvert$, and a sum over a finite index set splits along a partition
- The sum $\sum_{i \in S} a_i$ over a finite index set, and its product form
- Finite sums and finite products of natural numbers, $\sum_{k<n} a_k$ and $\prod_{k<n} a_k$ in $\mathbb{N}$
- Laws of finite sums and products in $\mathbb{N}$, and $\iota\big(\sum_{k<n} a_k\big) = \sum_{k<n} \iota(a_k)$
- The cardinality $\lvert A\rvert$ of a finite set
- Injection, surjection, bijection
- Equinumerous sets, $A \approx B$ and $A \preceq B$
- A subset of a finite set is finite, with $\lvert B\rvert \le \lvert A\rvert$, and equality holds if and only if $B = A$
- The well-ordering principle
- The principle of mathematical induction
- Order on the natural numbers
- Addition is cancellative
- Order is compatible with addition
- Trichotomy of the order on $\mathbb{N}$
- Discreteness: $\sigma(n)$ is the immediate successor
- Addition is commutative
- The natural numbers $\mathbb{N}$ (von Neumann)
Used by
Dependency tree · next 3 levels
Direct dependencies and their dependencies through the next three levels: 84 results over 32 levels. An arrow runs from a result to what uses it, and this result sits at the bottom with a heavier outline. Click the chart to enlarge it.
Sources
- Stars and bars (combinatorics) (Wikipedia) (standard reference, not scraped)
- Composition (combinatorics) (Wikipedia) (standard reference, not scraped)
- Hockey-stick identity (Wikipedia) (standard reference, not scraped)