@@ -135,6 +135,14 @@ def is_limit.of_ι {W : C} (g : W ⟶ X) (eq : g ≫ f = 0)
135
135
is_limit (kernel_fork.of_ι g eq) :=
136
136
is_limit_aux _ (λ s, lift s.ι s.condition) (λ s, fac s.ι s.condition) (λ s, uniq s.ι s.condition)
137
137
138
+ /-- Every kernel of `f` induces a kernel of `f ≫ g` if `g` is mono. -/
139
+ def is_kernel_comp_mono {c : kernel_fork f} (i : is_limit c) {Z} (g : Y ⟶ Z) [hg : mono g] :
140
+ is_limit (kernel_fork.of_ι c.ι (by simp) : kernel_fork (f ≫ g)) :=
141
+ fork.is_limit.mk' _ $ λ s,
142
+ let s' : kernel_fork f := fork.of_ι s.ι (by apply hg.right_cancellation; simp [s.condition]) in
143
+ let l := kernel_fork.is_limit.lift' i s'.ι s'.condition in
144
+ ⟨l.1 , l.2 , λ m hm, by apply fork.is_limit.hom_ext i; rw fork.ι_of_ι at hm; rw hm; exact l.2 .symm⟩
145
+
138
146
end
139
147
140
148
section
@@ -273,14 +281,9 @@ lemma kernel_not_epi_of_nonzero (w : f ≠ 0) : ¬epi (kernel.ι f) :=
273
281
lemma kernel_not_iso_of_nonzero (w : f ≠ 0 ) : (is_iso (kernel.ι f)) → false :=
274
282
λ I, kernel_not_epi_of_nonzero w $ by { resetI, apply_instance }
275
283
276
- -- TODO the remainder of this section has obvious generalizations to `has_equalizer f g`.
277
-
278
284
instance has_kernel_comp_mono {X Y Z : C} (f : X ⟶ Y) [has_kernel f] (g : Y ⟶ Z) [mono g] :
279
285
has_kernel (f ≫ g) :=
280
- { exists_limit :=
281
- ⟨{ cone := kernel_fork.of_ι (kernel.ι f) (by simp),
282
- is_limit := is_limit_aux _ (λ s, kernel.lift _ s.ι ((cancel_mono g).mp (by simp)))
283
- (by tidy) (by tidy) }⟩ }
286
+ ⟨⟨{ cone := _, is_limit := is_kernel_comp_mono (limit.is_limit _) g }⟩⟩
284
287
285
288
/--
286
289
When `g` is a monomorphism, the kernel of `f ≫ g` is isomorphic to the kernel of `f`.
@@ -440,6 +443,16 @@ def is_colimit.of_π {Z : C} (g : Y ⟶ Z) (eq : f ≫ g = 0)
440
443
is_colimit (cokernel_cofork.of_π g eq) :=
441
444
is_colimit_aux _ (λ s, desc s.π s.condition) (λ s, fac s.π s.condition) (λ s, uniq s.π s.condition)
442
445
446
+ /-- Every cokernel of `f` induces a cokernel of `g ≫ f` if `g` is epi. -/
447
+ def is_cokernel_epi_comp {c : cokernel_cofork f} (i : is_colimit c) {W} (g : W ⟶ X) [hg : epi g] :
448
+ is_colimit (cokernel_cofork.of_π c.π (by simp) : cokernel_cofork (g ≫ f)) :=
449
+ cofork.is_colimit.mk' _ $ λ s,
450
+ let s' : cokernel_cofork f := cofork.of_π s.π
451
+ (by apply hg.left_cancellation; simp [←category.assoc, s.condition]) in
452
+ let l := cokernel_cofork.is_colimit.desc' i s'.π s'.condition in
453
+ ⟨l.1 , l.2 ,
454
+ λ m hm, by apply cofork.is_colimit.hom_ext i; rw cofork.π_of_π at hm; rw hm; exact l.2 .symm⟩
455
+
443
456
end
444
457
445
458
section
@@ -602,13 +615,9 @@ def cokernel_comp_is_iso {X Y Z : C} (f : X ⟶ Y) (g : Y ⟶ Z) [has_cokernel f
602
615
{ hom := cokernel.desc _ (inv g ≫ cokernel.π f) (by simp),
603
616
inv := cokernel.desc _ (g ≫ cokernel.π (f ≫ g)) (by rw [←category.assoc, cokernel.condition]), }
604
617
605
- instance has_cokernel_epi_comp {X Y Z : C} (f : X ⟶ Y) [epi f] (g : Y ⟶ Z) [has_cokernel g] :
606
- has_cokernel (f ≫ g) :=
607
- { exists_colimit :=
608
- ⟨{ cocone := cokernel_cofork.of_π (cokernel.π g) (by simp),
609
- is_colimit := is_colimit_aux _
610
- (λ s, cokernel.desc _ s.π ((cancel_epi f).mp (by { rw ← category.assoc, simp })))
611
- (by tidy) (by tidy) }⟩ }
618
+ instance has_cokernel_epi_comp {X Y : C} (f : X ⟶ Y) [has_cokernel f] {W} (g : W ⟶ X) [epi g] :
619
+ has_cokernel (g ≫ f) :=
620
+ ⟨⟨{ cocone := _, is_colimit := is_cokernel_epi_comp (colimit.is_colimit _) g }⟩⟩
612
621
613
622
/--
614
623
When `f` is an epimorphism, the cokernel of `f ≫ g` is isomorphic to the cokernel of `g`.
0 commit comments