@@ -17,38 +17,36 @@ universes v u
17
17
18
18
open category_theory
19
19
open Module
20
+ open_locale Module
20
21
21
22
namespace Module
22
23
23
- variables {R : Type u} [ring R]
24
+ variables {R : Type u} [ring R] {X Y : Module.{v} R} (f : X ⟶ Y)
24
25
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
26
+ lemma ker_eq_bot_of_mono [mono f] : f.ker = ⊥ :=
27
+ linear_map.ker_eq_bot_of_cancel $ λ u v, (@cancel_mono _ _ _ _ _ f _ ↟u ↟v).1
28
+
29
+ lemma range_eq_top_of_epi [epi f] : f.range = ⊤ :=
30
+ linear_map.range_eq_top_of_cancel $ λ u v, (@cancel_epi _ _ _ _ _ f _ ↟u ↟v).1
31
+
32
+ lemma mono_iff_ker_eq_bot : mono f ↔ f.ker = ⊥ :=
33
+ ⟨λ hf, by exactI ker_eq_bot_of_mono _,
34
+ λ hf, concrete_category.mono_of_injective _ $ linear_map.ker_eq_bot.1 hf⟩
35
+
36
+ lemma mono_iff_injective : mono f ↔ function.injective f :=
37
+ by rw [mono_iff_ker_eq_bot, linear_map.ker_eq_bot]
38
+
39
+ lemma epi_iff_range_eq_top : epi f ↔ f.range = ⊤ :=
40
+ ⟨λ hf, by exactI range_eq_top_of_epi _,
41
+ λ hf, concrete_category.epi_of_surjective _ $ linear_map.range_eq_top.1 hf⟩
42
+
43
+ lemma epi_iff_surjective : epi f ↔ function.surjective f :=
44
+ by rw [epi_iff_range_eq_top, linear_map.range_eq_top]
45
+
46
+ instance mono_as_hom'_subtype (U : submodule R X) : mono ↾U.subtype :=
47
+ (mono_iff_ker_eq_bot _).mpr (submodule.ker_subtype U)
52
48
49
+ instance epi_as_hom''_mkq (U : submodule R X) : epi ↿U.mkq :=
50
+ (epi_iff_range_eq_top _).mpr $ submodule.range_mkq _
53
51
54
52
end Module
0 commit comments