l3lab/ntp-mathlib huggingface dataset:
lemma finiteCoproduct.hom_ext {B : Stonean.{u}} (f g : finiteCoproduct X ⟶ B)
    (h : ∀ a : α, finiteCoproduct.ι X a ≫ f = finiteCoproduct.ι X a ≫ g) : f = g := by
  ext ⟨a, x⟩
  

Proof state:
case w.mk
α : Type
inst✝ : Fintype α
B✝ : Stonean
X : α → Stonean
B : Stonean
f g : finiteCoproduct X ⟶ B
h : ∀ (a : α), ι X a ≫ f = ι X a ≫ g
a : α
x : CoeSort.coe (X a)
⊢ f { fst := a, snd := x } = g { fst := a, snd := x }

Next tactic:
specialize h a
lemma finiteCoproduct.hom_ext {B : Stonean.{u}} (f g : finiteCoproduct X ⟶ B)
    (h : ∀ a : α, finiteCoproduct.ι X a ≫ f = finiteCoproduct.ι X a ≫ g) : f = g := by
  ext ⟨a, x⟩
  specialize h a
  

Proof state:
case w.mk
α : Type
inst✝ : Fintype α
B✝ : Stonean
X : α → Stonean
B : Stonean
f g : finiteCoproduct X ⟶ B
a : α
x : CoeSort.coe (X a)
h : ι X a ≫ f = ι X a ≫ g
⊢ f { fst := a, snd := x } = g { fst := a, snd := x }

Next tactic:
apply_fun (fun q => q x) at h
lemma finiteCoproduct.hom_ext {B : Stonean.{u}} (f g : finiteCoproduct X ⟶ B)
    (h : ∀ a : α, finiteCoproduct.ι X a ≫ f = finiteCoproduct.ι X a ≫ g) : f = g := by
  ext ⟨a, x⟩
  specialize h a
  apply_fun (fun q => q x) at h
  

Proof state:
case w.mk
α : Type
inst✝ : Fintype α
B✝ : Stonean
X : α → Stonean
B : Stonean
f g : finiteCoproduct X ⟶ B
a : α
x : CoeSort.coe (X a)
h : (ι X a ≫ f) x = (ι X a ≫ g) x
⊢ f { fst := a, snd := x } = g { fst := a, snd := x }

Next tactic:
exact h
/-- The explicit finite coproduct cocone is a colimit cocone. -/
@[simps]
def finiteCoproduct.isColimit (F : Discrete α ⥤ Stonean) :
    IsColimit (finiteCoproduct.cocone F) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
F : Discrete α ⥤ Stonean
s : Cocone F
m : (cocone F).pt ⟶ s.pt
hm : ∀ (j : Discrete α), (cocone F).ι.app j ≫ m = s.ι.app j
a : α
⊢ ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫ m =
    ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫
      (fun s => desc (fun a => (F.obj ∘ Discrete.mk) a) fun a => s.ι.app { as := a }) s

Next tactic:
specialize hm ⟨a⟩
/-- The explicit finite coproduct cocone is a colimit cocone. -/
@[simps]
def finiteCoproduct.isColimit (F : Discrete α ⥤ Stonean) :
    IsColimit (finiteCoproduct.cocone F) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
F : Discrete α ⥤ Stonean
s : Cocone F
m : (cocone F).pt ⟶ s.pt
a : α
hm : (cocone F).ι.app { as := a } ≫ m = s.ι.app { as := a }
⊢ ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫ m =
    ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫
      (fun s => desc (fun a => (F.obj ∘ Discrete.mk) a) fun a => s.ι.app { as := a }) s

Next tactic:
ext t
/-- The explicit finite coproduct cocone is a colimit cocone. -/
@[simps]
def finiteCoproduct.isColimit (F : Discrete α ⥤ Stonean) :
    IsColimit (finiteCoproduct.cocone F) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    ext t
    

Proof state:
case w
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
F : Discrete α ⥤ Stonean
s : Cocone F
m : (cocone F).pt ⟶ s.pt
a : α
hm : (cocone F).ι.app { as := a } ≫ m = s.ι.app { as := a }
t : (forget Stonean).obj ((F.obj ∘ Discrete.mk) a)
⊢ (ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫ m) t =
    (ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫
        (fun s => desc (fun a => (F.obj ∘ Discrete.mk) a) fun a => s.ι.app { as := a }) s)
      t

Next tactic:
apply_fun (fun q => q t) at hm
/-- The explicit finite coproduct cocone is a colimit cocone. -/
@[simps]
def finiteCoproduct.isColimit (F : Discrete α ⥤ Stonean) :
    IsColimit (finiteCoproduct.cocone F) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    ext t
    apply_fun (fun q => q t) at hm
    

Proof state:
case w
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
F : Discrete α ⥤ Stonean
s : Cocone F
m : (cocone F).pt ⟶ s.pt
a : α
t : (forget Stonean).obj ((F.obj ∘ Discrete.mk) a)
hm : ((cocone F).ι.app { as := a } ≫ m) t = (s.ι.app { as := a }) t
⊢ (ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫ m) t =
    (ι (fun a => (F.obj ∘ Discrete.mk) a) a ≫
        (fun s => desc (fun a => (F.obj ∘ Discrete.mk) a) fun a => s.ι.app { as := a }) s)
      t

Next tactic:
exact hm
/--
The more explicit finite coproduct cocone is a colimit cocone.
-/
@[simps]
def finiteCoproduct.isColimit' : Limits.IsColimit (finiteCoproduct.explicitCocone X) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
s : Cocone (Discrete.functor X)
m : (explicitCocone X).pt ⟶ s.pt
hm : ∀ (j : Discrete α), (explicitCocone X).ι.app j ≫ m = s.ι.app j
a : α
⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => s.ι.app { as := a }) s

Next tactic:
specialize hm ⟨a⟩
/--
The more explicit finite coproduct cocone is a colimit cocone.
-/
@[simps]
def finiteCoproduct.isColimit' : Limits.IsColimit (finiteCoproduct.explicitCocone X) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
s : Cocone (Discrete.functor X)
m : (explicitCocone X).pt ⟶ s.pt
a : α
hm : (explicitCocone X).ι.app { as := a } ≫ m = s.ι.app { as := a }
⊢ ι (fun a => X a) a ≫ m = ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => s.ι.app { as := a }) s

Next tactic:
ext t
/--
The more explicit finite coproduct cocone is a colimit cocone.
-/
@[simps]
def finiteCoproduct.isColimit' : Limits.IsColimit (finiteCoproduct.explicitCocone X) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    ext t
    

Proof state:
case w
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
s : Cocone (Discrete.functor X)
m : (explicitCocone X).pt ⟶ s.pt
a : α
hm : (explicitCocone X).ι.app { as := a } ≫ m = s.ι.app { as := a }
t : (forget Stonean).obj (X a)
⊢ (ι (fun a => X a) a ≫ m) t = (ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => s.ι.app { as := a }) s) t

Next tactic:
apply_fun (fun q => q t) at hm
/--
The more explicit finite coproduct cocone is a colimit cocone.
-/
@[simps]
def finiteCoproduct.isColimit' : Limits.IsColimit (finiteCoproduct.explicitCocone X) where
  desc := fun s => finiteCoproduct.desc _ fun a => s.ι.app ⟨a⟩
  fac := fun s ⟨a⟩ => finiteCoproduct.ι_desc _ _ _
  uniq := fun s m hm => finiteCoproduct.hom_ext _ _ _ fun a => by
    specialize hm ⟨a⟩
    ext t
    apply_fun (fun q => q t) at hm
    

Proof state:
case w
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
s : Cocone (Discrete.functor X)
m : (explicitCocone X).pt ⟶ s.pt
a : α
t : (forget Stonean).obj (X a)
hm : ((explicitCocone X).ι.app { as := a } ≫ m) t = (s.ι.app { as := a }) t
⊢ (ι (fun a => X a) a ≫ m) t = (ι (fun a => X a) a ≫ (fun s => desc (fun a => X a) fun a => s.ι.app { as := a }) s) t

Next tactic:
exact hm
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Fintype α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a) := by
  

Proof state:
α✝ : Type
inst✝¹ : Fintype α✝
B : Stonean
X : α✝ → Stonean
α : Type
inst✝ : Fintype α
Z : α → Stonean
a : α
⊢ OpenEmbedding ⇑(Sigma.ι Z a)

Next tactic:
refine' OpenEmbedding.of_comp _ (homeoOfIso (coproductIsoCoproduct Z).symm).openEmbedding _
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Fintype α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a) := by
  refine' OpenEmbedding.of_comp _ (homeoOfIso (coproductIsoCoproduct Z).symm).openEmbedding _
  

Proof state:
α✝ : Type
inst✝¹ : Fintype α✝
B : Stonean
X : α✝ → Stonean
α : Type
inst✝ : Fintype α
Z : α → Stonean
a : α
⊢ OpenEmbedding (⇑(homeoOfIso (coproductIsoCoproduct Z).symm) ∘ ⇑(Sigma.ι Z a))

Next tactic:
convert finiteCoproduct.openEmbedding_ι Z a
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Fintype α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a) := by
  refine' OpenEmbedding.of_comp _ (homeoOfIso (coproductIsoCoproduct Z).symm).openEmbedding _
  convert finiteCoproduct.openEmbedding_ι Z a
  

