Skip to content

[Merged by Bors] - feat(Data/Real/IsNonarchimedean): add lemmas#16767

Closed
mariainesdff wants to merge 27 commits intomasterfrom
mariainesdff/isNonarchimedean
Closed

[Merged by Bors] - feat(Data/Real/IsNonarchimedean): add lemmas#16767
mariainesdff wants to merge 27 commits intomasterfrom
mariainesdff/isNonarchimedean

Conversation

@mariainesdff
Copy link
Copy Markdown
Contributor

@mariainesdff mariainesdff commented Sep 13, 2024

Used in #15373.


Open in Gitpod

@mariainesdff mariainesdff added awaiting-CI This PR does not pass CI yet. This label is automatically removed once it does. t-number-theory Number theory (also use t-algebra or t-analysis to specialize) t-analysis Analysis (normed *, calculus) labels Sep 13, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Sep 13, 2024

PR summary 94efc3eb2a

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.Algebra.Order.Hom.Normed 947
Mathlib.Algebra.Order.Hom.Ultra 949
Mathlib.Data.Real.IsNonarchimedean 1212

Declarations diff

+ AddGroupSeminormClass.isUltrametricDist
+ GroupNormClass.toNormedCommGroup
+ GroupNormClass.toNormedCommGroup_norm_eq
+ GroupNormClass.toNormedGroup
+ GroupNormClass.toNormedGroup_norm_eq
+ GroupSeminormClass.toSeminormedCommGroup
+ GroupSeminormClass.toSeminormedCommGroup_norm_eq
+ GroupSeminormClass.toSeminormedGroup
+ GroupSeminormClass.toSeminormedGroup_norm_eq
+ add_eq_max_of_ne
+ add_le
+ add_pow_le
+ exists_norm_finset_prod_le
+ exists_norm_finset_prod_le_of_nonempty
+ exists_norm_multiset_prod_le
+ finset_image_add
+ finset_image_add_of_nonempty
+ multiset_image_add
+ multiset_image_add_of_nonempty
+ nmul_le
+ nsmul_le

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.

@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 Sep 13, 2024
@Ruben-VandeVelde Ruben-VandeVelde added the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 13, 2024
@mariainesdff mariainesdff removed the awaiting-author A reviewer has asked the author a question or requested changes. label Sep 16, 2024
Copy link
Copy Markdown
Contributor

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

This looks fine to me.

@jcommelin
Copy link
Copy Markdown
Member

Thanks 🎉

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Oct 2, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 2, 2024
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 2, 2024

Build failed (retrying...):

mathlib-bors bot pushed a commit that referenced this pull request Oct 2, 2024
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 2, 2024

Build failed:

Copy link
Copy Markdown
Contributor

@faenuccio faenuccio left a comment

Choose a reason for hiding this comment

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

I left some minor comments.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 4, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 7, 2024
@faenuccio
Copy link
Copy Markdown
Contributor

Thanks! @jcommelin I think this is ready to go again, I think you can bors-ify it again.

@loefflerd
Copy link
Copy Markdown
Contributor

loefflerd commented Oct 8, 2024

I'm afraid that there has been some duplication going on here: many of the lemmas in this PR are essentially identical to lemmas that have been independently added by @pechersky in #14768, see Mathlib.Analysis.Normed.Group.Ultra.

Yakov's spellings are slightly different, because the assumptions are given as [Seminormed{Add}Group X] [IsUltrametricDist X] rather than [IsNonarchimedean (norm : X \to \RR)]. I think we should try to standardize on one spelling rather than doing everything twice.

@loefflerd
Copy link
Copy Markdown
Contributor

Muddying the waters further, we also seem to have NonarchimedeanHomClass and various variants of it. @mariainesdff, since you seem to be the author of those classes and also of this PR, can you comment on how they relate to each other?

@mariainesdff
Copy link
Copy Markdown
Contributor Author

I'm afraid that there has been some duplication going on here: many of the lemmas in this PR are essentially identical to lemmas that have been independently added by @pechersky in #14768, see Mathlib.Analysis.Normed.Group.Ultra.

