Skip to content

[Merged by Bors] - feat: e-seminormed monoid#27385

Closed
grunweg wants to merge 31 commits intoleanprover-community:masterfrom
grunweg:enorm-pseudo
Closed

[Merged by Bors] - feat: e-seminormed monoid#27385
grunweg wants to merge 31 commits intoleanprover-community:masterfrom
grunweg:enorm-pseudo

Conversation

@grunweg
Copy link
Copy Markdown
Contributor

@grunweg grunweg commented Jul 23, 2025

Most lemmas about these do not require the enorm to be positive definite (i.e., work fine if a nontrivial element has zero enorm), or can be rephrased easily. A handful of lemmas do require this condition.
Add a new class ESeminormed(Add)(Comm)Monoid, which only asks that zero have enorm,
and generalise most lemmas to this class.

The motivating example behind this is eLpNorm, which is an enormed commutative (additive) monoid --- when we drop the definiteness requirement. This will (hopefully) allow unifying many lemma about eLpNorm with their more general enorm variants.


Open in Gitpod

@grunweg grunweg added WIP Work in progress carleson part of the ongoing formalization of Carleson's theorem labels Jul 23, 2025
@github-actions github-actions bot added the t-analysis Analysis (normed *, calculus) label Jul 23, 2025
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 23, 2025

PR summary ed5dc595cc

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ ESeminormedAddCommMonoid
+ ESeminormedAddMonoid
+ ESeminormedCommMonoid
+ ESeminormedMonoid

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

@grunweg grunweg changed the title Start feat: weaken definiteness requirement for ENormed(Add)(Comm)Monoids Jul 24, 2025
@grunweg grunweg removed the WIP Work in progress label Jul 24, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jul 24, 2025

One proof in InjectiveSeminorm.lean needed a fix to not time out: otherwise, the proof would fail with errors like

type mismatch
  MonoidHom.map_pow ?m.905023 ?m.905024 ?m.905025
has type
  ?m.905023 (?m.905024 ^ ?m.905025) = ?m.905023 ?m.905024 ^ ?m.905025 : Prop
but is expected to have type
  mapL (f ^ n) = mapL f ^ n : Prop

