l3lab/ntp-mathlib huggingface dataset:
theorem isSeparator_def (G : C) :
    IsSeparator G ↔ ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ h : G ⟶ X, h ≫ f = h ≫ g) → f = g :=
  ⟨fun hG X Y f g hfg =>
    hG _ _ fun H hH h => by
      obtain rfl := Set.mem_singleton_iff.1 hH
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f g : X ⟶ Y
H : C
h : H ⟶ X
hG : IsSeparator H
hfg : ∀ (h : H ⟶ X), h ≫ f = h ≫ g
hH : H ∈ {H}
⊢ h ≫ f = h ≫ g

Next tactic:
exact hfg h
theorem isCoseparator_def (G : C) :
    IsCoseparator G ↔ ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ h : Y ⟶ G, f ≫ h = g ≫ h) → f = g :=
  ⟨fun hG X Y f g hfg =>
    hG _ _ fun H hH h => by
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
G : C
hG : IsCoseparator G
X Y : C
f g : X ⟶ Y
hfg : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
H : C
hH : H ∈ {G}
h : Y ⟶ H
⊢ f ≫ h = g ≫ h

Next tactic:
obtain rfl := Set.mem_singleton_iff.1 hH
theorem isCoseparator_def (G : C) :
    IsCoseparator G ↔ ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ h : Y ⟶ G, f ≫ h = g ≫ h) → f = g :=
  ⟨fun hG X Y f g hfg =>
    hG _ _ fun H hH h => by
      obtain rfl := Set.mem_singleton_iff.1 hH
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f g : X ⟶ Y
H : C
h : Y ⟶ H
hG : IsCoseparator H
hfg : ∀ (h : Y ⟶ H), f ≫ h = g ≫ h
hH : H ∈ {H}
⊢ f ≫ h = g ≫ h

Next tactic:
exact hfg h
theorem isDetector_def (G : C) :
    IsDetector G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : G ⟶ Y, ∃! h', h' ≫ f = h) → IsIso f :=
  ⟨fun hG X Y f hf =>
    hG _ fun H hH h => by
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
G : C
hG : IsDetector G
X Y : C
f : X ⟶ Y
hf : ∀ (h : G ⟶ Y), ∃! h', h' ≫ f = h
H : C
hH : H ∈ {G}
h : H ⟶ Y
⊢ ∃! h', h' ≫ f = h

Next tactic:
obtain rfl := Set.mem_singleton_iff.1 hH
theorem isDetector_def (G : C) :
    IsDetector G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : G ⟶ Y, ∃! h', h' ≫ f = h) → IsIso f :=
  ⟨fun hG X Y f hf =>
    hG _ fun H hH h => by
      obtain rfl := Set.mem_singleton_iff.1 hH
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f : X ⟶ Y
H : C
h : H ⟶ Y
hG : IsDetector H
hf : ∀ (h : H ⟶ Y), ∃! h', h' ≫ f = h
hH : H ∈ {H}
⊢ ∃! h', h' ≫ f = h

Next tactic:
exact hf h
theorem isCodetector_def (G : C) :
    IsCodetector G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : X ⟶ G, ∃! h', f ≫ h' = h) → IsIso f :=
  ⟨fun hG X Y f hf =>
    hG _ fun H hH h => by
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
G : C
hG : IsCodetector G
X Y : C
f : X ⟶ Y
hf : ∀ (h : X ⟶ G), ∃! h', f ≫ h' = h
H : C
hH : H ∈ {G}
h : X ⟶ H
⊢ ∃! h', f ≫ h' = h

Next tactic:
obtain rfl := Set.mem_singleton_iff.1 hH
theorem isCodetector_def (G : C) :
    IsCodetector G ↔ ∀ ⦃X Y : C⦄ (f : X ⟶ Y), (∀ h : X ⟶ G, ∃! h', f ≫ h' = h) → IsIso f :=
  ⟨fun hG X Y f hf =>
    hG _ fun H hH h => by
      obtain rfl := Set.mem_singleton_iff.1 hH
      

Proof state:
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
X Y : C
f : X ⟶ Y
H : C
h : X ⟶ H
hG : IsCodetector H
hf : ∀ (h : X ⟶ H), ∃! h', f ≫ h' = h
hH : H ∈ {H}
⊢ ∃! h', f ≫ h' = h

Next tactic:
exact hf h
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
⊢ IsSeparator G ↔ ∀ (A : C), Epi (Sigma.desc fun f => f)

Next tactic:
rw [isSeparator_def]
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  rw [isSeparator_def]
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
⊢ (∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : G ⟶ X), h ≫ f = h ≫ g) → f = g) ↔ ∀ (A : C), Epi (Sigma.desc fun f => f)

Next tactic:
refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  rw [isSeparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · 

Proof state:
case refine'_1
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
h : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : G ⟶ X), h ≫ f = h ≫ g) → f = g
A Z✝ : C
u v : A ⟶ Z✝
huv : (Sigma.desc fun f => f) ≫ u = (Sigma.desc fun f => f) ≫ v
i : G ⟶ A
⊢ i ≫ u = i ≫ v

Next tactic:
simpa using Sigma.ι _ i ≫= huv
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  rw [isSeparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using Sigma.ι _ i ≫= huv
  · 

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
h : ∀ (A : C), Epi (Sigma.desc fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : G ⟶ X), h ≫ f = h ≫ g
⊢ f = g

Next tactic:
haveI := h X
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  rw [isSeparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using Sigma.ι _ i ≫= huv
  · haveI := h X
    

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
h : ∀ (A : C), Epi (Sigma.desc fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : G ⟶ X), h ≫ f = h ≫ g
this : Epi (Sigma.desc fun f => f)
⊢ f = g

Next tactic:
refine' (cancel_epi (Sigma.desc fun f : G ⟶ X => f)).1 (colimit.hom_ext fun j => _)
theorem isSeparator_iff_epi (G : C) [∀ A : C, HasCoproduct fun _ : G ⟶ A => G] :
    IsSeparator G ↔ ∀ A : C, Epi (Sigma.desc fun f : G ⟶ A => f) := by
  rw [isSeparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using Sigma.ι _ i ≫= huv
  · haveI := h X
    refine' (cancel_epi (Sigma.desc fun f : G ⟶ X => f)).1 (colimit.hom_ext fun j => _)
    

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasCoproduct fun x => G
h : ∀ (A : C), Epi (Sigma.desc fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : G ⟶ X), h ≫ f = h ≫ g
this : Epi (Sigma.desc fun f => f)
j : Discrete (G ⟶ X)
⊢ colimit.ι (Discrete.functor fun f => G) j ≫ (Sigma.desc fun f => f) ≫ f =
    colimit.ι (Discrete.functor fun f => G) j ≫ (Sigma.desc fun f => f) ≫ g

Next tactic:
simpa using hh j.as
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
⊢ IsCoseparator G ↔ ∀ (A : C), Mono (Pi.lift fun f => f)

Next tactic:
rw [isCoseparator_def]
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  rw [isCoseparator_def]
  

Proof state:
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
⊢ (∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : Y ⟶ G), f ≫ h = g ≫ h) → f = g) ↔ ∀ (A : C), Mono (Pi.lift fun f => f)

Next tactic:
refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  rw [isCoseparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · 

Proof state:
case refine'_1
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ ⦃X Y : C⦄ (f g : X ⟶ Y), (∀ (h : Y ⟶ G), f ≫ h = g ≫ h) → f = g
A Z✝ : C
u v : Z✝ ⟶ A
huv : (u ≫ Pi.lift fun f => f) = v ≫ Pi.lift fun f => f
i : A ⟶ G
⊢ u ≫ i = v ≫ i

Next tactic:
simpa using huv =≫ Pi.π _ i
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  rw [isCoseparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using huv =≫ Pi.π _ i
  · 

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
⊢ f = g

Next tactic:
haveI := h Y
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  rw [isCoseparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using huv =≫ Pi.π _ i
  · haveI := h Y
    

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
this : Mono (Pi.lift fun f => f)
⊢ f = g

Next tactic:
refine' (cancel_mono (Pi.lift fun f : Y ⟶ G => f)).1 (limit.hom_ext fun j => _)
theorem isCoseparator_iff_mono (G : C) [∀ A : C, HasProduct fun _ : A ⟶ G => G] :
    IsCoseparator G ↔ ∀ A : C, Mono (Pi.lift fun f : A ⟶ G => f) := by
  rw [isCoseparator_def]
  refine' ⟨fun h A => ⟨fun u v huv => h _ _ fun i => _⟩, fun h X Y f g hh => _⟩
  · simpa using huv =≫ Pi.π _ i
  · haveI := h Y
    refine' (cancel_mono (Pi.lift fun f : Y ⟶ G => f)).1 (limit.hom_ext fun j => _)
    

Proof state:
case refine'_2
C : Type u₁
inst✝² : Category.{v₁, u₁} C
D : Type u₂
inst✝¹ : Category.{v₂, u₂} D
G : C
inst✝ : ∀ (A : C), HasProduct fun x => G
h : ∀ (A : C), Mono (Pi.lift fun f => f)
X Y : C
f g : X ⟶ Y
hh : ∀ (h : Y ⟶ G), f ≫ h = g ≫ h
this : Mono (Pi.lift fun f => f)
j : Discrete (Y ⟶ G)
⊢ (f ≫ Pi.lift fun f => f) ≫ limit.π (Discrete.functor fun f => G) j =
    (g ≫ Pi.lift fun f => f) ≫ limit.π (Discrete.functor fun f => G) j

Next tactic:
simpa using hh j.as
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
⊢ IsSeparator (G ⨿ H) ↔ IsSeparating {G, H}

Next tactic:
refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · 

Proof state:
case refine'_1
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparator (G ⨿ H)
X Y : C
u v : X ⟶ Y
huv : ∀ G_1 ∈ {G, H}, ∀ (h : G_1 ⟶ X), h ≫ u = h ≫ v
⊢ u = v

Next tactic:
refine' h.def _ _ fun g => coprod.hom_ext _ _
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · 

Proof state:
case refine'_1.refine'_1
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparator (G ⨿ H)
X Y : C
u v : X ⟶ Y
huv : ∀ G_1 ∈ {G, H}, ∀ (h : G_1 ⟶ X), h ≫ u = h ≫ v
g : G ⨿ H ⟶ X
⊢ coprod.inl ≫ g ≫ u = coprod.inl ≫ g ≫ v

Next tactic:
simpa using huv G (by simp) (coprod.inl ≫ g)
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparator (G ⨿ H)
X Y : C
u v : X ⟶ Y
huv : ∀ G_1 ∈ {G, H}, ∀ (h : G_1 ⟶ X), h ≫ u = h ≫ v
g : G ⨿ H ⟶ X
⊢ G ∈ {G, H}

Next tactic:
simp
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · 

Proof state:
case refine'_1.refine'_2
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparator (G ⨿ H)
X Y : C
u v : X ⟶ Y
huv : ∀ G_1 ∈ {G, H}, ∀ (h : G_1 ⟶ X), h ≫ u = h ≫ v
g : G ⨿ H ⟶ X
⊢ coprod.inr ≫ g ≫ u = coprod.inr ≫ g ≫ v

Next tactic:
simpa using huv H (by simp) (coprod.inr ≫ g)
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · simpa using huv H (by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparator (G ⨿ H)
X Y : C
u v : X ⟶ Y
huv : ∀ G_1 ∈ {G, H}, ∀ (h : G_1 ⟶ X), h ≫ u = h ≫ v
g : G ⨿ H ⟶ X
⊢ H ∈ {G, H}

Next tactic:
simp
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · simpa using huv H (by simp) (coprod.inr ≫ g)
  · 

Proof state:
case refine'_2
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparating {G, H}
X Y : C
u v : X ⟶ Y
huv : ∀ (h : G ⨿ H ⟶ X), h ≫ u = h ≫ v
Z : C
hZ : Z ∈ {G, H}
g : Z ⟶ X
⊢ g ≫ u = g ≫ v

Next tactic:
simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hZ
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · simpa using huv H (by simp) (coprod.inr ≫ g)
  · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hZ
    

Proof state:
case refine'_2
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
h : IsSeparating {G, H}
X Y : C
u v : X ⟶ Y
huv : ∀ (h : G ⨿ H ⟶ X), h ≫ u = h ≫ v
Z : C
g : Z ⟶ X
hZ : Z = G ∨ Z = H
⊢ g ≫ u = g ≫ v

Next tactic:
rcases hZ with (rfl | rfl)
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · simpa using huv H (by simp) (coprod.inr ≫ g)
  · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hZ
    rcases hZ with (rfl | rfl)
    · 

Proof state:
case refine'_2.inl
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
H X Y : C
u v : X ⟶ Y
Z : C
g : Z ⟶ X
inst✝ : HasBinaryCoproduct Z H
h : IsSeparating {Z, H}
huv : ∀ (h : Z ⨿ H ⟶ X), h ≫ u = h ≫ v
⊢ g ≫ u = g ≫ v

Next tactic:
simpa using coprod.inl ≫= huv (coprod.desc g 0)
theorem isSeparator_coprod (G H : C) [HasBinaryCoproduct G H] :
    IsSeparator (G ⨿ H) ↔ IsSeparating ({G, H} : Set C) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => coprod.hom_ext _ _
    · simpa using huv G (by simp) (coprod.inl ≫ g)
    · simpa using huv H (by simp) (coprod.inr ≫ g)
  · simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hZ
    rcases hZ with (rfl | rfl)
    · simpa using coprod.inl ≫= huv (coprod.desc g 0)
    · 

Proof state:
case refine'_2.inr
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G X Y : C
u v : X ⟶ Y
Z : C
g : Z ⟶ X
inst✝ : HasBinaryCoproduct G Z
h : IsSeparating {G, Z}
huv : ∀ (h : G ⨿ Z ⟶ X), h ≫ u = h ≫ v
⊢ g ≫ u = g ≫ v

Next tactic:
simpa using coprod.inr ≫= huv (coprod.desc 0 g)
theorem isSeparator_coprod_of_isSeparator_left (G H : C) [HasBinaryCoproduct G H]
    (hG : IsSeparator G) : IsSeparator (G ⨿ H) :=
  (isSeparator_coprod _ _).2 <| IsSeparating.mono hG <| by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
hG : IsSeparator G
⊢ {G} ⊆ {G, H}

Next tactic:
simp
theorem isSeparator_coprod_of_isSeparator_right (G H : C) [HasBinaryCoproduct G H]
    (hH : IsSeparator H) : IsSeparator (G ⨿ H) :=
  (isSeparator_coprod _ _).2 <| IsSeparating.mono hH <| by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
G H : C
inst✝ : HasBinaryCoproduct G H
hH : IsSeparator H
⊢ {H} ⊆ {G, H}

Next tactic:
simp
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
⊢ IsSeparator (∐ f) ↔ IsSeparating (Set.range f)

Next tactic:
refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · 

Proof state:
case refine'_1
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparator (∐ f)
X Y : C
u v : X ⟶ Y
huv : ∀ G ∈ Set.range f, ∀ (h : G ⟶ X), h ≫ u = h ≫ v
⊢ u = v

Next tactic:
refine' h.def _ _ fun g => colimit.hom_ext fun b => _
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => colimit.hom_ext fun b => _
    

Proof state:
case refine'_1
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparator (∐ f)
X Y : C
u v : X ⟶ Y
huv : ∀ G ∈ Set.range f, ∀ (h : G ⟶ X), h ≫ u = h ≫ v
g : ∐ f ⟶ X
b : Discrete β
⊢ colimit.ι (Discrete.functor f) b ≫ g ≫ u = colimit.ι (Discrete.functor f) b ≫ g ≫ v

Next tactic:
simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => colimit.hom_ext fun b => _
    simpa using huv (f b.as) (by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparator (∐ f)
X Y : C
u v : X ⟶ Y
huv : ∀ G ∈ Set.range f, ∀ (h : G ⟶ X), h ≫ u = h ≫ v
g : ∐ f ⟶ X
b : Discrete β
⊢ f b.as ∈ Set.range f

Next tactic:
simp
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => colimit.hom_ext fun b => _
    simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
  · 

Proof state:
case refine'_2
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : ∐ f ⟶ X), h ≫ u = h ≫ v
Z : C
hZ : Z ∈ Set.range f
g : Z ⟶ X
⊢ g ≫ u = g ≫ v

Next tactic:
obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => colimit.hom_ext fun b => _
    simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
  · obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
    

Proof state:
case refine'_2.intro
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : ∐ f ⟶ X), h ≫ u = h ≫ v
b : β
hZ : f b ∈ Set.range f
g : f b ⟶ X
⊢ g ≫ u = g ≫ v

Next tactic:
classical simpa using Sigma.ι f b ≫= huv (Sigma.desc (Pi.single b g))
theorem isSeparator_sigma {β : Type w} (f : β → C) [HasCoproduct f] :
    IsSeparator (∐ f) ↔ IsSeparating (Set.range f) := by
  refine'
    ⟨fun h X Y u v huv => _, fun h =>
      (isSeparator_def _).2 fun X Y u v huv => h _ _ fun Z hZ g => _⟩
  · refine' h.def _ _ fun g => colimit.hom_ext fun b => _
    simpa using huv (f b.as) (by simp) (colimit.ι (Discrete.functor f) _ ≫ g)
  · obtain ⟨b, rfl⟩ := Set.mem_range.1 hZ
    classical 

Proof state:
case refine'_2.intro
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
h : IsSeparating (Set.range f)
X Y : C
u v : X ⟶ Y
huv : ∀ (h : ∐ f ⟶ X), h ≫ u = h ≫ v
b : β
hZ : f b ∈ Set.range f
g : f b ⟶ X
⊢ g ≫ u = g ≫ v

Next tactic:
simpa using Sigma.ι f b ≫= huv (Sigma.desc (Pi.single b g))
theorem isSeparator_sigma_of_isSeparator {β : Type w} (f : β → C) [HasCoproduct f] (b : β)
    (hb : IsSeparator (f b)) : IsSeparator (∐ f) :=
  (isSeparator_sigma _).2 <| IsSeparating.mono hb <| by 

Proof state:
C : Type u₁
inst✝³ : Category.{v₁, u₁} C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
inst✝¹ : HasZeroMorphisms C
β : Type w
f : β → C
inst✝ : HasCoproduct f
b : β
hb : IsSeparator (f b)
⊢ {f b} ⊆ Set.range f

Next tactic:
simp