Zulip Chat Archive
Stream: mathlib4
Topic: Infinite products
Mitchell Lee (Mar 26 2024 at 08:41):
There's a folder in mathlib called Mathlib.Topology.Algebra.InfiniteSum
that defines infinite sums in an (additive) commutative topological monoid.
It would be nice, I think, to have a similar notion for infinite products in a (multiplicative) commutative topological monoid. This would, for example, make it easier to state a result like docs#EulerProduct.eulerProduct. (I know that technically there is already Additive.toMul (∑' a, Additive.ofMul (f a))
, but I hope I do not need to explain why this is undesirable.)
I would be happy to help make this happen. What would be the best approach?
Yaël Dillies (Mar 26 2024 at 08:44):
Yaël Dillies (Mar 26 2024 at 08:49):
See also !3#18405
Mitchell Lee (Mar 26 2024 at 09:12):
I see. Thank you for the links.
I will say that I would be inclined to directly "multiplicativize" the existing infinite sum code, rather than require that every term of the product is a unit. After all, the definition of a convergent infinite sum doesn't require that every term has a multiplicative inverse, or is even cancellable. If you want things like not to exist, then you can carry out the product in instead of .
David Loeffler (Mar 26 2024 at 09:36):
@Mitchell Lee What you are suggesting (naively multiplicativizing the existing definitions for sums) might seem logically tidy, but unfortunately does not match the way that infinite products get used in the established mathematics literature, and there was a consensus in the previous thread that we should not follow this path.
Mitchell Lee (Mar 26 2024 at 09:39):
From David Loeffler:
If R is a topological ring, then I think we should define "convergence" of a product valued in R to mean that every term of the product is a unit in R, and the convergence holds be w.r.t. the morally-correct topology on , which is the one induced by its embedding into via .
Is it not true that a product converges in this stronger sense if and only if it converges in the naive sense (i.e. the filter of finite partial products converges) and the value of the product is a unit?
David Loeffler (Mar 26 2024 at 09:57):
As pointed out by others in the thread, this is probably not the right definition, and it is better to allow finitely many non-unit terms.
Mitchell Lee (Mar 26 2024 at 10:04):
I cannot see that suggestion in the thread. The closest thing I can see is the suggestion of Sébastien Gouëzel, which is to require that every product of all but finitely many of the terms converges "in the naive sense" (of the filter of finite partial products converging). It is not obvious to me whether this is equivalent to the statement that there are finitely many non-unit terms and the product of the unit terms converges in the "morally correct" topology.
This definition excludes , which probably shouldn't be considered to converge, without excluding , which probably should be considered to converge.
But then, I think if we decide to adopt this definition, there is no reason that we couldn't use the same thing for infinite sums.
Mitchell Lee (Mar 26 2024 at 10:24):
Overall, though, here is my opinion: there is not actually a consensus in the literature about what it means for an infinite product to converge, and I don't see what horrible thing is going to happen if we just decide that .
Mitchell Lee (Mar 26 2024 at 10:35):
You also gave the example of in . Similarly, I can't see what's wrong with saying that this product is if carried out in , and it doesn't exist if carried out in the cancellative monoid . This is what the naive "multiplicativization" of the current definition of infinite sums already does.
But more importantly, I think no one would ever consider such a product, so it doesn't really matter whether we say it's or not.
Mario Carneiro (Mar 26 2024 at 10:42):
David Loeffler said:
As pointed out by others in the thread, this is probably not the right definition, and it is better to allow finitely many non-unit terms.
Can you point more specifically to where this is said? I can only see you making this claim in the earlier thread.
Mario Carneiro (Mar 26 2024 at 10:45):
Note that any weirdness that arises for infinite products also arises for infinite sums, because we can take sums over topological monoids with a element in the domain
David Loeffler (Mar 26 2024 at 10:59):
Mario Carneiro said:
Can you point more specifically to where this is said? I can only see you making this claim in the earlier thread.
The suggestion came from Sebastian: https://leanprover.zulipchat.com/#narrow/stream/113488-general/topic/infinite.20product.20clash.20with.20type.20product/near/326054526
David Loeffler (Mar 26 2024 at 11:16):
If you specialise to the case of values in a field, then this is also (close to) the notion of "convergence" used in the statements scanned from a textbook that Yakov was uploading (the difference being that this text was using a different, order-dependent notion of convergence for the non-vanishing tail product). So it was not just me who was arguing for a notion of product convergence other than the naive multiplicativization of the sum definition.
Mitchell Lee (Mar 26 2024 at 11:18):
Yes; as I said, the suggestion from Sebastian is different from the one you made.
David Loeffler (Mar 26 2024 at 11:20):
Mitchell Lee said:
Overall, though, here is my opinion: there is not actually a consensus in the literature about what it means for an infinite product to converge, and I don't see what horrible thing is going to happen if we just decide that .
One thing you lose by doing this is that the standard and widely-used lemma that for a sequence of non-negative reals , the product converges iff converges. I think it would be unfortunate to adopt a notion of product convergence for which this lemma does not hold.
Mitchell Lee (Mar 26 2024 at 11:35):
You don't lose that lemma, though.
David Loeffler (Mar 26 2024 at 11:36):
Mitchell Lee said:
You don't lose that lemma, though.
I'm pretty sure doesn't converge...
Mitchell Lee (Mar 26 2024 at 11:36):
That's not a series of nonnegative real numbers
Mitchell Lee (Mar 26 2024 at 11:37):
Okay, I see your point, that maybe you want it with "eventually nonnegative"
David Loeffler (Mar 26 2024 at 11:38):
Well, I want convergence of to imply convergence of for any .
Mitchell Lee (Mar 26 2024 at 11:41):
Okay, then we should use Sebastian's suggestion. But if we do that, we should do the same thing for additive.
David Loeffler (Mar 26 2024 at 11:41):
I also think it's desirable that should converge iff does. That's not true with Sebastian's definition: one would need a hybrid of Sebastian's definition and the one from Yakov's textbook clipping.
Sébastien Gouëzel (Mar 26 2024 at 11:42):
The conclusion I had arrived on my side is the following: The simplest and wisest thing to do is probably just to (1) multiplicativize the current definitions, as it will give a reasonable definition for many cases (with the drawback you're pointing that convergence of does not imply convergence of , but I'm not sure it will be a real pain). And then (2) add a second layer on top of this one, if it looks really useful, implementing a more complicated definition but with better properties in some cases.
Mitchell Lee (Mar 26 2024 at 11:43):
Sorry for getting your name wrong
Sébastien Gouëzel (Mar 26 2024 at 11:43):
Don't worry about my name, I'm used to every possible variation :-)
Sébastien Gouëzel (Mar 26 2024 at 11:44):
The advantage is that (1) can be done now, and (2) can be done later if/when needed.
Sébastien Gouëzel (Mar 26 2024 at 11:46):
David Loeffler said:
As pointed out by others in the thread, this is probably not the right definition, and it is better to allow finitely many non-unit terms.
No, this is bad, because when you additivize this then you get that in NNReal there is essentially no convergent sum (as the only element which is a unit for addition is zero...)
Mitchell Lee (Mar 26 2024 at 11:47):
Yes, I think it would make sense to have multiple definitions. However, I would not want to select any more than two of the five different things that have been suggested.
I do not think that " converges if and only if does" is essential. What's wrong with " converges to a nonzero number if and only if does"?
David Loeffler (Mar 26 2024 at 12:02):
Sébastien Gouëzel said:
No, this is bad, because when you additivize this then you get that in NNReal there is essentially no convergent sum (as the only element which is a unit for addition is zero...)
This argument is only conclusive if you also require that whatever definition we use for products also has to give a good result for sums under additivization; and I don't think that's a "given" here, is it? It's one of the many properties that would be nice to have, but we can't have all the "nice-to-haves" at the same time, and we're trying to find the best compromise.
David Loeffler (Mar 26 2024 at 12:11):
That said, I think Sebastien's argument is a very convincing one – that we should try out the naive multiplicativization of the existing definition, and see if it works well in practice. If it does turn out to be impossibly painful to work with, then that experience will help us to make an informed judgement on what we should go for instead.
Mitchell Lee (Mar 26 2024 at 12:13):
Well, one could make the same remark about the multiplicative monoid of all real numbers that are greater than or equal to 1. Are you just not allowed to take infinite products in that monoid?
Sébastien Gouëzel (Mar 26 2024 at 12:14):
David Loeffler said:
This argument is only conclusive if you also require that whatever definition we use for products also has to give a good result for sums under additivization.
Yes, absolutely. The big advantage of this approach is that, in this case, you just need to write everything once in the product case, and you get the sum case through to_additive
. While otherwise you need to write everything twice. I am all for minimizing the pain :-)
Yaël Dillies (Mar 26 2024 at 12:32):
David Loeffler said:
That said, I think Sebastien's argument is a very convincing one – that we should try out the naive multiplicativization of the existing definition, and see if it works well in practice. If it does turn out to be impossibly painful to work with, then that experience will help us to make an informed judgement on what we should go for instead.
In fact that's exactly the reasoning I had when I made !3#18405 :smile:
Mitchell Lee (Mar 26 2024 at 12:46):
This is kind of a contrived example, but I think it isn't totally frivolous either.
In the ring of real numbers, we have . Each term of the product lies in the subring of dyadic rationals, as does the product itself. So I should be able to do the same product in that ring, too. But in the ring of dyadic rationals, this is a product of infinitely many nonunits.
David Loeffler (Mar 26 2024 at 13:11):
I concede that requiring only finitely many non-unit terms does not work well when the target space is not a topological field (but I do claim that this special case is quite an important one).
Mitchell Lee (Mar 26 2024 at 21:08):
Yes, I think that topological fields are the most important case. However, in this case, there is not much that needs to be done. One of the most common definitions of infinite product convergence in the mathematical literature is that the finite partial products converge to a nonzero element. In a topological field, this notion of convergence is easily recoverable from the naive notion in two different ways: you could either carry out the product in the unit group, or you could carry out the product and then require that the answer is nonzero.
I think the naive notion (i.e. the direct multiplicativization of what we use for sums) is our best option.
Then, in the specific case that is a complete normed ring, we can say that a product converges absolutely if the sum converges. This implies convergence in the naive sense, and the lemma you mentioned earlier is true essentially by definition. It also has nice properties like being preserved by continuous homomorphisms. I much prefer this to trying to reason about which terms of the products are allowed to be nonunits.
Yakov Pechersky (Mar 26 2024 at 21:49):
Sorry to post in the middle of a complex discussion... One of the reasons I paused on formalization of that infinite products text is because of a lot of obstacles that are mentioned here. One in particular was that I couldn't come up with a satisfactory definition that allowed for all infinite products on the unit interval (a monoid with zero) to converge or diverge to zero.
Mitchell Lee (Mar 26 2024 at 22:05):
(Sidenote: that textbook you showed us was specifically trying to define conditional convergence of the product of a sequence. That definition should be added to Mathlib eventually, but I think we should start by defining unconditional convergence of an arbitrarily indexed product.)
Antoine Chambert-Loir (Mar 26 2024 at 23:40):
I don't know what litterature you're referring to, but let me recall that Bourbaki, General Topology, uses the mul-version the actually present add-version.
While I know that there are contexts where more stringent hypotheses are assumed, with more stringent consequences, It would be very awkward to have another definition.
David Loeffler (Mar 27 2024 at 11:41):
@Antoine Chambert-Loir I looked in Bourbaki's "General Topology" and did not find that definition, can you let me know where it can be found in the book?
David Loeffler (Mar 27 2024 at 11:53):
Chapter 3 of that book contains extensive discussion of sums in topological groups, and there is a brief throwaway remark that the definitions work for monoids too. But that is not the definition that is used later on in the same text, e.g. in Ch 4 sect 6 we read the following:
An infinite product of finite non-zero real numbers is said simply to be convergent if it is convergent in ; its value is then a finite non-zero real number.
So for Bourbaki, is not convergent, and so their notion of "convergence" does not agree with their definitions for monoids applied to the multiplicative monoid of .
Antoine Chambert-Loir (Mar 27 2024 at 12:50):
I'm sorry to disagree. In chapter 3, page 37, remarque 3 (French edition), they say that the definitions they gave for summable families apply to multiplicative monoids. The example you give is a case of a family of real numbers which happen to live in a submonoid (nonzero real numbers) which converges in the ambient monoid but not in the smaller one.
Antoine Chambert-Loir (Mar 27 2024 at 12:52):
They also use that definition for power series (Algebra, chapter 4, §4), although the only case where they prove a product is multipliable is the case where the family is summable.
David Loeffler (Mar 27 2024 at 13:30):
@Antoine: you appear to be disagreeing with your own chosen source. Please see the quote I provided above from Bourbaki ch 4 sect 6.
Antoine Chambert-Loir (Mar 27 2024 at 14:03):
In Bourbaki's language, the use of the adverb “simply” means that they know it's not the definition, but it's easier to pretend it is.
David Loeffler (Mar 27 2024 at 14:16):
Interesting. I can't believe there are people who think Bourbaki constitutes a model for good mathematical writing.
Antoine Chambert-Loir (Mar 27 2024 at 14:17):
Who said that?
David Loeffler (Mar 27 2024 at 14:19):
I've seen "simply" used to mean "this isn't the definition, but it is equivalent to the definition and more convenient". I've never seen "simply" to mean "this is logically incompatible with the definition but we somehow overlook the inconsistency".
Antoine Chambert-Loir (Mar 27 2024 at 14:32):
Maybe the text suffers from the translation here, because the French « simplement » doesn't imply that it is equivalent. In fact, the whole of chapter 4, §4, plays with this kind of conventions:
- n°1 and n°2 are about summable families “in ;
- n°4 about multipliable families “in ;
- n°5 is about summable families “in ;
- n°6 is about convergent series “in ”.
Antoine Chambert-Loir (Mar 27 2024 at 14:33):
I think what is needed is the way of phrasing the existence of a limit in a submonoid, without having to coerce everything from scratch.
Mitchell Lee (Mar 27 2024 at 16:51):
Here is my interpretation of the Bourbaki text: the product converges when carried out in , and it does not converge when carried out in . However, when we say that a product of nonzero real numbers "converges" without specifying the monoid, we mean that it converges in .
This is 100% compatible with the naive multiplicativization. As I said, if you don't want to exist for some reason, just do the product in .
Mitchell Lee (Mar 27 2024 at 16:56):
Moreover, there is no need to even coerce all the terms to the multiplicative group, if you find that to be too annoying (even though it is exactly as annoying as having to prove that all the terms are nonzero every time you want to even write down a product). A product exists in if and only if it exists in and its value is nonzero.
Mitchell Lee (Mar 27 2024 at 17:04):
Finally, as I understand it, part of the design philosophy of mathlib is to let users write down expressions like , even if some people consider them illegal. We even have 1 / 0
in Lean, and that causes a lot more problems than ever could. We can solve these problems by adding the appropriate hypotheses to theorems involving infinite products, rather than simply forbidding users from taking products like .
Mitchell Lee (Mar 27 2024 at 17:13):
(By the way, I think the word "simply" in the Bourbaki text is merely highlighting the fact that "convergent" is a simpler phrase than "convergent in ". In formalized mathematics, this is irrelevant, because you would always specify the monoid.)
Mitchell Lee (Mar 27 2024 at 21:49):
Anyway, shall I get started?
Mitchell Lee (Mar 28 2024 at 04:08):
Okay, here it is: #11733
Mitchell Lee (Mar 29 2024 at 03:49):
Thanks Yaël Dillies for the review; I've made the requested changes.
Mitchell Lee (Apr 05 2024 at 08:27):
Arbitrarily indexed products are on master now. I appreciate Yaël Dillies and Sébastien Gouëzel so much for helping with this. They caught a lot of my mistakes.
There are a few directions that are now opened up.
- Mathlib/Analysis/Normed/Group/InfiniteSum.lean is still not multiplicativized at all. This might be a bit more annoying because the correct multiplicativization of (for example) Summable.of_norm will involve both a sum and a product. I still think
@[to_additive]
should be able to handle it, though. - Mathlib/NumberTheory/EulerProduct/Basic.lean uses an ad-hoc implementation of infinite products. More specifically, it takes a partial product over all primes below
N
and then takes the limit asN
goes to infinity. I think that by using the new implementation of infinite products, these results in this file can be strengthened (to prove unconditional convergence of the Euler product, rather than just conditional convergence) and made easier to use. - As David Loeffler mentioned, it is likely that we will want to implement a stronger notion of multipliability at some point. (I believe that this should complement the current definition rather than replacing it.) Earlier in this thread, I suggested "absolute multipliability" for products whose terms lie in a normed ring: we say is absolutely multipliable if exists. It may be worth thinking about this or other possible conditions.
Michael Stoll (Apr 05 2024 at 12:00):
Mitchell Lee said:
Arbitrarily indexed products are on master now. I appreciate Yaël Dillies and Sébastien Gouëzel so much for helping with this. They caught a lot of my mistakes.
There are a few directions that are now opened up.
- (...)
- Mathlib/NumberTheory/EulerProduct/Basic.lean uses an ad-hoc implementation of infinite products. More specifically, it takes a partial product over all primes below
N
and then takes the limit asN
goes to infinity. I think that by using the new implementation of infinite products, these results in this file can be strengthened (to prove unconditional convergence of the Euler product, rather than just conditional convergence) and made easier to use.- (...)
This is on my to-do list.
Michael Stoll (Apr 08 2024 at 18:29):
The module docs of Mathlib.Topology.Algebra.InfiniteSum.NatInt
should be adapted to mention products as well :smile:
Michael Stoll (Apr 08 2024 at 19:19):
I will need something along the lines of "f : ℕ → R
(with, say, [NormedCommRing R] [CompleteSpace R]
) is multipliable if f n = 1 + g n
for all n
and (‖g ·‖)
is summable". Do we have this somewhere?
Michael Stoll (Apr 08 2024 at 19:20):
@Mitchell Lee ? :up:
Mitchell Lee (Apr 08 2024 at 19:20):
Michael Stoll said:
The module docs of
Mathlib.Topology.Algebra.InfiniteSum.NatInt
should be adapted to mention products as well :smile:
Mitchell Lee (Apr 08 2024 at 19:26):
Michael Stoll said:
I will need something along the lines of "
f : ℕ → R
(with, say,[NormedCommRing R] [CompleteSpace R]
) is multipliable iff n = 1 + g n
for alln
and(‖g ·‖)
is summable". Do we have this somewhere?
We don't have it yet. I think we should actually have this definition somewhere: f
is absolutely multipliable if ‖f · - 1‖
is summable. Then we should prove that in a complete normed ring, absolutely multipliable implies multipliable.
Mitchell Lee (Apr 08 2024 at 19:43):
Then we would have two notions of product convergence: one which is very permissive, and one which is better behaved with respect to removing or adding terms and better matches the definition we saw in that textbook.
Michael Stoll (Apr 10 2024 at 20:59):
Michael Stoll said:
Mitchell Lee said:
Arbitrarily indexed products are on master now. I appreciate Yaël Dillies and Sébastien Gouëzel so much for helping with this. They caught a lot of my mistakes.
There are a few directions that are now opened up.
- (...)
- Mathlib/NumberTheory/EulerProduct/Basic.lean uses an ad-hoc implementation of infinite products. More specifically, it takes a partial product over all primes below
N
and then takes the limit asN
goes to infinity. I think that by using the new implementation of infinite products, these results in this file can be strengthened (to prove unconditional convergence of the Euler product, rather than just conditional convergence) and made easier to use.- (...)
This is on my to-do list.
#12055 is a first step, which should make it easy to talk about convergence in the sense of tprod
(we consider sets of natural numbers with prime factors in any given finite set, not necessarily all primes below some bound).
Michael Stoll (Apr 15 2024 at 18:51):
#12161 deals with the TODOs in Mathlib/NumberTheory/EulerProduct/Basic.lean.
Last updated: May 02 2025 at 03:31 UTC