Proof state:
case h.e'_5
α✝ : Type
inst✝¹ : Fintype α✝
B : Stonean
X : α✝ → Stonean
α : Type
inst✝ : Fintype α
Z : α → Stonean
a : α
⊢ ⇑(homeoOfIso (coproductIsoCoproduct Z).symm) ∘ ⇑(Sigma.ι Z a) = ⇑(finiteCoproduct.ι Z a)

Next tactic:
ext x
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Fintype α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a) := by
  refine' OpenEmbedding.of_comp _ (homeoOfIso (coproductIsoCoproduct Z).symm).openEmbedding _
  convert finiteCoproduct.openEmbedding_ι Z a
  ext x
  

Proof state:
case h.e'_5.h
α✝ : Type
inst✝¹ : Fintype α✝
B : Stonean
X : α✝ → Stonean
α : Type
inst✝ : Fintype α
Z : α → Stonean
a : α
x : CoeSort.coe (Z a)
⊢ (⇑(homeoOfIso (coproductIsoCoproduct Z).symm) ∘ ⇑(Sigma.ι Z a)) x = (finiteCoproduct.ι Z a) x

Next tactic:
change ((Sigma.ι Z a) ≫ (coproductIsoCoproduct Z).inv) x = _
/-- The inclusion maps into the abstract finite coproduct are open embeddings. -/
lemma Sigma.openEmbedding_ι {α : Type} [Fintype α] (Z : α → Stonean.{u}) (a : α) :
    OpenEmbedding (Sigma.ι Z a) := by
  refine' OpenEmbedding.of_comp _ (homeoOfIso (coproductIsoCoproduct Z).symm).openEmbedding _
  convert finiteCoproduct.openEmbedding_ι Z a
  ext x
  change ((Sigma.ι Z a) ≫ (coproductIsoCoproduct Z).inv) x = _
  

Proof state:
case h.e'_5.h
α✝ : Type
inst✝¹ : Fintype α✝
B : Stonean
X : α✝ → Stonean
α : Type
inst✝ : Fintype α
Z : α → Stonean
a : α
x : CoeSort.coe (Z a)
⊢ (Sigma.ι Z a ≫ (coproductIsoCoproduct Z).inv) x = (finiteCoproduct.ι Z a) x

Next tactic:
simp only [coproductIsoCoproduct, colimit.comp_coconePointUniqueUpToIso_inv,
    finiteCoproduct.explicitCocone_pt, finiteCoproduct.explicitCocone_ι, Discrete.natTrans_app]
instance : PreservesFiniteCoproducts Stonean.toCompHaus := by
  

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
⊢ PreservesFiniteCoproducts toCompHaus

Next tactic:
refine ⟨fun J hJ ↦ ⟨fun {F} ↦ ?_⟩⟩
instance : PreservesFiniteCoproducts Stonean.toCompHaus := by
  refine ⟨fun J hJ ↦ ⟨fun {F} ↦ ?_⟩⟩
  

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
J : Type
hJ : Fintype J
F : Discrete J ⥤ Stonean
⊢ PreservesColimit F toCompHaus

Next tactic:
suffices : PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) Stonean.toCompHaus
instance : PreservesFiniteCoproducts Stonean.toCompHaus := by
  refine ⟨fun J hJ ↦ ⟨fun {F} ↦ ?_⟩⟩
  suffices : PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) Stonean.toCompHaus
  · 

Proof state:
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
J : Type
hJ : Fintype J
F : Discrete J ⥤ Stonean
this : PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) toCompHaus
⊢ PreservesColimit F toCompHaus

Next tactic:
exact preservesColimitOfIsoDiagram _ Discrete.natIsoFunctor.symm
instance : PreservesFiniteCoproducts Stonean.toCompHaus := by
  refine ⟨fun J hJ ↦ ⟨fun {F} ↦ ?_⟩⟩
  suffices : PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) Stonean.toCompHaus
  · exact preservesColimitOfIsoDiagram _ Discrete.natIsoFunctor.symm
  

Proof state:
case this
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
J : Type
hJ : Fintype J
F : Discrete J ⥤ Stonean
⊢ PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) toCompHaus

Next tactic:
apply preservesColimitOfPreservesColimitCocone (Stonean.finiteCoproduct.isColimit _)
instance : PreservesFiniteCoproducts Stonean.toCompHaus := by
  refine ⟨fun J hJ ↦ ⟨fun {F} ↦ ?_⟩⟩
  suffices : PreservesColimit (Discrete.functor (F.obj ∘ Discrete.mk)) Stonean.toCompHaus
  · exact preservesColimitOfIsoDiagram _ Discrete.natIsoFunctor.symm
  apply preservesColimitOfPreservesColimitCocone (Stonean.finiteCoproduct.isColimit _)
  

