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

tactic: apply ENNReal.le_of_forall_pos_le_add fun ε εpos _ => ?_
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
⊢ ρ s ≤ ν s
state_after: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
⊢ ρ s ≤ ν s + ↑ε

tactic: obtain ⟨U, sU, U_open, νU⟩ : ∃ (U : Set α), s ⊆ U ∧ IsOpen U ∧ ν U ≤ ν s + ε :=
  exists_isOpen_le_add s ν (ENNReal.coe_pos.2 εpos).ne'
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
⊢ ρ s ≤ ν s + ↑ε
state_after: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
⊢ ρ s ≤ ν s + ↑ε

tactic: let f : α → Set (Set α) := fun _ => {a | ρ a ≤ ν a ∧ a ⊆ U}
state_before: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
⊢ ρ s ≤ ν s + ↑ε
state_after: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
⊢ ρ s ≤ ν s + ↑ε

tactic: have h : v.FineSubfamilyOn f s := by
  apply v.fineSubfamilyOn_of_frequently f s fun x hx => ?_
  have :=
    (hs x hx).and_eventually
      ((v.eventually_filterAt_mem_setsAt x).and
        (v.eventually_filterAt_subset_of_nhds (U_open.mem_nhds (sU hx))))
  apply Frequently.mono this
  rintro a ⟨ρa, _, aU⟩
  exact ⟨ρa, aU⟩
state_before: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
⊢ ρ s ≤ ν s + ↑ε
state_after: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
h : v.FineSubfamilyOn f s
⊢ ρ s ≤ ν s + ↑ε

tactic: haveI : Encodable h.index := h.index_countable.toEncodable
state_before: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
h : v.FineSubfamilyOn f s
⊢ ρ s ≤ ν s + ↑ε
state_after: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
h : v.FineSubfamilyOn f s
this : Encodable ↑h.index
⊢ ρ s ≤ ν s + ↑ε

tactic: calc
  ρ s ≤ ∑' x : h.index, ρ (h.covering x) := h.measure_le_tsum_of_absolutelyContinuous hρ
  _ ≤ ∑' x : h.index, ν (h.covering x) := ENNReal.tsum_le_tsum fun x => (h.covering_mem x.2).1
  _ = ν (⋃ x : h.index, h.covering x) := by
    rw [measure_iUnion h.covering_disjoint_subtype fun i => h.measurableSet_u i.2]
  _ ≤ ν U := (measure_mono (iUnion_subset fun i => (h.covering_mem i.2).2))
  _ ≤ ν s + ε := νU
state_before: case intro.intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
h : v.FineSubfamilyOn f s
this : Encodable ↑h.index
⊢ ρ s ≤ ν s + ↑ε
state_after: no goals

tactic: apply v.fineSubfamilyOn_of_frequently f s fun x hx => ?_
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
⊢ v.FineSubfamilyOn f s
state_after: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
⊢ ∃ᶠ (a : Set α) in v.filterAt x, a ∈ f x

tactic: have :=
  (hs x hx).and_eventually
    ((v.eventually_filterAt_mem_setsAt x).and
      (v.eventually_filterAt_subset_of_nhds (U_open.mem_nhds (sU hx))))
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
⊢ ∃ᶠ (a : Set α) in v.filterAt x, a ∈ f x
state_after: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
⊢ ∃ᶠ (a : Set α) in v.filterAt x, a ∈ f x

tactic: apply Frequently.mono this
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
⊢ ∃ᶠ (a : Set α) in v.filterAt x, a ∈ f x
state_after: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
⊢ ∀ (x_1 : Set α), ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U → x_1 ∈ f x

tactic: rintro a ⟨ρa, _, aU⟩
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
⊢ ∀ (x_1 : Set α), ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U → x_1 ∈ f x
state_after: case intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
a : Set α
ρa : ρ a ≤ ν a
left✝ : a ∈ v.setsAt x
aU : a ⊆ U
⊢ a ∈ f x

tactic: exact ⟨ρa, aU⟩
state_before: case intro.intro
α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
x : α
hx : x ∈ s
this : ∃ᶠ (x_1 : Set α) in v.filterAt x, ρ x_1 ≤ ν x_1 ∧ x_1 ∈ v.setsAt x ∧ x_1 ⊆ U
a : Set α
ρa : ρ a ≤ ν a
left✝ : a ∈ v.setsAt x
aU : a ⊆ U
⊢ a ∈ f x
state_after: no goals

tactic: rw [measure_iUnion h.covering_disjoint_subtype fun i => h.measurableSet_u i.2]
state_before: α : Type u_1
inst✝⁴ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
E : Type u_2
inst✝³ : NormedAddCommGroup E
inst✝² : SecondCountableTopology α
inst✝¹ : BorelSpace α
ρ ν : Measure α
inst✝ : IsLocallyFiniteMeasure ν
hρ : ρ ≪ μ
s : Set α
hs : ∀ x ∈ s, ∃ᶠ (a : Set α) in v.filterAt x, ρ a ≤ ν a
ε : ℝ≥0
εpos : 0 < ε
x✝ : ν s < ⊤
U : Set α
sU : s ⊆ U
U_open : IsOpen U
νU : ν U ≤ ν s + ↑ε
f : α → Set (Set α) := fun x => {a | ρ a ≤ ν a ∧ a ⊆ U}
h : v.FineSubfamilyOn f s
this : Encodable ↑h.index
⊢ ∑' (x : ↑h.index), ν (h.covering ↑x) = ν (⋃ x, h.covering ↑x)
state_after: no goals