Skip to content

Commit 065334e

Browse files
committed
chore: split Algebra/Module/Equiv (#14466)
Co-authored-by: Scott Morrison <[email protected]>
1 parent dae74a5 commit 065334e

File tree

20 files changed

+639
-594
lines changed

20 files changed

+639
-594
lines changed

Mathlib.lean

+2-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,8 @@ import Mathlib.Algebra.Module.Card
428428
import Mathlib.Algebra.Module.CharacterModule
429429
import Mathlib.Algebra.Module.DedekindDomain
430430
import Mathlib.Algebra.Module.Defs
431-
import Mathlib.Algebra.Module.Equiv
431+
import Mathlib.Algebra.Module.Equiv.Basic
432+
import Mathlib.Algebra.Module.Equiv.Defs
432433
import Mathlib.Algebra.Module.FinitePresentation
433434
import Mathlib.Algebra.Module.GradedModule
434435
import Mathlib.Algebra.Module.Hom

Mathlib/Algebra/Algebra/Basic.lean

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ Authors: Kenny Lau, Yury Kudryashov
55
-/
66
import Mathlib.Algebra.Algebra.Defs
77
import Mathlib.Algebra.CharZero.Lemmas
8+
import Mathlib.Algebra.Module.Equiv.Basic
89
import Mathlib.Algebra.Module.Submodule.Ker
910
import Mathlib.Algebra.Module.Submodule.RestrictScalars
1011
import Mathlib.Algebra.Module.ULift

Mathlib/Algebra/Category/ModuleCat/Basic.lean

+9-7
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Robert A. Spencer, Markus Himmel
55
-/
66
import Mathlib.Algebra.Category.Grp.Preadditive
7+
import Mathlib.Algebra.Module.Equiv.Basic
78
import Mathlib.Algebra.PUnitInstances.Module
89
import Mathlib.CategoryTheory.Conj
910
import Mathlib.CategoryTheory.Linear.Basic
@@ -14,7 +15,7 @@ import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
1415
/-!
1516
# The category of `R`-modules
1617
17-
`Module.{v} R` is the category of bundled `R`-modules with carrier in the universe `v`. We show
18+
`ModuleCat.{v} R` is the category of bundled `R`-modules with carrier in the universe `v`. We show
1819
that it is preadditive and show that being an isomorphism, monomorphism and epimorphism is
1920
equivalent to being a linear equivalence, an injective linear map and a surjective linear map,
2021
respectively.
@@ -28,14 +29,15 @@ Similarly, there is a coercion from morphisms in `Module R` to linear maps.
2829
2930
Porting note: the next two paragraphs should be revised.
3031
31-
Unfortunately, Lean is not smart enough to see that, given an object `M : Module R`, the expression
32-
`of R M`, where we coerce `M` to the carrier type, is definitionally equal to `M` itself.
32+
Unfortunately, Lean is not smart enough to see that, given an object `M : ModuleCat R`,
33+
the expression `of R M`, where we coerce `M` to the carrier type,
34+
is definitionally equal to `M` itself.
3335
This means that to go the other direction, i.e., from linear maps/equivalences to (iso)morphisms
3436
in the category of `R`-modules, we have to take care not to inadvertently end up with an
3537
`of R M` where `M` is already an object. Hence, given `f : M →ₗ[R] N`,
36-
* if `M N : Module R`, simply use `f`;
37-
* if `M : Module R` and `N` is an unbundled `R`-module, use `↿f` or `asHomLeft f`;
38-
* if `M` is an unbundled `R`-module and `N : Module R`, use `↾f` or `asHomRight f`;
38+
* if `M N : ModuleCat R`, simply use `f`;
39+
* if `M : ModuleCat R` and `N` is an unbundled `R`-module, use `↿f` or `asHomLeft f`;
40+
* if `M` is an unbundled `R`-module and `N : ModuleCat R`, use `↾f` or `asHomRight f`;
3941
* if `M` and `N` are unbundled `R`-modules, use `↟f` or `asHom f`.
4042
4143
Similarly, given `f : M ≃ₗ[R] N`, use `toModuleIso`, `toModuleIso'Left`, `toModuleIso'Right`
@@ -44,7 +46,7 @@ or `toModuleIso'`, respectively.
4446
The arrow notations are localized, so you may have to `open ModuleCat` (or `open scoped ModuleCat`)
4547
to use them. Note that the notation for `asHomLeft` clashes with the notation used to promote
4648
functions between types to morphisms in the category `Type`, so to avoid confusion, it is probably a
47-
good idea to avoid having the locales `Module` and `CategoryTheory.Type` open at the same time.
49+
good idea to avoid having the locales `ModuleCat` and `CategoryTheory.Type` open at the same time.
4850
4951
If you get an error when trying to apply a theorem and the `convert` tactic produces goals of the
5052
form `M = of R M`, then you probably used an incorrect variant of `asHom` or `toModuleIso`.

Mathlib/Algebra/Lie/Basic.lean

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Oliver Nash
55
-/
66
import Mathlib.Algebra.Module.Submodule.Equiv
7+
import Mathlib.Algebra.Module.Equiv.Basic
78
import Mathlib.Data.Bracket
89
import Mathlib.Tactic.Abel
910

0 commit comments

Comments
 (0)