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

tactic: constructor
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
⊢ S ∈ (regularTopology C).sieves X ↔ ∃ Y π, EffectiveEpi π ∧ S.arrows π
state_after: case mp
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
⊢ S ∈ (regularTopology C).sieves X → ∃ Y π, EffectiveEpi π ∧ S.arrows π

case mpr
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

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

tactic: induction' h with Y T hS Y Y R S _ _ a b
state_before: case mp
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
h : S ∈ (regularTopology C).sieves X
⊢ ∃ Y π, EffectiveEpi π ∧ S.arrows π
state_after: case mp.of
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
hS : T ∈ (regularCoverage C).covering Y
⊢ ∃ Y_1 π, EffectiveEpi π ∧ (Sieve.generate T).arrows π

case mp.top
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
⊢ ∃ Y_1 π, EffectiveEpi π ∧ ⊤.arrows π

case mp.transitive
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
a : ∃ Y_1 π, EffectiveEpi π ∧ R.arrows π
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π

tactic: rcases hS with ⟨Y', π, h'⟩
state_before: case mp.of
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
hS : T ∈ (regularCoverage C).covering Y
⊢ ∃ Y_1 π, EffectiveEpi π ∧ (Sieve.generate T).arrows π
state_after: case mp.of.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
Y' : C
π : Y' ⟶ Y
h' : (T = Presieve.ofArrows (fun x => Y') fun x => π) ∧ EffectiveEpi π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ (Sieve.generate T).arrows π

tactic: refine ⟨Y', π, h'.2, ?_⟩
state_before: case mp.of.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
Y' : C
π : Y' ⟶ Y
h' : (T = Presieve.ofArrows (fun x => Y') fun x => π) ∧ EffectiveEpi π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ (Sieve.generate T).arrows π
state_after: case mp.of.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
Y' : C
π : Y' ⟶ Y
h' : (T = Presieve.ofArrows (fun x => Y') fun x => π) ∧ EffectiveEpi π
⊢ (Sieve.generate T).arrows π

tactic: rcases h' with ⟨rfl, _⟩
state_before: case mp.of.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
T : Presieve Y
Y' : C
π : Y' ⟶ Y
h' : (T = Presieve.ofArrows (fun x => Y') fun x => π) ∧ EffectiveEpi π
⊢ (Sieve.generate T).arrows π
state_after: case mp.of.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y Y' : C
π : Y' ⟶ Y
right✝ : EffectiveEpi π
⊢ (Sieve.generate (Presieve.ofArrows (fun x => Y') fun x => π)).arrows π

tactic: exact ⟨Y', 𝟙 Y', π, Presieve.ofArrows.mk (), (by simp)⟩
state_before: case mp.of.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y Y' : C
π : Y' ⟶ Y
right✝ : EffectiveEpi π
⊢ (Sieve.generate (Presieve.ofArrows (fun x => Y') fun x => π)).arrows π
state_after: no goals

tactic: simp
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y Y' : C
π : Y' ⟶ Y
right✝ : EffectiveEpi π
⊢ 𝟙 Y' ≫ π = π
state_after: no goals

tactic: exact ⟨Y, (𝟙 Y), inferInstance, by simp only [Sieve.top_apply, forall_const]⟩
state_before: case mp.top
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
⊢ ∃ Y_1 π, EffectiveEpi π ∧ ⊤.arrows π
state_after: no goals

tactic: simp only [Sieve.top_apply, forall_const]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S : Sieve X
Y : C
⊢ ⊤.arrows (𝟙 Y)
state_after: no goals

tactic: rcases a with ⟨Y₁, π, ⟨h₁,h₂⟩⟩
state_before: case mp.transitive
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
a : ∃ Y_1 π, EffectiveEpi π ∧ R.arrows π
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π
state_after: case mp.transitive.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
Y₁ : C
π : Y₁ ⟶ Y
h₁ : EffectiveEpi π
h₂ : R.arrows π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π

tactic: choose Y' π' _ H using b h₂
state_before: case mp.transitive.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
Y₁ : C
π : Y₁ ⟶ Y
h₁ : EffectiveEpi π
h₂ : R.arrows π
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π
state_after: case mp.transitive.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
Y₁ : C
π : Y₁ ⟶ Y
h₁ : EffectiveEpi π
h₂ : R.arrows π
Y' : C
π' : Y' ⟶ Y₁
h✝ : EffectiveEpi π'
H : (Sieve.pullback π S).arrows π'
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π

tactic: exact ⟨Y', π' ≫ π, inferInstance, (by simpa using H)⟩
state_before: case mp.transitive.intro.intro.intro
C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
Y₁ : C
π : Y₁ ⟶ Y
h₁ : EffectiveEpi π
h₂ : R.arrows π
Y' : C
π' : Y' ⟶ Y₁
h✝ : EffectiveEpi π'
H : (Sieve.pullback π S).arrows π'
⊢ ∃ Y_1 π, EffectiveEpi π ∧ S.arrows π
state_after: no goals

tactic: simpa using H
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preregular C
X : C
S✝ : Sieve X
Y : C
R S : Sieve Y
a✝¹ : (regularCoverage C).saturate Y R
a✝ : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → (regularCoverage C).saturate Y_1 (Sieve.pullback f S)
b : ∀ ⦃Y_1 : C⦄ ⦃f : Y_1 ⟶ Y⦄, R.arrows f → ∃ Y_2 π, EffectiveEpi π ∧ (Sieve.pullback f S).arrows π
Y₁ : C
π : Y₁ ⟶ Y
h₁ : EffectiveEpi π
h₂ : R.arrows π
Y' : C
π' : Y' ⟶ Y₁
h✝ : EffectiveEpi π'
H : (Sieve.pullback π S).arrows π'
⊢ S.arrows (π' ≫ π)
state_after: no goals

tactic: exact regularTopology.mem_sieves_of_hasEffectiveEpi S
state_before: case mpr
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: no goals