[GOAL]
α✝ : Type u_1
β : Type u_2
α : Type u_3
ht : TopologicalSpace α
h : PolishSpace α
⊢ CompleteSpace α
[PROOFSTEP]
convert h.complete.choose_spec.2
[GOAL]
case h.e'_2.h.e'_2.h.e'_2
α✝ : Type u_1
β : Type u_2
α : Type u_3
ht : TopologicalSpace α
h : PolishSpace α
⊢ polishSpaceMetric α = Exists.choose (_ : ∃ m, UniformSpace.toTopologicalSpace = ht ∧ CompleteSpace α)
[PROOFSTEP]
exact MetricSpace.replaceTopology_eq _ _
[GOAL]
α✝ : Type u_1
β : Type u_2
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
⊢ T2Space α
[PROOFSTEP]
letI := upgradePolishSpace α
[GOAL]
α✝ : Type u_1
β : Type u_2
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
this : UpgradedPolishSpace α := upgradePolishSpace α
⊢ T2Space α
[PROOFSTEP]
infer_instance
[GOAL]
α : 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)
⊢ PolishSpace ((i : ι) → E i)
[PROOFSTEP]
cases nonempty_encodable ι
[GOAL]
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 ι
⊢ PolishSpace ((i : ι) → E i)
[PROOFSTEP]
letI := fun i => upgradePolishSpace (E i)
[GOAL]
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)
[PROOFSTEP]
letI : MetricSpace (∀ i, E i) := PiCountable.metricSpace
[GOAL]
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)
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
⊢ PolishSpace α
[PROOFSTEP]
letI := upgradePolishSpace β
[GOAL]
α : Type u_1
β : Type u_2
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : PolishSpace β
f : α → β
hf : ClosedEmbedding f
this : UpgradedPolishSpace β := upgradePolishSpace β
⊢ PolishSpace α
[PROOFSTEP]
letI : MetricSpace α := hf.toEmbedding.comapMetricSpace f
[GOAL]
α : 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 α
[PROOFSTEP]
haveI : SecondCountableTopology α := hf.toEmbedding.secondCountableTopology
[GOAL]
α : 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 α
[PROOFSTEP]
have : CompleteSpace α :=
  by
  rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
  exact hf.closed_range.isComplete
[GOAL]
α : 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 α
[PROOFSTEP]
rw [completeSpace_iff_isComplete_range hf.toEmbedding.to_isometry.uniformInducing]
[GOAL]
α : 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)
[PROOFSTEP]
exact hf.closed_range.isComplete
[GOAL]
α : 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 α
[PROOFSTEP]
infer_instance
[GOAL]
α : 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 α
[PROOFSTEP]
rcases isEmpty_or_nonempty ι with (hι | hι)
[GOAL]
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 α
[PROOFSTEP]
exact ⟨t, fun i => (IsEmpty.elim hι i : _), le_rfl, p⟩
[GOAL]
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 α
[PROOFSTEP]
inhabit ι
[GOAL]
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 α
[PROOFSTEP]
letI : ∀ n : ι, TopologicalSpace (AuxCopy α n) := fun n => m n
[GOAL]
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 α
[PROOFSTEP]
haveI : ∀ n : ι, PolishSpace (AuxCopy α n) := fun n => h'm n
[GOAL]
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 α
[PROOFSTEP]
letI T : TopologicalSpace (∀ n : ι, AuxCopy α n) := inferInstance
[GOAL]
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 α
[PROOFSTEP]
let f : α → ∀ n : ι, AuxCopy α n := fun x _ => x
[GOAL]
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 α
[PROOFSTEP]
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
[GOAL]
α : 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
[PROOFSTEP]
rw [induced_to_pi]
[GOAL]
α : 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
[PROOFSTEP]
exact iInf_le_of_le n (@induced_id _ (m n)).le
[GOAL]
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
⊢ ∃ t', (∀ (n : ι), t' ≤ m n) ∧ t' ≤ t ∧ PolishSpace α
[PROOFSTEP]
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.
[GOAL]
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
⊢ PolishSpace α
[PROOFSTEP]
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
[GOAL]
α : 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
⊢ range f = ⋂ (n : ι), {x | x n = x default}
[PROOFSTEP]
ext x
[GOAL]
case 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
⊢ x ∈ range f ↔ x ∈ ⋂ (n : ι), {x | x n = x default}
[PROOFSTEP]
constructor
[GOAL]
case h.mp
α : 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
⊢ x ∈ range f → x ∈ ⋂ (n : ι), {x | x n = x default}
[PROOFSTEP]
rintro ⟨y, rfl⟩
[GOAL]
case h.mp.intro
α : 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
y : α
⊢ f y ∈ ⋂ (n : ι), {x | x n = x default}
[PROOFSTEP]
exact mem_iInter.2 fun n => by simp only [mem_setOf_eq]
[GOAL]
α : 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
y : α
n : ι
⊢ f y ∈ {x | x n = x default}
[PROOFSTEP]
simp only [mem_setOf_eq]
[GOAL]
case h.mpr
α : 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
⊢ x ∈ ⋂ (n : ι), {x | x n = x default} → x ∈ range f
[PROOFSTEP]
refine fun hx ↦ ⟨x default, ?_⟩
[GOAL]
case h.mpr
α : 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}
⊢ f (x default) = x
[PROOFSTEP]
ext1 n
[GOAL]
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 : ι
⊢ f (x default) n = x n
[PROOFSTEP]
symm
[GOAL]
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
[PROOFSTEP]
exact mem_iInter.1 hx n
[GOAL]
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 α
[PROOFSTEP]
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)
[GOAL]
α : 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)
[PROOFSTEP]
rw [A]
[GOAL]
α : 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})
[PROOFSTEP]
refine isClosed_iInter fun n => ?_
[GOAL]
α : 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}
[PROOFSTEP]
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)
[GOAL]
α : 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}
[PROOFSTEP]
apply isClosed_eq (C n) (C default)
[GOAL]
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 α
[PROOFSTEP]
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
[GOAL]
α : 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
[PROOFSTEP]
refine Function.Injective.embedding_induced fun x y hxy ↦ ?_
[GOAL]
α : 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
[PROOFSTEP]
have : f x default = f y default := by rw [hxy]
[GOAL]
α : 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
⊢ f x default = f y default
[PROOFSTEP]
rw [hxy]
[GOAL]
α : 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
this : f x default = f y default
⊢ x = y
[PROOFSTEP]
exact this
[GOAL]
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)
K : _root_.Embedding f
⊢ PolishSpace α
[PROOFSTEP]
have L : @ClosedEmbedding _ _ (T.induced f) T f :=
  by
  refine @ClosedEmbedding.mk _ _ (T.induced f) T f ?_ ?_
  · exact K
  · exact f_closed
[GOAL]
α : 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)
K : _root_.Embedding f
⊢ ClosedEmbedding f
[PROOFSTEP]
refine @ClosedEmbedding.mk _ _ (T.induced f) T f ?_ ?_
[GOAL]
case refine_1
α : 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)
K : _root_.Embedding f
⊢ _root_.Embedding f
[PROOFSTEP]
exact K
[GOAL]
case refine_2
α : 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)
K : _root_.Embedding f
⊢ IsClosed (range f)
[PROOFSTEP]
exact f_closed
[GOAL]
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)
K : _root_.Embedding f
L : ClosedEmbedding f
⊢ PolishSpace α
[PROOFSTEP]
exact @ClosedEmbedding.polishSpace _ _ (T.induced f) T (by infer_instance) _ L
[GOAL]
α : 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)
K : _root_.Embedding f
L : ClosedEmbedding f
⊢ PolishSpace ((n : ι) → AuxCopy α n)
[PROOFSTEP]
infer_instance
[GOAL]
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
⊢ MetricSpace (CompleteCopy s)
[PROOFSTEP]
refine
  @MetricSpace.ofT0PseudoMetricSpace (CompleteCopy s)
    (.ofDistTopology dist (fun _ ↦ ?_) (fun _ _ ↦ ?_) (fun x y z ↦ ?_) fun t ↦ ?_) _
