l3lab/ntp-mathlib huggingface dataset:
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  

Proof state:
⊢ Functor.IsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)

Next tactic:
constructor
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  

Proof state:
case is_cover
⊢ ∀ (U : CompHaus), Sieve.coverByImage Stonean.toCompHaus U ∈ GrothendieckTopology.sieves (coherentTopology CompHaus) U

Next tactic:
intro B
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  

Proof state:
case is_cover
B : CompHaus
⊢ Sieve.coverByImage Stonean.toCompHaus B ∈ GrothendieckTopology.sieves (coherentTopology CompHaus) B

Next tactic:
convert generate_singleton_mem_coherentTopology B
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  

Proof state:
case h.e'_4
B : CompHaus
⊢ Sieve.coverByImage Stonean.toCompHaus B = Sieve.generate (Presieve.singleton (presentation.π B))

Next tactic:
ext Y f
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  

Proof state:
case h.e'_4.h
B Y : CompHaus
f : Y ⟶ B
⊢ (Sieve.coverByImage Stonean.toCompHaus B).arrows f ↔ (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f

Next tactic:
refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · 

Proof state:
case h.e'_4.h.refine_1
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
⊢ (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f

Next tactic:
have : Projective (Stonean.toCompHaus.obj obj)
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · 

Proof state:
case this
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
⊢ Projective (Stonean.toCompHaus.obj obj)

Next tactic:
simp only [Stonean.toCompHaus, inducedFunctor_obj]
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      

Proof state:
case this
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
⊢ Projective obj.compHaus

Next tactic:
exact inferInstance
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      exact inferInstance
    

Proof state:
case h.e'_4.h.refine_1
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
this : Projective (Stonean.toCompHaus.obj obj)
⊢ (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f

Next tactic:
obtain ⟨p, p_factors⟩ := Projective.factors map (CompHaus.presentation.π B)
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      exact inferInstance
    obtain ⟨p, p_factors⟩ := Projective.factors map (CompHaus.presentation.π B)
    

Proof state:
case h.e'_4.h.refine_1.intro
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
this : Projective (Stonean.toCompHaus.obj obj)
p : Stonean.toCompHaus.obj obj ⟶ (presentation B).compHaus
p_factors : p ≫ presentation.π B = map
⊢ (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f

Next tactic:
exact ⟨(Stonean.toCompHaus.obj (presentation B)), ⟨lift ≫ p, ⟨(presentation.π B),
      ⟨Presieve.singleton.mk, by rw [Category.assoc, p_factors, fact]⟩⟩⟩⟩
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      exact inferInstance
    obtain ⟨p, p_factors⟩ := Projective.factors map (CompHaus.presentation.π B)
    exact ⟨(Stonean.toCompHaus.obj (presentation B)), ⟨lift ≫ p, ⟨(presentation.π B),
      ⟨Presieve.singleton.mk, by 

Proof state:
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.coverByImage Stonean.toCompHaus B).arrows f
obj : Stonean
lift : Y ⟶ Stonean.toCompHaus.obj obj
map : Stonean.toCompHaus.obj obj ⟶ B
fact : lift ≫ map = f
this : Projective (Stonean.toCompHaus.obj obj)
p : Stonean.toCompHaus.obj obj ⟶ (presentation B).compHaus
p_factors : p ≫ presentation.π B = map
⊢ (lift ≫ p) ≫ presentation.π B = f

Next tactic:
rw [Category.assoc, p_factors, fact]
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      exact inferInstance
    obtain ⟨p, p_factors⟩ := Projective.factors map (CompHaus.presentation.π B)
    exact ⟨(Stonean.toCompHaus.obj (presentation B)), ⟨lift ≫ p, ⟨(presentation.π B),
      ⟨Presieve.singleton.mk, by rw [Category.assoc, p_factors, fact]⟩⟩⟩⟩
  · 

Proof state:
case h.e'_4.h.refine_2
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f
Z : CompHaus
h : Y ⟶ Z
g : Z ⟶ B
hypo1 : Presieve.singleton (presentation.π B) g
hf : h ≫ g = f
⊢ (Sieve.coverByImage Stonean.toCompHaus B).arrows f

Next tactic:
cases hypo1
open CompHaus in
instance isCoverDense : Stonean.toCompHaus.IsCoverDense (coherentTopology _)  := by
  constructor
  intro B
  convert generate_singleton_mem_coherentTopology B
  ext Y f
  refine ⟨fun ⟨⟨obj, lift, map, fact⟩⟩ ↦ ?_, fun ⟨Z, h, g, hypo1, hf⟩ ↦ ?_⟩
  · have : Projective (Stonean.toCompHaus.obj obj) -- Lean should find this instance?
    · simp only [Stonean.toCompHaus, inducedFunctor_obj]
      exact inferInstance
    obtain ⟨p, p_factors⟩ := Projective.factors map (CompHaus.presentation.π B)
    exact ⟨(Stonean.toCompHaus.obj (presentation B)), ⟨lift ≫ p, ⟨(presentation.π B),
      ⟨Presieve.singleton.mk, by rw [Category.assoc, p_factors, fact]⟩⟩⟩⟩
  · cases hypo1
    

Proof state:
case h.e'_4.h.refine_2.mk
B Y : CompHaus
f : Y ⟶ B
x✝ : (Sieve.generate (Presieve.singleton (presentation.π B))).arrows f
h : Y ⟶ (presentation B).compHaus
hf : h ≫ presentation.π B = f
⊢ (Sieve.coverByImage Stonean.toCompHaus B).arrows f

Next tactic:
exact ⟨⟨presentation B, h, presentation.π B, hf⟩⟩
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  

Proof state:
X : Stonean
S : Sieve X
⊢ (∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)) ↔
    S ∈
      GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus))
        X