Filling in the underscores for f and n makes things work again.
In local testing, adding by apply in front makes it slightly faster with the placeholders filled it (but that's hard to say since wall times are noisy and incremental profiling). Putting by apply with the underscores still fails, but much faster.
Using set_option profiler true in in front of the declaration shows that attribute application is really slow. (22s when failing in term mode, about 4-5s in tactic mode; about 2-3 seconds on my computer when filling in the placeholders.)

I am not sure why this is.

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jul 24, 2025

In any case, hopefully everything works now.

@sgouezel
Copy link
Copy Markdown
Contributor

The terminology for addcommgroups is SeminormedAddCommGroup and NormedAddCommGroup. Would it make sense to follow a parallel convention here?

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Jul 29, 2025

Good question. I'm not sure that convention is helpful, though, because the various enorm classes are not in perfect analogy to normed ones.
The ENorm class (which is the weakest typeclass of all) imposes no assumption on the enorm at all; ContinuousENorm (the next weakest class) only asks for the enorm to be continuous.
If I wanted to follow the new convention, one should also rename

  • ENorm to (e.g.) ESeminorm --- which is confusing given that no conditions are imposed on the enorm,
  • ContinuousENorm to e.g. ContinuousESeminorm (which only asks for continuity of the enorm, same issue).

@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Aug 11, 2025

Would you like to take a look, Yael? You reviewed more enorm PRs in the past than Heather did.
(Of course, I won't mind a review from Heather either - nor anybody else for that matter.)

@grunweg grunweg removed the awaiting-author A reviewer has asked the author a question or requested changes. label Aug 12, 2025
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Aug 12, 2025

Ready for review again. , assuming CI passes. it does!

@github-actions github-actions bot removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Aug 12, 2025
Copy link
Copy Markdown
Contributor

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

Thanks! 🚀

maintainer merge

@github-actions
Copy link
Copy Markdown

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

@ghost ghost added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Aug 12, 2025
@mathlib4-merge-conflict-bot
Copy link
Copy Markdown
Collaborator

This pull request has conflicts, please merge master and resolve them.

@mathlib4-merge-conflict-bot mathlib4-merge-conflict-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 Aug 13, 2025
@grunweg grunweg added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. and removed merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) labels Aug 14, 2025
@grunweg grunweg removed the awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. label Aug 14, 2025
Copy link
Copy Markdown
Contributor

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

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

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 16, 2025

✌️ grunweg can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@ghost ghost added delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Aug 16, 2025
Co-authored-by: Sebastien Gouezel <sebastien.gouezel@univ-rennes1.fr>
@grunweg
Copy link
Copy Markdown
Contributor Author

grunweg commented Aug 16, 2025

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Aug 16, 2025
Most lemmas about these do not require the enorm to be positive definite (i.e., work fine if a nontrivial element has zero enorm), or can be rephrased easily. A handful of lemmas do require this condition.
Add a new class `ESeminormed(Add)(Comm)Monoid`, which only asks that zero have enorm,
and generalise most lemmas to this class.

The motivating example behind this is `eLpNorm`, which is an enormed commutative (additive) monoid
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Aug 16, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat: e-seminormed monoid [Merged by Bors] - feat: e-seminormed monoid Aug 16, 2025
@mathlib-bors mathlib-bors bot closed this Aug 16, 2025
@grunweg grunweg deleted the enorm-pseudo branch August 16, 2025 18:06
Julian added a commit to Aaron1011/mathlib4 that referenced this pull request Aug 16, 2025
* origin/master: (508 commits)
  feat(Logic/Basic): forall_and_index (leanprover-community#27737)
  feat(Algebra/intNorm): `x` divides `intNorm x` (leanprover-community#28021)
  feat(RingTheory/MvPolynomial/MonomialOrder): some lemmas about degree (leanprover-community#26000)
  chore: more elementary Motzkin polynomial proof (leanprover-community#28482)
  feat: e-seminormed monoid (leanprover-community#27385)
  feat(RingTheory): ` (⊥ : Ideal R) ^ n = ⊥` (leanprover-community#28171)
  fix(LinearAlgebra/Dimension/ErdosKaplansky): authorship (leanprover-community#28513)
  chore: golf entire `X_pow_eq_monomial` (leanprover-community#28504)
  feat(RingTheory): invertible modules and Picard group (leanprover-community#25337)
  chore: use delta `deriving` for leanprover-community#380 (leanprover-community#28498)
  feat: add bilinear maps for vector/matrix products (leanprover-community#28130)
  feat(Counterexamples): topologists' sine curve (leanprover-community#25833)
  feat(Analysis/Convex): doubly stochastic matrices have operator norm at most one (leanprover-community#28453)
  chore(Topology/Compactification): deprecate duplicate `ultrafilter_pure_injective` (leanprover-community#28436)
  feat: add `@[simp]` to `Multiset.cons_le_cons` and `Finset.insert_subset_insert` (leanprover-community#28285)
  feat: make `ring` work for semifields (leanprover-community#28494)
  feat: filtering lists and bounded quantifiers are primitive recursive (leanprover-community#26295)
  chore(Analysis/Analytic): split `Analytic.Basic` (leanprover-community#26270)
  refactor: tidy `mulVec` and `vecMul` lemmas about `•` (leanprover-community#28450)
  feat(Order/WellFounded): Acc and infinite descending chain (leanprover-community#28120)
  feat(NumberTheory/Padics): {Int,Rat}.padicValuation (leanprover-community#27667)
  chore(*): address a few timeout-related porting notes (leanprover-community#28483)
  feat(Algebra): toAlgebra_algebraMap (leanprover-community#28238)
  feat(Shrink): `IsCancelMul` instance (leanprover-community#28407)
  chore(Geometry): golf entire `chart_eq'` and `orthogonalProjection_orthogonalProjection` (leanprover-community#28485)
  feat: shifted geometric series and a `ProbabilityMeasure` version of `measure_iUnion_le` (leanprover-community#28087)
  chore(LinearAlgebra/PiTensorProduct): `rw` away use of `erw` in `lifts_zero` (leanprover-community#27554)
  feat(RingTheory): faithfully flat ring maps (leanprover-community#24530)
  chore(Geometry/RingedSpace): remove use of `erw` in `stalkSpecializes_stalkMap` (leanprover-community#27656)
  chore: add the Brownian motion project to downstream_repos.yml (leanprover-community#28459)
  feat(CategoryTheory/Sites/SheafOfTypes): composition of a sheaf with uliftFunctor is still a sheaf (leanprover-community#27816)
  feat(Valuation/DiscreteValuationRel): val relations with compatible valuations to Zm0 are IsDiscrete (leanprover-community#27213)
  chore(*): process a bunch of `aesop`-related porting notes (leanprover-community#28402)
  feat(CategoryTheory): abstract argument for the stability under transfinite compositions (leanprover-community#26030)
  chore: bump toolchain to v4.23.0-rc2 (leanprover-community#28454)
  chore(FieldTheory/Finite): fermat's little theorem in Nat form (leanprover-community#27962)
  feat(Combinatorics/SimpleGraph/Paths): add theorem `SimpleGraph.Walk.IsPath.concat` (leanprover-community#27582)
  feat(Slope): slope_pos_iff_of_le and related lemmas (leanprover-community#28039)
  feat: tactic analysis framework (leanprover-community#26683)
  chore(Data/EReal): deprecate `add_pos_of_nonneg_of_pos` and `add_ne_top_iff_of_ne_bot` (duplicates) (leanprover-community#28424)
  feat(MathlibTest/FieldSimp): add a few more tests (leanprover-community#28413)
  chore(RingTheory/HahnSeries): deprecate duplicate `orderTop_add_orderTop_le_orderTop_mul` (leanprover-community#28231)
  chore(AlgebraicGeometry/IdealSheaf): deprecate duplicate `AlgebraicGeometry.Scheme.IdealSheafData.Scheme.zeroLocus_radical` (leanprover-community#28202)
  feat(Algebra/Order): ArchimedeanClass ball (leanprover-community#27885)
  chore(Geometry/RingedSpace): remove use of `erw` in `isUnit_of_isUnit_germ` (leanprover-community#27660)
  feat(SkewMonoidAlgebra): coeff_mul lemmas (leanprover-community#27255)
  chore(LinearAlgebra): golf entire `isUnit_det` (leanprover-community#28438)
  chore(FieldTheory/IntermediateField): golf entire `coe_sum` and `coe_prod` (leanprover-community#28431)
  feat: separate linter error message for empty doc-strings (leanprover-community#27895)
  feat(RingTheory/PowerSeries/Binomial): add basic lemmas, golf (leanprover-community#27497)
  ...
Paul-Lez pushed a commit to Paul-Lez/mathlib4 that referenced this pull request Aug 23, 2025
Most lemmas about these do not require the enorm to be positive definite (i.e., work fine if a nontrivial element has zero enorm), or can be rephrased easily. A handful of lemmas do require this condition.
Add a new class `ESeminormed(Add)(Comm)Monoid`, which only asks that zero have enorm,
and generalise most lemmas to this class.

The motivating example behind this is `eLpNorm`, which is an enormed commutative (additive) monoid
pechersky pushed a commit to pechersky/mathlib4 that referenced this pull request Aug 25, 2025
Most lemmas about these do not require the enorm to be positive definite (i.e., work fine if a nontrivial element has zero enorm), or can be rephrased easily. A handful of lemmas do require this condition.
Add a new class `ESeminormed(Add)(Comm)Monoid`, which only asks that zero have enorm,
and generalise most lemmas to this class.

The motivating example behind this is `eLpNorm`, which is an enormed commutative (additive) monoid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

carleson part of the ongoing formalization of Carleson's theorem delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants