Theorem: CompHaus.effectiveEpiFamily_tfae
File: Mathlib/Topology/Category/CompHaus/EffectiveEpi.lean

tactic: tfae_have 1 → 2
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b]

tactic: tfae_have 2 → 3
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b]

tactic: tfae_have 3 → 1
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
tfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b
⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b]

tactic: tfae_finish
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
tfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b
tfae_3_to_1 : (∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b) → EffectiveEpiFamily X π
⊢ TFAE [EffectiveEpiFamily X π, Epi (Sigma.desc π), ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b]

tactic: intro
state_before: case tfae_1_to_2
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
⊢ EffectiveEpiFamily X π → Epi (Sigma.desc π)

tactic: infer_instance
state_before: case tfae_1_to_2
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
✝ : EffectiveEpiFamily X π
⊢ Epi (Sigma.desc π)

tactic: intro e
state_before: case tfae_2_to_3
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
⊢ Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b

tactic: rw [epi_iff_surjective] at e
state_before: case tfae_2_to_3
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Epi (Sigma.desc π)
⊢ ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b

tactic: let i : ∐ X ≅ finiteCoproduct X :=
  (colimit.isColimit _).coconePointUniqueUpToIso (finiteCoproduct.isColimit _)
state_before: case tfae_2_to_3
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
⊢ ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b

tactic: intro b
state_before: case tfae_2_to_3
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
⊢ ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b

tactic: obtain ⟨t,rfl⟩ := e b
state_before: case tfae_2_to_3
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
b : ↑B.toTop
⊢ ∃ a x, (forget CompHaus).map (π a) x = b

tactic: let q := i.hom t
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
⊢ ∃ a x, (forget CompHaus).map (π a) x = (forget CompHaus).map (Sigma.desc π) t

tactic: refine ⟨q.1,q.2,?_⟩
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
⊢ ∃ a x, (forget CompHaus).map (π a) x = (forget CompHaus).map (Sigma.desc π) t

tactic: have : t = i.inv (i.hom t) := show t = (i.hom ≫ i.inv) t by simp only [i.hom_inv_id] ; rfl
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
⊢ (forget CompHaus).map (π q.fst) q.snd = (forget CompHaus).map (Sigma.desc π) t

tactic: rw [this]
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ (forget CompHaus).map (π q.fst) q.snd = (forget CompHaus).map (Sigma.desc π) t

tactic: show _ = (i.inv ≫ Sigma.desc π) (i.hom t)
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ (forget CompHaus).map (π q.fst) q.snd =
    (forget CompHaus).map (Sigma.desc π) ((forget CompHaus).map i.inv ((forget CompHaus).map i.hom t))

tactic: suffices i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π by
  rw [this] ; rfl
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ (forget CompHaus).map (π q.fst) q.snd = (forget CompHaus).map (i.inv ≫ Sigma.desc π) ((forget CompHaus).map i.hom t)

tactic: rw [Iso.inv_comp_eq]
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π

tactic: apply colimit.hom_ext
state_before: case tfae_2_to_3.intro
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ Sigma.desc π = i.hom ≫ finiteCoproduct.desc X π

tactic: rintro ⟨a⟩
state_before: case tfae_2_to_3.intro.w
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
⊢ ∀ (j : Discrete α),
    colimit.ι (Discrete.functor X) j ≫ Sigma.desc π =
      colimit.ι (Discrete.functor X) j ≫ i.hom ≫ finiteCoproduct.desc X π

tactic: simp only [Discrete.functor_obj, colimit.ι_desc, Cofan.mk_pt, Cofan.mk_ι_app,
  colimit.comp_coconePointUniqueUpToIso_hom_assoc]
state_before: case tfae_2_to_3.intro.w.mk
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
a : α
⊢ colimit.ι (Discrete.functor X) { as := a } ≫ Sigma.desc π =
    colimit.ι (Discrete.functor X) { as := a } ≫ i.hom ≫ finiteCoproduct.desc X π

tactic: ext
state_before: case tfae_2_to_3.intro.w.mk
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
a : α
⊢ π a = (finiteCoproduct.cocone X).ι.app { as := a } ≫ finiteCoproduct.desc X π

tactic: rfl
state_before: case tfae_2_to_3.intro.w.mk.w
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
a : α
x✝ : (forget CompHaus).obj (X a)
⊢ (forget CompHaus).map (π a) x✝ =
    (forget CompHaus).map ((finiteCoproduct.cocone X).ι.app { as := a } ≫ finiteCoproduct.desc X π) x✝

tactic: simp only [i.hom_inv_id]
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
⊢ t = (forget CompHaus).map (i.hom ≫ i.inv) t

tactic: rfl
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
⊢ t = (forget CompHaus).map (𝟙 (∐ X)) t

tactic: rw [this]
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this✝ : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
this : i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π
⊢ (forget CompHaus).map (π q.fst) q.snd = (forget CompHaus).map (i.inv ≫ Sigma.desc π) ((forget CompHaus).map i.hom t)

tactic: rfl
state_before: α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
e : Function.Surjective ((forget CompHaus).map (Sigma.desc π))
i : ∐ X ≅ finiteCoproduct X :=
  IsColimit.coconePointUniqueUpToIso (colimit.isColimit (Discrete.functor X)) (finiteCoproduct.isColimit X)
t : (forget CompHaus).obj (∐ fun b => X b)
q : (forget CompHaus).obj (finiteCoproduct X) := (forget CompHaus).map i.hom t
this✝ : t = (forget CompHaus).map i.inv ((forget CompHaus).map i.hom t)
this : i.inv ≫ Sigma.desc π = finiteCoproduct.desc X π
⊢ (forget CompHaus).map (π q.fst) q.snd =
    (forget CompHaus).map (finiteCoproduct.desc X π) ((forget CompHaus).map i.hom t)

tactic: apply effectiveEpiFamily_of_jointly_surjective
state_before: case tfae_3_to_1
α : Type
inst✝ : Fintype α
B : CompHaus
X : α → CompHaus
π : (a : α) → X a ⟶ B
tfae_1_to_2 : EffectiveEpiFamily X π → Epi (Sigma.desc π)
tfae_2_to_3 : Epi (Sigma.desc π) → ∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b
⊢ (∀ (b : ↑B.toTop), ∃ a x, (forget CompHaus).map (π a) x = b) → EffectiveEpiFamily X π