[GOAL]
case refine_1
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
x✝ : CompleteCopy s
⊢ dist x✝ x✝ = 0
[PROOFSTEP]
simp only [dist_eq, dist_self, one_div, sub_self, abs_zero, add_zero]
[GOAL]
case refine_2
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
x✝¹ x✝ : CompleteCopy s
⊢ dist x✝¹ x✝ = dist x✝ x✝¹
[PROOFSTEP]
simp only [dist_eq, dist_comm, abs_sub_comm]
[GOAL]
case refine_3
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
x y z : CompleteCopy s
⊢ dist x z ≤ dist x y + dist y z
[PROOFSTEP]
calc
  dist x z = dist x.1 z.1 + |1 / infDist x.1 sᶜ - 1 / infDist z.1 sᶜ| := rfl
  _ ≤
      dist x.1 y.1 + dist y.1 z.1 +
        (|1 / infDist x.1 sᶜ - 1 / infDist y.1 sᶜ| + |1 / infDist y.1 sᶜ - 1 / infDist z.1 sᶜ|) :=
    (add_le_add (dist_triangle _ _ _) (dist_triangle (1 / infDist _ _) _ _))
  _ = dist x y + dist y z := add_add_add_comm ..
[GOAL]
case refine_4
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
⊢ IsOpen t ↔ ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
[PROOFSTEP]
refine ⟨fun h x hx ↦ ?_, fun h ↦ isOpen_iff_mem_nhds.2 fun x hx ↦ ?_⟩
[GOAL]
case refine_4.refine_1
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : IsOpen t
x : CompleteCopy s
hx : x ∈ t
⊢ ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
[PROOFSTEP]
rcases(Metric.isOpen_iff (α := s)).1 h x hx with ⟨ε, ε0, hε⟩
[GOAL]
case refine_4.refine_1.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : IsOpen t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ball x ε ⊆ t
⊢ ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
[PROOFSTEP]
exact ⟨ε, ε0, fun y hy ↦ hε <| (dist_comm _ _).trans_lt <| (dist_val_le_dist _ _).trans_lt hy⟩
[GOAL]
case refine_4.refine_2
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
⊢ t ∈ 𝓝 x
[PROOFSTEP]
rcases h x hx with ⟨ε, ε0, hε⟩
[GOAL]
case refine_4.refine_2.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
⊢ t ∈ 𝓝 x
[PROOFSTEP]
simp only [dist_eq, one_div] at hε
[GOAL]
case refine_4.refine_2.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
⊢ t ∈ 𝓝 x
[PROOFSTEP]
have :
  Tendsto (fun y : s ↦ dist x.1 y.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist y.1 sᶜ)⁻¹|) (𝓝 x)
    (𝓝 (dist x.1 x.1 + |(infDist x.1 sᶜ)⁻¹ - (infDist x.1 sᶜ)⁻¹|))
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
⊢ Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x)
    (𝓝 (dist ↑x ↑x + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑x) (↑s)ᶜ)⁻¹|))
[PROOFSTEP]
refine (tendsto_const_nhds.dist continuous_subtype_val.continuousAt).add (tendsto_const_nhds.sub <| ?_).abs
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
⊢ Tendsto (fun y => (infDist (↑y) (↑s)ᶜ)⁻¹) (𝓝 x) (𝓝 (infDist (↑x) (↑s)ᶜ)⁻¹)
[PROOFSTEP]
refine (continuousAt_inv_infDist_pt ?_).comp continuous_subtype_val.continuousAt
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
⊢ ¬↑x ∈ closure (↑s)ᶜ
[PROOFSTEP]
rw [s.isOpen.isClosed_compl.closure_eq, mem_compl_iff, not_not]
[GOAL]
case this
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
⊢ ↑x ∈ ↑s
[PROOFSTEP]
exact x.2
[GOAL]
case refine_4.refine_2.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
this :
  Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x)
    (𝓝 (dist ↑x ↑x + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑x) (↑s)ᶜ)⁻¹|))
