Skip to content

Conversation

@eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented Jan 5, 2024

While many of the lemmas cease to apply,
the definitions of sequences and their sums are still perfectly well-behaved in additive monoids; no negation is needed.


In future, we could use this to generalize NormedSpace.exp such that it works with NNReal, but unless leanprover-community/mathlib3#16554 or #11203 lands and provides a DivisionSemiring.nnqsmul field, that would conflict with #8370.

EDIT(Yaël): #11203 landed.

Open in Gitpod

@eric-wieser eric-wieser added awaiting-review awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. t-analysis Analysis (normed *, calculus) labels Jan 5, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 6, 2024
@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 2, 2024
@eric-wieser
Copy link
Member Author

!bench

@github-actions github-actions bot removed the awaiting-CI This PR doesn't pass CI yet. This label is automatically removed once it does. label Mar 2, 2024
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit ee16fce.
There were significant changes against commit 1aabff1:

  Benchmark                                            Metric         Change
  ==========================================================================
- ~Mathlib.Analysis.Analytic.Basic                     instructions    12.0%
- ~Mathlib.Analysis.Analytic.CPolynomial               instructions    13.2%
- ~Mathlib.Analysis.Calculus.ContDiff.Basic            instructions     6.5%
- ~Mathlib.Analysis.Calculus.ContDiff.Defs             instructions    10.3%
+ ~Mathlib.Analysis.Calculus.FormalMultilinearSeries   instructions   -14.6%

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Mar 4, 2024
…ditive monoids

While many of the lemmas cease to apply,
the definitions of sequences and their sums are still perfectly well-behaved in additive monoids;
no negation is needed.

We could use this to generalize `NormedSpace.exp` such that it works with `NNReal`,
but unless leanprover-community/mathlib3#16554 or similar lands and provides a `DivisionSemiring.nnqsmul` field,
that would conflict with #8370.
@YaelDillies YaelDillies force-pushed the eric-wieser/exp-ennreal branch from ee16fce to 2fa0dbc Compare February 18, 2025 12:43
@github-actions github-actions bot removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Feb 18, 2025
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

I rebased to get rid of a conflict. Looks good to me.

maintainer merge

@github-actions
Copy link

github-actions bot commented Feb 18, 2025

PR summary 1b91388834

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ instance : AddCommMonoid (FormalMultilinearSeries 𝕜 E F)

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

@github-actions
Copy link

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Feb 18, 2025
@fpvandoorn
Copy link
Member

!bench

Co-authored-by: damiano <adomani@gmail.com>
Copy link
Collaborator

@adomani adomani left a comment

Choose a reason for hiding this comment

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

Looks like I was not completely thorough re-generalising! 😄

Co-authored-by: damiano <adomani@gmail.com>
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit 2fa0dbc.
There were significant changes against commit 971ebb0:

  Benchmark                                           Metric         Change
  =========================================================================
- ~Mathlib.Analysis.Analytic.Basic                    instructions    17.4%
- ~Mathlib.Analysis.Analytic.CPolynomial              instructions    17.9%
- ~Mathlib.Analysis.Analytic.Constructions            instructions    15.6%
- ~Mathlib.Analysis.Calculus.ContDiff.Basic           instructions     8.0%
- ~Mathlib.Analysis.Calculus.ContDiff.Defs            instructions    17.2%
- ~Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries   instructions     9.0%
- ~Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno      instructions     8.6%
- ~Mathlib.Analysis.Calculus.FDeriv.Analytic          instructions     4.9%

@github-actions
Copy link

File Instructions %
build +248.504⬝10⁹ (+0.16%)
Mathlib.Analysis.Analytic.Basic +43.71⬝10⁹ (+17.38%)
Mathlib.Analysis.Calculus.ContDiff.Basic +35.7⬝10⁹ (+8.04%)
Mathlib.Analysis.Calculus.ContDiff.Defs +32.2⬝10⁹ (+17.16%)
Mathlib.Analysis.Analytic.CPolynomial +23.684⬝10⁹ (+17.85%)
2 files, Instructions +22.0⬝10⁹
File Instructions %
Mathlib.Analysis.Analytic.Constructions +22.827⬝10⁹ (+15.63%)
Mathlib.Analysis.Calculus.ContDiff.FTaylorSeries +22.160⬝10⁹ (+8.99%)
File Instructions %
Mathlib.Analysis.Calculus.ContDiff.FaaDiBruno +17.855⬝10⁹ (+8.58%)
Mathlib.Analysis.Calculus.FDeriv.Analytic +12.591⬝10⁹ (+4.85%)
Mathlib.Analysis.Analytic.Composition +9.685⬝10⁹ (+7.07%)
Mathlib.Analysis.Analytic.ChangeOrigin +8.288⬝10⁹ (+8.94%)
Mathlib.Analysis.Analytic.IteratedFDeriv +6.618⬝10⁹ (+10.22%)
2 files, Instructions +5.0⬝10⁹
File Instructions %
Mathlib.Analysis.Analytic.Inverse +5.666⬝10⁹ (+4.35%)
Mathlib.Analysis.Analytic.IsolatedZeros +5.481⬝10⁹ (+9.29%)
2 files, Instructions +1.0⬝10⁹
File Instructions %
Mathlib.Analysis.Analytic.Uniqueness +1.395⬝10⁹ (+4.51%)
Mathlib.Analysis.Analytic.OfScalars +1.164⬝10⁹ (+2.34%)
File Instructions %
Mathlib.Analysis.Calculus.FormalMultilinearSeries -2.946⬝10⁹ (-3.95%)
CI run

@adomani
Copy link
Collaborator

adomani commented Feb 18, 2025

I like where this PR is going: I would like not to have to worry about the slow-downs!

Co-authored-by: damiano <adomani@gmail.com>
@fpvandoorn
Copy link
Member

I also like this PR. I wrote a quick message here to check that we should merge this despite the performance regression.

@adomani
Copy link
Collaborator

adomani commented Feb 18, 2025

Btw, the sub_apply lemma mentioned in the PR description is not part of this PR (anymore?).

Copy link
Collaborator

@j-loreaux j-loreaux left a comment

Choose a reason for hiding this comment

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

I'm in favor of this despite the slowdowns.

Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Me too

@fpvandoorn
Copy link
Member

bors merge

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot 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 Feb 19, 2025
mathlib-bors bot pushed a commit that referenced this pull request Feb 19, 2025
…ditive monoids (#9467)

While many of the lemmas cease to apply,
the definitions of sequences and their sums are still perfectly well-behaved in additive monoids; no negation is needed.



Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 19, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title refactor(Analysis/Calculus/FormalMultilinearSeries): generalize to additive monoids [Merged by Bors] - refactor(Analysis/Calculus/FormalMultilinearSeries): generalize to additive monoids Feb 19, 2025
@mathlib-bors mathlib-bors bot closed this Feb 19, 2025
@mathlib-bors mathlib-bors bot deleted the eric-wieser/exp-ennreal branch February 19, 2025 12:08
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-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants