Theorem: MeasureTheory.exists_subset_real_measurableEquiv
File: Mathlib/MeasureTheory/Constructions/Polish.lean

tactic: by_cases hα : Countable α
state_before: α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: cases finite_or_infinite α
state_before: case pos
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: obtain ⟨n, h_nonempty_equiv⟩ := exists_nat_measurableEquiv_range_coe_fin_of_finite α
state_before: case pos.inl
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: refine' ⟨_, _, h_nonempty_equiv⟩
state_before: case pos.inl.intro
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: letI : MeasurableSpace (Fin n) := borel (Fin n)
state_before: case pos.inl.intro
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
⊢ MeasurableSet (range fun x => ↑↑x)

tactic: haveI : BorelSpace (Fin n) := ⟨rfl⟩
state_before: case pos.inl.intro
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
this : MeasurableSpace (Fin n) := borel (Fin n)
⊢ MeasurableSet (range fun x => ↑↑x)

tactic: refine' MeasurableEmbedding.measurableSet_range _
state_before: case pos.inl.intro
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
this✝ : MeasurableSpace (Fin n) := borel (Fin n)
this : BorelSpace (Fin n)
⊢ MeasurableSet (range fun x => ↑↑x)

tactic: infer_instance
state_before: case pos.inl.intro.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
this✝ : MeasurableSpace (Fin n) := borel (Fin n)
this : BorelSpace (Fin n)
⊢ MeasurableSpace (Fin n)

tactic: exact
  continuous_of_discreteTopology.measurableEmbedding
    (Nat.cast_injective.comp Fin.val_injective)
state_before: case pos.inl.intro.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Finite α
n : ℕ
h_nonempty_equiv : Nonempty (α ≃ᵐ ↑(range fun x => ↑↑x))
this✝ : MeasurableSpace (Fin n) := borel (Fin n)
this : BorelSpace (Fin n)
⊢ MeasurableEmbedding fun x => ↑↑x

tactic: refine' ⟨_, _, measurableEquiv_range_coe_nat_of_infinite_of_countable α⟩
state_before: case pos.inr
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Infinite α
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: refine' MeasurableEmbedding.measurableSet_range _
state_before: case pos.inr
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Infinite α
⊢ MeasurableSet (range Nat.cast)

tactic: infer_instance
state_before: case pos.inr.refine'_1
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Infinite α
⊢ MeasurableSpace ℕ

tactic: exact continuous_of_discreteTopology.measurableEmbedding Nat.cast_injective
state_before: case pos.inr.refine'_2
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : Countable α
h✝ : Infinite α
⊢ MeasurableEmbedding Nat.cast

tactic: refine'
  ⟨univ, MeasurableSet.univ,
    ⟨(PolishSpace.measurableEquivOfNotCountable hα _ : α ≃ᵐ (univ : Set ℝ))⟩⟩
state_before: case neg
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : ¬Countable α
⊢ ∃ s, MeasurableSet s ∧ Nonempty (α ≃ᵐ ↑s)

tactic: rw [countable_coe_iff]
state_before: case neg
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : ¬Countable α
⊢ ¬Countable ↑univ

tactic: exact Cardinal.not_countable_real
state_before: case neg
α : Type u_1
inst✝³ : TopologicalSpace α
ι : Type ?u.399198
inst✝² : MeasurableSpace α
inst✝¹ : PolishSpace α
inst✝ : BorelSpace α
hα : ¬Countable α
⊢ ¬Set.Countable univ