Next tactic:
refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · 

Proof state:
case refine_1
X : Stonean
S : Sieve X
x✝ : ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
α : Type
w✝ : Fintype α
Y : α → Stonean
π : (a : α) → Y a ⟶ X
H₁ : EffectiveEpiFamily Y π
H₂ : ∀ (a : α), S.arrows (π a)
⊢ S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X

Next tactic:
apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    

Proof state:
case refine_1
X : Stonean
S : Sieve X
x✝ : ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
α : Type
w✝ : Fintype α
Y : α → Stonean
π : (a : α) → Y a ⟶ X
H₁ : EffectiveEpiFamily Y π
H₂ : ∀ (a : α), S.arrows (π a)
⊢ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)

Next tactic:
refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    

Proof state:
case refine_1
X : Stonean
S : Sieve X
x✝ : ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
α : Type
w✝ : Fintype α
Y : α → Stonean
π : (a : α) → Y a ⟶ X
H₁ : EffectiveEpiFamily Y π
H₂ : ∀ (a : α), S.arrows (π a)
⊢ EffectiveEpiFamily (fun i => Stonean.toCompHaus.obj (Y i)) fun i => Stonean.toProfinite.map (π i)

Next tactic:
simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    

Proof state:
case refine_1
X : Stonean
S : Sieve X
x✝ : ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)
α : Type
w✝ : Fintype α
Y : α → Stonean
π : (a : α) → Y a ⟶ X
H₂ : ∀ (a : α), S.arrows (π a)
H₁ : ∀ (b : CoeSort.coe X), ∃ a x, (π a) x = b
⊢ EffectiveEpiFamily (fun i => Stonean.toCompHaus.obj (Y i)) fun i => Stonean.toProfinite.map (π i)

Next tactic:
exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · 

Proof state:
case refine_2
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
⊢ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
    

Proof state:
case refine_2.intro.intro.intro.intro.intro
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
α : Type
w✝ : Fintype α
Y : α → CompHaus
π : (a : α) → Y a ⟶ Stonean.toCompHaus.obj X
H₁ : EffectiveEpiFamily Y π
H₂ : ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)
⊢ ∃ α x Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
refine ⟨α, inferInstance, ?_⟩
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
    refine ⟨α, inferInstance, ?_⟩
    

Proof state:
case refine_2.intro.intro.intro.intro.intro
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
α : Type
w✝ : Fintype α
Y : α → CompHaus
π : (a : α) → Y a ⟶ Stonean.toCompHaus.obj X
H₁ : EffectiveEpiFamily Y π
H₂ : ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)
⊢ ∃ Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
obtain ⟨Y₀, H₂⟩ := Classical.skolem.mp H₂
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
    refine ⟨α, inferInstance, ?_⟩
    obtain ⟨Y₀, H₂⟩ := Classical.skolem.mp H₂
    

