l3lab/ntp-mathlib huggingface dataset:
/-- Any countable linear order embeds in any nontrivial dense linear order. -/
theorem embedding_from_countable_to_dense [Encodable α] [DenselyOrdered β] [Nontrivial β] :
    Nonempty (α ↪o β) := by
  rcases exists_pair_lt β with ⟨x, y, hxy⟩
  cases' exists_between hxy with a ha
  haveI : Nonempty (Set.Ioo x y) := ⟨⟨a, ha⟩⟩
  let our_ideal : Ideal (PartialIso α _) :=
    idealOfCofinals default (definedAtLeft (Set.Ioo x y))
  let F a := funOfIdeal a our_ideal (cofinal_meets_idealOfCofinals _ _ a)
  refine
    ⟨RelEmbedding.trans (OrderEmbedding.ofStrictMono (fun a ↦ (F a).val) fun a₁ a₂ ↦ ?_)
        (OrderEmbedding.subtype _)⟩
  rcases (F a₁).prop with ⟨f, hf, ha₁⟩
  rcases (F a₂).prop with ⟨g, hg, ha₂⟩
  rcases our_ideal.directed _ hf _ hg with ⟨m, _hm, fm, gm⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁴ : LinearOrder α
inst✝³ : LinearOrder β
inst✝² : Encodable α
inst✝¹ : DenselyOrdered β
inst✝ : Nontrivial β
x y : β
hxy : x < y
a : β
ha : x < a ∧ a < y
this : Nonempty ↑(Set.Ioo x y)
our_ideal : Ideal (PartialIso α ↑(Set.Ioo x y)) := idealOfCofinals default (definedAtLeft ↑(Set.Ioo x y))
F : (a : α) → { b // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun a =>
    funOfIdeal a our_ideal
      (_ : ∃ x_1 ∈ definedAtLeft (↑(Set.Ioo x y)) a, x_1 ∈ idealOfCofinals default (definedAtLeft ↑(Set.Ioo x y)))
a₁ a₂ : α
f : PartialIso α ↑(Set.Ioo x y)
hf : f ∈ our_ideal
ha₁ : (a₁, ↑(F a₁)) ∈ ↑f
g : PartialIso α ↑(Set.Ioo x y)
hg : g ∈ our_ideal
ha₂ : (a₂, ↑(F a₂)) ∈ ↑g
m : PartialIso α ↑(Set.Ioo x y)
_hm : m ∈ ↑our_ideal
fm : f ≤ m
gm : g ≤ m
⊢ a₁ < a₂ → (fun a => ↑(F a)) a₁ < (fun a => ↑(F a)) a₂

Next tactic:
exact (lt_iff_lt_of_cmp_eq_cmp <| m.prop (a₁, _) (fm ha₁) (a₂, _) (gm ha₂)).mp
/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Encodable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Encodable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β) :=
  let to_cofinal : Sum α β → Cofinal (PartialIso α β) := fun p ↦
    Sum.recOn p (definedAtLeft β) (definedAtRight α)
  let our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
  let F a := funOfIdeal a our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inl a))
  let G b := invOfIdeal b our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inr b))
  ⟨OrderIso.ofCmpEqCmp (fun a ↦ (F a).val) (fun b ↦ (G b).val) fun a b ↦ by
      

Proof state:
α : Type u_1
β : Type u_2
inst✝¹¹ : LinearOrder α
inst✝¹⁰ : LinearOrder β
inst✝⁹ : Encodable α
inst✝⁸ : DenselyOrdered α
inst✝⁷ : NoMinOrder α
inst✝⁶ : NoMaxOrder α
inst✝⁵ : Nonempty α
inst✝⁴ : Encodable β
inst✝³ : DenselyOrdered β
inst✝² : NoMinOrder β
inst✝¹ : NoMaxOrder β
inst✝ : Nonempty β
to_cofinal : α ⊕ β → Cofinal (PartialIso α β) := fun p => Sum.recOn p (definedAtLeft β) (definedAtRight α)
our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
F : (a : α) → { b // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun a => funOfIdeal a our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inl a), x ∈ idealOfCofinals default to_cofinal)
G : (b : β) → { a // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun b => invOfIdeal b our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inr b), x ∈ idealOfCofinals default to_cofinal)
a : α
b : β
⊢ cmp a ((fun b => ↑(G b)) b) = cmp ((fun a => ↑(F a)) a) b

Next tactic:
rcases (F a).prop with ⟨f, hf, ha⟩
/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Encodable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Encodable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β) :=
  let to_cofinal : Sum α β → Cofinal (PartialIso α β) := fun p ↦
    Sum.recOn p (definedAtLeft β) (definedAtRight α)
  let our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
  let F a := funOfIdeal a our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inl a))
  let G b := invOfIdeal b our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inr b))
  ⟨OrderIso.ofCmpEqCmp (fun a ↦ (F a).val) (fun b ↦ (G b).val) fun a b ↦ by
      rcases (F a).prop with ⟨f, hf, ha⟩
      

