Theorem: stronglyMeasurable_bot_iff
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: cases' isEmpty_or_nonempty α with hα hα
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c

tactic: refine' ⟨fun hf => _, fun hf_eq => _⟩
state_before: case inr
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c

tactic: simp only [@Subsingleton.stronglyMeasurable' _ _ ⊥ _ _ f,
  eq_iff_true_of_subsingleton, exists_const]
state_before: case inl
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : IsEmpty α
⊢ StronglyMeasurable f ↔ ∃ c, f = fun x => c

tactic: refine' ⟨f hα.some, _⟩
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
⊢ ∃ c, f = fun x => c

tactic: let fs := hf.approx
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
⊢ f = fun x => f (Nonempty.some hα)

tactic: have h_fs_tendsto : ∀ x, Tendsto (fun n => fs n x) atTop (𝓝 (f x)) := hf.tendsto_approx
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
⊢ f = fun x => f (Nonempty.some hα)

tactic: have : ∀ n, ∃ c, ∀ x, fs n x = c := fun n => SimpleFunc.simpleFunc_bot (fs n)
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
⊢ f = fun x => f (Nonempty.some hα)

tactic: let cs n := (this n).choose
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
⊢ f = fun x => f (Nonempty.some hα)

tactic: have h_cs_eq : ∀ n, ⇑(fs n) = fun _ => cs n := fun n => funext (this n).choose_spec
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
cs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)
⊢ f = fun x => f (Nonempty.some hα)

tactic: conv at h_fs_tendsto => enter [x, 1, n]; rw [h_cs_eq]
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => ↑(fs n) x) atTop (𝓝 (f x))
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
cs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)
h_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n
⊢ f = fun x => f (Nonempty.some hα)

tactic: have h_tendsto : Tendsto cs atTop (𝓝 (f hα.some)) := h_fs_tendsto hα.some
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
cs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))
h_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n
⊢ f = fun x => f (Nonempty.some hα)

tactic: ext1 x
state_before: case inr.refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
cs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))
h_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n
h_tendsto : Tendsto cs atTop (𝓝 (f (Nonempty.some hα)))
⊢ f = fun x => f (Nonempty.some hα)

tactic: exact tendsto_nhds_unique (h_fs_tendsto x) h_tendsto
state_before: case inr.refine'_1.h
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf : StronglyMeasurable f
fs : ℕ → α →ₛ β := StronglyMeasurable.approx hf
this : ∀ (n : ℕ), ∃ c, ∀ (x : α), ↑(fs n) x = c
cs : ℕ → β := fun n => Exists.choose (_ : ∃ c, ∀ (x : α), ↑(fs n) x = c)
h_fs_tendsto : ∀ (x : α), Tendsto (fun n => (fun x => cs n) x) atTop (𝓝 (f x))
h_cs_eq : ∀ (n : ℕ), ↑(fs n) = fun x => cs n
h_tendsto : Tendsto cs atTop (𝓝 (f (Nonempty.some hα)))
x : α
⊢ f x = f (Nonempty.some hα)

tactic: obtain ⟨c, rfl⟩ := hf_eq
state_before: case inr.refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
f g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
hf_eq : ∃ c, f = fun x => c
⊢ StronglyMeasurable f

tactic: exact stronglyMeasurable_const
state_before: case inr.refine'_2.intro
α : Type u_2
β : Type u_1
γ : Type ?u.48568
ι : Type ?u.48571
inst✝³ : Countable ι
g : α → β
inst✝² : TopologicalSpace β
inst✝¹ : Nonempty β
inst✝ : T2Space β
hα : Nonempty α
c : β
⊢ StronglyMeasurable fun x => c