Paper coverage: Kauers & Schneider, "Symbolic summation for q-series" (Section 2 & 3)

Lean theorem rows below are verified in Lean 4 with no sorry (Mathlib axioms aside). External audit rows are reproducible finite CAS checks tracked by the harness. Historical negative controls concern alternative conventions; they are not failed Lean proofs.

Trusted? column key:

Trust level Meaning
โœ… Trusted Lean theorem: kernel-checked proof, no sorry
โš™๏ธ Audit CAS audit: reproducible evidence, not trusted proof
๐Ÿ“‹ Negative audit Documented computation, not a theorem claim

Reproduce with:

lake build                                   # Lean: all theorems below
python3 scripts/check_all.py                 # CAS cross-checks (sympy) + OEIS + data gates
python3 scripts/check_blueprint.py          # blueprint โ†” Lean declaration links

Section 2 โ€” classical Stirling identity

Result Lean declaration Trusted?
Pointwise certificate $op(f)(k) = g(k+1) - g(k)$ section2_pointwise_certificate โœ… Trusted
Boundary identity (top + bottom) section2Boundary_total โœ… Trusted
Range reconciliation section2_range_reconcile โœ… Trusted
Derived recurrence $F(m,n) = (n+1)[(n+1)F(m,n+1) ... ]$ (six-term) section2_recurrence, section2Sum_satisfies_recurrence, section2ClosedForm_satisfies_recurrence โœ… Trusted
Uniqueness of recurrence solutions section2_uniqueness โœ… Trusted
Closed form $F(m,n) = \tfrac12(n+1)(n+2)\cdot S_1(m,n+2)$ for $m \ge 2$ section2_identity โœ… Trusted

Section 3, Id. 1 โ€” q-Stirling second kind (printed statement, valid as printed)

Result Lean declaration Trusted?
Pointwise certificate section3Id1_pointwise_certificate โœ… Trusted
Range reconciliation section3Id1_range_reconcile โœ… Trusted
Operator annihilates the sum section3Id1OperatorApplyToSeries_eq_zero โœ… Trusted
Identity $F(m,n) = S_2^q(n+1,m+1)$ for all q : โ„š (incl. $q = 0, 1$) section3Id1_identity โœ… Trusted

Section 3, Id. 2 โ€” printed form proved under the Katriel reading, boundary layer included

The paper's printed Id. 2 reads $F(m,n) = \sum_{k} (-1)^{n-k}\cdot \binom{k}{m}\cdot S_1(n,k)\cdot q^{-k} = (-1)^{n-m}\cdot S_1(n+1,m+1)$ with a weighted first kind. Once S1 is read as the Katriel-weighted first kind $S_1^K(n,k) = q^{-\binom{n}{2}}\cdot S_1^q(n,k)$ (recursion step $S_1^K(n+1,k+1) = q^{-n}\cdot (S_1^K(n,k) - [n]_q\cdot S_1^K(n,k+1))$), the printed statement holds for q โ‰  0:

Boundary layer now proved too: the weighted transport of the boundary argument is fully formalized (rows below) โ€” bottom endpoint vanishing (id2_weighted_cert_at_m), upper sentinel shift (id2_sentinel_shift), top endpoint pointwise case (id2_weighted_pointwise_at_top), shifted-range reconciliation with the printed sentinels (id2_weighted_range_reconcile), weighted telescoping (id2_weighted_telescoping), and the printed weighted boundary identity (id2_boundary_weighted).

Historically the first audit (cas/check_id2_convention.py) searched (weighted/unweighted S1) ร— (summand/RHS q-powers) for a convention satisfying a clean 2-term identity-and-recurrence pair and found exactly one hit โ€” $q^{n-k}$ summand, unweighted $S_1^q$, $q^{0}$ RHS โ€” which is the convention the Lean proof adopts (all q : โ„š, incl. $q = 0$ where the rescaling view degenerates). That search's "printed fails" verdict applies to unweighted readings only; the Katriel reading above resolves the printed statement positively.

