Skip to content

Commit 15ee1d2

Browse files
committed
chore: mark measure_union_ne_top and friends with finiteness (#30967)
In some cases, add `≠ ∞` versions of existing `< ∞` lemmas, and tag those with finiteness. Use this to golf one proof `by measurability` using finiteness, which is the morally correct proof. Motivated by #30966.
1 parent 016f98d commit 15ee1d2

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

Mathlib/MeasureTheory/Function/UnifTight.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private theorem unifTight_fin (hp_top : p ≠ ∞) {n : ℕ} {f : Fin n → α
174174
obtain ⟨S, hμS, hFε⟩ := h hgLp hε
175175
obtain ⟨s, _, hμs, hfε⟩ :=
176176
(hfLp (Fin.last n)).exists_eLpNorm_indicator_compl_lt hp_top (coe_ne_zero.2 hε.ne')
177-
refine ⟨s ∪ S, (by measurability), fun i => ?_⟩
177+
refine ⟨s ∪ S, (by finiteness), fun i => ?_⟩
178178
by_cases hi : i.val < n
179179
· rw [show f i = g ⟨i.val, hi⟩ from rfl, compl_union, ← indicator_indicator]
180180
apply (eLpNorm_indicator_le _).trans

Mathlib/MeasureTheory/Measure/MeasureSpaceDef.lean

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,11 @@ theorem measure_biUnion_lt_top {s : Set β} {f : β → Set α} (hs : s.Finite)
226226
rw [Finite.mem_toFinset]
227227
· simpa only [ENNReal.sum_lt_top, Finite.mem_toFinset]
228228

229+
@[aesop (rule_sets := [finiteness]) safe apply]
230+
theorem measure_biUnion_ne_top {s : Set β} {f : β → Set α} (hs : s.Finite)
231+
(hfin : ∀ i ∈ s, μ (f i) ≠ ∞) : μ (⋃ i ∈ s, f i) ≠ ∞ :=
232+
(measure_biUnion_lt_top hs (fun i hi ↦ Ne.lt_top (hfin i hi ·))).ne
233+
229234
theorem measure_union_lt_top (hs : μ s < ∞) (ht : μ t < ∞) : μ (s ∪ t) < ∞ :=
230235
(measure_union_le s t).trans_lt (ENNReal.add_lt_top.mpr ⟨hs, ht⟩)
231236

@@ -235,12 +240,14 @@ theorem measure_union_lt_top_iff : μ (s ∪ t) < ∞ ↔ μ s < ∞ ∧ μ t <
235240
· exact (measure_mono Set.subset_union_left).trans_lt h
236241
· exact (measure_mono Set.subset_union_right).trans_lt h
237242

243+
@[aesop (rule_sets := [finiteness]) safe apply]
238244
theorem measure_union_ne_top (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) : μ (s ∪ t) ≠ ∞ :=
239245
(measure_union_lt_top hs.lt_top ht.lt_top).ne
240246

241247
open scoped symmDiff in
248+
@[aesop (rule_sets := [finiteness]) unsafe 95% apply]
242249
theorem measure_symmDiff_ne_top (hs : μ s ≠ ∞) (ht : μ t ≠ ∞) : μ (s ∆ t) ≠ ∞ :=
243-
ne_top_of_le_ne_top (measure_union_ne_top hs ht) <| measure_mono symmDiff_subset_union
250+
ne_top_of_le_ne_top (by finiteness) <| measure_mono symmDiff_subset_union
244251

245252
@[simp]
246253
theorem measure_union_eq_top_iff : μ (s ∪ t) = ∞ ↔ μ s = ∞ ∨ μ t = ∞ :=
@@ -257,11 +264,19 @@ theorem measure_lt_top_of_subset (hst : t ⊆ s) (hs : μ s ≠ ∞) : μ t <
257264
theorem measure_ne_top_of_subset (h : t ⊆ s) (ht : μ s ≠ ∞) : μ t ≠ ∞ :=
258265
(measure_lt_top_of_subset h ht).ne
259266

260-
theorem measure_inter_lt_top_of_left_ne_top (hs_finite : μ s ≠ ∞) : μ (s ∩ t) < ∞ :=
261-
measure_lt_top_of_subset inter_subset_left hs_finite
267+
@[aesop (rule_sets := [finiteness]) unsafe apply]
268+
theorem measure_inter_ne_top_of_left_ne_top (hs_finite : μ s ≠ ∞) : μ (s ∩ t) ≠ ∞ :=
269+
measure_ne_top_of_subset inter_subset_left hs_finite
270+
271+
theorem measure_inter_lt_top_of_left_ne_top (hs_finite : μ s ≠ ∞) : μ (s ∩ t) < ∞ := by
272+
finiteness
273+
274+
@[aesop (rule_sets := [finiteness]) unsafe apply]
275+
theorem measure_inter_ne_top_of_right_ne_top (ht_finite : μ t ≠ ∞) : μ (s ∩ t) ≠ ∞ :=
276+
measure_ne_top_of_subset inter_subset_right ht_finite
262277

263-
theorem measure_inter_lt_top_of_right_ne_top (ht_finite : μ t ≠ ∞) : μ (s ∩ t) < ∞ :=
264-
measure_lt_top_of_subset inter_subset_right ht_finite
278+
theorem measure_inter_lt_top_of_right_ne_top (ht_finite : μ t ≠ ∞) : μ (s ∩ t) < ∞ := by
279+
finiteness
265280

266281
theorem measure_inter_null_of_null_right (S : Set α) {T : Set α} (h : μ T = 0) : μ (S ∩ T) = 0 :=
267282
measure_mono_null inter_subset_right h

0 commit comments

Comments
 (0)