Skip to content

Commit 0b484e1

Browse files
committed
chore: deduplicate proof that coproduct of separating set is separator (#21081)
Co-authored-by: Markus Himmel <markus@lean-fro.org>
1 parent d45ceb4 commit 0b484e1

File tree

4 files changed

+14
-52
lines changed

4 files changed

+14
-52
lines changed

Mathlib.lean

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1845,7 +1845,6 @@ import Mathlib.CategoryTheory.Galois.Prorepresentability
18451845
import Mathlib.CategoryTheory.Galois.Topology
18461846
import Mathlib.CategoryTheory.Generator.Abelian
18471847
import Mathlib.CategoryTheory.Generator.Basic
1848-
import Mathlib.CategoryTheory.Generator.Coproduct
18491848
import Mathlib.CategoryTheory.Generator.Preadditive
18501849
import Mathlib.CategoryTheory.Generator.Presheaf
18511850
import Mathlib.CategoryTheory.Generator.Sheaf

Mathlib/CategoryTheory/Generator/Basic.lean

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -527,15 +527,21 @@ theorem isSeparator_coprod_of_isSeparator_right (G H : C) [HasBinaryCoproduct G
527527
(hH : IsSeparator H) : IsSeparator (G ⨿ H) :=
528528
(isSeparator_coprod _ _).2 <| IsSeparating.mono hH <| by simp
529529

530+
lemma isSeparator_of_isColimit_cofan {β : Type w} {f : β → C}
531+
(hf : IsSeparating (Set.range f)) {c : Cofan f} (hc : IsColimit c) : IsSeparator c.pt := by
532+
refine (isSeparator_def _).2 fun X Y u v huv => hf _ _ fun Z hZ g => ?_
533+
obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
534+
classical simpa using c.ι.app ⟨b⟩ ≫= huv (hc.desc (Cofan.mk _ (Pi.single b g)))
535+
530536
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
531537
IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
532-
refine
533-
fun h X Y u v huv => ?_, fun h =>
534-
(isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => ?_⟩
535-
· refine h.def _ _ fun g => colimit.hom_ext fun b => ?_
536-
simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
537-
· obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
538-
classical simpa using Sigma.ι f b ≫= huv (Sigma.desc (Pi.single b g))
538+
refinefun h X Y u v huv => ?_, fun h => isSeparator_of_isColimit_cofan h (colimit.isColimit _)⟩
539+
refine h.def _ _ fun g => colimit.hom_ext fun b => ?_
540+
simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
541+
542+
theorem IsSeparating.isSeparator_coproduct {β : Type w} {f : β → C} [HasCoproduct f]
543+
(hS : IsSeparating (Set.range f)) : IsSeparator (∐ f) :=
544+
(isSeparator_sigma _).2 hS
539545

540546
theorem isSeparator_sigma_of_isSeparator {β : Type w} (f : β → C) [HasCoproduct f] (b : β)
541547
(hb : IsSeparator (f b)) : IsSeparator (∐ f) :=

Mathlib/CategoryTheory/Generator/Coproduct.lean

Lines changed: 0 additions & 43 deletions
This file was deleted.

Mathlib/CategoryTheory/Generator/Presheaf.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
44
Authors: Joël Riou
55
-/
66

7-
import Mathlib.CategoryTheory.Generator.Coproduct
7+
import Mathlib.CategoryTheory.Generator.Basic
88
import Mathlib.CategoryTheory.Limits.FunctorCategory.Basic
99

1010
/-!

0 commit comments

Comments
 (0)