l3lab/ntp-mathlib huggingface dataset:
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    

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)
⊢ EffectiveEpiFamily Y₀ π₀

Next tactic:
simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    

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)
⊢ ∀ (b : CoeSort.coe X), ∃ a x, (π₀ a) x = b

Next tactic:
simp only [(CompHaus.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₁
    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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    simp only [(CompHaus.effectiveEpiFamily_tfae _ _).out 0 2] at 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₂✝² : ∀ (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)
H₁ : ∀ (b : ↑(Stonean.toCompHaus.obj X).toTop), ∃ a x, (π a) x = b
⊢ ∀ (b : CoeSort.coe X), ∃ a x, (π₀ a) x = b

Next tactic:
intro b
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    simp only [(CompHaus.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    intro b
    

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₂✝² : ∀ (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)
H₁ : ∀ (b : ↑(Stonean.toCompHaus.obj X).toTop), ∃ a x, (π a) x = b
b : CoeSort.coe X
⊢ ∃ a x, (π₀ a) x = b

Next tactic:
obtain ⟨i, x, H₁⟩ := H₁ b
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    simp only [(CompHaus.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    intro b
    obtain ⟨i, x, H₁⟩ := H₁ b
    

Proof state:
case refine_2.intro.intro.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₂✝² : ∀ (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)
H₁✝ : ∀ (b : ↑(Stonean.toCompHaus.obj X).toTop), ∃ a x, (π a) x = b
b : CoeSort.coe X
i : α
x : ↑(Y i).toTop
H₁ : (π i) x = b
⊢ ∃ a x, (π₀ a) x = b

Next tactic:
refine ⟨i, f₀ i x, ?_⟩
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    simp only [(CompHaus.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    intro b
    obtain ⟨i, x, H₁⟩ := H₁ b
    refine ⟨i, f₀ i x, ?_⟩
    

Proof state:
case refine_2.intro.intro.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₂✝² : ∀ (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)
H₁✝ : ∀ (b : ↑(Stonean.toCompHaus.obj X).toTop), ∃ a x, (π a) x = b
b : CoeSort.coe X
i : α
x : ↑(Y i).toTop
H₁ : (π i) x = b
⊢ (π₀ i) ((f₀ i) x) = b

Next tactic:
rw [← H₁, (H₂ i).2]
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₂
    refine ⟨Y₀ , π₀, ⟨?_, fun i ↦ (H₂ i).1⟩⟩
    simp only [(Stonean.effectiveEpiFamily_tfae _ _).out 0 2]
    simp only [(CompHaus.effectiveEpiFamily_tfae _ _).out 0 2] at H₁
    intro b
    obtain ⟨i, x, H₁⟩ := H₁ b
    refine ⟨i, f₀ i x, ?_⟩
    rw [← H₁, (H₂ i).2]
    

Proof state:
case refine_2.intro.intro.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₂✝² : ∀ (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)
H₁✝ : ∀ (b : ↑(Stonean.toCompHaus.obj X).toTop), ∃ a x, (π a) x = b
b : CoeSort.coe X
i : α
x : ↑(Y i).toTop
H₁ : (π i) x = b
⊢ (π₀ i) ((f₀ i) x) = (f₀ i ≫ Stonean.toCompHaus.map (π₀ i)) x

Next tactic:
rfl
lemma coherentTopology_is_induced :
    coherentTopology Stonean.{u} =
      Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) := by
  

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

Next tactic:
ext X S
lemma coherentTopology_is_induced :
    coherentTopology Stonean.{u} =
      Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) := by
  ext X S
  

Proof state:
case h.h.h
X : Stonean
S : Sieve X
⊢ S ∈ GrothendieckTopology.sieves (coherentTopology Stonean) X ↔
    S ∈
      GrothendieckTopology.sieves (Functor.inducedTopologyOfIsCoverDense Stonean.toCompHaus (coherentTopology CompHaus))
        X

Next tactic:
rw [← coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily X]
lemma coherentTopology_is_induced :
    coherentTopology Stonean.{u} =
      Stonean.toCompHaus.inducedTopologyOfIsCoverDense (coherentTopology _) := by
  ext X S
  rw [← coverDense.inducedTopology_Sieve_iff_EffectiveEpiFamily X]
  

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

Next tactic:
rw [← coherentTopology.mem_sieves_iff_hasEffectiveEpiFamily S]
lemma coverPreserving :
    CoverPreserving (coherentTopology _) (coherentTopology _) Stonean.toCompHaus := by
  

Proof state:
⊢ CoverPreserving (coherentTopology Stonean) (coherentTopology CompHaus) Stonean.toCompHaus

Next tactic:
rw [coherentTopology_is_induced]
lemma coverPreserving :
    CoverPreserving (coherentTopology _) (coherentTopology _) Stonean.toCompHaus := by
  rw [coherentTopology_is_induced]
  

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

Next tactic:
apply LocallyCoverDense.inducedTopology_coverPreserving
instance coverLifting :
    Stonean.toCompHaus.IsCocontinuous (coherentTopology _) (coherentTopology _) := by
  

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

Next tactic:
rw [coherentTopology_is_induced]
instance coverLifting :
    Stonean.toCompHaus.IsCocontinuous (coherentTopology _) (coherentTopology _) := by
  rw [coherentTopology_is_induced]
  

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

Next tactic:
apply LocallyCoverDense.inducedTopology_isCocontinuous
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  

Proof state:
B : Profinite
⊢ Sieve.generate (Presieve.singleton (presentation.π B)) ∈ GrothendieckTopology.sieves (coherentTopology Profinite) B

Next tactic:
apply Coverage.saturate.of
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  

Proof state:
case hS
B : Profinite
⊢ Presieve.singleton (presentation.π B) ∈ Coverage.covering (coherentCoverage Profinite) B

Next tactic:
refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · 

Proof state:
case hS.refine_1
B : Profinite
⊢ Presieve.singleton (presentation.π B) =
    Presieve.ofArrows (fun x => Stonean.toProfinite.obj (presentation B)) fun x => presentation.π B

Next tactic:
funext X f
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    

Proof state:
case hS.refine_1.h.h
B X : Profinite
f : X ⟶ B
⊢ Presieve.singleton (presentation.π B) f =
    Presieve.ofArrows (fun x => Stonean.toProfinite.obj (presentation B)) (fun x => presentation.π B) f

Next tactic:
ext
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    

Proof state:
case hS.refine_1.h.h.a
B X : Profinite
f : X ⟶ B
⊢ Presieve.singleton (presentation.π B) f ↔
    Presieve.ofArrows (fun x => Stonean.toProfinite.obj (presentation B)) (fun x => presentation.π B) f

Next tactic:
refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
    

Proof state:
case hS.refine_1.h.h.a
B X : Profinite
f : X ⟶ B
⊢ Presieve.ofArrows (fun x => Stonean.toProfinite.obj (presentation B)) (fun x => presentation.π B) f →
    Presieve.singleton (presentation.π B) f

Next tactic:
rintro ⟨⟩
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
    rintro ⟨⟩
    

Proof state:
case hS.refine_1.h.h.a.mk
B Y : Profinite
i✝ : Unit
⊢ Presieve.singleton (presentation.π B) (presentation.π B)

Next tactic:
simp only [Presieve.singleton_eq_iff_domain]
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
    rintro ⟨⟩
    simp only [Presieve.singleton_eq_iff_domain]
  · 

Proof state:
case hS.refine_2
B : Profinite
⊢ EffectiveEpiFamily (fun x => Stonean.toProfinite.obj (presentation B)) fun x => presentation.π B

Next tactic:
apply ((effectiveEpiFamily_tfae
      (fun (_ : Unit) => (Stonean.toProfinite.obj B.presentation))
      (fun (_ : Unit) => (Profinite.presentation.π B))).out 0 2).mpr
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
    rintro ⟨⟩
    simp only [Presieve.singleton_eq_iff_domain]
  · apply ((effectiveEpiFamily_tfae
      (fun (_ : Unit) => (Stonean.toProfinite.obj B.presentation))
      (fun (_ : Unit) => (Profinite.presentation.π B))).out 0 2).mpr
    

Proof state:
case hS.refine_2
B : Profinite
⊢ ∀ (b : ↑B.toCompHaus.toTop), ∃ a x, (presentation.π B) x = b

Next tactic:
intro b
open Profinite in
lemma generate_singleton_mem_coherentTopology (B : Profinite) :
    Sieve.generate (Presieve.singleton (presentation.π B)) ∈ coherentTopology Profinite B := by
  apply Coverage.saturate.of
  refine ⟨Unit, inferInstance, fun _ => (Stonean.toProfinite.obj B.presentation),
    fun _ => (presentation.π B), ?_ , ?_⟩
  · funext X f
    ext
    refine ⟨fun ⟨⟩ ↦ ⟨()⟩, ?_⟩
    rintro ⟨⟩
    simp only [Presieve.singleton_eq_iff_domain]
  · apply ((effectiveEpiFamily_tfae
      (fun (_ : Unit) => (Stonean.toProfinite.obj B.presentation))
      (fun (_ : Unit) => (Profinite.presentation.π B))).out 0 2).mpr
    intro b
    

Proof state:
case hS.refine_2
B : Profinite
b : ↑B.toCompHaus.toTop
⊢ ∃ a x, (presentation.π B) x = b

Next tactic:
exact ⟨(), (Profinite.epi_iff_surjective (presentation.π B)).mp (presentation.epi_π B) b⟩