Yakov's spellings are slightly different, because the assumptions are given as [Seminormed{Add}Group X] [IsUltrametricDist X] rather than [IsNonarchimedean (norm : X \to \RR)]. I think we should try to standardize on one spelling rather than doing everything twice.

IsUltrametricDist is not enough for my purposes since it assumes that you have some canonical distance function (which in lemmas like IsUltrametricDist.norm_add_le_max would be the one induced by a bundled SeminormedAddGroup structure on your type).

However, I want to be able to make the statement that a (semi)norm is nonarchimedean, since I will be using this in situations in which I need to consider more than one (semi)norm on the same additive group or ring.

It is likely that some of the proofs in Mathlib.Analysis.Normed.Group.Ultra can be refactored to use the proofs from this file, but please consider this being postponed to another PR, so that I can continue PRing the construction of C_p.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 18, 2024
@leanprover-community-bot-assistant leanprover-community-bot-assistant removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Oct 19, 2024
@loefflerd
Copy link
Copy Markdown
Contributor

I've pushed some changes as follows.

  • I removed 3 of the 4 variations of the lemma constructing ultrametric normed groups from an unbundled norm-like function; everything seems to work fine with just the one, most general version.
  • I added new lemmas in Analysis/Normed/Group/Ultra for the results about finset / multiset products, copying Maria's proofs pretty much verbatim, and replaced the proofs in Maria's file with references to those results.

I'm going to retract my comment about the normed ring lemma, because it's probably not worth building the infrastructure of conversions between bundled / unbundled ring norms just for this one (very specific) lemma.

There's still room for some cleanup in Analysis/Normed/Group/Ultra, to impose a bit more uniformity between related lemmas (and fill in the missing cases e.g. noncommutative List products); but I know Maria has a lot of stuff queued up behind this, so it's not fair to keep her waiting. I vote we go ahead and merge this PR now.

Maria: are you happy with this plan? If so, please remove the "awaiting author" tag, and I'll put it back on the maintainer-merge queue.

@mariainesdff mariainesdff removed the awaiting-author A reviewer has asked the author a question or requested changes. label Oct 21, 2024
@mariainesdff
Copy link
Copy Markdown
Contributor Author

Maria: are you happy with this plan? If so, please remove the "awaiting author" tag, and I'll put it back on the maintainer-merge queue.

Sounds good; thank you for your commits. I have removed the tag.

@loefflerd
Copy link
Copy Markdown
Contributor

maintainer merge

@github-actions
Copy link
Copy Markdown

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

@github-actions github-actions bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Oct 21, 2024
@riccardobrasca
Copy link
Copy Markdown
Member

@pechersky is this good for you?

@pechersky
Copy link
Copy Markdown
Contributor

Agreed entirely with David Loeffler. LGTM.

@riccardobrasca
Copy link
Copy Markdown
Member

Thanks!

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Oct 21, 2024
mathlib-bors bot pushed a commit that referenced this pull request Oct 21, 2024
Used in #15373.



Co-authored-by: Yakov Pechersky <ffxen158@gmail.com>
Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com>
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 21, 2024

Build failed:

@riccardobrasca
Copy link
Copy Markdown
Member

Can you please merge master and fix the error?

bors d+

@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 21, 2024

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

@github-actions github-actions bot added the delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). label Oct 21, 2024
@riccardobrasca
Copy link
Copy Markdown
Member

Thanks!

bors merge

mathlib-bors bot pushed a commit that referenced this pull request Oct 21, 2024
Used in #15373.



Co-authored-by: Yakov Pechersky <ffxen158@gmail.com>
Co-authored-by: Yakov Pechersky <pechersky@users.noreply.github.com>
Co-authored-by: David Loeffler <d.loeffler.01@cantab.net>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Oct 21, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Data/Real/IsNonarchimedean): add lemmas [Merged by Bors] - feat(Data/Real/IsNonarchimedean): add lemmas Oct 21, 2024
@mathlib-bors mathlib-bors bot closed this Oct 21, 2024
@mathlib-bors mathlib-bors bot deleted the mariainesdff/isNonarchimedean branch October 21, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

delegated This pull request has been delegated to the PR author (or occasionally another non-maintainer). maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus) t-number-theory Number theory (also use t-algebra or t-analysis to specialize)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants