The binomial sums of chapter 8 are answered in closed form - #1461
Merged
Merged
Conversation
sum(k binomial(n, k), k, 0, n) was left as written. BinomialIdentities reads the sums of chapter 8 of Sullivan and Mackey's An Introduction to Proofs that are not the binomial theorem itself: - a polynomial in the index beside the coefficient, in the falling factorial basis by the Stirling numbers of the second kind, since k^(j falling) binomial(n, k) is n^(j falling) binomial(n - j, k - j) by the chairperson identity applied j times and what is left is the binomial theorem: sum(k binomial(n, k)) is n 2^(n - 1) (Prop 8.4.4), and the same beside x^k y^(n - k); - Vandermonde's convolution, sum(binomial(a, i) binomial(b, k - i), i, 0, k) = binomial(a + b, k) (Prob 8.9.16), the range written to k, a or b, and its square case sum(binomial(n, k)^2) = binomial(2n, n) (Prob 8.9.34); - the summation identity sum(binomial(i, k), i, 0, n) = binomial(n + 1, k + 1) (Thm 8.4.6); - the sums over the even or the odd indices, each 2^(n - 1) for n >= 1 (Ex 8.3.11), with the even sum 1 and the odd sum empty at n = 0. The coefficient as its three factorials is read too, the top one folded into a number where the bound is concrete. The identities under forall are decided from the closed forms. Suite 12567 passed; the kernel gate passed on all 19 gated benchmarks. Part of #1409. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Chapter 8 of Sullivan and Mackey's An Introduction to Proofs (#1409): the binomial sums beyond the binomial theorem, which
BinomialSumalready reads (sum(binomial(n, k) x^k y^(n − k), k, 0, n)is(x + y)^n;3^nand4^nfor the2^(n−k)and3^kweights;0for the alternating sum). Re-measured against master, the rest of the chapter's identity rows were left as written;BinomialIdentitiesanswers them:k^(j falling) binomial(n, k)isn^(j falling) binomial(n − j, k − j)— the chairperson identityjtimes — and what is left is the binomial theorem.sum(k binomial(n, k), k, 0, n)isn 2^(n − 1),sum(k^2 binomial(n, k))isn 2^(n−1) + n(n − 1) 2^(n−2), and the same besidex^k y^(n − k). The coefficient as its three factorials is read too, with the top one folded into a number where the bound is concrete, asBinomialSumdoes.sum(binomial(a, i) binomial(b, k − i), i, 0, k)isbinomial(a + b, k), the range written tok,aorb(the terms outside are zero), and the square casesum(binomial(n, k)^2, k, 0, n)isbinomial(2 n, n)(Prob 8.9.34).sum(binomial(i, k), i, 0, n)isbinomial(n + 1, k + 1).sum(binomial(n, 2l), l, 0, floor(n/2))andsum(binomial(n, 2l + 1), l, 0, floor((n − 1)/2))are each2^(n − 1)forn ≥ 1, with the even sum1and the odd sum empty atn = 0— the book leaves the even sum's closed form open.Under
forallthe identities are decided from the closed forms:forall n in ZZ+ : sum(k binomial(n, k), k, 0, n) = n 2^(n − 1),forall n in ZZ* : sum(binomial(n, k)^2, k, 0, n) = binomial(2 n, n)and the summation identity areTrue.BinomialSumTestlosessum(N!/(k!(N−k)!) k, k, 0, N)from its "not of the shape" rows, since it is closed now;Syntax.mdandBREAKING-CHANGES.mdupdated (the 2.5.0 column measured on a build of v2.5.0: the factorial spelling as written,binomialdid not parse).Tests:
BinomialIdentitiesTest— ten closed forms checked against the expanded sum at six bounds including one past the hundred-term expansion, Vandermonde with both parameters free at four triples and two spellings of the range, the parity sums at zero, and the three identities underforall. Full suite 12567 passed, 0 failed; the kernel gate PASSED on all 19 gated benchmarks.Part of #1409.
🤖 Generated with Claude Code
https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura