l3lab/ntp-mathlib huggingface dataset:
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom

Next tactic:
simp
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
⊢ g₁ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
    g₂ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }

Next tactic:
let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
Z' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }
⊢ g₁ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
    g₂ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }

Next tactic:
let g₁' : Z' ⟶ Y' := Over.homMk g₁
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
Z' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }
g₁' : Z' ⟶ Y' := Over.homMk g₁
⊢ g₁ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
    g₂ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }

Next tactic:
let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
Z' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }
g₁' : Z' ⟶ Y' := Over.homMk g₁
⊢ g₂ ≫ Y'.obj.hom = Z'.obj.hom

Next tactic:
simp [h]
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
Z' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }
g₁' : Z' ⟶ Y' := Over.homMk g₁
g₂' : Z' ⟶ Y' := Over.homMk g₂
⊢ g₁ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
    g₂ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }

Next tactic:
change F.map g₁' ≫ _ = F.map g₂' ≫ _
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
Z : C
g₁ g₂ : Z ⟶ Y
h : g₁ ≫ f = g₂ ≫ f
Y' : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
Z' : D := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) }
g₁' : Z' ⟶ Y' := Over.homMk g₁
g₂' : Z' ⟶ Y' := Over.homMk g₂
⊢ F.map g₁' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
    F.map g₂' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }

Next tactic:
simp only [S.w]
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
⊢ ∀ (s : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows))
    (j : FullSubcategory fun f_1 => (Sieve.generateSingleton f).arrows f_1.hom),
    (Presieve.cocone (Sieve.generateSingleton f).arrows).ι.app j ≫
        (fun S =>
            EffectiveEpiStruct.desc Hf (S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })
              (_ :
                ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),
                  let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };
                  let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };
                  let g₁' := Over.homMk g₁;
                  let g₂' := Over.homMk g₂;
                  F.map g₁' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
                    F.map g₂' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))
          s =
      s.ι.app j

Next tactic:
rintro S ⟨T,g,hT⟩
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
⊢ (Presieve.cocone (Sieve.generateSingleton f).arrows).ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) } ≫
      (fun S =>
          EffectiveEpiStruct.desc Hf (S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) })
            (_ :
              ∀ {Z : C} (g₁ g₂ : Z ⟶ Y) (h : g₁ ≫ f = g₂ ≫ f),
                let Y' := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) };
                let Z' := { obj := Over.mk (g₁ ≫ f), property := (_ : ∃ e, e ≫ f = (Over.mk (g₁ ≫ f)).hom) };
                let g₁' := Over.homMk g₁;
                let g₂' := Over.homMk g₂;
                F.map g₁' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) } =
                  F.map g₂' ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }))
        S =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
dsimp
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
⊢ T.hom ≫
      EffectiveEpiStruct.desc Hf (S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) })
        (_ :
          ∀ {Z : C} (g₁ g₂ : Z ⟶ Y),
            g₁ ≫ f = g₂ ≫ f →
              g₁ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =
                g₂ ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) }) =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
⊢ g ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
let y : D := ⟨Over.mk f, 𝟙 _, by simp⟩
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
      let y : D := ⟨Over.mk f, 𝟙 _, by 

Proof state:
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
⊢ 𝟙 ((𝟭 C).obj (Over.mk f).left) ≫ f = (Over.mk f).hom

Next tactic:
simp
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
      let y : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
y : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
⊢ g ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
let x : D := ⟨Over.mk T.hom, g, hT⟩
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
      let y : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let x : D := ⟨Over.mk T.hom, g, hT⟩
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
y : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
x : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }
⊢ g ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
let g' : x ⟶ y := Over.homMk g
/--
Implementation: This is a construction which will be used in the proof that
the sieve generated by a single arrow is effective epimorphic if and only if
the arrow is an effective epi.
-/
def isColimitOfEffectiveEpiStruct {X Y : C} (f : Y ⟶ X) (Hf : EffectiveEpiStruct f) :
    IsColimit (Sieve.generateSingleton f : Presieve X).cocone :=
  letI D := FullSubcategory fun T : Over X => Sieve.generateSingleton f T.hom
  letI F : D ⥤ _ := (Sieve.generateSingleton f).arrows.diagram
  { desc := fun S => Hf.desc (S.ι.app ⟨Over.mk f, ⟨𝟙 _, by simp⟩⟩) <| by
      intro Z g₁ g₂ h
      let Y' : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let Z' : D := ⟨Over.mk (g₁ ≫ f), g₁, rfl⟩
      let g₁' : Z' ⟶ Y' := Over.homMk g₁
      let g₂' : Z' ⟶ Y' := Over.homMk g₂ (by simp [h])
      change F.map g₁' ≫ _ = F.map g₂' ≫ _
      simp only [S.w]
    fac := by
      rintro S ⟨T,g,hT⟩
      dsimp
      nth_rewrite 1 [← hT, Category.assoc, Hf.fac]
      let y : D := ⟨Over.mk f, 𝟙 _, by simp⟩
      let x : D := ⟨Over.mk T.hom, g, hT⟩
      let g' : x ⟶ y := Over.homMk g
      

Proof state:
case mk.intro
C : Type u_1
inst✝ : Category.{?u.8651, u_1} C
X Y : C
f : Y ⟶ X
Hf : EffectiveEpiStruct f
D : Type (max u_1 ?u.8651) := FullSubcategory fun T => (Sieve.generateSingleton f).arrows T.hom
F : D ⥤ C := Presieve.diagram (Sieve.generateSingleton f).arrows
S : Cocone (Presieve.diagram (Sieve.generateSingleton f).arrows)
T : Over X
g : (𝟭 C).obj T.left ⟶ Y
hT : g ≫ f = T.hom
y : D := { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = (Over.mk f).hom) }
x : D := { obj := Over.mk T.hom, property := (_ : ∃ e, e ≫ f = (Over.mk T.hom).hom) }
g' : x ⟶ y := Over.homMk g
⊢ g ≫ S.ι.app { obj := Over.mk f, property := (_ : ∃ e, e ≫ f = f) } =
    S.ι.app { obj := T, property := (_ : ∃ e, e ≫ f = T.hom) }

Next tactic:
change F.map g' ≫ _ = _