FLT/Slop/NumberTheory/TsumDivisorsAntidiagonal.lean
Explanation legend Lean4 Domain Explanation Language (L4DEL)
L4DEL explanations are a separate layer. They do not change the Lean source. Intuition is explanatory prose; numbered items are a reading path; sources link the wording back to evidence.
- L4DEL
- Lean4 Domain Explanation Language
Credit: The upstream authors and contributors retain credit for the project and mathematics. lean4-explainer only renders their pinned source and adds the separately disclosed explanation layer.
Project sources: Pinned project documentation, Pinned FLT blueprint introduction
8 declarations, 0 contain sorry, 0 declared as axioms
The Lambert series rearrangement, hypothesis-driven
This file proves the general Lambert series rearrangement
∑_{m≥1} c(m)rᵐ/(1-rᵐ) = ∑_{N≥1} (∑_{d ∣ N} c(d))rᴺ over a topological field, with the analytic
inputs taken as hypotheses rather than derived from a norm. The rearrangement itself — regrouping
the double series ∑_{m,j} c(m)r^{mj} along the fibres of (m, j) ↦ mj, which are exactly the
divisor pairs of N — is pure algebra plus unconditional-summability bookkeeping. Only the two
analytic facts (the geometric row expansions and the summability of the double series) genuinely use
the topology, and they are what the hypotheses below isolate.
Two formulations
tsum_lambert_of_summable, over an arbitrary Hausdorff topological field, takes both analytic inputs as hypotheses:hgeo— each row has its geometric expansion,HasSum (fun j ↦ r^{m(j+1)}) (rᵐ/(1-rᵐ));hsum— the double series is (unconditionally) summable.
tsum_lambert_of_summable_of_isTopologicallyNilpotent, over a complete uniform field, replaces the per-rowhgeoby the single, cleaner hypothesis thatris topologically nilpotent (IsTopologicallyNilpotent r, i.e.rⁿ → 0). This is a trade, not a free weakening.hgeoimpliesIsTopologicallyNilpotent r(aHasSumfamily is null along the cofinite filter — see theexamplemotivating the companion), so the hypothesis is genuinely weaker; but reconstructing each row'sHasSumfromrⁿ → 0still needs the row to be summable, and the only source of that ishsum, whose fibres are summable only when𝕜is complete (Summable.comp_injective). Completeness cannot be dropped: over a bare topological fieldrⁿ → 0does not imply the geometric row is unconditionally summable. Topological nilpotency then supplies each row's value through the sequential geometric limit∑_{j<N} (rᵐ)ʲ → (1-rᵐ)⁻¹(isTopologicallyNilpotent_iff_tendsto_geomSum), whichSummable.hasSum_iff_tendsto_natupgrades to the requiredHasSum.
Both intended instantiations are complete, so the second formulation is the convenient one there; the first is kept for its full topological-field generality.
How this differs from the existing mathlib lemma
Mathlib's tsum_pow_div_one_sub_eq_tsum_sigma (in
Mathlib.NumberTheory.TsumDivisorsAntidiagonal, whence the name of this file) states
∑' n : ℕ+, n ^ k * r ^ n / (1 - r ^ n) = ∑' n : ℕ+, σ k n * r ^ n for a complete
nontrivially normed field and ‖r‖ < 1. Two restrictions are baked into it:
- The analysis is normed. Summability of the double series and the geometric row
expansions are established through
‖·‖-estimates, so the lemma is unusable over a nonarchimedean local field in theValuativeRelframework, which carries no canonicalNormedFieldinstance (its valuation takes values in an abstract rank-one group with zero, not inℝ). - The coefficients are the powers
c(d) = dᵏ(so the divisor sums areσ k). The rearrangement works for arbitrary coefficients; the Tate curve needsc(d) = -((5d³ + 7d⁵)/12), which is not a power ofd.
The two known Lambert lemmas become corollaries by discharging the hypotheses in their respective settings:
- over a complete nontrivially normed field, by
hasSum_geometric_of_norm_lt_one/tendsto_pow_atTop_nhds_zero_of_norm_lt_oneandsummable_prod_mul_pow— this rederivation oftsum_pow_div_one_sub_eq_tsum_sigmais carried out below (as anexample; in a mathlib PR it would simply become the new proof of that lemma); - over a nonarchimedean local field, by
TateCurve.hasSum_geometric_succ/TateCurve.tendsto_pow_nhds_zeroandTateCurve.summable_of_valuation_le_pow— recoveringTateCurve.tsum_lambertofFLT.KnownIn1980s.EllipticCurves.TateCurveBaseChange(rewiring that file through this one is left for the upstreaming pass).
Imports (2)
Imported by 2 files
- theorem
tsum_lambert_of_summableDocumented declaration: tsum_lambert_of_summable line 86 sourceSource documentation
The Lambert series rearrangement
∑_{m≥1} c(m)rᵐ/(1-rᵐ) = ∑_{N≥1} (∑_{d ∣ N} c(d))rᴺover a Hausdorff topological field, with the analytic inputs as hypotheses:hgeosays each rowrᵐ/(1-rᵐ)has its geometric expansion∑_{j≥1} r^{mj}, andhsumsays the double series is (unconditionally) summable. Given these, the double series is regrouped along the fibres of(m, j) ↦ mj, which are exactly the divisor pairs ofN.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,TopologicalSpace,IsTopologicalRing,T2Space,Nat,PNat,HasSum,HPow.hPow,HMul.hMul,HAdd.hAdd,OfNat.ofNat,HDiv.hDiv,HSub.hSub,SummationFilter.unconditional,Summable,Prod,Prod.fst,Prod.snd,Eq,tsumand 2 moreProof uses:
Eq.mpr,id,congrFun',SummationFilter,congrArg,optParam,mul_div_assoc,HasSum.mul_left,Subtype,Membership.mem,Finset,Nat.divisorsAntidiagonal,Function.comp,Sigma,Equiv,sigmaAntidiagonalEquivProd,Sigma.mk,of_eq_true,Eq.trans,Trueand 34 more94 instances, coercions and auxiliary constants left out.
Tactic trace: 13 steps
Open to load the checked before-and-after goal states.
theorem tsum_lambert_of_summable (r : 𝕜) (c : ℕ → 𝕜) (hgeo : ∀ m : ℕ+, HasSum (fun j : ℕ ↦ r ^ ((m : ℕ) * (j + 1))) (r ^ (m : ℕ) / (1 - r ^ (m : ℕ)))) (hsum : Summable fun p : ℕ+ × ℕ+ ↦ c p.1 * r ^ ((p.1 : ℕ) * (p.2 : ℕ))) : ∑' m : ℕ+, c m * r ^ (m : ℕ) / (1 - r ^ (m : ℕ)) = ∑' N : ℕ+, (∑ d ∈ (N : ℕ).divisors, c d) * r ^ (N : ℕ) := by … - example
(example at line 114)line 114 sourceSource comment
`hgeo → IsTopologicallyNilpotent r`: the row hypothesis is strictly stronger than topological nilpotency, which is why the completeness-based companion below can take the weaker `IsTopologicallyNilpotent r` in its place. Only the first row `hgeo 1` is needed — a `HasSum` family is null along the cofinite filter (`= atTop` on `ℕ`), i.e. `rⁿ → 0`.example (r : 𝕜) (hgeo : ∀ m : ℕ+, HasSum (fun j : ℕ ↦ r ^ ((m : ℕ) * (j + 1))) (r ^ (m : ℕ) / (1 - r ^ (m : ℕ)))) : IsTopologicallyNilpotent r := by … - theorem
isTopologicallyNilpotent_iff_tendsto_geomSumDocumented declaration: isTopologicallyNilpotent_iff_tendsto_geomSum line 127 sourceSource documentation
The sequential geometric limit that identifies each row's value in the companion below: over a Hausdorff topological field,
ris topologically nilpotent iff the geometric partial sums∑_{n<N} rⁿconverge to(1-r)⁻¹. This sequential convergence is weaker thanHasSum, but combined with row summability fromhsum(throughSummable.hasSum_iff_tendsto_nat) it recovers the rowHasSumthattsum_lambert_of_summabletakes ashgeo.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,TopologicalSpace,IsTopologicalRing,T2Space,Iff,IsTopologicallyNilpotent,Filter.Tendsto,Nat,Finset.sum,Finset.range,HPow.hPow,Filter.atTop,nhds,Inv.inv,HSub.hSub,OfNat.ofNatProof uses:
Iff.intro,Ne,Eq,False,one_ne_zero,tendsto_nhds_unique,tendsto_const_nhds,Eq.mp,congrFun',Filter,congrArg,funext,one_pow,Eq.symm,Eq.mpr,HDiv.hDiv,id,geom_sum_eq,Filter.Tendsto.div_const,Filter.Tendsto.sub_constand 53 more119 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
theorem isTopologicallyNilpotent_iff_tendsto_geomSum (r : 𝕜) : IsTopologicallyNilpotent r ↔ Filter.Tendsto (fun N ↦ ∑ n ∈ Finset.range N, r ^ n) Filter.atTop (nhds (1 - r)⁻¹) := by … - theorem
tsum_lambert_of_summable_of_isTopologicallyNilpotentDocumented declaration: tsum_lambert_of_summable_of_isTopologicallyNilpotent line 166 sourceSource documentation
The Lambert series rearrangement from topological nilpotency, over a complete uniform field: the companion to
tsum_lambert_of_summablethat trades the per-row hypothesishgeofor the single assumptionIsTopologicallyNilpotent r, at the cost of assuming𝕜complete.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
Field,UniformSpace,IsUniformAddGroup,IsTopologicalRing,CompleteSpace,T2Space,Nat,IsTopologicallyNilpotent,Summable,Prod,PNat,HMul.hMul,Prod.fst,HPow.hPow,Prod.snd,SummationFilter.unconditional,Eq,tsum,HDiv.hDiv,HSub.hSuband 3 moreProof uses:
HasSum,HAdd.hAdd,Function.Injective,Prod.mk,Nat.succPNat,Nat.succPNat_injective,And.right,Iff.mp,And,Prod.ext_iff,Summable.comp_injective,id,Eq.mp,Filter.Tendsto,Function.comp,Filter.atTop,nhds,congrFun',Filter,congrArgand 83 more116 instances, coercions and auxiliary constants left out.
Tactic trace: 21 steps
Open to load the checked before-and-after goal states.
theorem tsum_lambert_of_summable_of_isTopologicallyNilpotent (r : 𝕜) (c : ℕ → 𝕜) (htn : IsTopologicallyNilpotent r) (hsum : Summable fun p : ℕ+ × ℕ+ ↦ c p.1 * r ^ ((p.1 : ℕ) * (p.2 : ℕ))) : ∑' m : ℕ+, c m * r ^ (m : ℕ) / (1 - r ^ (m : ℕ)) = ∑' N : ℕ+, (∑ d ∈ (N : ℕ).divisors, c d) * r ^ (N : ℕ) := by … - theorem
hasSum_geometric_pow_mul_succThe geometric series ofrᵐ, indexed from the first term: for‖r‖ < 1andm ≠ 0,∑_{j≥1} r^{mj} = rᵐ/(1-rᵐ)line 220 sourceSource documentation
The geometric series of
rᵐ, indexed from the first term: for‖r‖ < 1andm ≠ 0,∑_{j≥1} r^{mj} = rᵐ/(1-rᵐ). This discharges thehgeohypothesis oftsum_lambert_of_summableover a normed field (no completeness is needed: the limit is explicit).standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NontriviallyNormedField,LT.lt,Real,Norm.norm,OfNat.ofNat,Nat,Ne,HasSum,HPow.hPow,HMul.hMul,HAdd.hAdd,HDiv.hDiv,HSub.hSub,SummationFilter.unconditionalProof uses:
Eq.mpr,id,Eq,congrFun',congrArg,norm_pow,pow_lt_one₀,norm_nonneg,funext,Mathlib.Tactic.Ring.of_eq,Nat.rawCast,Mathlib.Tactic.Ring.Common.pow_congr,Mathlib.Tactic.Ring.Common.atom_pf,rfl,Eq.symm,Eq.refl,Mathlib.Tactic.Ring.Common.mul_congr,Mathlib.Tactic.Ring.Common.add_congr,Mathlib.Tactic.Ring.cast_pos,Mathlib.Meta.NormNum.isNat_ofNatand 26 more125 instances, coercions and auxiliary constants left out.
Tactic trace: 6 steps
Open to load the checked before-and-after goal states.
theorem hasSum_geometric_pow_mul_succ (hr : ‖r‖ < 1) {m : ℕ} (hm : m ≠ 0) : HasSum (fun j : ℕ ↦ r ^ (m * (j + 1))) (r ^ m / (1 - r ^ m)) := by … - theorem
summable_prod_mul_pow'The variant ofsummable_prod_mul_powwith the weight on the first coordinate line 232 sourceSource documentation
The variant of
summable_prod_mul_powwith the weight on the first coordinate. This discharges thehsumhypothesis oftsum_lambert_of_summablefor the weightsdᵏover a complete normed field.standard axioms: Classical.choice, Quot.sound, propext what this means
Statement uses:
NontriviallyNormedField,CompleteSpace,NormSMulClass,Int,Nat,LT.lt,Real,Norm.norm,OfNat.ofNat,Summable,Prod,PNat,HMul.hMul,HPow.hPow,Prod.fst,Prod.snd,SummationFilter.unconditionalProof uses:
Summable.congr,Prod.swap,Summable.prod_symm,summable_prod_mul_pow,of_eq_true,Eq,Eq.trans,True,congrFun',congrArg,mul_comm,eq_self81 instances, coercions and auxiliary constants left out.
Tactic trace: 9 steps
Open to load the checked before-and-after goal states.
theorem summable_prod_mul_pow' [NormSMulClass ℤ 𝕜] (k : ℕ) (hr : ‖r‖ < 1) : Summable fun p : ℕ+ × ℕ+ ↦ ((p.1 : ℕ) : 𝕜) ^ k * r ^ ((p.1 : ℕ) * (p.2 : ℕ)) := by … - example
(example at line 237)line 237 source - example
(example at line 251)line 251 sourceSource comment
Confirmation that the completeness-based companion is genuinely usable in this setting: a `NontriviallyNormedField` with `[CompleteSpace]` supplies the uniform-field instances the variant needs, and `‖r‖ < 1` discharges `IsTopologicallyNilpotent r`.example (r : 𝕜) (c : ℕ → 𝕜) (hr : ‖r‖ < 1) (hsum : Summable fun p : ℕ+ × ℕ+ ↦ c p.1 * r ^ ((p.1 : ℕ) * (p.2 : ℕ))) : ∑' m : ℕ+, c m * r ^ (m : ℕ) / (1 - r ^ (m : ℕ)) = ∑' N : ℕ+, (∑ d ∈ (N : ℕ).divisors, c d) * r ^ (N : ℕ) := …