Theorem: CategoryTheory.regularTopology.isLocallySurjective_iff
File: Mathlib/CategoryTheory/Sites/Coherent/LocallySurjective.lean

tactic: constructor
state_before: C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
⊢ Presheaf.IsLocallySurjective (regularTopology C) f ↔
    ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
      ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
⊢ Presheaf.IsLocallySurjective (regularTopology C) f →
    ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
      ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y

case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
⊢ (∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
      ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y) →
    Presheaf.IsLocallySurjective (regularTopology C) f

tactic: intro ⟨h⟩ X y
state_before: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
⊢ Presheaf.IsLocallySurjective (regularTopology C) f →
    ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
      ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h : ∀ {U : C} (s : (forget D).obj (G.obj { unop := U })), Presheaf.imageSieve f s ∈ (regularTopology C).sieves U
X : C
y : (forget D).obj (G.obj { unop := X })
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y

tactic: specialize h y
state_before: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h : ∀ {U : C} (s : (forget D).obj (G.obj { unop := U })), Presheaf.imageSieve f s ∈ (regularTopology C).sieves U
X : C
y : (forget D).obj (G.obj { unop := X })
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
h : Presheaf.imageSieve f y ∈ (regularTopology C).sieves X
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y

tactic: rw [regularTopology.mem_sieves_iff_hasEffectiveEpi] at h
state_before: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
h : Presheaf.imageSieve f y ∈ (regularTopology C).sieves X
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
h : ∃ Y π, EffectiveEpi π ∧ (Presheaf.imageSieve f y).arrows π
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y

tactic: obtain ⟨X', π, h, h'⟩ := h
state_before: case mp
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
h : ∃ Y π, EffectiveEpi π ∧ (Presheaf.imageSieve f y).arrows π
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: case mp.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
X' : C
π : X' ⟶ X
h : EffectiveEpi π
h' : (Presheaf.imageSieve f y).arrows π
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y

tactic: exact ⟨X', π, h, h'⟩
state_before: case mp.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
X : C
y : (forget D).obj (G.obj { unop := X })
X' : C
π : X' ⟶ X
h : EffectiveEpi π
h' : (Presheaf.imageSieve f y).arrows π
⊢ ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
state_after: no goals

tactic: intro h
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
⊢ (∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
      ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y) →
    Presheaf.IsLocallySurjective (regularTopology C) f
state_after: case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
⊢ Presheaf.IsLocallySurjective (regularTopology C) f

tactic: refine ⟨fun y ↦ ?_⟩
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
⊢ Presheaf.IsLocallySurjective (regularTopology C) f
state_after: case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
⊢ Presheaf.imageSieve f y ∈ (regularTopology C).sieves U✝

tactic: obtain ⟨X', π, h, h'⟩ := h _ y
state_before: case mpr
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
⊢ Presheaf.imageSieve f y ∈ (regularTopology C).sieves U✝
state_after: case mpr.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h✝ :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
X' : C
π : X' ⟶ U✝
h : EffectiveEpi π
h' : ∃ x, (f.app { unop := X' }) x = (G.map { unop := π }) y
⊢ Presheaf.imageSieve f y ∈ (regularTopology C).sieves U✝

tactic: rw [regularTopology.mem_sieves_iff_hasEffectiveEpi]
state_before: case mpr.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h✝ :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
X' : C
π : X' ⟶ U✝
h : EffectiveEpi π
h' : ∃ x, (f.app { unop := X' }) x = (G.map { unop := π }) y
⊢ Presheaf.imageSieve f y ∈ (regularTopology C).sieves U✝
state_after: case mpr.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h✝ :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
X' : C
π : X' ⟶ U✝
h : EffectiveEpi π
h' : ∃ x, (f.app { unop := X' }) x = (G.map { unop := π }) y
⊢ ∃ Y π, EffectiveEpi π ∧ (Presheaf.imageSieve f y).arrows π

tactic: exact ⟨X', π, h, h'⟩
state_before: case mpr.intro.intro.intro
C : Type u_1
D : Type u_2
inst✝³ : Category.{u_3, u_1} C
inst✝² : Category.{u_4, u_2} D
inst✝¹ : ConcreteCategory D
inst✝ : Preregular C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
h✝ :
  ∀ (X : C) (y : (forget D).obj (G.obj { unop := X })),
    ∃ X' φ, ∃ (_ : EffectiveEpi φ), ∃ x, (f.app { unop := X' }) x = (G.map { unop := φ }) y
U✝ : C
y : (forget D).obj (G.obj { unop := U✝ })
X' : C
π : X' ⟶ U✝
h : EffectiveEpi π
h' : ∃ x, (f.app { unop := X' }) x = (G.map { unop := π }) y
⊢ ∃ Y π, EffectiveEpi π ∧ (Presheaf.imageSieve f y).arrows π
state_after: no goals