Proof state:
case intro.intro
α : Type u_1
β : Type u_2
inst✝¹¹ : LinearOrder α
inst✝¹⁰ : LinearOrder β
inst✝⁹ : Encodable α
inst✝⁸ : DenselyOrdered α
inst✝⁷ : NoMinOrder α
inst✝⁶ : NoMaxOrder α
inst✝⁵ : Nonempty α
inst✝⁴ : Encodable β
inst✝³ : DenselyOrdered β
inst✝² : NoMinOrder β
inst✝¹ : NoMaxOrder β
inst✝ : Nonempty β
to_cofinal : α ⊕ β → Cofinal (PartialIso α β) := fun p => Sum.recOn p (definedAtLeft β) (definedAtRight α)
our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
F : (a : α) → { b // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun a => funOfIdeal a our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inl a), x ∈ idealOfCofinals default to_cofinal)
G : (b : β) → { a // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun b => invOfIdeal b our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inr b), x ∈ idealOfCofinals default to_cofinal)
a : α
b : β
f : PartialIso α β
hf : f ∈ our_ideal
ha : (a, ↑(F a)) ∈ ↑f
⊢ cmp a ((fun b => ↑(G b)) b) = cmp ((fun a => ↑(F a)) a) b

Next tactic:
rcases (G b).prop with ⟨g, hg, hb⟩
/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Encodable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Encodable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β) :=
  let to_cofinal : Sum α β → Cofinal (PartialIso α β) := fun p ↦
    Sum.recOn p (definedAtLeft β) (definedAtRight α)
  let our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
  let F a := funOfIdeal a our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inl a))
  let G b := invOfIdeal b our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inr b))
  ⟨OrderIso.ofCmpEqCmp (fun a ↦ (F a).val) (fun b ↦ (G b).val) fun a b ↦ by
      rcases (F a).prop with ⟨f, hf, ha⟩
      rcases (G b).prop with ⟨g, hg, hb⟩
      

Proof state:
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹¹ : LinearOrder α
inst✝¹⁰ : LinearOrder β
inst✝⁹ : Encodable α
inst✝⁸ : DenselyOrdered α
inst✝⁷ : NoMinOrder α
inst✝⁶ : NoMaxOrder α
inst✝⁵ : Nonempty α
inst✝⁴ : Encodable β
inst✝³ : DenselyOrdered β
inst✝² : NoMinOrder β
inst✝¹ : NoMaxOrder β
inst✝ : Nonempty β
to_cofinal : α ⊕ β → Cofinal (PartialIso α β) := fun p => Sum.recOn p (definedAtLeft β) (definedAtRight α)
our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
F : (a : α) → { b // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun a => funOfIdeal a our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inl a), x ∈ idealOfCofinals default to_cofinal)
G : (b : β) → { a // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun b => invOfIdeal b our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inr b), x ∈ idealOfCofinals default to_cofinal)
a : α
b : β
f : PartialIso α β
hf : f ∈ our_ideal
ha : (a, ↑(F a)) ∈ ↑f
g : PartialIso α β
hg : g ∈ our_ideal
hb : (↑(G b), b) ∈ ↑g
⊢ cmp a ((fun b => ↑(G b)) b) = cmp ((fun a => ↑(F a)) a) b

Next tactic:
rcases our_ideal.directed _ hf _ hg with ⟨m, _, fm, gm⟩
/-- Any two countable dense, nonempty linear orders without endpoints are order isomorphic. -/
theorem iso_of_countable_dense [Encodable α] [DenselyOrdered α] [NoMinOrder α] [NoMaxOrder α]
    [Nonempty α] [Encodable β] [DenselyOrdered β] [NoMinOrder β] [NoMaxOrder β] [Nonempty β] :
    Nonempty (α ≃o β) :=
  let to_cofinal : Sum α β → Cofinal (PartialIso α β) := fun p ↦
    Sum.recOn p (definedAtLeft β) (definedAtRight α)
  let our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
  let F a := funOfIdeal a our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inl a))
  let G b := invOfIdeal b our_ideal (cofinal_meets_idealOfCofinals _ to_cofinal (Sum.inr b))
  ⟨OrderIso.ofCmpEqCmp (fun a ↦ (F a).val) (fun b ↦ (G b).val) fun a b ↦ by
      rcases (F a).prop with ⟨f, hf, ha⟩
      rcases (G b).prop with ⟨g, hg, hb⟩
      rcases our_ideal.directed _ hf _ hg with ⟨m, _, fm, gm⟩
      

