l3lab/ntp-mathlib huggingface dataset:
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      

Proof state:
case h.mpr.h
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
x : (n : ι) → AuxCopy α n
hx : x ∈ ⋂ n, {x | x n = x default}
n : ι
⊢ x n = f (x default) n

Next tactic:
exact mem_iInter.1 hx n
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  

Proof state:
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
⊢ PolishSpace α

Next tactic:
have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
    apply isClosed_eq (C n) (C default)
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
⊢ IsClosed (range f)

Next tactic:
rw [A]
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
⊢ IsClosed (⋂ n, {x | x n = x default})

Next tactic:
refine isClosed_iInter fun n => ?_
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
n : ι
⊢ IsClosed {x | x n = x default}

Next tactic:
have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
n : ι
C : ∀ (i : ι), Continuous fun x => id (x i)
⊢ IsClosed {x | x n = x default}

Next tactic:
apply isClosed_eq (C n) (C default)
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
    apply isClosed_eq (C n) (C default)
  

Proof state:
case inr
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
f_closed : IsClosed (range f)
⊢ PolishSpace α

Next tactic:
have K : @_root_.Embedding _ _ (T.induced f) T f := by
    refine Function.Injective.embedding_induced fun x y hxy ↦ ?_
    have : f x default = f y default := by rw [hxy]
    exact this
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
    apply isClosed_eq (C n) (C default)
  have K : @_root_.Embedding _ _ (T.induced f) T f := by
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
f_closed : IsClosed (range f)
⊢ _root_.Embedding f

Next tactic:
refine Function.Injective.embedding_induced fun x y hxy ↦ ?_
/-- Given a Polish space, and countably many finer Polish topologies, there exists another Polish
topology which is finer than all of them.

Porting note: TODO: the topology `t'` is `t ⊓ ⨅ i, m i`. -/
theorem exists_polishSpace_forall_le {ι : Type*} [Countable ι] [t : TopologicalSpace α]
    [p : PolishSpace α] (m : ι → TopologicalSpace α) (hm : ∀ n, m n ≤ t)
    (h'm : ∀ n, @PolishSpace α (m n)) :
    ∃ t' : TopologicalSpace α, (∀ n, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' := by
  rcases isEmpty_or_nonempty ι with (hι | hι)
  · exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
  inhabit ι
  /- Consider the product of infinitely many copies of `α`, each endowed with the topology `m n`.
    This is a Polish space, as a product of Polish spaces. Pulling back this topology under the
    diagonal embedding of `α`, one gets a Polish topology which is finer than all the `m n`. -/
  letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
  haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
  letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
  let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
  -- show that the induced topology is finer than all the `m n`.
  have T_le_m : ∀ n, T.induced f ≤ m n := fun n ↦ by
    rw [induced_to_pi]
    exact iInf_le_of_le n (@induced_id _ (m n)).le
  refine' ⟨T.induced f, fun n => T_le_m n, (T_le_m default).trans (hm default), _⟩
  -- show that the new topology is Polish, as the pullback of a Polish topology under a closed
  -- embedding.
  have A : range f = ⋂ n, { x | x n = x default } := by
    ext x
    constructor
    · rintro ⟨y, rfl⟩
      exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
    · refine fun hx ↦ ⟨x default, ?_⟩
      ext1 n
      symm
      exact mem_iInter.1 hx n
  have f_closed : IsClosed (range f) := by
    rw [A]
    refine isClosed_iInter fun n => ?_
    have C : ∀ i : ι, Continuous fun x : ∀ n, AuxCopy α n => (id (x i) : α) := fun i ↦
      have : Continuous (show AuxCopy α i → α from id) := continuous_id_of_le (hm i)
      this.comp (continuous_apply i)
    apply isClosed_eq (C n) (C default)
  have K : @_root_.Embedding _ _ (T.induced f) T f := by
    refine Function.Injective.embedding_induced fun x y hxy ↦ ?_
    

Proof state:
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝ : Countable ι
t : TopologicalSpace α
p : PolishSpace α
m : ι → TopologicalSpace α
hm : ∀ (n : ι), m n ≤ t
h'm : ∀ (n : ι), PolishSpace α
hι : Nonempty ι
inhabited_h : Inhabited ι
this✝ : (n : ι) → TopologicalSpace (AuxCopy α n) := fun n => m n
this : ∀ (n : ι), PolishSpace (AuxCopy α n)
T : TopologicalSpace ((n : ι) → AuxCopy α n) := inferInstance
f : α → (n : ι) → AuxCopy α n := fun x x_1 => x
T_le_m : ∀ (n : ι), induced f T ≤ m n
A : range f = ⋂ n, {x | x n = x default}
f_closed : IsClosed (range f)
x y : α
hxy : f x = f y
⊢ x = y

Next tactic:
have : f x default = f y default := by rw [hxy]