⊢ t ∈ 𝓝 x
[PROOFSTEP]
simp only [dist_self, sub_self, abs_zero, zero_add] at this
[GOAL]
case refine_4.refine_2.intro.intro
α : Type u_1
β : Type u_2
inst✝ : MetricSpace α
s : Opens α
t : Set (CompleteCopy s)
h : ∀ (x : CompleteCopy s), x ∈ t → ∃ ε, ε > 0 ∧ ∀ (y : CompleteCopy s), dist x y < ε → y ∈ t
x : CompleteCopy s
hx : x ∈ t
ε : ℝ
ε0 : ε > 0
hε : ∀ (y : CompleteCopy s), dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹| < ε → y ∈ t
this : Tendsto (fun y => dist ↑x ↑y + |(infDist (↑x) (↑s)ᶜ)⁻¹ - (infDist (↑y) (↑s)ᶜ)⁻¹|) (𝓝 x) (𝓝 0)
⊢ t ∈ 𝓝 x
[PROOFSTEP]
exact mem_of_superset (this <| gt_mem_nhds ε0) hε
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
⊢ CompleteSpace (CompleteCopy s)
[PROOFSTEP]
refine Metric.complete_of_convergent_controlled_sequences ((1 / 2) ^ ·) (by simp) fun u hu ↦ ?_
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
⊢ ∀ (n : ℕ), 0 < (fun x => (1 / 2) ^ x) n
[PROOFSTEP]
simp
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
have A : CauchySeq fun n => (u n).1
[GOAL]
case A
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
⊢ CauchySeq fun n => ↑(u n)
[PROOFSTEP]
refine cauchySeq_of_le_tendsto_0 (fun n : ℕ => (1 / 2) ^ n) (fun n m N hNn hNm => ?_) ?_
[GOAL]
case A.refine_1
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
n m N : ℕ
hNn : N ≤ n
hNm : N ≤ m
⊢ dist ↑(u n) ↑(u m) ≤ (fun n => (1 / 2) ^ n) N
[PROOFSTEP]
exact (dist_val_le_dist (u n) (u m)).trans (hu N n m hNn hNm).le
[GOAL]
case A.refine_2
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
⊢ Tendsto (fun n => (1 / 2) ^ n) atTop (𝓝 0)
[PROOFSTEP]
exact tendsto_pow_atTop_nhds_0_of_lt_1 (by norm_num) (by norm_num)
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
⊢ 0 ≤ 1 / 2
[PROOFSTEP]
norm_num
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
⊢ 1 / 2 < 1
[PROOFSTEP]
norm_num
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
obtain ⟨x, xlim⟩ : ∃ x, Tendsto (fun n => (u n).1) atTop (𝓝 x) := cauchySeq_tendsto_of_complete A
[GOAL]
case intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
by_cases xs : x ∈ s
[GOAL]
case pos
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : x ∈ s
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
exact ⟨⟨x, xs⟩, tendsto_subtype_rng.2 xlim⟩
[GOAL]
case neg
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
obtain ⟨C, hC⟩ : ∃ C, ∀ n, 1 / infDist (u n).1 sᶜ < C
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
⊢ ∃ C, ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
[PROOFSTEP]
refine ⟨(1 / 2) ^ 0 + 1 / infDist (u 0).1 sᶜ, fun n ↦ ?_⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
n : ℕ
⊢ 1 / infDist (↑(u n)) (↑s)ᶜ < (1 / 2) ^ 0 + 1 / infDist (↑(u 0)) (↑s)ᶜ
[PROOFSTEP]
rw [← sub_lt_iff_lt_add]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
n : ℕ
⊢ 1 / infDist (↑(u n)) (↑s)ᶜ - 1 / infDist (↑(u 0)) (↑s)ᶜ < (1 / 2) ^ 0
[PROOFSTEP]
calc
  _ ≤ |1 / infDist (u n).1 sᶜ - 1 / infDist (u 0).1 sᶜ| := le_abs_self _
  _ = |1 / infDist (u 0).1 sᶜ - 1 / infDist (u n).1 sᶜ| := (abs_sub_comm _ _)
  _ ≤ dist (u 0) (u n) := (le_add_of_nonneg_left dist_nonneg)
  _ < (1 / 2) ^ 0 := hu 0 0 n le_rfl n.zero_le