Proof state:
case intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹¹ : LinearOrder α
inst✝¹⁰ : LinearOrder β
inst✝⁹ : Encodable α
inst✝⁸ : DenselyOrdered α
inst✝⁷ : NoMinOrder α
inst✝⁶ : NoMaxOrder α
inst✝⁵ : Nonempty α
inst✝⁴ : Encodable β
inst✝³ : DenselyOrdered β
inst✝² : NoMinOrder β
inst✝¹ : NoMaxOrder β
inst✝ : Nonempty β
to_cofinal : α ⊕ β → Cofinal (PartialIso α β) := fun p => Sum.recOn p (definedAtLeft β) (definedAtRight α)
our_ideal : Ideal (PartialIso α β) := idealOfCofinals default to_cofinal
F : (a : α) → { b // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun a => funOfIdeal a our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inl a), x ∈ idealOfCofinals default to_cofinal)
G : (b : β) → { a // ∃ f ∈ our_ideal, (a, b) ∈ ↑f } :=
  fun b => invOfIdeal b our_ideal (_ : ∃ x ∈ to_cofinal (Sum.inr b), x ∈ idealOfCofinals default to_cofinal)
a : α
b : β
f : PartialIso α β
hf : f ∈ our_ideal
ha : (a, ↑(F a)) ∈ ↑f
g : PartialIso α β
hg : g ∈ our_ideal
hb : (↑(G b), b) ∈ ↑g
m : PartialIso α β
left✝ : m ∈ ↑our_ideal
fm : f ≤ m
gm : g ≤ m
⊢ cmp a ((fun b => ↑(G b)) b) = cmp ((fun a => ↑(F a)) a) b

Next tactic:
exact m.prop (a, _) (fm ha) (_, b) (gm hb)
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by 

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
a b : (forget CompHaus).obj X
hab : π a = π b
⊢ (ContinuousMap.mk fun x => a) ≫ π = (ContinuousMap.mk fun x => b) ≫ π

Next tactic:
ext
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; 

Proof state:
case w
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
a b : (forget CompHaus).obj X
hab : π a = π b
x✝ : (forget CompHaus).obj X
⊢ ((ContinuousMap.mk fun x => a) ≫ π) x✝ = ((ContinuousMap.mk fun x => b) ≫ π) x✝

Next tactic:
exact hab
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by 

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
a b : (forget CompHaus).obj X
hab : π a = π b
⊢ (ContinuousMap.mk fun x => a) ≫ π = (ContinuousMap.mk fun x => b) ≫ π

Next tactic:
ext
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; 

Proof state:
case w
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
a b : (forget CompHaus).obj X
hab : π a = π b
x✝ : (forget CompHaus).obj X
⊢ ((ContinuousMap.mk fun x => a) ≫ π) x✝ = ((ContinuousMap.mk fun x => b) ≫ π) x✝

Next tactic:
exact hab
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
⊢ g =
    (fun {W} e h =>
        QuotientMap.lift (_ : QuotientMap ⇑π) e
          (_ :
            ∀ (a b : (forget CompHaus).obj X),
              π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a))
      e (_ : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e)

Next tactic:
suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; exact hab)) a⟩ by assumption
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by 

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
a b : (forget CompHaus).obj X
hab : π a = π b
⊢ (ContinuousMap.mk fun x => a) ≫ π = (ContinuousMap.mk fun x => b) ≫ π

