Theorem: VitaliFamily.ae_tendsto_measure_inter_div
File: Mathlib/MeasureTheory/Covering/Differentiation.lean

tactic: let t := toMeasurable μ s
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: have A :
  ∀ᵐ x ∂μ.restrict s,
    Tendsto (fun a => μ (t ∩ a) / μ a) (v.filterAt x) (𝓝 (t.indicator 1 x)) := by
  apply ae_mono restrict_le_self
  apply ae_tendsto_measure_inter_div_of_measurableSet
  exact measurableSet_toMeasurable _ _
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: have B : ∀ᵐ x ∂μ.restrict s, t.indicator 1 x = (1 : ℝ≥0∞) := by
  refine' ae_restrict_of_ae_restrict_of_subset (subset_toMeasurable μ s) _
  filter_upwards [ae_restrict_mem (measurableSet_toMeasurable μ s)] with _ hx
  simp only [hx, Pi.one_apply, indicator_of_mem]
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: filter_upwards [A, B] with x hx h'x
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: rw [h'x] at hx
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
x : α
hx : Tendsto (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator (toMeasurable μ s) 1 x))
h'x : indicator (toMeasurable μ s) 1 x = 1
⊢ Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: apply hx.congr' _
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
x : α
hx : Tendsto (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)
h'x : indicator (toMeasurable μ s) 1 x = 1
⊢ Tendsto (fun a => ↑↑μ (s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)

tactic: filter_upwards [v.eventually_filterAt_measurableSet x] with _ ha
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
x : α
hx : Tendsto (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)
h'x : indicator (toMeasurable μ s) 1 x = 1
⊢ (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) =ᶠ[filterAt v x] fun a => ↑↑μ (s ∩ a) / ↑↑μ a

tactic: congr 1
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
x : α
hx : Tendsto (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)
h'x : indicator (toMeasurable μ s) 1 x = 1
a✝ : Set α
ha : MeasurableSet a✝
⊢ ↑↑μ (toMeasurable μ s ∩ a✝) / ↑↑μ a✝ = ↑↑μ (s ∩ a✝) / ↑↑μ a✝

tactic: exact measure_toMeasurable_inter_of_sigmaFinite ha _
state_before: case h.e_a
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
B : ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1
x : α
hx : Tendsto (fun a => ↑↑μ (toMeasurable μ s ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 1)
h'x : indicator (toMeasurable μ s) 1 x = 1
a✝ : Set α
ha : MeasurableSet a✝
⊢ ↑↑μ (toMeasurable μ s ∩ a✝) = ↑↑μ (s ∩ a✝)

tactic: apply ae_mono restrict_le_self
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))

tactic: apply ae_tendsto_measure_inter_div_of_measurableSet
state_before: case a
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
⊢ {x | (fun x => Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))) x} ∈ ae μ

tactic: exact measurableSet_toMeasurable _ _
state_before: case a.hs
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
⊢ MeasurableSet t

tactic: refine' ae_restrict_of_ae_restrict_of_subset (subset_toMeasurable μ s) _
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ s, indicator t 1 x = 1

tactic: filter_upwards [ae_restrict_mem (measurableSet_toMeasurable μ s)] with _ hx
state_before: α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
⊢ ∀ᵐ (x : α) ∂Measure.restrict μ (toMeasurable μ s), indicator t 1 x = 1

tactic: simp only [hx, Pi.one_apply, indicator_of_mem]
state_before: case h
α : Type u_1
inst✝⁵ : MetricSpace α
m0 : MeasurableSpace α
μ : MeasureTheory.Measure α
v : VitaliFamily μ
E : Type ?u.6387832
inst✝⁴ : NormedAddCommGroup E
inst✝³ : SecondCountableTopology α
inst✝² : BorelSpace α
inst✝¹ : IsLocallyFiniteMeasure μ
ρ : MeasureTheory.Measure α
inst✝ : IsLocallyFiniteMeasure ρ
s : Set α
t : Set α := toMeasurable μ s
A : ∀ᵐ (x : α) ∂Measure.restrict μ s, Tendsto (fun a => ↑↑μ (t ∩ a) / ↑↑μ a) (filterAt v x) (𝓝 (indicator t 1 x))
a✝ : α
hx : a✝ ∈ toMeasurable μ s
⊢ indicator (toMeasurable μ s) 1 a✝ = 1