Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - feat(RingTheory/Morita/Basic): Define Morita Equivalence #20640

Closed
wants to merge 42 commits into from

Conversation

Whysoserioushah
Copy link
Collaborator

@Whysoserioushah Whysoserioushah commented Jan 10, 2025

Co-authored by: @jjaassoonn


Open in Gitpod

Copy link

github-actions bot commented Jan 10, 2025

PR summary 84846a1273

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Category.ModuleCat.ChangeOfRings 1189 1192 +3 (+0.25%)
Import changes for all files
Files Import difference
6 files Mathlib.Algebra.Category.ModuleCat.Differentials.Basic Mathlib.Algebra.Category.ModuleCat.Differentials.Presheaf Mathlib.Algebra.Category.ModuleCat.EnoughInjectives Mathlib.AlgebraicGeometry.Modules.Presheaf Mathlib.AlgebraicGeometry.Modules.Sheaf Mathlib.AlgebraicGeometry.Modules.Tilde
2
20 files Mathlib.Algebra.Category.ModuleCat.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Presheaf.Abelian Mathlib.Algebra.Category.ModuleCat.Presheaf.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Presheaf.Colimits Mathlib.Algebra.Category.ModuleCat.Presheaf.EpiMono Mathlib.Algebra.Category.ModuleCat.Presheaf.Limits Mathlib.Algebra.Category.ModuleCat.Presheaf.Pushforward Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafification Mathlib.Algebra.Category.ModuleCat.Presheaf.Sheafify Mathlib.Algebra.Category.ModuleCat.Presheaf Mathlib.Algebra.Category.ModuleCat.Pseudofunctor Mathlib.Algebra.Category.ModuleCat.Sheaf.Abelian Mathlib.Algebra.Category.ModuleCat.Sheaf.ChangeOfRings Mathlib.Algebra.Category.ModuleCat.Sheaf.Colimits Mathlib.Algebra.Category.ModuleCat.Sheaf.Free Mathlib.Algebra.Category.ModuleCat.Sheaf.Generators Mathlib.Algebra.Category.ModuleCat.Sheaf.Limits Mathlib.Algebra.Category.ModuleCat.Sheaf.PushforwardContinuous Mathlib.Algebra.Category.ModuleCat.Sheaf.Quasicoherent Mathlib.Algebra.Category.ModuleCat.Sheaf
3
Mathlib.RingTheory.Morita.Basic (new file) 1194

Declarations diff

+ IsMoritaEquivalent
+ MoritaEquivalence
+ instance : Linear S (ModuleCat.{v} S) := ModuleCat.Algebra.instLinear
+ instance {A : Type u₁} [Ring A] [Algebra R A] {B : Type u₂} [Ring B] [Algebra R B]
+ instance {R S} [Ring R] [Ring S] (f : R →+* S) : (restrictScalars f).Additive
+ instance {R₀ R S} [CommSemiring R₀] [Ring R] [Ring S] [Algebra R₀ R] [Algebra R₀ S]
+ ofAlgEquiv
+ of_algEquiv
+ restrictScalarsEquivalenceOfRingEquiv_additive
+ restrictScalarsEquivalenceOfRingEquiv_linear
++ refl
++ symm
++ trans
- instance : Linear S (ModuleCat.{v} S)

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 github-actions bot added the t-algebra Algebra (groups, rings, fields, etc) label Jan 10, 2025
@Whysoserioushah Whysoserioushah added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jan 10, 2025
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@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 Jan 15, 2025
@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 Jan 16, 2025
@ADedecker
Copy link
Member

I think it's quite important to add a base ring into the story: when A and B are algebras over a (commutative) ring R, you want to be able to say that their categories of modules are, not only equivalent or additively equivalent, but R-linearly equivalent (I'm not sure about the terminology, but I think you'll see what I mean).

Also, even in the general setup, I think it would be better to always assume a Morita equivalence to be additive, and add a constructor from a bare equivalence.

@jjaassoonn
Copy link
Collaborator

jjaassoonn commented Jan 18, 2025

@ADedecker can you check the newest commit 273aaa7 to see if this is what you mean (modulo the factor a bunch of other stuff in mathlib is broken)

Co-authored-by: Kim Morrison <kim@tqft.net>
@jcommelin jcommelin added awaiting-author A reviewer has asked the author a question or requested changes and removed maintainer-merge labels Feb 5, 2025
Comment on lines +448 to +451
scoped instance : SMulCommClass S S₀ M where
smul_comm s s₀ n :=
show s • algebraMap S₀ S s₀ • n = algebraMap S₀ S s₀ • s • n by
rw [← smul_assoc, smul_eq_mul, ← Algebra.commutes, mul_smul]
Copy link
Member

Choose a reason for hiding this comment

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

You should give IsScalarTower instead. And use IsScalarTower.of_algebraMap_smul in the proof.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

changed!

Copy link
Member

Choose a reason for hiding this comment

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

It still gives a large-import label. Perhaps add both IsScalarTower and SMulCommClass by hand?

@github-actions github-actions bot added the large-import Automatically added label for PRs with a significant increase in transitive imports label Feb 12, 2025
@Whysoserioushah Whysoserioushah removed the awaiting-author A reviewer has asked the author a question or requested changes label Feb 12, 2025
@github-actions github-actions bot removed the large-import Automatically added label for PRs with a significant increase in transitive imports label Feb 12, 2025
@erdOne
Copy link
Member

erdOne commented Feb 13, 2025

Thanks!
maintainer merge

Copy link

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

Copy link
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

@leanprover-community-mathlib4-bot leanprover-community-mathlib4-bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge labels Feb 13, 2025
mathlib-bors bot pushed a commit that referenced this pull request Feb 13, 2025
Co-authored by: @jjaassoonn 



Co-authored-by: zjj <zjj@zjj>
Co-authored-by: Whysoserioushah <109107491+Whysoserioushah@users.noreply.github.com>
Co-authored-by: Whysoserioushah <yx3021@ic.ac.uk>
Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>
@mathlib-bors
Copy link
Contributor

mathlib-bors bot commented Feb 13, 2025

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(RingTheory/Morita/Basic): Define Morita Equivalence [Merged by Bors] - feat(RingTheory/Morita/Basic): Define Morita Equivalence Feb 13, 2025
@mathlib-bors mathlib-bors bot closed this Feb 13, 2025
@mathlib-bors mathlib-bors bot deleted the morita branch February 13, 2025 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! 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.