Next tactic:
ext
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; 

Proof state:
case w
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
a b : (forget CompHaus).obj X
hab : π a = π b
x✝ : (forget CompHaus).obj X
⊢ ((ContinuousMap.mk fun x => a) ≫ π) x✝ = ((ContinuousMap.mk fun x => b) ≫ π) x✝

Next tactic:
exact hab
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; exact hab)) a⟩ by 

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
this :
  g =
    (QuotientMap.liftEquiv (_ : QuotientMap ⇑π))
      { val := e,
        property :=
          (_ :
            ∀ (a b : (forget CompHaus).obj X),
              π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a) }
⊢ g =
    (fun {W} e h =>
        QuotientMap.lift (_ : QuotientMap ⇑π) e
          (_ :
            ∀ (a b : (forget CompHaus).obj X),
              π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a))
      e (_ : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e)

Next tactic:
assumption
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; exact hab)) a⟩ by assumption
    

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
⊢ g =
    (QuotientMap.liftEquiv (_ : QuotientMap ⇑π))
      { val := e,
        property :=
          (_ :
            ∀ (a b : (forget CompHaus).obj X),
              π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a) }

Next tactic:
rw [← Equiv.symm_apply_eq (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv]
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; exact hab)) a⟩ by assumption
    rw [← Equiv.symm_apply_eq (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv]
    

Proof state:
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
⊢ (QuotientMap.liftEquiv (_ : QuotientMap ⇑π)).symm g =
    { val := e,
      property :=
        (_ :
          ∀ (a b : (forget CompHaus).obj X),
            π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a) }

Next tactic:
ext
/--
Implementation: If `π` is a surjective morphism in `CompHaus`, then it is an effective epi.
The theorem `CompHaus.effectiveEpi_tfae` should be used instead.
-/
noncomputable
def struct {B X : CompHaus.{u}} (π : X ⟶ B) (hπ : Function.Surjective π) :
    EffectiveEpiStruct π where
  desc e h := (QuotientMap.of_surjective_continuous hπ π.continuous).lift e fun a b hab ↦
    FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a
  fac e h := ((QuotientMap.of_surjective_continuous hπ π.continuous).lift_comp e
    fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
    (by ext; exact hab)) a)
  uniq e h g hm := by
    suffices g = (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv ⟨e,
      fun a b hab ↦ FunLike.congr_fun (h ⟨fun _ ↦ a, continuous_const⟩ ⟨fun _ ↦ b, continuous_const⟩
      (by ext; exact hab)) a⟩ by assumption
    rw [← Equiv.symm_apply_eq (QuotientMap.of_surjective_continuous hπ π.continuous).liftEquiv]
    ext
    

Proof state:
case a.h
B X : CompHaus
π : X ⟶ B
hπ : Function.Surjective ⇑π
W✝ : CompHaus
e : X ⟶ W✝
h : ∀ {Z : CompHaus} (g₁ g₂ : Z ⟶ X), g₁ ≫ π = g₂ ≫ π → g₁ ≫ e = g₂ ≫ e
g : B ⟶ W✝
hm : π ≫ g = e
a✝ : (forget CompHaus).obj X
⊢ ↑((QuotientMap.liftEquiv (_ : QuotientMap ⇑π)).symm g) a✝ =
    ↑{ val := e,
          property :=
            (_ :
              ∀ (a b : (forget CompHaus).obj X),
                π a = π b → ((ContinuousMap.mk fun x => a) ≫ e) a = ((ContinuousMap.mk fun x => b) ≫ e) a) }
      a✝

Next tactic:
simp only [QuotientMap.liftEquiv_symm_apply_coe, ContinuousMap.comp_apply, ← hm]