@@ -6,6 +6,7 @@ Authors: Adam Topaz
6
6
7
7
import Mathlib.CategoryTheory.Sites.Sieves
8
8
import Mathlib.CategoryTheory.Limits.Shapes.KernelPair
9
+ import Mathlib.Tactic.ApplyFun
9
10
10
11
/-!
11
12
@@ -32,9 +33,10 @@ our notion of `EffectiveEpi` is often called "strict epi" in the literature.
32
33
- [ nlab: *Effective Epimorphism* ] (https://ncatlab.org/nlab/show/effective+epimorphism) and
33
34
- [ Stacks 00WP ] (https://stacks.math.columbia.edu/tag/00WP) for the standard definitions.
34
35
35
- -/
36
+ ## TODO
37
+ - Find sufficient conditions on functors to preserve/reflect effective epis.
36
38
37
- set_option autoImplicit true
39
+ -/
38
40
39
41
namespace CategoryTheory
40
42
@@ -303,12 +305,12 @@ attribute [nolint simpNF]
303
305
EffectiveEpiFamily.fac_assoc
304
306
305
307
/-- The effective epi family structure on the identity -/
306
- def effectiveEpiFamilyStructId : EffectiveEpiFamilyStruct ( α : Unit → C) (fun _ => 𝟙 (α ())) where
308
+ def effectiveEpiFamilyStructId { α : Unit → C} : EffectiveEpiFamilyStruct α (fun _ => 𝟙 (α ())) where
307
309
desc := fun e _ => e ()
308
310
fac := by aesop_cat
309
311
uniq := by aesop_cat
310
312
311
- instance : EffectiveEpiFamily (fun _ => X : Unit → C) (fun _ => 𝟙 X) :=
313
+ instance {X : C} : EffectiveEpiFamily (fun _ => X : Unit → C) (fun _ => 𝟙 X) :=
312
314
⟨⟨effectiveEpiFamilyStructId⟩⟩
313
315
314
316
example {B W : C} {α : Type *} (X : α → C) (π : (a : α) → (X a ⟶ B))
@@ -455,8 +457,9 @@ Given an `EffectiveEpiFamily X π` such that the coproduct of `X` exists, `Sigma
455
457
`EffectiveEpi`.
456
458
-/
457
459
noncomputable
458
- def EffectiveEpiFamily_descStruct {B : C} {α : Type *} (X : α → C) (π : (a : α) → (X a ⟶ B))
459
- [HasCoproduct X] [EffectiveEpiFamily X π] : EffectiveEpiStruct (Sigma.desc π) where
460
+ def effectiveEpiStructDescOfEffectiveEpiFamily {B : C} {α : Type *} (X : α → C)
461
+ (π : (a : α) → (X a ⟶ B)) [HasCoproduct X] [EffectiveEpiFamily X π] :
462
+ EffectiveEpiStruct (Sigma.desc π) where
460
463
desc e h := EffectiveEpiFamily.desc X π (fun a ↦ Sigma.ι X a ≫ e) (fun a₁ a₂ g₁ g₂ hg ↦ by
461
464
simp only [← Category.assoc]
462
465
apply h (g₁ ≫ Sigma.ι X a₁) (g₂ ≫ Sigma.ι X a₂)
@@ -478,26 +481,88 @@ def EffectiveEpiFamily_descStruct {B : C} {α : Type*} (X : α → C) (π : (a :
478
481
479
482
instance {B : C} {α : Type *} (X : α → C) (π : (a : α) → (X a ⟶ B)) [HasCoproduct X]
480
483
[EffectiveEpiFamily X π] : EffectiveEpi (Sigma.desc π) :=
481
- ⟨⟨EffectiveEpiFamily_descStruct X π⟩⟩
484
+ ⟨⟨effectiveEpiStructDescOfEffectiveEpiFamily X π⟩⟩
485
+
486
+ /--
487
+ This is an auxiliary lemma used twice in the definition of `EffectiveEpiFamilyOfEffectiveEpiDesc`.
488
+ It is the `h` hypothesis of `EffectiveEpi.desc` and `EffectiveEpi.fac`.
489
+ -/
490
+ theorem effectiveEpiFamilyStructOfEffectiveEpiDesc_aux {B : C} {α : Type *} {X : α → C}
491
+ {π : (a : α) → X a ⟶ B} [HasCoproduct X]
492
+ [∀ {Z : C} (g : Z ⟶ ∐ X) (a : α), HasPullback g (Sigma.ι X a)]
493
+ [∀ {Z : C} (g : Z ⟶ ∐ X), HasCoproduct fun a ↦ pullback g (Sigma.ι X a)]
494
+ [∀ {Z : C} (g : Z ⟶ ∐ X), Epi (Sigma.desc fun a ↦ pullback.fst (f := g) (g := (Sigma.ι X a)))]
495
+ {W : C} {e : (a : α) → X a ⟶ W} (h : ∀ {Z : C} (a₁ a₂ : α) (g₁ : Z ⟶ X a₁) (g₂ : Z ⟶ X a₂),
496
+ g₁ ≫ π a₁ = g₂ ≫ π a₂ → g₁ ≫ e a₁ = g₂ ≫ e a₂) {Z : C}
497
+ {g₁ g₂ : Z ⟶ ∐ fun b ↦ X b} (hg : g₁ ≫ Sigma.desc π = g₂ ≫ Sigma.desc π) :
498
+ g₁ ≫ Sigma.desc e = g₂ ≫ Sigma.desc e := by
499
+ apply_fun ((Sigma.desc fun a ↦ pullback.fst (f := g₁) (g := (Sigma.ι X a))) ≫ ·) using
500
+ (fun a b ↦ (cancel_epi _).mp)
501
+ ext a
502
+ simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app]
503
+ rw [← Category.assoc, pullback.condition]
504
+ simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app]
505
+ apply_fun ((Sigma.desc fun a ↦ pullback.fst (f := pullback.fst ≫ g₂)
506
+ (g := (Sigma.ι X a))) ≫ ·) using (fun a b ↦ (cancel_epi _).mp)
507
+ ext b
508
+ simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app]
509
+ simp only [← Category.assoc]
510
+ rw [(Category.assoc _ _ g₂), pullback.condition]
511
+ simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app]
512
+ rw [← Category.assoc]
513
+ apply h
514
+ apply_fun (pullback.fst (f := g₁) (g := (Sigma.ι X a)) ≫ ·) at hg
515
+ rw [← Category.assoc, pullback.condition] at hg
516
+ simp only [Category.assoc, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app] at hg
517
+ apply_fun ((Sigma.ι (fun a ↦ pullback _ _) b) ≫ (Sigma.desc fun a ↦ pullback.fst
518
+ (f := pullback.fst ≫ g₂) (g := (Sigma.ι X a))) ≫ ·) at hg
519
+ simp only [colimit.ι_desc_assoc, Discrete.functor_obj, Cofan.mk_pt, Cofan.mk_ι_app] at hg
520
+ simp only [← Category.assoc] at hg
521
+ rw [(Category.assoc _ _ g₂), pullback.condition] at hg
522
+ simpa using hg
523
+
524
+ /--
525
+ If a coproduct interacts well enough with pullbacks, then a family whose domains are the terms of
526
+ the coproduct is effective epimorphic whenever `Sigma.desc` induces an effective epimorphism from
527
+ the coproduct itself.
528
+ -/
529
+ noncomputable
530
+ def effectiveEpiFamilyStructOfEffectiveEpiDesc {B : C} {α : Type *} (X : α → C)
531
+ (π : (a : α) → (X a ⟶ B)) [HasCoproduct X] [EffectiveEpi (Sigma.desc π)]
532
+ [∀ {Z : C} (g : Z ⟶ ∐ X) (a : α), HasPullback g (Sigma.ι X a)]
533
+ [∀ {Z : C} (g : Z ⟶ ∐ X), HasCoproduct (fun a ↦ pullback g (Sigma.ι X a))]
534
+ [∀ {Z : C} (g : Z ⟶ ∐ X),
535
+ Epi (Sigma.desc (fun a ↦ pullback.fst (f := g) (g := (Sigma.ι X a))))] :
536
+ EffectiveEpiFamilyStruct X π where
537
+ desc e h := EffectiveEpi.desc (Sigma.desc π) (Sigma.desc e) fun _ _ hg ↦
538
+ effectiveEpiFamilyStructOfEffectiveEpiDesc_aux h hg
539
+ fac e h a := by
540
+ rw [(by simp : π a = Sigma.ι X a ≫ Sigma.desc π), (by simp : e a = Sigma.ι X a ≫ Sigma.desc e),
541
+ Category.assoc, EffectiveEpi.fac (Sigma.desc π) (Sigma.desc e) (fun g₁ g₂ hg ↦
542
+ effectiveEpiFamilyStructOfEffectiveEpiDesc_aux h hg)]
543
+ uniq _ _ _ hm := by
544
+ apply EffectiveEpi.uniq (Sigma.desc π)
545
+ ext
546
+ simpa using hm _
482
547
483
548
/--
484
549
An `EffectiveEpiFamily` consisting of a single `EffectiveEpi`
485
550
-/
486
551
noncomputable
487
- def EffectiveEpi_familyStruct {B X : C} (f : X ⟶ B) [EffectiveEpi f] :
552
+ def effectiveEpiFamilyStructSingletonOfEffectiveEpi {B X : C} (f : X ⟶ B) [EffectiveEpi f] :
488
553
EffectiveEpiFamilyStruct (fun () ↦ X) (fun () ↦ f) where
489
554
desc e h := EffectiveEpi.desc f (e ()) (fun g₁ g₂ hg ↦ h () () g₁ g₂ hg)
490
555
fac e h := fun _ ↦ EffectiveEpi.fac f (e ()) (fun g₁ g₂ hg ↦ h () () g₁ g₂ hg)
491
556
uniq e h m hm := by apply EffectiveEpi.uniq f (e ()) (h () ()); exact hm ()
492
557
493
558
instance {B X : C} (f : X ⟶ B) [EffectiveEpi f] : EffectiveEpiFamily (fun () ↦ X) (fun () ↦ f) :=
494
- ⟨⟨EffectiveEpi_familyStruct f⟩⟩
559
+ ⟨⟨effectiveEpiFamilyStructSingletonOfEffectiveEpi f⟩⟩
495
560
496
561
/--
497
562
A single element `EffectiveEpiFamily` constists of an `EffectiveEpi`
498
563
-/
499
564
noncomputable
500
- def EffectiveEpiStruct_ofFamily {B X : C} (f : X ⟶ B)
565
+ def effectiveEpiStructOfEffectiveEpiFamilySingleton {B X : C} (f : X ⟶ B)
501
566
[EffectiveEpiFamily (fun () ↦ X) (fun () ↦ f)] :
502
567
EffectiveEpiStruct f where
503
568
desc e h := EffectiveEpiFamily.desc
@@ -509,9 +574,9 @@ def EffectiveEpiStruct_ofFamily {B X : C} (f : X ⟶ B)
509
574
510
575
instance {B X : C} (f : X ⟶ B) [EffectiveEpiFamily (fun () ↦ X) (fun () ↦ f)] :
511
576
EffectiveEpi f :=
512
- ⟨⟨EffectiveEpiStruct_ofFamily f⟩⟩
577
+ ⟨⟨effectiveEpiStructOfEffectiveEpiFamilySingleton f⟩⟩
513
578
514
- lemma effectiveEpi_iff_effectiveEpiFamily {B X : C} (f : X ⟶ B) :
579
+ theorem effectiveEpi_iff_effectiveEpiFamily {B X : C} (f : X ⟶ B) :
515
580
EffectiveEpi f ↔ EffectiveEpiFamily (fun () ↦ X) (fun () ↦ f) :=
516
581
⟨fun _ ↦ inferInstance, fun _ ↦ inferInstance⟩
517
582
@@ -520,7 +585,7 @@ A family of morphisms with the same target inducing an isomorphism from the copr
520
585
is an `EffectiveEpiFamily`.
521
586
-/
522
587
noncomputable
523
- def EffectiveEpiFamilyStruct_of_isIso_desc {B : C} {α : Type *} (X : α → C)
588
+ def effectiveEpiFamilyStructOfIsIsoDesc {B : C} {α : Type *} (X : α → C)
524
589
(π : (a : α) → (X a ⟶ B)) [HasCoproduct X] [IsIso (Sigma.desc π)] :
525
590
EffectiveEpiFamilyStruct X π where
526
591
desc e _ := (asIso (Sigma.desc π)).inv ≫ (Sigma.desc e)
@@ -540,34 +605,51 @@ def EffectiveEpiFamilyStruct_of_isIso_desc {B : C} {α : Type*} (X : α → C)
540
605
541
606
instance {B : C} {α : Type *} (X : α → C) (π : (a : α) → (X a ⟶ B)) [HasCoproduct X]
542
607
[IsIso (Sigma.desc π)] : EffectiveEpiFamily X π :=
543
- ⟨⟨EffectiveEpiFamilyStruct_of_isIso_desc X π⟩⟩
608
+ ⟨⟨effectiveEpiFamilyStructOfIsIsoDesc X π⟩⟩
544
609
545
610
/-- The identity is an effective epi. -/
546
- def EffectiveEpiStructId {X : C} : EffectiveEpiStruct (𝟙 X) where
547
- desc e _ := e
548
- fac _ _ := by simp only [Category.id_comp]
549
- uniq _ _ _ h := by simp only [Category.id_comp] at h; exact h
550
-
551
- instance {X : C} : EffectiveEpi (𝟙 X) := ⟨⟨EffectiveEpiStructId⟩⟩
552
-
553
- end instances
611
+ noncomputable
612
+ def effectiveEpiStructOfIsIso {X Y : C} (f : X ⟶ Y) [IsIso f] : EffectiveEpiStruct f where
613
+ desc e _ := inv f ≫ e
614
+ fac _ _ := by simp
615
+ uniq _ _ _ h := by simpa using h
554
616
555
- section Epi
617
+ instance {X Y : C} (f : X ⟶ Y) [IsIso f] : EffectiveEpi f := ⟨⟨effectiveEpiStructOfIsIso f⟩⟩
556
618
557
- variable [HasFiniteCoproducts C] (h : ∀ {α : Type } [Fintype α] {B : C}
558
- (X : α → C) (π : (a : α) → (X a ⟶ B)), EffectiveEpiFamily X π ↔ Epi (Sigma.desc π ))
619
+ /--
620
+ A split epi followed by an effective epi is an effective epi. This version takes an explicit section
621
+ to the split epi, and is mainly used to define `effectiveEpiStructCompOfEffectiveEpiSplitEpi`,
622
+ which takes a `IsSplitEpi` instance instead.
623
+ -/
624
+ noncomputable
625
+ def effectiveEpiStructCompOfEffectiveEpiSplitEpi' {B X Y : C} (f : X ⟶ B) (g : Y ⟶ X) (i : X ⟶ Y)
626
+ (hi : i ≫ g = 𝟙 _) [EffectiveEpi f] : EffectiveEpiStruct (g ≫ f) where
627
+ desc e w := EffectiveEpi.desc f (i ≫ e) fun g₁ g₂ _ ↦ (by
628
+ simp only [← Category.assoc]
629
+ apply w (g₁ ≫ i) (g₂ ≫ i)
630
+ simpa [← Category.assoc, hi])
631
+ fac e w := by
632
+ simp only [Category.assoc, EffectiveEpi.fac]
633
+ rw [← Category.id_comp e, ← Category.assoc, ← Category.assoc]
634
+ apply w
635
+ simp only [Category.comp_id, Category.id_comp, ← Category.assoc]
636
+ aesop
637
+ uniq _ _ _ hm := by
638
+ apply EffectiveEpi.uniq f
639
+ rw [← hm, ← Category.assoc, ← Category.assoc, hi, Category.id_comp]
640
+
641
+ /-- A split epi followed by an effective epi is an effective epi. -/
642
+ noncomputable
643
+ def effectiveEpiStructCompOfEffectiveEpiSplitEpi {B X Y : C} (f : X ⟶ B) (g : Y ⟶ X) [IsSplitEpi g]
644
+ [EffectiveEpi f] : EffectiveEpiStruct (g ≫ f) :=
645
+ effectiveEpiStructCompOfEffectiveEpiSplitEpi' f g
646
+ (IsSplitEpi.exists_splitEpi (f := g)).some.section_
647
+ (IsSplitEpi.exists_splitEpi (f := g)).some.id
559
648
560
- lemma effectiveEpi_iff_epi {X Y : C} (f : X ⟶ Y) : EffectiveEpi f ↔ Epi f := by
561
- rw [effectiveEpi_iff_effectiveEpiFamily, h]
562
- have w : f = (Limits.Sigma.ι (fun () ↦ X) ()) ≫ (Limits.Sigma.desc (fun () ↦ f))
563
- · simp only [Limits.colimit.ι_desc, Limits.Cofan.mk_pt, Limits.Cofan.mk_ι_app]
564
- refine ⟨?_, fun _ ↦ epi_of_epi_fac w.symm⟩
565
- intro
566
- rw [w]
567
- have : Epi (Limits.Sigma.ι (fun () ↦ X) ()) := ⟨fun _ _ h ↦ by ext; exact h⟩
568
- exact epi_comp _ _
649
+ instance {B X Y : C} (f : X ⟶ B) (g : Y ⟶ X) [IsSplitEpi g] [EffectiveEpi f] :
650
+ EffectiveEpi (g ≫ f) := ⟨⟨effectiveEpiStructCompOfEffectiveEpiSplitEpi f g⟩⟩
569
651
570
- end Epi
652
+ end instances
571
653
572
654
section Regular
573
655
@@ -615,4 +697,21 @@ noncomputable instance regularEpiOfEffectiveEpi {B X : C} (f : X ⟶ B) [HasPull
615
697
616
698
end Regular
617
699
700
+ section Epi
701
+
702
+ variable [HasFiniteCoproducts C] (h : ∀ {α : Type } [Fintype α] {B : C}
703
+ (X : α → C) (π : (a : α) → (X a ⟶ B)), EffectiveEpiFamily X π ↔ Epi (Sigma.desc π ))
704
+
705
+ lemma effectiveEpi_iff_epi {X Y : C} (f : X ⟶ Y) : EffectiveEpi f ↔ Epi f := by
706
+ rw [effectiveEpi_iff_effectiveEpiFamily, h]
707
+ have w : f = (Limits.Sigma.ι (fun () ↦ X) ()) ≫ (Limits.Sigma.desc (fun () ↦ f))
708
+ · simp only [Limits.colimit.ι_desc, Limits.Cofan.mk_pt, Limits.Cofan.mk_ι_app]
709
+ refine ⟨?_, fun _ ↦ epi_of_epi_fac w.symm⟩
710
+ intro
711
+ rw [w]
712
+ have : Epi (Limits.Sigma.ι (fun () ↦ X) ()) := ⟨fun _ _ h ↦ by ext; exact h⟩
713
+ exact epi_comp _ _
714
+
715
+ end Epi
716
+
618
717
end CategoryTheory
0 commit comments