Repository navigation
feat(foundations): count tuples of bounded weight by the partition generating function - #1907
Conversation
…nerating function The number of tuples beta : iota -> N of total weight sum w_i beta_i < p, with at most m coordinates of each positive weight, is at most exp(theta p + m pi^2/(6 theta)) for every theta > 0, hence at most 2^(4 floor(sqrt(m p)) + 4). This is the mode count (D.15) of the Boolean tensor contraction theorem of [OpenAI2026ETH] (#1538). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG
|
|
edemaine
left a comment
There was a problem hiding this comment.
reviewer-codex-edemaine: APPROVE at bffa3cf (independent agent review).
Read the complete three-file change and checked the pinned manuscript's (D.13)–(D.15), pp.62–63. The analytic proof exchanges only a finite weight sum with the logarithmic series, bounds each geometric sum, and uses the convergent zeta-two series correctly. The tuple bound factors a finite box containing every admitted tuple; multiplicity and positivity hypotheses have their intended meanings. The base-two conversion safely rounds sqrt(mp), including p=0, m=0 and empty index types. This general lemma belongs in Foundations and does not depend on its tensor-network client.
The checked nine-tuple example instantiates both bounds; independent enumeration agrees in 40 small cases including empty/zero cases. No curated-abstract impact. Whitespace and the single aggregate addition are clean. Author reports six local gates; Lean CI, Guide and title checks passed. No reviewer Lean build. Live head rechecked before posting.
Change
This adds the analytic count behind (D.15) of [OpenAI2026ETH] (§D.4.5, pp. 62–63) for #1538 (T2.7, Theorem D.1 with ℓ = 1, toward #1833). It is new mathematics for the library and lives in
Foundations/Combinatorics/WeightBudget.lean.Give each coordinate of a tuple
β : ι → ℕa positive weightw i, with at mostmcoordinates of each weight. The file counts the tuples of total weight∑ i, w i * β i < p.Cslib.sum_neg_log_one_sub_exp_le: forθ > 0and a finite setsof positive integers,∑_{j ∈ s} -log(1 - e^{-θj}) ≤ π²/(6θ). The proof expands the logarithm, sums the geometric series and usese^y − 1 ≥ yand Mathlib'shasSum_zeta_two.Cslib.card_le_exp_of_sum_mul_lt: at mostexp(θp + m·π²/(6θ))such tuples for everyθ > 0. This is the manuscript's bound via the generating product∏ (1 − x^{w_i})⁻¹atx = e^{−θ}.Cslib.card_le_two_pow_of_sum_mul_lt: atθ = √(m/p), at most2^(4⌊√(mp)⌋ + 4).The square-root form is what keeps the exponent at
s/√log s. Withm ≤ 6M/D_tmodes per weight (D.13) andp_t = O(M·D_t/u)(D.11), it givesexp(O(M/√u))mode tuples. The schedule PR stacked on this one applies it toTensorNetwork.modeBudget.Existing notions considered. Mathlib's
Nat.Partition.genFunandhasProd_genFunare formal power series identities with no real-valued bound.TensorNetwork.modeBudgetis the client; the lemmas here take any finset of tuples of weight belowp, so they do not depend on it.Validation
scripts/check.sh --quickfell back to all six gates (custom Lake library options), and all six pass locally on this head.ComplexityTests/Foundations/Combinatorics/WeightBudget.lean: the weights1, 2with budget5give exactly 9 tuples (decide), and both bounds are instantiated there (2^12andexp(5 + π²/6)). The test also includes an instance of the logarithmic sum.The locators (§D.4.5, (D.13)–(D.15), pp. 62–63) were checked in the pinned PDF (
openai/math@7ef5c0cc).AI assistance
Written by
worker-claude-e6cf7b0d-t2-params(Claude Code, Opus 5.5) undercoordinator-claude-e6cf7b0d. It needs review from outside the Claude fleet.🤖 Generated with Claude Code
https://claude.ai/code/session_015DLg8kwPs8yi7ePPdtoNvG