Theorem: stronglyMeasurable_derivWithin_Ici
File: Mathlib/Analysis/Calculus/FDeriv/Measurable.lean

Proof steps:
state_before: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
⊢ StronglyMeasurable fun x => derivWithin f (Ici x) x
state_after: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
⊢ StronglyMeasurable fun x => derivWithin f (Ici x) x
tactic: borelize F
state_before: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
⊢ StronglyMeasurable fun x => derivWithin f (Ici x) x
state_after: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
⊢ IsSeparable (range fun x => derivWithin f (Ici x) x)
tactic: apply stronglyMeasurable_iff_measurable_separable.2 ⟨measurable_derivWithin_Ici f, ?_⟩
state_before: F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
⊢ IsSeparable (range fun x => derivWithin f (Ici x) x)
state_after: case intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
⊢ IsSeparable (range fun x => derivWithin f (Ici x) x)
tactic: obtain ⟨t, t_count, ht⟩ : ∃ t : Set ℝ, t.Countable ∧ Dense t := exists_countable_dense ℝ
state_before: case intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
⊢ IsSeparable (range fun x => derivWithin f (Ici x) x)
state_after: case intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
⊢ (range fun x => derivWithin f (Ici x) x) ⊆ closure ↑(Submodule.span ℝ (f '' t))
tactic: suffices H : range (fun x ↦ derivWithin f (Ici x) x) ⊆ closure (Submodule.span ℝ (f '' t)) from
    IsSeparable.mono (t_count.image f).isSeparable.span.closure H
state_before: case intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
⊢ (range fun x => derivWithin f (Ici x) x) ⊆ closure ↑(Submodule.span ℝ (f '' t))
state_after: case intro.intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ (fun x => derivWithin f (Ici x) x) x ∈ closure ↑(Submodule.span ℝ (f '' t))
tactic: rintro - ⟨x, rfl⟩
state_before: case intro.intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ (fun x => derivWithin f (Ici x) x) x ∈ closure ↑(Submodule.span ℝ (f '' t))
state_after: case intro.intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ (range fun y => derivWithin f (Ici x) y) ⊆ closure ↑(Submodule.span ℝ (f '' t))
tactic: suffices H' : range (fun y ↦ derivWithin f (Ici x) y) ⊆ closure (Submodule.span ℝ (f '' t)) from
    H' (mem_range_self _)
state_before: case intro.intro.intro
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ (range fun y => derivWithin f (Ici x) y) ⊆ closure ↑(Submodule.span ℝ (f '' t))
state_after: case intro.intro.intro.h
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ Ici x ⊆ closure (Ici x ∩ t)
tactic: apply range_derivWithin_subset_closure_span_image
state_before: case intro.intro.intro.h
F : Type u_1
inst✝² : NormedAddCommGroup F
inst✝¹ : NormedSpace ℝ F
f : ℝ → F
K : Set F
inst✝ : CompleteSpace F
this✝¹ : MeasurableSpace F := borel F
this✝ : BorelSpace F
t : Set ℝ
t_count : t.Countable
ht : Dense t
x : ℝ
⊢ Ici x ⊆ closure (Ici x ∩ t)
state_after: no goals
tactic: calc Ici x
    = closure (Ioi x ∩ closure t) := by simp [dense_iff_closure_eq.1 ht]
  _ ⊆ closure (closure (Ioi x ∩ t)) := by
      apply closure_mono
      simpa [inter_comm] using (isOpen_Ioi (a := x)).closure_inter (s := t)
  _ ⊆ closure (Ici x ∩ t) := by
      rw [closure_closure]
      exact closure_mono (inter_subset_inter_left _ Ioi_subset_Ici_self)