@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
4
4
Authors: Robert A. Spencer, Markus Himmel
5
5
-/
6
6
import Mathlib.Algebra.Category.Grp.Preadditive
7
+ import Mathlib.Algebra.Module.Equiv.Basic
7
8
import Mathlib.Algebra.PUnitInstances.Module
8
9
import Mathlib.CategoryTheory.Conj
9
10
import Mathlib.CategoryTheory.Linear.Basic
@@ -14,7 +15,7 @@ import Mathlib.CategoryTheory.Preadditive.AdditiveFunctor
14
15
/-!
15
16
# The category of `R`-modules
16
17
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
18
19
that it is preadditive and show that being an isomorphism, monomorphism and epimorphism is
19
20
equivalent to being a linear equivalence, an injective linear map and a surjective linear map,
20
21
respectively.
@@ -28,14 +29,15 @@ Similarly, there is a coercion from morphisms in `Module R` to linear maps.
28
29
29
30
Porting note: the next two paragraphs should be revised.
30
31
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.
33
35
This means that to go the other direction, i.e., from linear maps/equivalences to (iso)morphisms
34
36
in the category of `R`-modules, we have to take care not to inadvertently end up with an
35
37
`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`;
39
41
* if `M` and `N` are unbundled `R`-modules, use `↟f` or `asHom f`.
40
42
41
43
Similarly, given `f : M ≃ₗ[R] N`, use `toModuleIso`, `toModuleIso'Left`, `toModuleIso'Right`
@@ -44,7 +46,7 @@ or `toModuleIso'`, respectively.
44
46
The arrow notations are localized, so you may have to `open ModuleCat` (or `open scoped ModuleCat`)
45
47
to use them. Note that the notation for `asHomLeft` clashes with the notation used to promote
46
48
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.
48
50
49
51
If you get an error when trying to apply a theorem and the `convert` tactic produces goals of the
50
52
form `M = of R M`, then you probably used an incorrect variant of `asHom` or `toModuleIso`.
0 commit comments