FLT/Slop/NumberTheory/TsumDivisorsAntidiagonal.lean

GitHub source file

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

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 two known Lambert lemmas become corollaries by discharging the hypotheses in their respective settings:

Imports (2)
Imported by 2 files
  1. theorem tsum_lambert_of_summable Documented declaration: tsum_lambert_of_summable line 86 source

    Source 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: hgeo says each row rᵐ/(1-rᵐ) has its geometric expansion ∑_{j≥1} r^{mj}, and hsum says 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 of N.

    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, tsum and 2 more

    Proof 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, True and 34 more

    94 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
    …
  2. example (example at line 114) line 114 source

    Source 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
    …
  3. theorem isTopologicallyNilpotent_iff_tendsto_geomSum Documented declaration: isTopologicallyNilpotent_iff_tendsto_geomSum line 127 source

    Source documentation

    The sequential geometric limit that identifies each row's value in the companion below: over a Hausdorff topological field, r is topologically nilpotent iff the geometric partial sums ∑_{n<N} rⁿ converge to (1-r)⁻¹. This sequential convergence is weaker than HasSum, but combined with row summability from hsum (through Summable.hasSum_iff_tendsto_nat) it recovers the row HasSum that tsum_lambert_of_summable takes as hgeo.

    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.ofNat

    Proof 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_const and 53 more

    119 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
    …
  4. theorem tsum_lambert_of_summable_of_isTopologicallyNilpotent Documented declaration: tsum_lambert_of_summable_of_isTopologicallyNilpotent line 166 source

    Source documentation

    The Lambert series rearrangement from topological nilpotency, over a complete uniform field: the companion to tsum_lambert_of_summable that trades the per-row hypothesis hgeo for the single assumption IsTopologicallyNilpotent 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.hSub and 3 more

    Proof 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, congrArg and 83 more

    116 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
    …
  5. theorem hasSum_geometric_pow_mul_succ The geometric series of rᵐ, indexed from the first term: for ‖r‖ < 1 and m ≠ 0, ∑_{j≥1} r^{mj} = rᵐ/(1-rᵐ) line 220 source

    Source documentation

    The geometric series of rᵐ, indexed from the first term: for ‖r‖ < 1 and m ≠ 0, ∑_{j≥1} r^{mj} = rᵐ/(1-rᵐ). This discharges the hgeo hypothesis of tsum_lambert_of_summable over 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.unconditional

    Proof 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_ofNat and 26 more

    125 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
    …
  6. theorem summable_prod_mul_pow' The variant of summable_prod_mul_pow with the weight on the first coordinate line 232 source

    Source documentation

    The variant of summable_prod_mul_pow with the weight on the first coordinate. This discharges the hsum hypothesis of tsum_lambert_of_summable for the weights dᵏ 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.unconditional

    Proof uses: Summable.congr, Prod.swap, Summable.prod_symm, summable_prod_mul_pow, of_eq_true, Eq, Eq.trans, True, congrFun', congrArg, mul_comm, eq_self

    81 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
    …
  7. example (example at line 237) line 237 source
  8. example (example at line 251) line 251 source

    Source 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 : ℕ) :=
    …