Zulip Chat Archive
Stream: maths
Topic: Proving a sum over smooth numbers is summable
Gareth Ma (Nov 06 2023 at 15:22):
Hi, I am trying to prove that the sum is summable for all . This is true because it is equal to which is a finite product. However, that requires proving , which requires to be summable i.e. there's some circular argument. Am I correct here? Is there an alternative proof?
Adam Topaz (Nov 06 2023 at 15:26):
You can use docs#HasSum
Adam Topaz (Nov 06 2023 at 15:28):
Once you prove HasSum ... P
with your P
, you can use docs#HasSum.summable to show summability.
Gareth Ma (Nov 06 2023 at 15:29):
Is HasSum S P equivalent to saying ? Because that seems even harder to prove
Adam Topaz (Nov 06 2023 at 15:29):
And finally if you want to show that your sum, defined as tsum
, is actuall equal to P
, you can use docs#HasSum.tsum_eq
Adam Topaz (Nov 06 2023 at 15:31):
HasSum
is defined as saying that the limit of the partial sums over arbitrary larger and larger finite subsets is equal to P
. You can look at the definition itself:
def HasSum (f : β → α) (a : α) : Prop :=
Tendsto (fun s : Finset β => ∑ b in s, f b) atTop (𝓝 a)
Gareth Ma (Nov 06 2023 at 15:33):
Right
Gareth Ma (Nov 06 2023 at 15:33):
So should I write as something like
example (z : ℕ) (δ : ℝ) (hδ : 0 < δ) :
HasSum
(fun N : ℕ ↦ if smooth z n then 1 / (n : ℝ) ^ δ else 0)
(∏ p in prime_Ico 1 z, (1 - 1 / (p : ℝ) ^ δ)⁻¹) := by
sorry
Adam Topaz (Nov 06 2023 at 15:34):
I don't know what smooth
is.
Gareth Ma (Nov 06 2023 at 15:34):
Oh oops
Adam Topaz (Nov 06 2023 at 15:34):
or prime_Ico
.
Gareth Ma (Nov 06 2023 at 15:34):
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Data.Finset.Basic
import Mathlib.Data.Nat.Interval
import Mathlib.Data.Nat.Prime
import Mathlib.Data.Real.Basic
import Mathlib.NumberTheory.Divisors
import Mathlib.NumberTheory.LSeries
open Nat Finset BigOperators Real ArithmeticFunction
def prime_Ico (a b : ℕ) := (Ico a b).filter Nat.Prime
def smooth (z n : ℕ) := ∀ p ∈ n.factors, p < z
instance : ∀ z, DecidablePred (smooth z) := by unfold smooth ; infer_instance
Gareth Ma (Nov 06 2023 at 15:35):
it's just short hands for the ranges that appear in the definitions
Reid Barton (Nov 06 2023 at 15:35):
I guess an approach could be to show that the sets of -smooth numbers in which, in addition, each prime appears at most times are cofinal in all finite subsets of the -smooth numbers (which ought to be enough since the summands are all nonnegative), and for these subsets , we can evaluate the sums as products of truncated geometric series.
Adam Topaz (Nov 06 2023 at 15:35):
aha I see. yeah you could do that, or you could just use more binders in the sum/product and avoid making these new definitions.
Gareth Ma (Nov 06 2023 at 15:39):
Reid Barton said:
I guess an approach could be to show that the sets of -smooth numbers in which, in addition, each prime appears at most times are cofinal in all finite subsets of the -smooth numbers (which ought to be enough since the summands are all nonnegative), and for these subsets , we can evaluate the sums as products of truncated geometric series.
Oh! That sounds quite possible - I think I proved something like that already. And also is a finite set / sum, so it should be much easier to handle
Gareth Ma (Nov 06 2023 at 15:39):
Thanks a lot Reid, I think I will try that approach. Thanks Adam as well :)
Michael Stoll (Nov 06 2023 at 15:56):
@Gareth Ma My Euler product code basically has the equality . It is prod_of_tsum_geometric
in EulerFactor.lean
.
Gareth Ma (Nov 06 2023 at 15:57):
Yours doesn't work for my use case since diverges for ?
Michael Stoll (Nov 06 2023 at 15:58):
I assume one can prove it using weaker assumptions.
Gareth Ma (Nov 06 2023 at 15:59):
Maybe yeah, but ∑' n, f n
is currently as stated
Michael Stoll (Nov 06 2023 at 16:06):
Use that the sums in the product on the left converge absolutely to get convergence of the sum (over smooth numbers) on the right. I'll try to come up with something later if you don't beat me to it.
Gareth Ma (Nov 06 2023 at 16:11):
I see. But I think I will try to prove it myself first. Thanks though
Michael Stoll (Nov 06 2023 at 20:02):
I now have
lemma hasSum_prod_tsum_primesBelow
(hsum : ∀ {p : ℕ}, p.Prime → Summable (fun n : ℕ ↦ ‖f (p ^ n)‖)) (N : ℕ) :
Summable (fun m : N.factorsBelow ↦ ‖f m‖) ∧
HasSum (fun m : N.factorsBelow ↦ f m) (∏ p in N.primesBelow, ∑' (n : ℕ), f (p ^ n))
(I'll push it to my github repo soon, but you don't have to look :smile: )
In the proof, I had two occurrences of exact <term>
leading to a time-out, but have := <term>; exact this
succeeding quickly. What could be the reason for this?
Michael Stoll (Nov 06 2023 at 20:03):
BTW, I think I will change factorsBelow
to smoothNumbers
in my code, as "smooth" is a pretty common name for the relevant property.
Kevin Buzzard (Nov 06 2023 at 20:26):
exact <term>
means "make this term unify so that it has the type we expect"; have := <term>; exact this
means "let the term have whatever type it wants to have, and then check that this is defeq to the type we expect"
Michael Stoll (Nov 06 2023 at 20:53):
Can you elaborate a bit more on the difference this makes?
One of the terms in questions is summable_mul_of_summable_norm hs ih.1
, where
hs: Summable fun n ↦ ‖‖f (N ^ n)‖‖
ih: (Summable fun m ↦ ‖‖f ↑m‖‖) ∧ ...
⊢ Summable fun x ↦ ‖f (N ^ x.1)‖ * ‖f ↑x.2‖
and n
in hs
is a natural number, m
in ih
is in ↑(smoothNumbers N)
(a subtype of Nat
), and x
in the goal is in ℕ × ↑(smoothNumbers N)
.
Could it be related to type class resolution and when this happens?
Michael Stoll (Nov 06 2023 at 20:59):
BTW, this
and the goal look pretty identical. However, using set_option pp.all true
, there are some differences in the type classes:
(@SeminormedRing.toPseudoMetricSpace.{u_1} F
(@NormedRing.toSeminormedRing.{u_1} F
(@NormedCommRing.toNormedRing.{u_1} F (@NormedField.toNormedCommRing.{u_1} F inst✝¹))))))
vs.
(@SeminormedAddCommGroup.toPseudoMetricSpace.{u_1} F
(@NonUnitalSeminormedRing.toSeminormedAddCommGroup.{u_1} F
(@NonUnitalNormedRing.toNonUnitalSeminormedRing.{u_1} F
(@NormedRing.toNonUnitalNormedRing.{u_1} F
(@NormedCommRing.toNormedRing.{u_1} F (@NormedField.toNormedCommRing.{u_1} F inst✝¹))))))))
and
(@NonUnitalNonAssocRing.toMul.{u_1} F
vs.
(@NonUnitalNonAssocSemiring.toMul.{u_1} F
(@NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u_1} F
which supports my suspicion...
Michael Stoll (Nov 06 2023 at 21:01):
Is there some easy way to avoid these problems?
Kevin Buzzard (Nov 06 2023 at 21:08):
So without seeing a #mwe I will conjecture that doing things one way makes the whole algebra heirarchy explode, and doing it the other way doesn't, for reasons which I have never entirely understood and lie deep in the typeclass system. What happens if you set time-out to 0 and then look at the traces in exact <term>
?
Michael Stoll (Nov 06 2023 at 21:18):
Maybe tomorrow; it's getting late, and I have other things to do...
Michael Stoll (Nov 11 2023 at 20:46):
It appears that convert <term>
has the same effect as have := <term>; exact this
.
Scott Morrison (Nov 11 2023 at 21:28):
No, convert
does quite a bit more than that (in particular it will use congr
internally and give you subgoals for non-matching subexpressions). But it is strictly more powerful than have := <term>; exact this
.
Michael Stoll (Nov 12 2023 at 08:30):
OK (I know that convert
is more powerful, geneally speaking); I should have said "in the context above".
Last updated: Dec 20 2023 at 11:08 UTC