Result Lean declaration Trusted?
Pointwise certificate (corrected g) section3Id2_pointwise_certificate โœ… Trusted
Telescoping id2_telescoping โœ… Trusted
Range reconciliation id2_range_reconcile โœ… Trusted
Boundary identity id2_boundary โœ… Trusted
Operator annihilates the sum (recurrence $F(m+1,n+1) = F(m,n) + [n+1]_q F(m+1,n)$) section3Id2OperatorApplyToSeries_eq_zero โœ… Trusted
Identity $F(m,n) = (-1)^{n-m}\cdot S_1^q(n+1,m+1)$ for all q : โ„š section3Id2_identity โœ… Trusted
Katriel transport: printed weighted summand/sum = t(n)-times the verified unweighted one, $t(n) = q^{-\binom{n+1}{2}}$ id2_summand_conj, id2_sum_conj โœ… Trusted
Katriel transport: printed 3-term operator = $-(q-1)\cdot t(n)$-times the verified operator (no range restriction) id2_op_series_conj โœ… Trusted
Katriel transport: printed certificate = $-(q-1)\cdot t(n)$-times the corrected certificate, $k \le n$ id2_cert_conj โœ… Trusted
Katriel transport: printed pointwise identity $Lฬ‚fฬ‚ = ฤ(k+1) - ฤ(k)$, $k+1 \le n$ id2_pointwise_certificate_weighted โœ… Trusted
Printed recurrence annihilates the printed weighted sum for all m n, q โ‰  0 section3Id2_weighted_identity โœ… Trusted
Printed closed form $Fฬ‚(m,n) = (-1)^{n-m}\cdot Sฬ‚1(n+1,m+1)$ for all m n, q โ‰  0 section3Id2_weighted_rhs โœ… Trusted
Weighted boundary: bottom endpoint vanishing at $k = m$ id2_weighted_cert_at_m โœ… Trusted
Weighted boundary: upper sentinel shift $ฤ(m,n,n+1) = (q-1)\cdot q^{n+1}\cdot ลต(m+1,n+1,n+1)$ id2_sentinel_shift โœ… Trusted
Weighted boundary: top endpoint pointwise case ($k = n$ sentinel) id2_weighted_pointwise_at_top โœ… Trusted
Weighted boundary: shifted-range reconciliation with printed sentinels id2_weighted_range_reconcile โœ… Trusted
Weighted boundary: weighted telescoping over Icc(m+1) n id2_weighted_telescoping โœ… Trusted
Weighted boundary identity $Lฬ‚(n) + (-(q-1)q^{n+1}ลต(m+1,n+1,n+1) + (q-1)ลต(m,n,m)) + (ฤ(n) - ฤ(m+1)) = 0$ id2_boundary_weighted โœ… Trusted
Katriel-reading positive audit of the printed identity, recurrence, certificate and boundaries (Python, exact rationals) cas/check_id2_katriel.py โš™๏ธ Audit (not trusted proof)
Print-convention negative audit, unweighted readings (Python, exact rationals) cas/check_id2_convention.py โš™๏ธ Audit (not trusted proof)

Section 3, Id. 3 โ€” printed statement proved (classical-S1 reading); corrected generic-q and gemini companion analogs also proved

Re-reading the paper shows Id. 3 uses the classical signed Stirling numbers S1(n,k) (not $S_1^q$) with the printed power $q^{-k}$. Under that reading the printed statement is sound and is now fully proved in Lean (cas/check_id3_convention.py sections 1โ€“5 remain documented negatives only for the earlier (wrong) $S_1^q$ readings; its section 6 verifies the classical-S1 reading). Three statements coexist in the blueprint:

  1. thm:id3-printed โ€” the printed statement (classical S1, printed certificate), proved for q โ‰  0 with $q^{m+1} \neq 1$; the $q = 1$ column reduces to classical identity (8).
  2. thm:id3 โ€” a corrected generic-q analog (qStirling1Tilde, $q^{n-k}$ summand), kept as an independent q-analog slice, no longer a "repair" of Id. 3.
  3. thm:id3-gemini โ€” the gemini-review companion convention (rescaled companion Tฬƒ), proved in OreAlgebraLib/Papers/KauersSchneider/Section3Id3Gemini.lean.

Printed statement (classical S1)