[GOAL]
case neg.intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
have Cpos : 0 < C := lt_of_le_of_lt (div_nonneg zero_le_one infDist_nonneg) (hC 0)
[GOAL]
case neg.intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
have Hmem : ∀ {y}, y ∈ s ↔ 0 < infDist y sᶜ := fun {y} ↦ by
  rw [← s.isOpen.isClosed_compl.not_mem_iff_infDist_pos ⟨x, xs⟩]; exact not_not.symm
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
y : α
⊢ y ∈ s ↔ 0 < infDist y (↑s)ᶜ
[PROOFSTEP]
rw [← s.isOpen.isClosed_compl.not_mem_iff_infDist_pos ⟨x, xs⟩]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
y : α
⊢ y ∈ s ↔ ¬y ∈ (↑s)ᶜ
[PROOFSTEP]
exact not_not.symm
[GOAL]
case neg.intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
have I : ∀ n, 1 / C ≤ infDist (u n).1 sᶜ := fun n ↦
  by
  have : 0 < infDist (u n).1 sᶜ := Hmem.1 (u n).2
  rw [div_le_iff' Cpos]
  exact (div_le_iff this).1 (hC n).le
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
n : ℕ
⊢ 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ
[PROOFSTEP]
have : 0 < infDist (u n).1 sᶜ := Hmem.1 (u n).2
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
n : ℕ
this : 0 < infDist (↑(u n)) (↑s)ᶜ
⊢ 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ
[PROOFSTEP]
rw [div_le_iff' Cpos]
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
n : ℕ
this : 0 < infDist (↑(u n)) (↑s)ᶜ
⊢ 1 ≤ C * infDist (↑(u n)) (↑s)ᶜ
[PROOFSTEP]
exact (div_le_iff this).1 (hC n).le
[GOAL]
case neg.intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
I : ∀ (n : ℕ), 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
have I' : 1 / C ≤ infDist x sᶜ :=
  have : Tendsto (fun n => infDist (u n).1 sᶜ) atTop (𝓝 (infDist x sᶜ)) :=
    ((continuous_infDist_pt (sᶜ : Set α)).tendsto x).comp xlim
  ge_of_tendsto' this I
[GOAL]
case neg.intro
α : Type u_1
β : Type u_2
inst✝¹ : MetricSpace α
s : Opens α
inst✝ : CompleteSpace α
u : ℕ → CompleteCopy s
hu : ∀ (N n m : ℕ), N ≤ n → N ≤ m → dist (u n) (u m) < (fun x => (1 / 2) ^ x) N
A : CauchySeq fun n => ↑(u n)
x : α
xlim : Tendsto (fun n => ↑(u n)) atTop (𝓝 x)
xs : ¬x ∈ s
C : ℝ
hC : ∀ (n : ℕ), 1 / infDist (↑(u n)) (↑s)ᶜ < C
Cpos : 0 < C
Hmem : ∀ {y : α}, y ∈ s ↔ 0 < infDist y (↑s)ᶜ
I : ∀ (n : ℕ), 1 / C ≤ infDist (↑(u n)) (↑s)ᶜ
I' : 1 / C ≤ infDist x (↑s)ᶜ
⊢ ∃ x, Tendsto u atTop (𝓝 x)
[PROOFSTEP]
exact absurd (Hmem.2 <| lt_of_lt_of_le (div_pos one_pos Cpos) I') xs
[GOAL]
α✝ : Type u_1
β : Type u_2
inst✝² : MetricSpace α✝
s✝ : Opens α✝
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsOpen s
⊢ PolishSpace ↑s
[PROOFSTEP]
letI := upgradePolishSpace α
[GOAL]
α✝ : Type u_1
β : Type u_2
inst✝² : MetricSpace α✝
s✝ : Opens α✝
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsOpen s
this : UpgradedPolishSpace α := upgradePolishSpace α
⊢ PolishSpace ↑s
[PROOFSTEP]
lift s to Opens α using hs
[GOAL]
case intro
α✝ : Type u_1
β : Type u_2
inst✝² : MetricSpace α✝
s✝ : Opens α✝
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
this : UpgradedPolishSpace α := upgradePolishSpace α
s : Opens α
⊢ PolishSpace ↑↑s
[PROOFSTEP]
have : SecondCountableTopology s.CompleteCopy := inferInstanceAs (SecondCountableTopology s)
[GOAL]
case intro
α✝ : Type u_1
β : Type u_2
inst✝² : MetricSpace α✝
s✝ : Opens α✝
α : Type u_3
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
this✝ : UpgradedPolishSpace α := upgradePolishSpace α
s : Opens α
this : SecondCountableTopology (CompleteCopy s)
⊢ PolishSpace ↑↑s
[PROOFSTEP]
exact inferInstanceAs (PolishSpace s.CompleteCopy)
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
⊢ IsClopenable s
[PROOFSTEP]
haveI : PolishSpace s := hs.polishSpace
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this : PolishSpace ↑s
⊢ IsClopenable s
[PROOFSTEP]
let t : Set α := sᶜ
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this : PolishSpace ↑s
t : Set α := sᶜ
⊢ IsClopenable s
[PROOFSTEP]
haveI : PolishSpace t := hs.isOpen_compl.polishSpace
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
⊢ IsClopenable s
[PROOFSTEP]
let f : s ⊕ t ≃ α := Equiv.Set.sumCompl s
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ IsClopenable s
[PROOFSTEP]
have hle : TopologicalSpace.coinduced f instTopologicalSpaceSum ≤ ‹_›
[GOAL]
case hle
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
[PROOFSTEP]
simp only [instTopologicalSpaceSum, coinduced_sup, coinduced_compose, sup_le_iff, ← continuous_iff_coinduced_le]
[GOAL]
case hle
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
⊢ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inl) ∧ Continuous (↑(Equiv.Set.sumCompl s) ∘ Sum.inr)
[PROOFSTEP]
exact ⟨continuous_subtype_val, continuous_subtype_val⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsClopenable s
[PROOFSTEP]
refine ⟨.coinduced f instTopologicalSpaceSum, hle, ?_, hs.mono hle, ?_⟩
[GOAL]
case refine_1
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ PolishSpace α
[PROOFSTEP]
rw [← f.induced_symm]
[GOAL]
case refine_1
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ PolishSpace α
[PROOFSTEP]
exact f.symm.polishSpace_induced
[GOAL]
case refine_2
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsOpen s
[PROOFSTEP]
rw [isOpen_coinduced, isOpen_sum_iff]
[GOAL]
case refine_2
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ IsOpen (Sum.inl ⁻¹' (↑f ⁻¹' s)) ∧ IsOpen (Sum.inr ⁻¹' (↑f ⁻¹' s))
[PROOFSTEP]
convert And.intro (isOpen_univ (α := s)) (isOpen_empty (α := (sᶜ : Set α)))
[GOAL]
case h.e'_1.h.e'_3
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ Sum.inl ⁻¹' (↑f ⁻¹' s) = univ
[PROOFSTEP]
ext ⟨x, hx⟩
[GOAL]
case h.e'_2.h.e'_3
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
⊢ Sum.inr ⁻¹' (↑f ⁻¹' s) = ∅
[PROOFSTEP]
ext ⟨x, hx⟩
[GOAL]
case h.e'_1.h.e'_3.h.mk
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
x : α
hx : x ∈ s
⊢ { val := x, property := hx } ∈ Sum.inl ⁻¹' (↑f ⁻¹' s) ↔ { val := x, property := hx } ∈ univ
[PROOFSTEP]
simpa using hx
[GOAL]
case h.e'_2.h.e'_3.h.mk
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsClosed s
this✝ : PolishSpace ↑s
t : Set α := sᶜ
this : PolishSpace ↑t
f : ↑s ⊕ ↑t ≃ α := Equiv.Set.sumCompl s
hle : coinduced (↑f) instTopologicalSpaceSum ≤ inst✝¹
x : α
hx : x ∈ t
⊢ { val := x, property := hx } ∈ Sum.inr ⁻¹' (↑f ⁻¹' s) ↔ { val := x, property := hx } ∈ ∅
[PROOFSTEP]
simpa using hx
[GOAL]
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
s : Set α
hs : IsClopenable s
⊢ IsClopenable sᶜ
[PROOFSTEP]
rcases hs with ⟨t, t_le, t_polish, h, h'⟩
[GOAL]
case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝ : TopologicalSpace α
s : Set α
t : TopologicalSpace α
t_le : t ≤ inst✝
t_polish : PolishSpace α
h : IsClosed s
h' : IsOpen s
⊢ IsClopenable sᶜ
[PROOFSTEP]
exact ⟨t, t_le, t_polish, @IsOpen.isClosed_compl α t s h', @IsClosed.isOpen_compl α t s h⟩
[GOAL]
α : Type u_1
β : Type u_2
inst✝¹ : TopologicalSpace α
inst✝ : PolishSpace α
s : Set α
hs : IsOpen s
⊢ IsClopenable s
[PROOFSTEP]
simpa using hs.isClosed_compl.isClopenable.compl
[GOAL]
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
hs : ∀ (n : ℕ), IsClopenable (s n)
⊢ IsClopenable (⋃ (n : ℕ), s n)
[PROOFSTEP]
choose m mt m_polish _ m_open using hs
[GOAL]
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
⊢ IsClopenable (⋃ (n : ℕ), s n)
[PROOFSTEP]
obtain ⟨t', t'm, -, t'_polish⟩ : ∃ t' : TopologicalSpace α, (∀ n : ℕ, t' ≤ m n) ∧ t' ≤ t ∧ @PolishSpace α t' :=
  exists_polishSpace_forall_le m mt m_polish
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
⊢ IsClopenable (⋃ (n : ℕ), s n)
[PROOFSTEP]
have A : IsOpen[t'] (⋃ n, s n) := by
  apply isOpen_iUnion
  intro n
  apply t'm n
  exact m_open n
[GOAL]
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
⊢ IsOpen (⋃ (n : ℕ), s n)
[PROOFSTEP]
apply isOpen_iUnion
[GOAL]
case h
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
⊢ ∀ (i : ℕ), IsOpen (s i)
[PROOFSTEP]
intro n
[GOAL]
case h
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
n : ℕ
⊢ IsOpen (s n)
[PROOFSTEP]
apply t'm n
[GOAL]
case h.a
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
n : ℕ
⊢ IsOpen (s n)
[PROOFSTEP]
exact m_open n
[GOAL]
case intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ (n : ℕ), s n)
⊢ IsClopenable (⋃ (n : ℕ), s n)
[PROOFSTEP]
obtain ⟨t'', t''_le, t''_polish, h1, h2⟩ :
  ∃ t'' : TopologicalSpace α, t'' ≤ t' ∧ @PolishSpace α t'' ∧ IsClosed[t''] (⋃ n, s n) ∧ IsOpen[t''] (⋃ n, s n) :=
  @IsOpen.isClopenable α t' t'_polish _ A
[GOAL]
case intro.intro.intro.intro.intro.intro.intro
α : Type u_1
β : Type u_2
t : TopologicalSpace α
inst✝ : PolishSpace α
s : ℕ → Set α
m : ℕ → TopologicalSpace α
mt : ∀ (n : ℕ), m n ≤ t
m_polish : ∀ (n : ℕ), PolishSpace α
h✝ : ∀ (n : ℕ), IsClosed (s n)
m_open : ∀ (n : ℕ), IsOpen (s n)
t' : TopologicalSpace α
t'm : ∀ (n : ℕ), t' ≤ m n
t'_polish : PolishSpace α
A : IsOpen (⋃ (n : ℕ), s n)
t'' : TopologicalSpace α
t''_le : t'' ≤ t'
t''_polish : PolishSpace α
h1 : IsClosed (⋃ (n : ℕ), s n)
h2 : IsOpen (⋃ (n : ℕ), s n)
⊢ IsClopenable (⋃ (n : ℕ), s n)
[PROOFSTEP]
exact ⟨t'', t''_le.trans ((t'm 0).trans (mt 0)), t''_polish, h1, h2⟩