|
| 1 | +/- |
| 2 | +Copyright (c) 2021 Scott Morrison All rights reserved. |
| 3 | +Released under Apache 2.0 license as described in the file LICENSE. |
| 4 | +Authors: Scott Morrison |
| 5 | +-/ |
| 6 | +import algebra.category.Module.adjunctions |
| 7 | +import category_theory.epi_mono |
| 8 | + |
| 9 | +/-! |
| 10 | +# Monomorphisms in `Module R` |
| 11 | +
|
| 12 | +This file shows that an `R`-linear map is a monomorphism in the category of `R`-modules |
| 13 | +if and only if it is injective, and similarly an epimorphism if and only if it is surjective. |
| 14 | +-/ |
| 15 | + |
| 16 | +universes v u |
| 17 | + |
| 18 | +open category_theory |
| 19 | +open Module |
| 20 | + |
| 21 | +namespace Module |
| 22 | + |
| 23 | +variables {R : Type u} [ring R] |
| 24 | + |
| 25 | +/-- |
| 26 | +We could also give a direct proof via `linear_map.ker_eq_bot_of_cancel`. |
| 27 | +(This would allow generalising from `Module.{u}` to `Module.{v}`.) |
| 28 | +-/ |
| 29 | +lemma mono_iff_injective {X Y : Module.{u} R} (f : X ⟶ Y) : mono f ↔ function.injective f := |
| 30 | +begin |
| 31 | + rw ←category_theory.mono_iff_injective, |
| 32 | + exact ⟨right_adjoint_preserves_mono (adj R), faithful_reflects_mono (forget (Module.{u} R))⟩, |
| 33 | +end |
| 34 | + |
| 35 | +lemma epi_iff_surjective {X Y : Module.{v} R} (f : X ⟶ Y) : epi f ↔ function.surjective f := |
| 36 | +begin |
| 37 | + fsplit, |
| 38 | + { intro h, |
| 39 | + rw ←linear_map.range_eq_top, |
| 40 | + apply linear_map.range_eq_top_of_cancel, |
| 41 | + -- Now we have to fight a bit with the difference between `Y` and `↥Y`. |
| 42 | + intros u v w, |
| 43 | + change Y ⟶ Module.of R (linear_map.range f).quotient at u, |
| 44 | + change Y ⟶ Module.of R (linear_map.range f).quotient at v, |
| 45 | + apply (cancel_epi (Module.of_self_iso Y).hom).mp, |
| 46 | + apply h.left_cancellation, |
| 47 | + cases X, cases Y, -- after this we can see `Module.of_self_iso` is just the identity. |
| 48 | + convert w; { dsimp, erw category.id_comp, }, }, |
| 49 | + { rw ←category_theory.epi_iff_surjective, |
| 50 | + exact faithful_reflects_epi (forget (Module.{v} R)), }, |
| 51 | +end |
| 52 | + |
| 53 | + |
| 54 | +end Module |
0 commit comments