Skip to content

[Merged by Bors] - feat(Topology/InfiniteSum): tprod_one_{add/sub}_ordered#30436

Closed
wwylele wants to merge 2 commits intoleanprover-community:masterfrom
wwylele:prod-one-sub
Closed

[Merged by Bors] - feat(Topology/InfiniteSum): tprod_one_{add/sub}_ordered#30436
wwylele wants to merge 2 commits intoleanprover-community:masterfrom
wwylele:prod-one-sub

Conversation

@wwylele
Copy link
Copy Markdown
Collaborator

@wwylele wwylele commented Oct 11, 2025

This extends the existing Finset.prod_one_sub_ordered to infinite sum/product, and also adds the more natural add version.

Together with some previous PRs about infinite sum/prod and powerseries, this is part of my effort of upstreaming useful stuff from https://github.com/wwylele/PentagonalNumberTheorem. It starts getting into niche lemma, so suggestions such that not wanting this in mathlib, or it should be stated in a different form, are all welcomed.


Open in Gitpod

@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 11, 2025

PR summary 412e7b8df3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ prod_one_add_ordered
+ tprod_one_add_ordered
+ tprod_one_sub_ordered

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@wwylele wwylele added the t-topology Topological spaces, uniform spaces, metric spaces, filters label Oct 18, 2025
Comment on lines +292 to +295
theorem tprod_one_add_ordererd [ContinuousAdd α]
(hsum : Summable fun i ↦ f i * ∏ j ∈ Iio i, (1 + f j))
(hprod : Multipliable (1 + f ·)) :
∏' i, (1 + f i) = 1 + ∑' i, f i * ∏ j ∈ Iio i, (1 + f j) := by
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recently there was a huge topological summation/product refactor, where we now add a filter to the inputs of every summartion/product.

Since this is about the ordered product, I would assume that we're concerned about conditional convergence (i.e. limit of partial products using Iic/Iio), so maybe we can use that? (It's called SummationFilter.conditional.)

And if you use that, then maybe you can look at the code above you and start with the corresponding analogue of hasProd_one_add_of_hasSum_prod above, but using the conditional filter, and then you should only require the hsum assumption and not hprod?

I tried to write some code myself and this was the result.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own usage, I am concerned about absolute convergence, but I can look into how I can generalize this to other summation filters

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, it took me a while to get back to this, but after trying for a while, I couldn't generalize this to more summation filters. I suspect this isn't correct for general (NeBot, LeAtTop) filters.

This is also very different from hasProd_one_add_of_hasSum_prod (see how the summation here has a prod inside!),. The summability can't translate.

I am honestly not very motivated to do the generalization. Perhaps, do you have a statement about general filter that you think is definitely true, so I focus on proving it without doubting its correctness?

@kckennylau kckennylau added the awaiting-author A reviewer has asked the author a question or requested changes. label Nov 21, 2025
@wwylele wwylele removed the awaiting-author A reviewer has asked the author a question or requested changes. label Dec 7, 2025
@grunweg
Copy link
Copy Markdown
Contributor

grunweg commented Dec 24, 2025

Thanks for the PR! This looks good to me, but I'd like to have another pair of eyes:
maintainer merge

@github-actions
Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by grunweg.

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Dec 24, 2025
@JovanGerb
Copy link
Copy Markdown
Contributor

Will you also add the dual version of the theorem? I.e. with the order relation i < j reversed?

@JovanGerb
Copy link
Copy Markdown
Contributor

I don't know how long it will take to tag all of the dependencies, but we will eventually use @[to_dual] to generate the dual version automatically. But it's not clear to me what the name of the dual version should be.

@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Dec 24, 2025

The dependencies to tag is fortunately only about 6 lemmas. I can do it but I'd like to do it in another PR, given the potential debate on the naming. I don't have good idea on the name either...

@JovanGerb
Copy link
Copy Markdown
Contributor

Hmm, I don't have a good idea for the lemma names either, though it would be nice to have a more descriptive lemma name, so that you can tell the direction based on the lemma name. Maybe something like prod_add_eq_sum_prod_lt...

Copy link
Copy Markdown
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 🎉

bors merge

Let's discuss dualizing and naming in the follow up PR.

@ghost ghost added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Dec 26, 2025
mathlib-bors bot pushed a commit that referenced this pull request Dec 26, 2025
This extends the existing `Finset.prod_one_sub_ordered` to infinite sum/product, and also adds the more natural `add` version.

Together with some previous PRs about infinite sum/prod and powerseries, this is part of my effort of upstreaming useful stuff from https://github.com/wwylele/PentagonalNumberTheorem. It starts getting into niche lemma, so suggestions such that not wanting this in mathlib, or it should be stated in a different form, are all welcomed.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 26, 2025

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Dec 26, 2025
This extends the existing `Finset.prod_one_sub_ordered` to infinite sum/product, and also adds the more natural `add` version.

Together with some previous PRs about infinite sum/prod and powerseries, this is part of my effort of upstreaming useful stuff from https://github.com/wwylele/PentagonalNumberTheorem. It starts getting into niche lemma, so suggestions such that not wanting this in mathlib, or it should be stated in a different form, are all welcomed.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Dec 26, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Topology/InfiniteSum): tprod_one_{add/sub}_ordered [Merged by Bors] - feat(Topology/InfiniteSum): tprod_one_{add/sub}_ordered Dec 26, 2025
@mathlib-bors mathlib-bors bot closed this Dec 26, 2025
@wwylele wwylele deleted the prod-one-sub branch December 26, 2025 19:02
@wwylele
Copy link
Copy Markdown
Collaborator Author

wwylele commented Dec 27, 2025

The dependencies to tag is fortunately only about 6 lemmas.

So it turned out I underestimated the amount of dependencies to tag. There is a whole chain of lemmas from Filter to tag. I am trying to work on it but it will probably take a while

kim-em pushed a commit to kim-em/mathlib4 that referenced this pull request Jan 6, 2026
…ommunity#30436)

This extends the existing `Finset.prod_one_sub_ordered` to infinite sum/product, and also adds the more natural `add` version.

Together with some previous PRs about infinite sum/prod and powerseries, this is part of my effort of upstreaming useful stuff from https://github.com/wwylele/PentagonalNumberTheorem. It starts getting into niche lemma, so suggestions such that not wanting this in mathlib, or it should be stated in a different form, are all welcomed.
goliath-klein pushed a commit to PrParadoxy/mathlib4 that referenced this pull request Jan 24, 2026
…ommunity#30436)

This extends the existing `Finset.prod_one_sub_ordered` to infinite sum/product, and also adds the more natural `add` version.

Together with some previous PRs about infinite sum/prod and powerseries, this is part of my effort of upstreaming useful stuff from https://github.com/wwylele/PentagonalNumberTheorem. It starts getting into niche lemma, so suggestions such that not wanting this in mathlib, or it should be stated in a different form, are all welcomed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR has been sent to bors. t-topology Topological spaces, uniform spaces, metric spaces, filters

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants