-
Notifications
You must be signed in to change notification settings - Fork 372
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
Closed
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
ca351a7
basic
Whysoserioushah b5b09d2
fix build
Whysoserioushah 60c47ac
apply suggestions
jjaassoonn de69322
inline
6af581c
add todo
a66deb6
add 1
ab44429
change
2e80c78
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn 90c9112
shorten line
f8bb3f4
Merge remote-tracking branch 'origin/master' into morita
Whysoserioushah 273aaa7
generalize
13696f4
test
7d58c66
fix?
f79a4f2
fix
d7d9043
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn d1f7a09
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah 8a33222
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah 68ba2a3
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah f0552fe
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah 2344c2a
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah d2f7b46
Update Mathlib/Algebra/Category/ModuleCat/Basic.lean
jjaassoonn 961d207
Merge remote-tracking branch 'origin/master' into morita
Whysoserioushah 5ded14d
junyan suggestion
Whysoserioushah 99a4bf2
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn 6c34832
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn dffcf77
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn 54cac5f
apply suggestions from @alreadydone
c7b5292
Remove Functor.Additive from def of Functor.Linear
alreadydone e556403
unused arguments
alreadydone 47ce0e0
golf `restrictScalarsEquivalenceOfRingEquiv_linear`
alreadydone 50cb794
Update Mathlib/RingTheory/Morita/Basic.lean
jjaassoonn bf8230e
remove ext
dde0e8b
Merge branch 'morita' of https://github.com/leanprover-community/math…
d046381
revert
e914cb1
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah 8717ed5
Update Mathlib/RingTheory/Morita/Basic.lean
Whysoserioushah e1f07fb
Merge remote-tracking branch 'origin/master' into morita
Whysoserioushah 6244abb
Merge branch 'morita' of https://github.com/leanprover-community/math…
Whysoserioushah d3807df
apply kevin's suggestion
Whysoserioushah eb6ad79
apply andrew advice
Whysoserioushah fb51470
fix?
Whysoserioushah 84846a1
fix large import
Whysoserioushah File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
/- | ||
Copyright (c) 2025 Jujian Zhang. All rights reserved. | ||
Released under Apache 2.0 license as described in the file LICENSE. | ||
Authors: Jujian Zhang, Yunzhou Xie | ||
-/ | ||
import Mathlib.Algebra.Category.ModuleCat.ChangeOfRings | ||
import Mathlib.CategoryTheory.Linear.LinearFunctor | ||
import Mathlib.Algebra.Category.ModuleCat.Basic | ||
import Mathlib.CategoryTheory.Adjunction.Limits | ||
|
||
/-! | ||
# Morita equivalence | ||
Two `R`-algebras `A` and `B` are Morita equivalent if the categories of modules over `A` and | ||
`B` are `R`-linearly equivalent. In this file, we prove that Morita equivalence is an equivalence | ||
relation and that isomorphic algebras are Morita equivalent. | ||
# Main definitions | ||
- `MoritaEquivalence R A B`: a structure containing an `R`-linear equivalence of categories between | ||
the module categories of `A` and `B`. | ||
- `IsMoritaEquivalent R A B`: a predicate asserting that `R`-algebras `A` and `B` are Morita | ||
equivalent. | ||
## TODO | ||
- For any ring `R`, `R` and `Matₙ(R)` are Morita equivalent. | ||
- Morita equivalence in terms of projective generators. | ||
- Morita equivalence in terms of full idempotents. | ||
Whysoserioushah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Morita equivalence in terms of existence of an invertible bimodule. | ||
- If `R ≈ S`, then `R` is simple iff `S` is simple. | ||
jjaassoonn marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## References | ||
* [Nathan Jacobson, *Basic Algebra II*][jacobson1989] | ||
## Tags | ||
Morita Equivalence, Category Theory, Noncommutative Ring, Module Theory | ||
-/ | ||
|
||
universe u₀ u₁ u₂ u₃ | ||
|
||
open CategoryTheory | ||
|
||
variable (R : Type u₀) [CommSemiring R] | ||
|
||
open scoped ModuleCat.Algebra | ||
|
||
/-- | ||
Let `A` and `B` be `R`-algebras. A Morita equivalence between `A` and `B` is an `R`-linear | ||
equivalence between the categories of `A`-modules and `B`-modules. | ||
-/ | ||
structure MoritaEquivalence | ||
(A : Type u₁) [Ring A] [Algebra R A] | ||
(B : Type u₂) [Ring B] [Algebra R B] where | ||
/-- The underlying equivalence of categories -/ | ||
eqv : ModuleCat.{max u₁ u₂} A ≌ ModuleCat.{max u₁ u₂} B | ||
linear : eqv.functor.Linear R := by infer_instance | ||
|
||
namespace MoritaEquivalence | ||
|
||
attribute [instance] MoritaEquivalence.linear | ||
|
||
instance {A : Type u₁} [Ring A] [Algebra R A] {B : Type u₂} [Ring B] [Algebra R B] | ||
(e : MoritaEquivalence R A B) : e.eqv.functor.Additive := | ||
e.eqv.functor.additive_of_preserves_binary_products | ||
|
||
/-- | ||
For any `R`-algebra `A`, `A` is Morita equivalent to itself. | ||
-/ | ||
def refl (A : Type u₁) [Ring A] [Algebra R A] : MoritaEquivalence R A A where | ||
eqv := CategoryTheory.Equivalence.refl | ||
linear := Functor.instLinearId | ||
|
||
/-- | ||
For any `R`-algebras `A` and `B`, if `A` is Morita equivalent to `B`, then `B` is Morita equivalent | ||
to `A`. | ||
-/ | ||
def symm {A : Type u₁} [Ring A] [Algebra R A] {B : Type u₂} [Ring B] [Algebra R B] | ||
(e : MoritaEquivalence R A B) : MoritaEquivalence R B A where | ||
eqv := e.eqv.symm | ||
linear := e.eqv.inverseLinear R | ||
|
||
-- TODO: We have restricted all the rings to the same universe here because of the complication | ||
-- `max u₁ u₂`, `max u₂ u₃` vs `max u₁ u₃`. But once we proved the definition of Morita | ||
-- equivalence is equivalent to the existence of a full idempotent element, we can remove this | ||
-- restriction in the universe. | ||
-- Or alternatively, @alreadydone has sketched an argument on how the universe restriction can be | ||
-- removed via a categorical argument, | ||
-- see [here](https://github.com/leanprover-community/mathlib4/pull/20640#discussion_r1912189931) | ||
/-- | ||
For any `R`-algebras `A`, `B`, and `C`, if `A` is Morita equivalent to `B` and `B` is Morita | ||
equivalent to `C`, then `A` is Morita equivalent to `C`. | ||
-/ | ||
def trans {A B C : Type u₁} | ||
[Ring A] [Algebra R A] [Ring B] [Algebra R B] [Ring C] [Algebra R C] | ||
(e : MoritaEquivalence R A B) (e' : MoritaEquivalence R B C) : | ||
MoritaEquivalence R A C where | ||
eqv := e.eqv.trans e'.eqv | ||
linear := e.eqv.functor.instLinearComp e'.eqv.functor | ||
|
||
variable {R} in | ||
/-- | ||
Isomorphic `R`-algebras are Morita equivalent. | ||
-/ | ||
noncomputable def ofAlgEquiv {A : Type u₁} {B : Type u₂} | ||
[Ring A] [Algebra R A] [Ring B] [Algebra R B] (f : A ≃ₐ[R] B) : | ||
MoritaEquivalence R A B where | ||
eqv := ModuleCat.restrictScalarsEquivalenceOfRingEquiv f.symm.toRingEquiv | ||
linear := ModuleCat.Algebra.restrictScalarsEquivalenceOfRingEquiv_linear f.symm | ||
|
||
end MoritaEquivalence | ||
|
||
/-- | ||
Let `A` and `B` be `R`-algebras. We say that `A` and `B` are Morita equivalent if the categories of | ||
`A`-modules and `B`-modules are equivalent as `R`-linear categories. | ||
-/ | ||
structure IsMoritaEquivalent | ||
(A : Type u₁) [Ring A] [Algebra R A] | ||
(B : Type u₂) [Ring B] [Algebra R B] : Prop where | ||
cond : Nonempty <| MoritaEquivalence R A B | ||
|
||
namespace IsMoritaEquivalent | ||
|
||
lemma refl (A : Type u₁) [Ring A] [Algebra R A] : IsMoritaEquivalent R A A where | ||
cond := ⟨.refl R A⟩ | ||
|
||
lemma symm {A : Type u₁} [Ring A] [Algebra R A] {B : Type u₂} [Ring B] [Algebra R B] | ||
(h : IsMoritaEquivalent R A B) : IsMoritaEquivalent R B A where | ||
cond := h.cond.map <| .symm R | ||
|
||
lemma trans {A B C : Type u₁} [Ring A] [Ring B] [Ring C] [Algebra R A] [Algebra R B] [Algebra R C] | ||
(h : IsMoritaEquivalent R A B) (h' : IsMoritaEquivalent R B C) : | ||
IsMoritaEquivalent R A C where | ||
cond := Nonempty.map2 (.trans R) h.cond h'.cond | ||
|
||
lemma of_algEquiv {A : Type u₁} [Ring A] [Algebra R A] {B : Type u₂} [Ring B] [Algebra R B] | ||
(f : A ≃ₐ[R] B) : IsMoritaEquivalent R A B where | ||
cond := ⟨.ofAlgEquiv f⟩ | ||
|
||
end IsMoritaEquivalent |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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 useIsScalarTower.of_algebraMap_smul
in the proof.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!
There was a problem hiding this comment.
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
andSMulCommClass
by hand?