Theorem: CategoryTheory.regularTopology.mem_sieves_of_hasEffectiveEpi
File: Mathlib/CategoryTheory/Sites/Coherent/RegularTopology.lean

tactic: rintro ⟨Y, π, h⟩
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
⊢ (∃ Y π, EffectiveEpi π ∧ S.arrows π) → S ∈ (regularTopology C).sieves X
state_after: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ S ∈ (regularTopology C).sieves X

tactic: have h_le : Sieve.generate (Presieve.ofArrows (fun () ↦ Y) (fun _ ↦ π)) ≤ S := by
  rw [Sieve.sets_iff_generate (Presieve.ofArrows _ _) S]
  apply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows _ _) S _
  intro W g f
  refine ⟨W, 𝟙 W, ?_⟩
  cases f
  exact ⟨π, ⟨h.2, Category.id_comp π⟩⟩
state_before: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ S ∈ (regularTopology C).sieves X
state_after: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
h_le : Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S
⊢ S ∈ (regularTopology C).sieves X

tactic: apply Coverage.saturate_of_superset (regularCoverage C) h_le
state_before: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
h_le : Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S
⊢ S ∈ (regularTopology C).sieves X
state_after: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
h_le : Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S
⊢ (regularCoverage C).saturate X (Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π))

tactic: exact Coverage.saturate.of X _ ⟨Y, π, rfl, h.1⟩
state_before: case intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
h_le : Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S
⊢ (regularCoverage C).saturate X (Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π))
state_after: no goals

tactic: rw [Sieve.sets_iff_generate (Presieve.ofArrows _ _) S]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ Sieve.generate (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S.arrows

tactic: apply Presieve.le_of_factorsThru_sieve (Presieve.ofArrows _ _) S _
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ (Presieve.ofArrows (fun x => Y) fun x => π) ≤ S.arrows
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ (Presieve.ofArrows (fun x => Y) fun x => π).FactorsThru S.arrows

tactic: intro W g f
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
⊢ (Presieve.ofArrows (fun x => Y) fun x => π).FactorsThru S.arrows
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun x => Y) (fun x => π) g
⊢ ∃ W_1 i e, S.arrows e ∧ i ≫ e = g

tactic: refine ⟨W, 𝟙 W, ?_⟩
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun x => Y) (fun x => π) g
⊢ ∃ W_1 i e, S.arrows e ∧ i ≫ e = g
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun x => Y) (fun x => π) g
⊢ ∃ e, S.arrows e ∧ 𝟙 W ≫ e = g

tactic: cases f
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
W : C
g : W ⟶ X
f : Presieve.ofArrows (fun x => Y) (fun x => π) g
⊢ ∃ e, S.arrows e ∧ 𝟙 W ≫ e = g
state_after: case mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
i✝ : Unit
⊢ ∃ e, S.arrows e ∧ 𝟙 Y ≫ e = π

tactic: exact ⟨π, ⟨h.2, Category.id_comp π⟩⟩
state_before: case mk
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
π : Y ⟶ X
h : EffectiveEpi π ∧ S.arrows π
i✝ : Unit
⊢ ∃ e, S.arrows e ∧ 𝟙 Y ≫ e = π
state_after: no goals