Theorem: CategoryTheory.extensiveTopology.presheafIsLocallySurjective_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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) f ↔ ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) f → ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })

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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ (∀ (X : C), Function.Surjective ⇑(f.app { unop := X })) → Presheaf.IsLocallySurjective (extensiveTopology C) f

tactic: rw [Presheaf.isLocallySurjective_iff_whisker_forget (J := extensiveTopology C)]
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) f → ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) (whiskerRight f (forget D)) →
    ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })

tactic: exact fun h _ ↦ surjective_of_isLocallySurjective_sheafOfTypes (whiskerRight f (forget D)) 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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) (whiskerRight f (forget D)) →
    ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
⊢ (∀ (X : C), Function.Surjective ⇑(f.app { unop := X })) → Presheaf.IsLocallySurjective (extensiveTopology 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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
⊢ Presheaf.IsLocallySurjective (extensiveTopology C) f

tactic: refine ⟨fun {X} 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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
⊢ Presheaf.IsLocallySurjective (extensiveTopology 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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
⊢ Presheaf.imageSieve f y ∈ (extensiveTopology C).sieves X

tactic: obtain ⟨x, hx⟩ := h X 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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
⊢ Presheaf.imageSieve f y ∈ (extensiveTopology C).sieves X
state_after: case mpr.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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ Presheaf.imageSieve f y ∈ (extensiveTopology C).sieves X

tactic: convert (extensiveTopology C).top_mem' X
state_before: case mpr.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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ Presheaf.imageSieve f y ∈ (extensiveTopology C).sieves X
state_after: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ Presheaf.imageSieve f y = ⊤

tactic: rw [← Sieve.id_mem_iff_eq_top]
state_before: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ Presheaf.imageSieve f y = ⊤
state_after: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ (Presheaf.imageSieve f y).arrows (𝟙 X)

tactic: simp [Presheaf.imageSieve]
state_before: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ (Presheaf.imageSieve f y).arrows (𝟙 X)
state_after: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ ∃ t, (f.app { unop := X }) t = y

tactic: exact ⟨x, hx⟩
state_before: case h.e'_4
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✝³ : FinitaryPreExtensive C
F G : Cᵒᵖ ⥤ D
f : F ⟶ G
inst✝² : PreservesFiniteProducts F
inst✝¹ : PreservesFiniteProducts G
inst✝ : PreservesFiniteProducts (forget D)
h : ∀ (X : C), Function.Surjective ⇑(f.app { unop := X })
X : C
y : (forget D).obj (G.obj { unop := X })
x : (forget D).obj (F.obj { unop := X })
hx : (f.app { unop := X }) x = y
⊢ ∃ t, (f.app { unop := X }) t = y
state_after: no goals