Proof state:
case this
α : Type
inst✝ : Fintype α
B : Stonean
X : α → Stonean
J : Type
hJ : Fintype J
F : Discrete J ⥤ Stonean
⊢ IsColimit (toCompHaus.mapCocone (finiteCoproduct.cocone (Discrete.functor (F.obj ∘ Discrete.mk))))

Next tactic:
exact CompHaus.finiteCoproduct.isColimit _
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ CompactSpace ↑(TopCat.of ↑(⇑f ⁻¹' Set.range ⇑i))

Next tactic:
dsimp [TopCat.of]
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ CompactSpace ↑(⇑f ⁻¹' Set.range ⇑i)

Next tactic:
rw [← isCompact_iff_compactSpace]
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ IsCompact (⇑f ⁻¹' Set.range ⇑i)

Next tactic:
refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ IsCompact (Set.range ⇑i)

Next tactic:
simp only [← Set.image_univ]
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ IsCompact (⇑i '' Set.univ)

Next tactic:
exact IsCompact.image isCompact_univ i.continuous
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ T2Space ↑(TopCat.of ↑(⇑f ⁻¹' Set.range ⇑i))

Next tactic:
dsimp [TopCat.of]
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ T2Space ↑(⇑f ⁻¹' Set.range ⇑i)

Next tactic:
exact inferInstance
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    

Proof state:
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ ExtremallyDisconnected ↑(CompHaus.mk (TopCat.of ↑(⇑f ⁻¹' Set.range ⇑i))).toTop

Next tactic:
constructor
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    

Proof state:
case open_closure
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
⊢ ∀ (U : Set ↑(CompHaus.mk (TopCat.of ↑(⇑f ⁻¹' Set.range ⇑i))).toTop), IsOpen U → IsOpen (closure U)

Next tactic:
intro U hU
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    intro U hU
    

Proof state:
case open_closure
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
U : Set ↑(CompHaus.mk (TopCat.of ↑(⇑f ⁻¹' Set.range ⇑i))).toTop
hU : IsOpen U
⊢ IsOpen (closure U)

Next tactic:
dsimp at U
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    intro U hU
    dsimp at U
    

Proof state:
case open_closure
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
U : Set ↑(⇑f ⁻¹' Set.range ⇑i)
hU : IsOpen U
⊢ IsOpen (closure U)

Next tactic:
have h : IsClopen (f ⁻¹' (Set.range i))
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    intro U hU
    dsimp at U
    have h : IsClopen (f ⁻¹' (Set.range i))
    · 

Proof state:
case h
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
U : Set ↑(⇑f ⁻¹' Set.range ⇑i)
hU : IsOpen U
⊢ IsClopen (⇑f ⁻¹' Set.range ⇑i)

Next tactic:
constructor
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    intro U hU
    dsimp at U
    have h : IsClopen (f ⁻¹' (Set.range i))
    · constructor
      · 

Proof state:
case h.left
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
U : Set ↑(⇑f ⁻¹' Set.range ⇑i)
hU : IsOpen U
⊢ IsOpen (⇑f ⁻¹' Set.range ⇑i)

Next tactic:
exact IsOpen.preimage f.continuous hi.open_range
/--
The pullback of a morphism `f` and an open embedding `i` in `Stonean`, constructed explicitly as
the preimage under `f`of the image of `i` with the subspace topology.
-/
def pullback : Stonean where
  compHaus := {
    toTop := TopCat.of (f ⁻¹' (Set.range i))
    is_compact := by
      dsimp [TopCat.of]
      rw [← isCompact_iff_compactSpace]
      refine IsClosed.isCompact (IsClosed.preimage f.continuous (IsCompact.isClosed ?_))
      simp only [← Set.image_univ]
      exact IsCompact.image isCompact_univ i.continuous
    is_hausdorff := by
      dsimp [TopCat.of]
      exact inferInstance }
  extrDisc := by
    constructor
    intro U hU
    dsimp at U
    have h : IsClopen (f ⁻¹' (Set.range i))
    · constructor
      · exact IsOpen.preimage f.continuous hi.open_range
      · 

Proof state:
case h.right
X Y Z : Stonean
f : X ⟶ Z
i : Y ⟶ Z
hi : OpenEmbedding ⇑i
U : Set ↑(⇑f ⁻¹' Set.range ⇑i)
hU : IsOpen U
⊢ IsClosed (⇑f ⁻¹' Set.range ⇑i)

Next tactic:
refine' IsClosed.preimage f.continuous _