|
1 | | -Require Import WildCat.SetoidRewrite. |
2 | | -Require Import Basics.Overture Basics.Tactics Basics.Equivalences. |
3 | | -Require Import WildCat.Core WildCat.Equiv WildCat.EquivGpd WildCat.PointedCat |
4 | | - WildCat.Yoneda WildCat.Graph WildCat.ZeroGroupoid WildCat.Pullbacks |
5 | | - WildCat.AbEnriched WildCat.FunctorCat. |
| 1 | +From HoTT.Basics Require Import Overture Tactics Equivalences. |
| 2 | +From HoTT.WildCat Require Import Core SetoidRewrite Equiv EquivGpd PointedCat |
| 3 | + Yoneda Graph ZeroGroupoid Pullbacks |
| 4 | + AbEnriched FunctorCat. |
6 | 5 |
|
7 | 6 | (** * Epi-stable categories *) |
8 | 7 |
|
@@ -186,7 +185,7 @@ End AbEpiStable. |
186 | 185 |
|
187 | 186 | (** ** Tactics *) |
188 | 187 |
|
189 | | -(** The [fix_left] tactic is the key to smooth diagram chasing in an [IsAbEpiStable] category. Given [lift : Lift ? ?]; we extract the lifted element using the provided name [d] and the proof it is a lift using the name [l]. Then we update all other generalized elements to have the same domain as [d]. We could also have a limited version of this tactic for an [IsEpiStable] category. *) |
| 188 | +(** The [fix_left] tactic is the key to smooth diagram chasing in an [IsAbEpiStable] category. Given [lift : Lift ? ?]; we extract the lifted element using the provided name [d] and the proof it is a lift using the name [l]. Then we update all other generalized elements to have the same domain as [d]. We could also have a limited version of this tactic for an [IsEpiStable] category. For examples of this tactic in use, see the EpiStableLemmas section below and the file HomologicalAlgebra.v. *) |
190 | 189 | Ltac fix_lift lift d l := |
191 | 190 | let P2 := fresh "P" in |
192 | 191 | let e := fresh "e" in |
@@ -273,3 +272,53 @@ Ltac rewrite_with_assoc h := |
273 | 272 | (** Similar, with the other parenthesization. *) |
274 | 273 | Ltac rewrite_with_assoc_opp h := |
275 | 274 | rewrite (cat_assoc _ _ _ $@ cat_postwhisker _ h $@ cat_assoc_opp _ _ _). |
| 275 | + |
| 276 | +(** We can prove some lemmas about these categories using diagram chasing. *) |
| 277 | + |
| 278 | +Section EpiStableLemmas. |
| 279 | + |
| 280 | + Context {A : Type} `{IsEpiStable A}. |
| 281 | + |
| 282 | + (** Morphisms that are both mono and epi are not necessarily iso. The two-out-of-three property is not true for monos and epis in general, but it holds for maps that are both monos and epi in EpiStable categories. *) |
| 283 | + |
| 284 | + Context {X Y Z : A} (f : X $-> Y) (g : Y $-> Z). |
| 285 | + |
| 286 | + (** We already know the following implications: |
| 287 | + - [f] mono/epi + [g] mono/epi => [g $o f] mono/epi |
| 288 | + - [g $o f] mono => [f] mono |
| 289 | + - [g $o f] epi => [g] epi |
| 290 | +
|
| 291 | + It remains to show: |
| 292 | + - [g $o f] mono + [f] epi => [g] mono |
| 293 | + - [g $o f] epi + [g] mono => [f] epi *) |
| 294 | + |
| 295 | + Definition monic_cancel_epic `{!Monic (g $o f)} `{!Epic f} : Monic g. |
| 296 | + Proof. |
| 297 | + apply monic_via_elt; intros P y y' p. |
| 298 | + |
| 299 | + elt_lift_epic f y x lx; elt_lift_epic f y' x' lx'. |
| 300 | + |
| 301 | + lhs_V' napply lx. |
| 302 | + rhs_V' napply lx'. |
| 303 | + napply cat_postwhisker. |
| 304 | + apply (ismonic (g $o f)). |
| 305 | + lhs' napply cat_assoc. |
| 306 | + rhs' napply cat_assoc. |
| 307 | + lhs' napply (g $@L lx). |
| 308 | + rhs' napply (g $@L lx'). |
| 309 | + exact p. |
| 310 | + Defined. |
| 311 | + |
| 312 | + Definition epic_cancel_monic `{!Epic (g $o f)} `{!Monic g} : Epic f. |
| 313 | + Proof. |
| 314 | + apply epic_elt_lift; intros P y. |
| 315 | + |
| 316 | + elt_lift_epic (g $o f) (g $o y) x lx. |
| 317 | + |
| 318 | + provide_lift x. |
| 319 | + rapply ismonic. |
| 320 | + lhs' napply cat_assoc_opp. |
| 321 | + exact lx. |
| 322 | + Defined. |
| 323 | + |
| 324 | +End EpiStableLemmas. |
0 commit comments