Proof state:
case refine_2.intro.intro.intro.intro.intro.intro
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
α : Type
w✝ : Fintype α
Y : α → CompHaus
π : (a : α) → Y a ⟶ Stonean.toCompHaus.obj X
H₁ : EffectiveEpiFamily Y π
H₂✝ : ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)
Y₀ : α → Stonean
H₂ : ∀ (x : α), ∃ g h, S.arrows g ∧ π x = h ≫ Stonean.toCompHaus.map g
⊢ ∃ Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
obtain ⟨π₀, H₂⟩ := Classical.skolem.mp H₂
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
    refine ⟨α, inferInstance, ?_⟩
    obtain ⟨Y₀, H₂⟩ := Classical.skolem.mp H₂
    obtain ⟨π₀, H₂⟩ := Classical.skolem.mp H₂
    

Proof state:
case refine_2.intro.intro.intro.intro.intro.intro.intro
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
α : Type
w✝ : Fintype α
Y : α → CompHaus
π : (a : α) → Y a ⟶ Stonean.toCompHaus.obj X
H₁ : EffectiveEpiFamily Y π
H₂✝¹ : ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)
Y₀ : α → Stonean
H₂✝ : ∀ (x : α), ∃ g h, S.arrows g ∧ π x = h ≫ Stonean.toCompHaus.map g
π₀ : (x : α) → Y₀ x ⟶ X
H₂ : ∀ (x : α), ∃ h, S.arrows (π₀ x) ∧ π x = h ≫ Stonean.toCompHaus.map (π₀ x)
⊢ ∃ Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
obtain ⟨f₀, H₂⟩ := Classical.skolem.mp H₂
theorem coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily (X : Stonean) (S : Sieve X) :
    (∃ (α : Type) (_ : Fintype α) (Y : α → Stonean) (π : (a : α) → (Y a ⟶ X)),
    EffectiveEpiFamily Y π ∧ (∀ a : α, (S.arrows) (π a)) ) ↔
    (S ∈ Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) X) := by
  refine ⟨fun ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ ↦ ?_, fun hS ↦ ?_⟩
  · apply (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily (Sieve.functorPushforward _ S)).mpr
    refine ⟨α, inferInstance, fun i => Stonean.toCompHaus.obj (Y i),
      fun i => Stonean.toProfinite.map (π i), ⟨?_,
      fun a => Sieve.image_mem_functorPushforward Stonean.toCompHaus S (H₂ a)⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    exact CompHaus.effectiveEpiFamily_of_jointly_surjective
        (fun i => Stonean.toCompHaus.obj (Y i)) (fun i => Stonean.toCompHaus.map (π i)) H₁
  · obtain ⟨α, _, Y, π, ⟨H₁, H₂⟩⟩ := (coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily _).mp hS
    refine ⟨α, inferInstance, ?_⟩
    obtain ⟨Y₀, H₂⟩ := Classical.skolem.mp H₂
    obtain ⟨π₀, H₂⟩ := Classical.skolem.mp H₂
    obtain ⟨f₀, H₂⟩ := Classical.skolem.mp H₂
    

Proof state:
case refine_2.intro.intro.intro.intro.intro.intro.intro.intro
X : Stonean
S : Sieve X
hS :
  S ∈
    GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus)) X
α : Type
w✝ : Fintype α
Y : α → CompHaus
π : (a : α) → Y a ⟶ Stonean.toCompHaus.obj X
H₁ : EffectiveEpiFamily Y π
H₂✝² : ∀ (a : α), (Sieve.functorPushforward Stonean.toCompHaus S).arrows (π a)
Y₀ : α → Stonean
H₂✝¹ : ∀ (x : α), ∃ g h, S.arrows g ∧ π x = h ≫ Stonean.toCompHaus.map g
π₀ : (x : α) → Y₀ x ⟶ X
H₂✝ : ∀ (x : α), ∃ h, S.arrows (π₀ x) ∧ π x = h ≫ Stonean.toCompHaus.map (π₀ x)
f₀ : (x : α) → Y x ⟶ Stonean.toCompHaus.obj (Y₀ x)
H₂ : ∀ (x : α), S.arrows (π₀ x) ∧ π x = f₀ x ≫ Stonean.toCompHaus.map (π₀ x)
⊢ ∃ Y π, EffectiveEpiFamily Y π ∧ ∀ (a : α), S.arrows (π a)

Next tactic:
refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