l3lab/ntp-mathlib huggingface dataset:
/-- A countable product of Polish spaces is Polish. -/
instance pi_countable {ι : Type*} [Countable ι] {E : ι → Type*} [∀ i, TopologicalSpace (E i)]
    [∀ i, PolishSpace (E i)] : PolishSpace (∀ i, E i) := by
  cases nonempty_encodable ι
  letI := fun i => upgradePolishSpace (E i)
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝² : Countable ι
E : ι → Type u_4
inst✝¹ : (i : ι) → TopologicalSpace (E i)
inst✝ : ∀ (i : ι), PolishSpace (E i)
val✝ : Encodable ι
this : (i : ι) → UpgradedPolishSpace (E i) := fun i => upgradePolishSpace (E i)
⊢ PolishSpace ((i : ι) → E i)

Next tactic:
letI : MetricSpace (∀ i, E i) := PiCountable.metricSpace
/-- A countable product of Polish spaces is Polish. -/
instance pi_countable {ι : Type*} [Countable ι] {E : ι → Type*} [∀ i, TopologicalSpace (E i)]
    [∀ i, PolishSpace (E i)] : PolishSpace (∀ i, E i) := by
  cases nonempty_encodable ι
  letI := fun i => upgradePolishSpace (E i)
  letI : MetricSpace (∀ i, E i) := PiCountable.metricSpace
  

Proof state:
case intro
α : Type u_1
β : Type u_2
ι : Type u_3
inst✝² : Countable ι
E : ι → Type u_4
inst✝¹ : (i : ι) → TopologicalSpace (E i)
inst✝ : ∀ (i : ι), PolishSpace (E i)
val✝ : Encodable ι
this✝ : (i : ι) → UpgradedPolishSpace (E i) := fun i => upgradePolishSpace (E i)
this : MetricSpace ((i : ι) → E i) := PiCountable.metricSpace
⊢ PolishSpace ((i : ι) → E i)

Next tactic:
infer_instance
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
⊢ PolishSpace α

Next tactic:
letI := upgradePolishSpace β
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this : UpgradedPolishSpace β := upgradePolishSpace β
⊢ PolishSpace α

Next tactic:
letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this✝ : UpgradedPolishSpace β := upgradePolishSpace β
this : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)
⊢ PolishSpace α

Next tactic:
haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
  haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this✝¹ : UpgradedPolishSpace β := upgradePolishSpace β
this✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)
this : SecondCountableTopology α
⊢ PolishSpace α

Next tactic:
have : CompleteSpace α := by
    rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
    exact hf.closed_range.isComplete
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
  haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
  have : CompleteSpace α := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this✝¹ : UpgradedPolishSpace β := upgradePolishSpace β
this✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)
this : SecondCountableTopology α
⊢ CompleteSpace α

Next tactic:
rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
  haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
  have : CompleteSpace α := by
    rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this✝¹ : UpgradedPolishSpace β := upgradePolishSpace β
this✝ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)
this : SecondCountableTopology α
⊢ IsComplete (range f)

Next tactic:
exact hf.closed_range.isComplete
/-- Given a closed embedding into a Polish space, the source space is also Polish. -/
theorem _root_.ClosedEmbedding.polishSpace [TopologicalSpace α] [TopologicalSpace β] [PolishSpace β]
    {f : α → β} (hf : ClosedEmbedding f) : PolishSpace α := by
  letI := upgradePolishSpace β
  letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
  haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
  have : CompleteSpace α := by
    rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
    exact hf.closed_range.isComplete
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this✝² : UpgradedPolishSpace β := upgradePolishSpace β
this✝¹ : MetricSpace α := Embedding.comapMetricSpace f (_ : _root_.Embedding f)
this✝ : SecondCountableTopology α
this : CompleteSpace α
⊢ PolishSpace α

Next tactic:
infer_instance
/-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
h : Countable α
inst✝ : DiscreteTopology α
⊢ PolishSpace α

Next tactic:
obtain ⟨f, hf⟩ := h.exists_injective_nat
/-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
  obtain ⟨f, hf⟩ := h.exists_injective_nat
  

Proof state:
case intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
h : Countable α
inst✝ : DiscreteTopology α
f : α → ℕ
hf : Injective f
⊢ PolishSpace α

Next tactic:
have : ClosedEmbedding f := by
    apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf
    exact fun t _ => isClosed_discrete _
/-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
  obtain ⟨f, hf⟩ := h.exists_injective_nat
  have : ClosedEmbedding f := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
h : Countable α
inst✝ : DiscreteTopology α
f : α → ℕ
hf : Injective f
⊢ ClosedEmbedding f

Next tactic:
apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf
/-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
  obtain ⟨f, hf⟩ := h.exists_injective_nat
  have : ClosedEmbedding f := by
    apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf
    

Proof state:
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
h : Countable α
inst✝ : DiscreteTopology α
f : α → ℕ
hf : Injective f
⊢ IsClosedMap f

Next tactic:
exact fun t _ => isClosed_discrete _
/-- Any countable discrete space is Polish. -/
instance (priority := 50) polish_of_countable [TopologicalSpace α]
    [h : Countable α] [DiscreteTopology α] : PolishSpace α := by
  obtain ⟨f, hf⟩ := h.exists_injective_nat
  have : ClosedEmbedding f := by
    apply closedEmbedding_of_continuous_injective_closed continuous_of_discreteTopology hf
    exact fun t _ => isClosed_discrete _
  

Proof state:
case intro
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
h : Countable α
inst✝ : DiscreteTopology α
f : α → ℕ
hf : Injective f
this : ClosedEmbedding f
⊢ PolishSpace α

Next tactic:
exact this.polishSpace
/-- 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
  

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 α
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
rcases isEmpty_or_nonempty ι with (hι | hι)
/-- 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ι)
  · 

Proof state:
case inl
α : 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ι : IsEmpty ι
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
/-- 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⟩
  

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 ι
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
inhabit ι
/-- 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`. -/
  

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 ι
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m 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
  

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
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm 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
  

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', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
/-- 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
  

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
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
/-- 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`.
  

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', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α

Next tactic:
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
/-- 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
    

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
n : ι
⊢ induced f T ≤ m n

Next tactic:
rw [induced_to_pi]
/-- 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]
    

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
n : ι
⊢ ⨅ i, induced (fun x => f x i) inferInstance ≤ m n

Next tactic:
exact iInf_le_of_le n (@induced_id _ (m n)).le