Summary
Track the formal proof work toward a closed-form expression for stf(b) (Sum of Triangular Factors) in Lean 4 + Mathlib. This decomposes the journey from algebraic foundations through to a single-formula closed form.
Background
stf(b) computes the sum of digit-row values in a triangular arrangement for base b. For b = 10: stf(10) = 9 + 78 + 456 + 123 = 666. The goal is to prove a general closed-form expression for stf(b) for any triangular base.
The algebraic form rowValue'(b, z) and the telescoping identity reduce stf to three simpler quantities (boundary term, correction sum, boundary sum), each of which needs its own closed form.
Completed
Remaining
Key Insight
The telescoping theorem reduces stf(b) to three quantities B, C, rv'(b,r). All three ultimately depend on the arithmetic-geometric sum Σ i·b^i. This is the single bottleneck — once proven, the remaining closed forms follow.
Approaches Under Consideration
- Stay in Nat: Prove multiplicative forms avoiding division (e.g.,
(b-1)·stf'(b) = ...)
- Cast to ℤ via zify: Use
push_cast + ring + induction for polynomial identities
- Semi-closed form: Accept telescoping as a structural result without full simplification
Analysis
See 2026-02-08__10-00-17__dev-workflow_phase3d-closed-form-stf-pathway.md for detailed pathway analysis.
See 2026-02-08__12-13-07__full-postmortem_phase3d-telescoping-stf-and-remaining-roadmap.md for Phase 3D postmortem.
Summary
Track the formal proof work toward a closed-form expression for
stf(b)(Sum of Triangular Factors) in Lean 4 + Mathlib. This decomposes the journey from algebraic foundations through to a single-formula closed form.Background
stf(b)computes the sum of digit-row values in a triangular arrangement for baseb. Forb = 10: stf(10) = 9 + 78 + 456 + 123 = 666. The goal is to prove a general closed-form expression forstf(b)for any triangular base.The algebraic form
rowValue'(b, z)and the telescoping identity reduce stf to three simpler quantities (boundary term, correction sum, boundary sum), each of which needs its own closed form.Completed
rowValue_eq_rowValue'— bridge algorithmic to algebraic rowValue (v0.7.16)v0.7.20)rowValue'_split— decompose into constant-coeff geometric + linearly-weighted power sumstf'/stf_eq_stf'— algebraic stf definition and bridgerowValue'_succ_add— recursive relation (additive form)geom_sum_mul_add_one,power_sum_reverse— geometric sum helperspower_sum_closed— Mathlib geometric series closed form (ed56eac)uncommitted)rowValue'_zero,rowValue'_one— boundary lemmasrowValue'_sum_index_shift— index shift for rv' sumssum_rowValue'_succ_eq— summed recursive relationstf'_telescope— stf'(b) + C + b·rv'(b,r) = b·stf'(b) + BRemaining
Σ (b - tri(z) + z) = r·b - (r-1)·r·(r-2)/6Σ i·b^iidentity — the mathematical bottleneck(b-1)² · Σ i·b^i = polynomial in b, n(b-1)²divisibilityΣ (z+1)·G(z+1)via arithmetic-geometric sumΣ i·b^iidentity aboveΣ i·b^(r-1-i)for last rowb = tri(r), digits are [0, 1, ..., r-1]Σ i·b^iidentityrowValue'(b,z) = N(b,z) / (2·(b-1)²)2·(b-1)² | N(b,z)in Nat (or cast to ℤ)stf(b) = F(b)as single expressionKey Insight
The telescoping theorem reduces
stf(b)to three quantities B, C, rv'(b,r). All three ultimately depend on the arithmetic-geometric sumΣ i·b^i. This is the single bottleneck — once proven, the remaining closed forms follow.Approaches Under Consideration
(b-1)·stf'(b) = ...)push_cast+ring+ induction for polynomial identitiesAnalysis
See
2026-02-08__10-00-17__dev-workflow_phase3d-closed-form-stf-pathway.mdfor detailed pathway analysis.See
2026-02-08__12-13-07__full-postmortem_phase3d-telescoping-stf-and-remaining-roadmap.mdfor Phase 3D postmortem.