Result Lean declaration Trusted?
Sum bridge at $q = 1$ (qStirling1 โ„š 1 โ‰ก S1) section3Id3Sum_eq_section3Id2Sum, qStirling1_one_eq_stirling1 โœ… Trusted
Pointwise certificate $L(f)(k) = g(k+1) - g(k)$, all $k \in [m,n]$, needs q โ‰  0, $q^{m+1} \neq 1$ section3Id3_pointwise (keystone identities id3K1, id3K2) โœ… Trusted
Telescoping section3Id3_telescoping โœ… Trusted
Boundary certificates ($k = m$, $k = m+1$) section3Id3_cert_at_m_zero, section3Id3_cert_at_m1 โœ… Trusted
Sentinel balance $g(m,n,n+1) = q\cdot f(m+1,n+1,n+1)$ + range reconciliation section3Id3_top_balance, section3Id3_range_reconcile โœ… Trusted
Printed recurrence $F(m,n) + q(q^m + n)F(m+1,n) - qF(m+1,n+1) = 0$ for q โ‰  0, $q^{m+1} \neq 1$ section3Id3OperatorApplyToSeries_eq_zero โœ… Trusted
q=1 classical identity (8): sum $= (-1)^{n-m} S_1(n+1,m+1)$ (all m,n) section3Id3_classical_identity (section3Id3_classical_rec, _rhs_rec, _col_zero, _row_eq) โœ… Trusted
Negative audit of the earlier $S_1^q$ readings (sections 1โ€“5); classical-S1 verification (section 6) cas/check_id3_convention.py โš™๏ธ Audit (not trusted proof)

Corrected generic-q analog (qStirling1Tilde)

Result Lean declaration Trusted?
Pointwise certificate (corrected) id3c_pointwise โœ… Trusted
Telescoping id3c_telescoping โœ… Trusted
Range reconciliation id3c_range_reconcile โœ… Trusted
Boundary identity id3c_boundary โœ… Trusted
Operator annihilates the sum (corrected recurrence) id3c_op_series_eq_zero โœ… Trusted
Identity $F(m,n) = (-1)^{n-m}\cdot \tilde{S}1^q(n+1,m+1)$ for all q : โ„š section3Id3_corrected_identity โœ… Trusted

Gemini-review companion convention (Tฬƒ, rescaled)

Result Lean declaration Trusted?
Companion array Tฬƒ (polynomial normalization, all q : โ„š incl. $q = 0$) gemTilde_* simp lemmas, gemTilde_eq_zero_of_lt, gemTilde_self โœ… Trusted
Pointwise certificate incl. near-diagonal endpoint $k = n$ (no separate boundary identity needed) gem_pointwise (gem_cert_at_m1, gem_cert_at_n1) โœ… Trusted
Telescoping + range reconciliation gem_telescoping, gem_range_reconcile โœ… Trusted
Operator annihilates the rescaled sum gem_op_series_eq_zero โœ… Trusted
Closed form by column/row induction gem_rhs_rec, gem_col_base, gem_row_eq, gem_row_succ โœ… Trusted
Identity $G(m,n) = (-1)^{n-m}\cdot \tilde{T}(n+1,m+1)$ for all q : โ„š section3Id3_gemini_identity โœ… Trusted
Convention + off-by-one defect of the printed companion (exact rationals) cas/check_id3_gemini_tilde.py โš™๏ธ Audit (not trusted proof)

Section 3, Id. 4 โ€” printed statement verified under the Carlitz weight

cas/derive_id4_follow_paper.py (exact fractions.Fraction arithmetic) shows the printed Id. 4 telescoper and printed certificate hold once the first-kind q-Stirling numbers carry the Carlitz weight $ลœโ‚(n,k) := q^{-n(n-1}/2)\cdot S_1แต (n,k)$; the printed Id. 4 summand is the corrected Id. 3 summand conjugated by a column weight, so the earlier "subsumed by corrected Id. 3" verdict was a historical audit stage (unweighted / Gould-weighted conventions only), superseded by this resolution.

Result Artifact Trusted?
Negative audit of the unweighted/Gould-weighted conventions cas/check_id4_convention.py, cas/search_id4_qanalog.py โš™๏ธ Audit (not trusted proof)
Carlitz-weight resolution (printed pair verified, exact rationals) cas/derive_id4_follow_paper.py โš™๏ธ Audit (not trusted proof)
Identity (operator annihilates the Carlitz-weighted sum) for all q : โ„š, q โ‰  0 section3Id4_weighted_identity โœ… Trusted
Printed certificate pointwise identity $op4(m,n,k) = ฤ4(m,n,k+1) - ฤ4(m,n,k)$ for $m \le k \le n+1$, q โ‰  0, $q^{m+1} \neq 1$ (G.2โ€“G.3) id4_pointwise, id4_cert_zero (with id4_cert_conj, id4_op_summand_conj; Id. 3 boundary lemmas id3c_op_left, id3c_op_right) โœ… Trusted

Scope notes: the Lean-proved recurrence holds for all q โ‰  0; the printed certificate additionally needs $q^{m+1} \neq 1$ (its denominator $q^{m+1} - 1$ vanishes otherwise, e.g. at $q = -1, m = 1$). The certificate pointwise identity is verified by cas/derive_id4_follow_paper.py Parts G.2โ€“G.3 and Lean-formalized as id4_pointwise ($m \le k \le n+1$): interior rows by conjugation (id4_op_summand_conj, id3c_pointwise, id4_cert_conj), boundaries $k = m$/$k = n$ via the Id. 3 boundary identities id3c_op_left/id3c_op_right, and the range edge $k = n+1$ via id3c_cert_at_n1 and the weight step id4T_succ.

Section 3, Item 5 โ€” q-Worpitzky identity (Lean proof, degenerate cases covered)

Result Lean declaration Trusted?
Pointwise certificate section3Item5_pointwise_certificate โœ… Trusted
Telescope + q-Worpitzky recurrence section3Item5_telescope, section3Item5_qworpitzky_recurrence โœ… Trusted
Identity in semiring-generic / all-q form section3Item5_identity_all_q (+ degenerate cases $q = 0, 1$ from Milestone 12) โœ… Trusted

Closing Remark โ€” negative for q-Stirlings, POSITIVE for classical S1 (Milestones 13โ€“14)

The paper's closing Remark (6-term/3-step operator) is not consistent with any S1 convention matching the printed S1_q summand (unweighted qStirling1, Gould-weighted); in those conventions the statement is a documented negative (cas/check_remark_convention.py, Milestone 13).

Status update (Milestone 14): the Remark is correct AS PRINTED for the classical signed S1 reading. With $S_1(n,k) = S_1(n-1,k-1) - (n-1)\cdot S_1(n-1,k)$ and the printed summand $k\cdot (-1)^{n-k}\cdot (k choose m)_q\cdot S_1(n,k)\cdot q^{-k}$, exact-rational CAS verification (cas/check_remark_classical.py) shows:

  1. the printed 6-term recurrence holds on F for the full grid $q \in {2, 3, \tfrac12, \tfrac13, 3/2, \tfrac23, -1}$, $m \le 4$, $n \le 8$ (210 rows โ€” a polynomial identity in q, so the certificate-free rows are all valid checks);
  2. the printed certificate (inner factor $q^m$) satisfies the pointwise identity $L(f)(m,n,k) = g(m,n,k+1) - g(m,n,k)$ exactly (870 checks over 270 non-degenerate rows);
  3. the lower boundary is exact: $g(m,n,m) = 0$;
  4. the upper boundary closes by edge-shift cancellation: with E(m,n) the $k = n+1$ sentinel terms of the shifted columns, $g(m,n,n+1) = -E(m,n)$, and the series-form operator equals the pointwise sum plus E(m,n) โ€” so the telescoping proof goes through unchanged.

The initial-values table of the classical-S1 sum matches the external (gemini-review draft) transcript. Note the draft's display of the certificate uses inner factor $q^{m+k}$; that is the mis-transcription โ€” the paper's printed inner factor $q^m$ is the correct one. Also as printed, the certificate denominator $(1-q^{m+1})(1-q^{m+2})$ vanishes whenever $q^{m+1} = 1$ (in particular for every m at $q = -1$, and at $q = 1$); those columns are outside the certificate domain and excluded from parts 2โ€“4, while part 1 (the recurrence) is polynomial in q and verified there too; 5. (Lean, Milestone 14 follow-up) the $q^n$-rescaled, denominator-free series form vanishes on the entire (q, m, n) grid โ€” no hypotheses: the empty rows n < m and the diagonal $n = m$ are direct (remarkOpSeriesR_eq_zero_empty, remarkOpSeriesR_eq_zero_diag; the diagonal closes through the q-independent singleton values $-(m+2) + 2(m+1) - m = 0$), and the main rows m < n lift from 0 < q < 1 to all of โ„š by a polynomial lift in โ„š[X] (remarkOpSeriesR_eq_zero_full); 6. (Lean) the printed recurrence follows for q โ‰  0 alone โ€” no row condition $m + 1 \le n$, no certificate hypotheses $q^{m+1} \neq 1$, $q^{m+2} \neq 1$ (remark_recurrence), matching part 1b of the audit, which covers the degenerate parameters at $q \in {0, 1}$ on the full (m, n) grid (223 checks; at $q = 0$ the rescaled operator is the object checked, since the printed $q^{-k}$ weight degenerates there); 7. (Lean, Milestone 14 closing) the printed-object transport layer is complete: the printed certificate remarkGcert (over the printed denominator $-q^{m+1} - q^{m+2} + q^{2m+3} + 1 = (1 - q^{m+1})\cdot (1 - q^{m+2})$), the printed six-term operator remarkOpPrinted, and the printed edge-shift remarkPrintedEdge are defined; the bridge remarkGp_eq proves $G_p = q^{n+2m}\cdot remarkDs\cdot g$ on the certificate domain (q โ‰  0, $q^{m+1}, q^{m+2} \neq 1$, $k \le n+1$; weight identity cert_weight_id); and from it follow the printed pointwise identity remark_pointwise ($op(k) = g(k+1) - g(k)$; certificate-domain small case remark_pointwise_small_printed at $k = 1$), the lower boundary $g(m) = 0$ (remark_certificate_lower, all q), the upper boundary $g(n+1) = -E(m,n)$ (remark_certificate_upper), the telescoping theorem remark_telescoping ($\sum_{k}=m+1}^{n} op(k) = g(n+1) - g(m+1)$), and the printed $k = m$ endpoint: the hypothesis-free rescaled column identity remark_pointwise_at_m transports through the bridge to remark_pointwise_at_m_printed ($op(m) = g(m+1) - g(m)$ for $m \le n$), giving the full-range pointwise identity remark_pointwise_full ($m \le k \le n$) and the full telescoping remark_telescoping_full ($\sum_{k}=m}^{n} op(k) = g(n+1) - g(m)$, including the lower endpoint contribution โ€” nonzero in general: $op(1) = -1/2$ at (2,1,2) โ€” and the diagonal rows) โ€” closing the Remark's printed certificate proof exactly as in the CAS audit.

The natural rescaled target variant's companion-Tฬƒ Id. 3 slice is Lean-proved (section3Id3_gemini_identity).

Result Artifact Trusted?
Negative audit (S1_q conventions) cas/check_remark_convention.py ๐Ÿ“‹ Negative audit (not a theorem claim)
Positive audit (classical signed S1) cas/check_remark_classical.py โš™๏ธ Audit โ€” POSITIVE, verified as printed (not a theorem claim); includes Part 1b degenerate rows (diagonal, empty, q โˆˆ {0, 1})
Lean proof (classical signed S1) OreAlgebraLib/Papers/KauersSchneider/Section3Remark.lean โœ… Trusted โ€” pointwise certificate + telescoping + full-grid series vanishing + printed recurrence for q โ‰  0 + printed-object transport layer (bridge, certificate g, pointwise/boundary/telescoping incl. the $k = m$ endpoint and full range Icc m n) (Milestone 14 + follow-up + closing + endpoint gap)

Companion report audit (StirlingNumbers/notes/document.tex)

The step-by-step verification report on the gemini-review branch was checked claim-by-claim with exact symbolic computation (sympy, rational arithmetic in q, $n, m \le 6$). Verdicts:

With the corrections, the derived recurrences reproduce the sums exactly (0 mismatches for all parts (a)โ€“(e), 330 point checks per part across $q \in {2, 1/2, 3/2, 2/3, -1}$), confirming the tables in the document.

Companion report: Lean formalization (Section3Report.lean)

The report's own restatement of Id. 3 / Id. 4 โ€” the signed array convention $G(n,m) = (-1)^{n-m}F(m,n)$ โ€” is also formalized in Lean, in OreAlgebraLib/Papers/KauersSchneider/Section3Report.lean (kernel-checked, no sorry), on top of the Section 3 / Section 3 Id. 4 modules:

Report claim Lean declaration(s) Trusted?
Signed-array closed form $G(n,m)=\tilde S_1^q(n+1,m+1)$ (Id. 3) reportGId3, reportGId3_eq โœ… Trusted
F-level step $F(m{+}1,n{+}1)=F(m,n)+([n{+}1]_q+q^{m+1}-1)F(m{+}1,n)$ reportId3_F_step โœ… Trusted
Printed Id. 4 sum-level recurrence ($q\neq 0$) reportId4_F_recurrence โœ… Trusted
Report's column-weighted closed form $\hat G(n,m)=q^{-n(n+1)/2}\tilde S_1^q(n+1,m+1)$ (Id. 4) reportGId4, reportGId4_eq โœ… Trusted

The report's pointwise certificates remain unformalized in Lean; the exact-rational audit script cas/check_report_document_audit.py verifies all parts (a)โ€“(e) with 0 violations, including the corrected tilde and S-bar