Skip to content

[Merged by Bors] - feat(RingTheory/AdicCompletion): comparison with tensor product#14358

Closed
chrisflav wants to merge 31 commits intomasterfrom
jlcm/adic-tensorproduct.2
Closed

[Merged by Bors] - feat(RingTheory/AdicCompletion): comparison with tensor product#14358
chrisflav wants to merge 31 commits intomasterfrom
jlcm/adic-tensorproduct.2

Conversation

@chrisflav
Copy link
Copy Markdown
Member

@chrisflav chrisflav commented Jul 2, 2024

We construct the natural map AdicCompletion I R ⊗[R] M →ₗ[AdicCompletion I R] AdicCompletion I M for any
R-module M and ideal I and show that it is an isomorphism for M = R^n and surjective if M is a finite R-module.

Co-authored-by: Judith Ludwig ludwig@mathi.uni-heidelberg.de


For context: In the next PR we conclude from this one that this above map is an isomorphism for R Noetherian and M finite and deduce from this that AdicCompletion I R is a flat R-algebra if R is Noetherian.

Open in Gitpod

@chrisflav chrisflav added awaiting-review t-algebra Algebra (groups, rings, fields, etc) labels Jul 2, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jul 2, 2024

PR summary e87de9ea0e

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference
Mathlib.LinearAlgebra.TensorProduct.Pi 752
Mathlib.RingTheory.AdicCompletion.AsTensorProduct 1170

Declarations diff

+ Pi.single_apply_smul
+ ofTensorProduct
+ ofTensorProductBil
+ ofTensorProductEquivOfPiFintype
+ ofTensorProduct_bijective_of_pi_of_fintype
+ ofTensorProduct_naturality
+ ofTensorProduct_surjective_of_fg
+ ofTensorProduct_tmul
+ piScalarRight
+ piScalarRightHom
+ piScalarRightHom_tmul
+ piScalarRightInv
+ piScalarRight_apply
+ piScalarRight_symm_single

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>

@riccardobrasca
Copy link
Copy Markdown
Member

I have the impression the file AsTensorProduct is quite slow.

!bench

@chrisflav
Copy link
Copy Markdown
Member Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 27167c3.
There were no significant changes against commit aa30cf9.

@chrisflav
Copy link
Copy Markdown
Member Author

Benchmark seems to be okay, but I agree the file is slow (and the last PR in this series will make it slower still). I think it's the module instance of AdicCompletion I M over AdicCompletion I R that is slow, this was already visible in the algebra file and I think it's because of the many quotient rings involved. Do you think it is okay for now @riccardobrasca?
(In the future, might it help to introduce IsAdicCompletion I M which eliminates the explicit quotient construction?)

@riccardobrasca
Copy link
Copy Markdown
Member

Benchmark seems to be okay, but I agree the file is slow (and the last PR in this series will make it slower still). I think it's the module instance of AdicCompletion I M over AdicCompletion I R that is slow, this was already visible in the algebra file and I think it's because of the many quotient rings involved. Do you think it is okay for now @riccardobrasca? (In the future, might it help to introduce IsAdicCompletion I M which eliminates the explicit quotient construction?)

Can you open a discussion on Zulip about the slowness? We surely want IsAdicCompletion, but also AdicCompletion (to complete a given ring), and maybe it is worth to start investigating now.

@chrisflav
Copy link
Copy Markdown
Member Author

Benchmark seems to be okay, but I agree the file is slow (and the last PR in this series will make it slower still). I think it's the module instance of AdicCompletion I M over AdicCompletion I R that is slow, this was already visible in the algebra file and I think it's because of the many quotient rings involved. Do you think it is okay for now @riccardobrasca? (In the future, might it help to introduce IsAdicCompletion I M which eliminates the explicit quotient construction?)

Can you open a discussion on Zulip about the slowness? We surely want IsAdicCompletion, but also AdicCompletion (to complete a given ring), and maybe it is worth to start investigating now.

Okay, I will do that after the weekend, since I will be away from a computer until Monday.

@ghost ghost added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 8, 2024
@chrisflav
Copy link
Copy Markdown
Member Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit b134ed1.
There were significant changes against commit aa30cf9:

  Benchmark                                          Metric         Change
  ========================================================================
- ~Mathlib.RingTheory.AdicCompletion.Algebra         instructions    14.0%
- ~Mathlib.RingTheory.AdicCompletion.Basic           instructions    29.6%
+ ~Mathlib.RingTheory.AdicCompletion.Functoriality   instructions   -61.6%

@chrisflav
Copy link
Copy Markdown
Member Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit 00f96b9.
There were significant changes against commit 86414a8:

  Benchmark                                          Metric         Change
  ========================================================================
- ~Mathlib.RingTheory.AdicCompletion.Algebra         instructions    20.8%
- ~Mathlib.RingTheory.AdicCompletion.Basic           instructions    47.7%
+ ~Mathlib.RingTheory.AdicCompletion.Functoriality   instructions   -60.2%

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit abf5c56.
There were significant changes against commit 86414a8:

  Benchmark                                          Metric         Change
  ========================================================================
- ~Mathlib.RingTheory.AdicCompletion.Algebra         instructions    30.9%
- ~Mathlib.RingTheory.AdicCompletion.Basic           instructions    36.4%
+ ~Mathlib.RingTheory.AdicCompletion.Functoriality   instructions   -61.7%

@chrisflav
Copy link
Copy Markdown
Member Author

!bench

@leanprover-bot
Copy link
Copy Markdown
Collaborator

Here are the benchmark results for commit d63433d.
There were significant changes against commit 86414a8:

  Benchmark                                          Metric         Change
  ========================================================================
+ ~Mathlib.RingTheory.AdicCompletion.Algebra         instructions   -15.3%
+ ~Mathlib.RingTheory.AdicCompletion.Functoriality   instructions   -64.1%

@ghost ghost removed the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Jul 11, 2024
@ghost
Copy link
Copy Markdown

ghost commented Jul 11, 2024

This PR/issue depends on:

@ghost ghost added the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 11, 2024
@ghost ghost removed the merge-conflict The PR has a merge conflict with master, and needs manual merging. (this label is managed by a bot) label Jul 11, 2024
@chrisflav
Copy link
Copy Markdown
Member Author

@riccardobrasca: The speed-up PR #14534 has been merged now (quick summary: currently no big speed-up, but when #11521 lands, this will also make the AsTensorProduct file fast). Anything else I should address for this PR?

@riccardobrasca
Copy link
Copy Markdown
Member

Thanks for having investigated this!

bors merge

@github-actions github-actions bot added the ready-to-merge This PR has been sent to bors. label Jul 12, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jul 12, 2024
We construct the natural map `AdicCompletion I R ⊗[R] M →ₗ[AdicCompletion I R] AdicCompletion I M` for any
`R`-module `M` and ideal `I` and show that it is an isomorphism for `M = R^n` and surjective if `M` is a finite `R`-module.

Co-authored-by: Judith Ludwig <ludwig@mathi.uni-heidelberg.de>
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jul 12, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(RingTheory/AdicCompletion): comparison with tensor product [Merged by Bors] - feat(RingTheory/AdicCompletion): comparison with tensor product Jul 12, 2024
@mathlib-bors mathlib-bors bot closed this Jul 12, 2024
@mathlib-bors mathlib-bors bot deleted the jlcm/adic-tensorproduct.2 branch July 12, 2024 10:19
@chrisflav
Copy link
Copy Markdown
Member Author

Thanks for the review!

@adomani adomani mentioned this pull request Aug 1, 2024
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-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants