measure_theory.decomposition.signed_hahnMathlib.MeasureTheory.Decomposition.SignedHahn

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -119,7 +119,7 @@ private theorem find_exists_one_div_lt_spec (hi : ¬s ≤[i] 0) :
 private theorem find_exists_one_div_lt_min (hi : ¬s ≤[i] 0) {m : ℕ}
     (hm : m < findExistsOneDivLt s i) : ¬ExistsOneDivLt s i m :=
   by
-  rw [find_exists_one_div_lt, dif_pos hi] at hm 
+  rw [find_exists_one_div_lt, dif_pos hi] at hm
   exact Nat.find_min _ hm
 
 /-- Given the set `i`, if `i` is not negative, `some_exists_one_div_lt` chooses the set
@@ -199,7 +199,7 @@ private theorem measure_of_restrict_nonpos_seq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
     (hn : ¬s ≤[i \ ⋃ k < n, restrictNonposSeq s i k] 0) : 0 < s (restrictNonposSeq s i n) :=
   by
   cases n
-  · rw [restrict_nonpos_seq]; rw [← @Set.diff_empty _ i] at hi₂ 
+  · rw [restrict_nonpos_seq]; rw [← @Set.diff_empty _ i] at hi₂
     rcases some_exists_one_div_lt_spec hi₂ with ⟨_, _, h⟩
     exact lt_trans Nat.one_div_pos_of_nat h
   · rw [restrict_nonpos_seq_succ]
@@ -223,7 +223,7 @@ private theorem restrict_nonpos_seq_disjoint' {n m : ℕ} (h : n < m) :
   rw [Set.eq_empty_iff_forall_not_mem]
   rintro x ⟨hx₁, hx₂⟩
   cases m; · linarith
-  · rw [restrict_nonpos_seq] at hx₂ 
+  · rw [restrict_nonpos_seq] at hx₂
     exact
       (some_exists_one_div_lt_subset hx₂).2
         (Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨nat.lt_succ_iff.mp h, hx₁⟩⟩)
@@ -241,7 +241,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 :=
   by
   by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
-  push_neg at hn 
+  push_neg at hn
   set k := Nat.find hn with hk₁
   have hk₂ : s ≤[i \ ⋃ l < k, restrict_nonpos_seq s i l] 0 := Nat.find_spec hn
   have hmeas : MeasurableSet (⋃ (l : ℕ) (H : l < k), restrict_nonpos_seq s i l) :=
@@ -322,7 +322,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     · exact le_of_lt (restrict_nonpos_seq_lt n (hn' n))
   have h₃ : tendsto (fun n => (bdd n : ℝ) + 1) at_top at_top :=
     by
-    simp only [one_div] at h₃' 
+    simp only [one_div] at h₃'
     exact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)
   have h₄ : tendsto (fun n => (bdd n : ℝ)) at_top at_top := by
     convert at_top.tendsto_at_top_add_const_right (-1) h₃; simp
@@ -330,15 +330,15 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     hi₁.diff (MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
-  rw [restrict_le_restrict_iff _ _ A_meas] at hnn ; push_neg at hnn 
+  rw [restrict_le_restrict_iff _ _ A_meas] at hnn; push_neg at hnn
   obtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn
   have : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E :=
     by
-    rw [tendsto_at_top_at_top] at h₄ 
+    rw [tendsto_at_top_at_top] at h₄
     obtain ⟨k, hk⟩ := h₄ (max (1 / s E + 1) 1)
     refine' ⟨k, _, _⟩
     · have hle := le_of_max_le_right (hk k le_rfl)
-      norm_cast at hle 
+      norm_cast at hle
       exact hle
     · have : 1 / s E < bdd k := by
         linarith (config := { restrict_type := ℝ }) [le_of_max_le_left (hk k le_rfl)]
@@ -468,7 +468,7 @@ theorem of_symmDiff_compl_positive_negative {s : SignedMeasure α} {i j : Set α
     (hi : MeasurableSet i) (hj : MeasurableSet j) (hi' : 0 ≤[i] s ∧ s ≤[iᶜ] 0)
     (hj' : 0 ≤[j] s ∧ s ≤[jᶜ] 0) : s (i ∆ j) = 0 ∧ s (iᶜ ∆ jᶜ) = 0 :=
   by
-  rw [restrict_le_restrict_iff s 0, restrict_le_restrict_iff 0 s] at hi' hj' 
+  rw [restrict_le_restrict_iff s 0, restrict_le_restrict_iff 0 s] at hi' hj'
   constructor
   · rw [symmDiff_def, Set.diff_eq_compl_inter, Set.diff_eq_compl_inter, Set.sup_eq_union, of_union,
       le_antisymm (hi'.2 (hi.compl.inter hj) (Set.inter_subset_left _ _))
Diff
@@ -377,7 +377,7 @@ theorem zero_mem_measureOfNegatives : (0 : ℝ) ∈ s.measureOfNegatives :=
 theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
   by
   simp_rw [BddBelow, Set.Nonempty, mem_lowerBounds]
-  by_contra' h
+  by_contra! h
   have h' : ∀ n : ℕ, ∃ y : ℝ, y ∈ s.measure_of_negatives ∧ y < -n := fun n => h (-n)
   choose f hf using h'
   have hf' : ∀ n : ℕ, ∃ B, MeasurableSet B ∧ s ≤[B] 0 ∧ s B < -n :=
@@ -437,7 +437,7 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
   refine' ⟨Aᶜ, hA₁.compl, _, (compl_compl A).symm ▸ hA₂⟩
   rw [restrict_le_restrict_iff _ _ hA₁.compl]
   intro C hC hC₁
-  by_contra' hC₂
+  by_contra! hC₂
   rcases exists_subset_restrict_nonpos hC₂ with ⟨D, hD₁, hD, hD₂, hD₃⟩
   have : s (A ∪ D) < Inf s.measure_of_negatives :=
     by
Diff
@@ -316,7 +316,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
       HasSum.summable
         (s.m_Union (fun _ => restrict_nonpos_seq_measurable_set _) restrict_nonpos_seq_disjoint)
     refine'
-      summable_of_nonneg_of_le (fun n => _) (fun n => _)
+      Summable.of_nonneg_of_le (fun n => _) (fun n => _)
         (Summable.comp_injective this Nat.succ_injective)
     · exact le_of_lt Nat.one_div_pos_of_nat
     · exact le_of_lt (restrict_nonpos_seq_lt n (hn' n))
Diff
@@ -3,8 +3,8 @@ Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying
 -/
-import Mathbin.MeasureTheory.Measure.VectorMeasure
-import Mathbin.Order.SymmDiff
+import MeasureTheory.Measure.VectorMeasure
+import Order.SymmDiff
 
 #align_import measure_theory.decomposition.signed_hahn from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
 
Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying
-
-! This file was ported from Lean 3 source module measure_theory.decomposition.signed_hahn
-! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Measure.VectorMeasure
 import Mathbin.Order.SymmDiff
 
+#align_import measure_theory.decomposition.signed_hahn from "leanprover-community/mathlib"@"61b5e2755ccb464b68d05a9acf891ae04992d09d"
+
 /-!
 # Hahn decomposition
 
Diff
@@ -284,6 +284,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     exact restrict_nonpos_seq_subset _ hx
   · infer_instance
 
+#print MeasureTheory.SignedMeasure.exists_subset_restrict_nonpos /-
 /-- A measurable set of negative measure has a negative subset of negative measure. -/
 theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 :=
@@ -358,6 +359,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
   convert hk₂; norm_cast
   exact tsub_add_cancel_of_le hk₁
 #align measure_theory.signed_measure.exists_subset_restrict_nonpos MeasureTheory.SignedMeasure.exists_subset_restrict_nonpos
+-/
 
 end ExistsSubsetRestrictNonpos
 
@@ -368,9 +370,11 @@ def measureOfNegatives (s : SignedMeasure α) : Set ℝ :=
 #align measure_theory.signed_measure.measure_of_negatives MeasureTheory.SignedMeasure.measureOfNegatives
 -/
 
+#print MeasureTheory.SignedMeasure.zero_mem_measureOfNegatives /-
 theorem zero_mem_measureOfNegatives : (0 : ℝ) ∈ s.measureOfNegatives :=
   ⟨∅, ⟨MeasurableSet.empty, le_restrict_empty _ _⟩, s.Empty⟩
 #align measure_theory.signed_measure.zero_mem_measure_of_negatives MeasureTheory.SignedMeasure.zero_mem_measureOfNegatives
+-/
 
 #print MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives /-
 theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
@@ -402,6 +406,7 @@ theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
 #align measure_theory.signed_measure.bdd_below_measure_of_negatives MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives
 -/
 
+#print MeasureTheory.SignedMeasure.exists_compl_positive_negative /-
 /-- Alternative formulation of `measure_theory.signed_measure.exists_is_compl_positive_negative`
 (the Hahn decomposition theorem) using set complements. -/
 theorem exists_compl_positive_negative (s : SignedMeasure α) :
@@ -448,7 +453,9 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
   · exact hA₁.union hD₁
   · exact restrict_le_restrict_union _ _ hA₁ hA₂ hD₁ hD₂
 #align measure_theory.signed_measure.exists_compl_positive_negative MeasureTheory.SignedMeasure.exists_compl_positive_negative
+-/
 
+#print MeasureTheory.SignedMeasure.exists_isCompl_positive_negative /-
 /-- **The Hahn decomposition thoerem**: Given a signed measure `s`, there exist
 complement measurable sets `i` and `j` such that `i` is positive, `j` is negative. -/
 theorem exists_isCompl_positive_negative (s : SignedMeasure α) :
@@ -456,7 +463,9 @@ theorem exists_isCompl_positive_negative (s : SignedMeasure α) :
   let ⟨i, hi₁, hi₂, hi₃⟩ := exists_compl_positive_negative s
   ⟨i, iᶜ, hi₁, hi₂, hi₁.compl, hi₃, isCompl_compl⟩
 #align measure_theory.signed_measure.exists_is_compl_positive_negative MeasureTheory.SignedMeasure.exists_isCompl_positive_negative
+-/
 
+#print MeasureTheory.SignedMeasure.of_symmDiff_compl_positive_negative /-
 /-- The symmetric difference of two Hahn decompositions has measure zero. -/
 theorem of_symmDiff_compl_positive_negative {s : SignedMeasure α} {i j : Set α}
     (hi : MeasurableSet i) (hj : MeasurableSet j) (hi' : 0 ≤[i] s ∧ s ≤[iᶜ] 0)
@@ -493,6 +502,7 @@ theorem of_symmDiff_compl_positive_negative {s : SignedMeasure α} {i j : Set α
     · exact hi.inter hj.compl
   all_goals measurability
 #align measure_theory.signed_measure.of_symm_diff_compl_positive_negative MeasureTheory.SignedMeasure.of_symmDiff_compl_positive_negative
+-/
 
 end SignedMeasure
 
Diff
@@ -244,7 +244,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 :=
   by
   by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
-  push_neg  at hn 
+  push_neg at hn 
   set k := Nat.find hn with hk₁
   have hk₂ : s ≤[i \ ⋃ l < k, restrict_nonpos_seq s i l] 0 := Nat.find_spec hn
   have hmeas : MeasurableSet (⋃ (l : ℕ) (H : l < k), restrict_nonpos_seq s i l) :=
@@ -332,7 +332,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     hi₁.diff (MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
-  rw [restrict_le_restrict_iff _ _ A_meas] at hnn ; push_neg  at hnn 
+  rw [restrict_le_restrict_iff _ _ A_meas] at hnn ; push_neg at hnn 
   obtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn
   have : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E :=
     by
@@ -340,7 +340,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     obtain ⟨k, hk⟩ := h₄ (max (1 / s E + 1) 1)
     refine' ⟨k, _, _⟩
     · have hle := le_of_max_le_right (hk k le_rfl)
-      norm_cast  at hle 
+      norm_cast at hle 
       exact hle
     · have : 1 / s E < bdd k := by
         linarith (config := { restrict_type := ℝ }) [le_of_max_le_left (hk k le_rfl)]
@@ -364,7 +364,7 @@ end ExistsSubsetRestrictNonpos
 #print MeasureTheory.SignedMeasure.measureOfNegatives /-
 /-- The set of measures of the set of measurable negative sets. -/
 def measureOfNegatives (s : SignedMeasure α) : Set ℝ :=
-  s '' { B | MeasurableSet B ∧ s ≤[B] 0 }
+  s '' {B | MeasurableSet B ∧ s ≤[B] 0}
 #align measure_theory.signed_measure.measure_of_negatives MeasureTheory.SignedMeasure.measureOfNegatives
 -/
 
Diff
@@ -122,7 +122,7 @@ private theorem find_exists_one_div_lt_spec (hi : ¬s ≤[i] 0) :
 private theorem find_exists_one_div_lt_min (hi : ¬s ≤[i] 0) {m : ℕ}
     (hm : m < findExistsOneDivLt s i) : ¬ExistsOneDivLt s i m :=
   by
-  rw [find_exists_one_div_lt, dif_pos hi] at hm
+  rw [find_exists_one_div_lt, dif_pos hi] at hm 
   exact Nat.find_min _ hm
 
 /-- Given the set `i`, if `i` is not negative, `some_exists_one_div_lt` chooses the set
@@ -202,7 +202,7 @@ private theorem measure_of_restrict_nonpos_seq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
     (hn : ¬s ≤[i \ ⋃ k < n, restrictNonposSeq s i k] 0) : 0 < s (restrictNonposSeq s i n) :=
   by
   cases n
-  · rw [restrict_nonpos_seq]; rw [← @Set.diff_empty _ i] at hi₂
+  · rw [restrict_nonpos_seq]; rw [← @Set.diff_empty _ i] at hi₂ 
     rcases some_exists_one_div_lt_spec hi₂ with ⟨_, _, h⟩
     exact lt_trans Nat.one_div_pos_of_nat h
   · rw [restrict_nonpos_seq_succ]
@@ -226,7 +226,7 @@ private theorem restrict_nonpos_seq_disjoint' {n m : ℕ} (h : n < m) :
   rw [Set.eq_empty_iff_forall_not_mem]
   rintro x ⟨hx₁, hx₂⟩
   cases m; · linarith
-  · rw [restrict_nonpos_seq] at hx₂
+  · rw [restrict_nonpos_seq] at hx₂ 
     exact
       (some_exists_one_div_lt_subset hx₂).2
         (Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨nat.lt_succ_iff.mp h, hx₁⟩⟩)
@@ -244,7 +244,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 :=
   by
   by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
-  push_neg  at hn
+  push_neg  at hn 
   set k := Nat.find hn with hk₁
   have hk₂ : s ≤[i \ ⋃ l < k, restrict_nonpos_seq s i l] 0 := Nat.find_spec hn
   have hmeas : MeasurableSet (⋃ (l : ℕ) (H : l < k), restrict_nonpos_seq s i l) :=
@@ -272,7 +272,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     · convert le_of_eq s.empty.symm
       ext; simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]
       exact fun h' => False.elim (h h')
-  · intro ; exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
+  · intro; exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
   · intro a b hab
     refine' set.disjoint_Union_left.mpr fun ha => _
     refine' set.disjoint_Union_right.mpr fun hb => _
@@ -306,7 +306,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     by
     rw [hA, ← s.of_disjoint_Union_nat, add_comm, of_add_of_diff]
     exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
-    exacts[hi₁, Set.iUnion_subset fun _ => restrict_nonpos_seq_subset _, fun _ =>
+    exacts [hi₁, Set.iUnion_subset fun _ => restrict_nonpos_seq_subset _, fun _ =>
       restrict_nonpos_seq_measurable_set _, restrict_nonpos_seq_disjoint]
   have h₂ : s A ≤ s i := by
     rw [h₁]
@@ -324,7 +324,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     · exact le_of_lt (restrict_nonpos_seq_lt n (hn' n))
   have h₃ : tendsto (fun n => (bdd n : ℝ) + 1) at_top at_top :=
     by
-    simp only [one_div] at h₃'
+    simp only [one_div] at h₃' 
     exact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)
   have h₄ : tendsto (fun n => (bdd n : ℝ)) at_top at_top := by
     convert at_top.tendsto_at_top_add_const_right (-1) h₃; simp
@@ -332,19 +332,19 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     hi₁.diff (MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
-  rw [restrict_le_restrict_iff _ _ A_meas] at hnn; push_neg  at hnn
+  rw [restrict_le_restrict_iff _ _ A_meas] at hnn ; push_neg  at hnn 
   obtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn
   have : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E :=
     by
-    rw [tendsto_at_top_at_top] at h₄
+    rw [tendsto_at_top_at_top] at h₄ 
     obtain ⟨k, hk⟩ := h₄ (max (1 / s E + 1) 1)
     refine' ⟨k, _, _⟩
     · have hle := le_of_max_le_right (hk k le_rfl)
-      norm_cast  at hle
+      norm_cast  at hle 
       exact hle
     · have : 1 / s E < bdd k := by
         linarith (config := { restrict_type := ℝ }) [le_of_max_le_left (hk k le_rfl)]
-      rw [one_div] at this⊢
+      rw [one_div] at this ⊢
       rwa [inv_lt (lt_trans (inv_pos.2 hE₃) this) hE₃]
   obtain ⟨k, hk₁, hk₂⟩ := this
   have hA' : A ⊆ i \ ⋃ l ≤ k, restrict_nonpos_seq s i l :=
@@ -462,7 +462,7 @@ theorem of_symmDiff_compl_positive_negative {s : SignedMeasure α} {i j : Set α
     (hi : MeasurableSet i) (hj : MeasurableSet j) (hi' : 0 ≤[i] s ∧ s ≤[iᶜ] 0)
     (hj' : 0 ≤[j] s ∧ s ≤[jᶜ] 0) : s (i ∆ j) = 0 ∧ s (iᶜ ∆ jᶜ) = 0 :=
   by
-  rw [restrict_le_restrict_iff s 0, restrict_le_restrict_iff 0 s] at hi' hj'
+  rw [restrict_le_restrict_iff s 0, restrict_le_restrict_iff 0 s] at hi' hj' 
   constructor
   · rw [symmDiff_def, Set.diff_eq_compl_inter, Set.diff_eq_compl_inter, Set.sup_eq_union, of_union,
       le_antisymm (hi'.2 (hi.compl.inter hj) (Set.inter_subset_left _ _))
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying
 
 ! This file was ported from Lean 3 source module measure_theory.decomposition.signed_hahn
-! leanprover-community/mathlib commit bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e
+! leanprover-community/mathlib commit 61b5e2755ccb464b68d05a9acf891ae04992d09d
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -14,6 +14,9 @@ import Mathbin.Order.SymmDiff
 /-!
 # Hahn decomposition
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 This file proves the Hahn decomposition theorem (signed version). The Hahn decomposition theorem
 states that, given a signed measure `s`, there exist complementary, measurable sets `i` and `j`,
 such that `i` is positive and `j` is negative with respect to `s`; that is, `s` restricted on `i`
@@ -358,15 +361,18 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
 
 end ExistsSubsetRestrictNonpos
 
+#print MeasureTheory.SignedMeasure.measureOfNegatives /-
 /-- The set of measures of the set of measurable negative sets. -/
 def measureOfNegatives (s : SignedMeasure α) : Set ℝ :=
   s '' { B | MeasurableSet B ∧ s ≤[B] 0 }
 #align measure_theory.signed_measure.measure_of_negatives MeasureTheory.SignedMeasure.measureOfNegatives
+-/
 
 theorem zero_mem_measureOfNegatives : (0 : ℝ) ∈ s.measureOfNegatives :=
   ⟨∅, ⟨MeasurableSet.empty, le_restrict_empty _ _⟩, s.Empty⟩
 #align measure_theory.signed_measure.zero_mem_measure_of_negatives MeasureTheory.SignedMeasure.zero_mem_measureOfNegatives
 
+#print MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives /-
 theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
   by
   simp_rw [BddBelow, Set.Nonempty, mem_lowerBounds]
@@ -394,6 +400,7 @@ theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
   rcases exists_nat_gt (-s A) with ⟨n, hn⟩
   exact lt_irrefl _ ((neg_lt.1 hn).trans_le (hfalse n))
 #align measure_theory.signed_measure.bdd_below_measure_of_negatives MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives
+-/
 
 /-- Alternative formulation of `measure_theory.signed_measure.exists_is_compl_positive_negative`
 (the Hahn decomposition theorem) using set complements. -/
Diff
@@ -42,7 +42,7 @@ Hahn decomposition theorem
 
 noncomputable section
 
-open Classical BigOperators NNReal ENNReal MeasureTheory
+open scoped Classical BigOperators NNReal ENNReal MeasureTheory
 
 variable {α β : Type _} [MeasurableSpace α]
 
Diff
@@ -186,9 +186,7 @@ private theorem restrict_nonpos_seq_succ (n : ℕ) :
   rw [restrict_nonpos_seq]
 
 private theorem restrict_nonpos_seq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
-  cases n <;>
-    · rw [restrict_nonpos_seq]
-      exact some_exists_one_div_lt_subset'
+  cases n <;> · rw [restrict_nonpos_seq]; exact some_exists_one_div_lt_subset'
 
 private theorem restrict_nonpos_seq_lt (n : ℕ) (hn : ¬s ≤[i \ ⋃ k ≤ n, restrictNonposSeq s i k] 0) :
     (1 / (findExistsOneDivLt s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) + 1) : ℝ) <
@@ -201,8 +199,7 @@ private theorem measure_of_restrict_nonpos_seq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
     (hn : ¬s ≤[i \ ⋃ k < n, restrictNonposSeq s i k] 0) : 0 < s (restrictNonposSeq s i n) :=
   by
   cases n
-  · rw [restrict_nonpos_seq]
-    rw [← @Set.diff_empty _ i] at hi₂
+  · rw [restrict_nonpos_seq]; rw [← @Set.diff_empty _ i] at hi₂
     rcases some_exists_one_div_lt_spec hi₂ with ⟨_, _, h⟩
     exact lt_trans Nat.one_div_pos_of_nat h
   · rw [restrict_nonpos_seq_succ]
@@ -264,18 +261,15 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
       rw [sub_neg]
       exact lt_of_lt_of_le hi₂ this
     refine' tsum_nonneg _
-    intro l
-    by_cases l < k
+    intro l; by_cases l < k
     · convert h₁ _ h
       ext x
       rw [Set.mem_iUnion, exists_prop, and_iff_right_iff_imp]
       exact fun _ => h
     · convert le_of_eq s.empty.symm
-      ext
-      simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]
+      ext; simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]
       exact fun h' => False.elim (h h')
-  · intro
-    exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
+  · intro ; exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
   · intro a b hab
     refine' set.disjoint_Union_left.mpr fun ha => _
     refine' set.disjoint_Union_right.mpr fun hb => _
@@ -292,11 +286,9 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 :=
   by
   have hi₁ : MeasurableSet i := by_contradiction fun h => ne_of_lt hi <| s.not_measurable h
-  by_cases s ≤[i] 0
-  · exact ⟨i, hi₁, Set.Subset.refl _, h, hi⟩
+  by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi⟩
   by_cases hn : ∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrict_nonpos_seq s i l] 0
-  swap
-  · exact exists_subset_restrict_nonpos' hi₁ hi hn
+  swap; · exact exists_subset_restrict_nonpos' hi₁ hi hn
   set A := i \ ⋃ l, restrict_nonpos_seq s i l with hA
   set bdd : ℕ → ℕ := fun n => find_exists_one_div_lt s (i \ ⋃ k ≤ n, restrict_nonpos_seq s i k) with
     hbdd
@@ -331,16 +323,13 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     by
     simp only [one_div] at h₃'
     exact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)
-  have h₄ : tendsto (fun n => (bdd n : ℝ)) at_top at_top :=
-    by
-    convert at_top.tendsto_at_top_add_const_right (-1) h₃
-    simp
+  have h₄ : tendsto (fun n => (bdd n : ℝ)) at_top at_top := by
+    convert at_top.tendsto_at_top_add_const_right (-1) h₃; simp
   have A_meas : MeasurableSet A :=
     hi₁.diff (MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
-  rw [restrict_le_restrict_iff _ _ A_meas] at hnn
-  push_neg  at hnn
+  rw [restrict_le_restrict_iff _ _ A_meas] at hnn; push_neg  at hnn
   obtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn
   have : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E :=
     by
@@ -358,14 +347,12 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
   have hA' : A ⊆ i \ ⋃ l ≤ k, restrict_nonpos_seq s i l :=
     by
     apply Set.diff_subset_diff_right
-    intro x
-    simp only [Set.mem_iUnion]
+    intro x; simp only [Set.mem_iUnion]
     rintro ⟨n, _, hn₂⟩
     exact ⟨n, hn₂⟩
   refine'
     find_exists_one_div_lt_min (hn' k) (Buffer.lt_aux_2 hk₁) ⟨E, Set.Subset.trans hE₂ hA', hE₁, _⟩
-  convert hk₂
-  norm_cast
+  convert hk₂; norm_cast
   exact tsub_add_cancel_of_le hk₁
 #align measure_theory.signed_measure.exists_subset_restrict_nonpos MeasureTheory.SignedMeasure.exists_subset_restrict_nonpos
 
@@ -448,8 +435,7 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
     rw [← hA₃,
       of_union (Set.disjoint_of_subset_right (Set.Subset.trans hD hC₁) disjoint_compl_right) hA₁
         hD₁]
-    linarith
-    infer_instance
+    linarith; infer_instance
   refine' not_le.2 this _
   refine' csInf_le bdd_below_measure_of_negatives ⟨A ∪ D, ⟨_, _⟩, rfl⟩
   · exact hA₁.union hD₁
Diff
@@ -98,41 +98,35 @@ allowing us to prove `exists_subset_restrict_nonpos`.
 there exists a measurable set `k ⊆ i` such that `1 / (n + 1) < s k`. -/
 private def exists_one_div_lt (s : SignedMeasure α) (i : Set α) (n : ℕ) : Prop :=
   ∃ k : Set α, k ⊆ i ∧ MeasurableSet k ∧ (1 / (n + 1) : ℝ) < s k
-#align measure_theory.signed_measure.exists_one_div_lt measure_theory.signed_measure.exists_one_div_lt
 
 private theorem exists_nat_one_div_lt_measure_of_not_negative (hi : ¬s ≤[i] 0) :
     ∃ n : ℕ, ExistsOneDivLt s i n :=
   let ⟨k, hj₁, hj₂, hj⟩ := exists_pos_measure_of_not_restrict_le_zero s hi
   let ⟨n, hn⟩ := exists_nat_one_div_lt hj
   ⟨n, k, hj₂, hj₁, hn⟩
-#align measure_theory.signed_measure.exists_nat_one_div_lt_measure_of_not_negative measure_theory.signed_measure.exists_nat_one_div_lt_measure_of_not_negative
 
 /-- Given the set `i`, if `i` is not negative, `find_exists_one_div_lt s i` is the
 least natural number `n` such that `exists_one_div_lt s i n`, otherwise, it returns 0. -/
 private def find_exists_one_div_lt (s : SignedMeasure α) (i : Set α) : ℕ :=
   if hi : ¬s ≤[i] 0 then Nat.find (exists_nat_one_div_lt_measure_of_not_negative hi) else 0
-#align measure_theory.signed_measure.find_exists_one_div_lt measure_theory.signed_measure.find_exists_one_div_lt
 
 private theorem find_exists_one_div_lt_spec (hi : ¬s ≤[i] 0) :
     ExistsOneDivLt s i (findExistsOneDivLt s i) :=
   by
   rw [find_exists_one_div_lt, dif_pos hi]
   convert Nat.find_spec _
-#align measure_theory.signed_measure.find_exists_one_div_lt_spec measure_theory.signed_measure.find_exists_one_div_lt_spec
 
 private theorem find_exists_one_div_lt_min (hi : ¬s ≤[i] 0) {m : ℕ}
     (hm : m < findExistsOneDivLt s i) : ¬ExistsOneDivLt s i m :=
   by
   rw [find_exists_one_div_lt, dif_pos hi] at hm
   exact Nat.find_min _ hm
-#align measure_theory.signed_measure.find_exists_one_div_lt_min measure_theory.signed_measure.find_exists_one_div_lt_min
 
 /-- Given the set `i`, if `i` is not negative, `some_exists_one_div_lt` chooses the set
 `k` from `exists_one_div_lt s i (find_exists_one_div_lt s i)`, otherwise, it returns the
 empty set. -/
 private def some_exists_one_div_lt (s : SignedMeasure α) (i : Set α) : Set α :=
   if hi : ¬s ≤[i] 0 then Classical.choose (findExistsOneDivLt_spec hi) else ∅
-#align measure_theory.signed_measure.some_exists_one_div_lt measure_theory.signed_measure.some_exists_one_div_lt
 
 private theorem some_exists_one_div_lt_spec (hi : ¬s ≤[i] 0) :
     someExistsOneDivLt s i ⊆ i ∧
@@ -141,7 +135,6 @@ private theorem some_exists_one_div_lt_spec (hi : ¬s ≤[i] 0) :
   by
   rw [some_exists_one_div_lt, dif_pos hi]
   exact Classical.choose_spec (find_exists_one_div_lt_spec hi)
-#align measure_theory.signed_measure.some_exists_one_div_lt_spec measure_theory.signed_measure.some_exists_one_div_lt_spec
 
 private theorem some_exists_one_div_lt_subset : someExistsOneDivLt s i ⊆ i :=
   by
@@ -152,11 +145,9 @@ private theorem some_exists_one_div_lt_subset : someExistsOneDivLt s i ⊆ i :=
       h
   · rw [some_exists_one_div_lt, dif_neg hi]
     exact Set.empty_subset _
-#align measure_theory.signed_measure.some_exists_one_div_lt_subset measure_theory.signed_measure.some_exists_one_div_lt_subset
 
 private theorem some_exists_one_div_lt_subset' : someExistsOneDivLt s (i \ j) ⊆ i :=
   Set.Subset.trans someExistsOneDivLt_subset (Set.diff_subset _ _)
-#align measure_theory.signed_measure.some_exists_one_div_lt_subset' measure_theory.signed_measure.some_exists_one_div_lt_subset'
 
 private theorem some_exists_one_div_lt_measurable_set : MeasurableSet (someExistsOneDivLt s i) :=
   by
@@ -167,13 +158,11 @@ private theorem some_exists_one_div_lt_measurable_set : MeasurableSet (someExist
       h
   · rw [some_exists_one_div_lt, dif_neg hi]
     exact MeasurableSet.empty
-#align measure_theory.signed_measure.some_exists_one_div_lt_measurable_set measure_theory.signed_measure.some_exists_one_div_lt_measurable_set
 
 private theorem some_exists_one_div_lt_lt (hi : ¬s ≤[i] 0) :
     (1 / (findExistsOneDivLt s i + 1) : ℝ) < s (someExistsOneDivLt s i) :=
   let ⟨_, _, h⟩ := someExistsOneDivLt_spec hi
   h
-#align measure_theory.signed_measure.some_exists_one_div_lt_lt measure_theory.signed_measure.some_exists_one_div_lt_lt
 
 /-- Given the set `i`, `restrict_nonpos_seq s i` is the sequence of sets defined inductively where
 `restrict_nonpos_seq s i 0 = some_exists_one_div_lt s (i \ ∅)` and
@@ -191,18 +180,15 @@ private def restrict_nonpos_seq (s : SignedMeasure α) (i : Set α) : ℕ → Se
         ⋃ k ≤ n,
           have : k < n + 1 := Nat.lt_succ_iff.mpr H
           restrict_nonpos_seq k)
-#align measure_theory.signed_measure.restrict_nonpos_seq measure_theory.signed_measure.restrict_nonpos_seq
 
 private theorem restrict_nonpos_seq_succ (n : ℕ) :
     restrictNonposSeq s i n.succ = someExistsOneDivLt s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) := by
   rw [restrict_nonpos_seq]
-#align measure_theory.signed_measure.restrict_nonpos_seq_succ measure_theory.signed_measure.restrict_nonpos_seq_succ
 
 private theorem restrict_nonpos_seq_subset (n : ℕ) : restrictNonposSeq s i n ⊆ i := by
   cases n <;>
     · rw [restrict_nonpos_seq]
       exact some_exists_one_div_lt_subset'
-#align measure_theory.signed_measure.restrict_nonpos_seq_subset measure_theory.signed_measure.restrict_nonpos_seq_subset
 
 private theorem restrict_nonpos_seq_lt (n : ℕ) (hn : ¬s ≤[i \ ⋃ k ≤ n, restrictNonposSeq s i k] 0) :
     (1 / (findExistsOneDivLt s (i \ ⋃ k ≤ n, restrictNonposSeq s i k) + 1) : ℝ) <
@@ -210,7 +196,6 @@ private theorem restrict_nonpos_seq_lt (n : ℕ) (hn : ¬s ≤[i \ ⋃ k ≤ n,
   by
   rw [restrict_nonpos_seq_succ]
   apply some_exists_one_div_lt_lt hn
-#align measure_theory.signed_measure.restrict_nonpos_seq_lt measure_theory.signed_measure.restrict_nonpos_seq_lt
 
 private theorem measure_of_restrict_nonpos_seq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
     (hn : ¬s ≤[i \ ⋃ k < n, restrictNonposSeq s i k] 0) : 0 < s (restrictNonposSeq s i n) :=
@@ -228,14 +213,12 @@ private theorem measure_of_restrict_nonpos_seq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
       exact funext fun x => by rw [Nat.lt_succ_iff]
     rcases some_exists_one_div_lt_spec h₁ with ⟨_, _, h⟩
     exact lt_trans Nat.one_div_pos_of_nat h
-#align measure_theory.signed_measure.measure_of_restrict_nonpos_seq measure_theory.signed_measure.measure_of_restrict_nonpos_seq
 
 private theorem restrict_nonpos_seq_measurable_set (n : ℕ) :
     MeasurableSet (restrictNonposSeq s i n) := by
   cases n <;>
     · rw [restrict_nonpos_seq]
       exact some_exists_one_div_lt_measurable_set
-#align measure_theory.signed_measure.restrict_nonpos_seq_measurable_set measure_theory.signed_measure.restrict_nonpos_seq_measurable_set
 
 private theorem restrict_nonpos_seq_disjoint' {n m : ℕ} (h : n < m) :
     restrictNonposSeq s i n ∩ restrictNonposSeq s i m = ∅ :=
@@ -247,7 +230,6 @@ private theorem restrict_nonpos_seq_disjoint' {n m : ℕ} (h : n < m) :
     exact
       (some_exists_one_div_lt_subset hx₂).2
         (Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨nat.lt_succ_iff.mp h, hx₁⟩⟩)
-#align measure_theory.signed_measure.restrict_nonpos_seq_disjoint' measure_theory.signed_measure.restrict_nonpos_seq_disjoint'
 
 private theorem restrict_nonpos_seq_disjoint : Pairwise (Disjoint on restrictNonposSeq s i) :=
   by
@@ -256,7 +238,6 @@ private theorem restrict_nonpos_seq_disjoint : Pairwise (Disjoint on restrictNon
   rcases lt_or_gt_of_ne h with (h | h)
   · rw [restrict_nonpos_seq_disjoint' h]
   · rw [Set.inter_comm, restrict_nonpos_seq_disjoint' h]
-#align measure_theory.signed_measure.restrict_nonpos_seq_disjoint measure_theory.signed_measure.restrict_nonpos_seq_disjoint
 
 private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂ : s i < 0)
     (hn : ¬∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrictNonposSeq s i l] 0) :
@@ -305,7 +286,6 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     intro _ hx
     exact restrict_nonpos_seq_subset _ hx
   · infer_instance
-#align measure_theory.signed_measure.exists_subset_restrict_nonpos' measure_theory.signed_measure.exists_subset_restrict_nonpos'
 
 /-- A measurable set of negative measure has a negative subset of negative measure. -/
 theorem exists_subset_restrict_nonpos (hi : s i < 0) :
Diff
@@ -246,7 +246,7 @@ private theorem restrict_nonpos_seq_disjoint' {n m : ℕ} (h : n < m) :
   · rw [restrict_nonpos_seq] at hx₂
     exact
       (some_exists_one_div_lt_subset hx₂).2
-        (Set.mem_unionᵢ.2 ⟨n, Set.mem_unionᵢ.2 ⟨nat.lt_succ_iff.mp h, hx₁⟩⟩)
+        (Set.mem_iUnion.2 ⟨n, Set.mem_iUnion.2 ⟨nat.lt_succ_iff.mp h, hx₁⟩⟩)
 #align measure_theory.signed_measure.restrict_nonpos_seq_disjoint' measure_theory.signed_measure.restrict_nonpos_seq_disjoint'
 
 private theorem restrict_nonpos_seq_disjoint : Pairwise (Disjoint on restrictNonposSeq s i) :=
@@ -267,7 +267,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
   set k := Nat.find hn with hk₁
   have hk₂ : s ≤[i \ ⋃ l < k, restrict_nonpos_seq s i l] 0 := Nat.find_spec hn
   have hmeas : MeasurableSet (⋃ (l : ℕ) (H : l < k), restrict_nonpos_seq s i l) :=
-    MeasurableSet.unionᵢ fun _ => MeasurableSet.unionᵢ fun _ => restrict_nonpos_seq_measurable_set _
+    MeasurableSet.iUnion fun _ => MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
   refine' ⟨i \ ⋃ l < k, restrict_nonpos_seq s i l, hi₁.diff hmeas, Set.diff_subset _ _, hk₂, _⟩
   rw [of_diff hmeas hi₁, s.of_disjoint_Union_nat]
   · have h₁ : ∀ l < k, 0 ≤ s (restrict_nonpos_seq s i l) :=
@@ -276,8 +276,8 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
       refine' le_of_lt (measure_of_restrict_nonpos_seq h _ _)
       refine' mt (restrict_le_zero_subset _ (hi₁.diff _) (Set.Subset.refl _)) (Nat.find_min hn hl)
       exact
-        MeasurableSet.unionᵢ fun _ =>
-          MeasurableSet.unionᵢ fun _ => restrict_nonpos_seq_measurable_set _
+        MeasurableSet.iUnion fun _ =>
+          MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
     suffices 0 ≤ ∑' l : ℕ, s (⋃ H : l < k, restrict_nonpos_seq s i l)
       by
       rw [sub_neg]
@@ -287,21 +287,21 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     by_cases l < k
     · convert h₁ _ h
       ext x
-      rw [Set.mem_unionᵢ, exists_prop, and_iff_right_iff_imp]
+      rw [Set.mem_iUnion, exists_prop, and_iff_right_iff_imp]
       exact fun _ => h
     · convert le_of_eq s.empty.symm
       ext
-      simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_unionᵢ, not_and, iff_false_iff]
+      simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]
       exact fun h' => False.elim (h h')
   · intro
-    exact MeasurableSet.unionᵢ fun _ => restrict_nonpos_seq_measurable_set _
+    exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
   · intro a b hab
     refine' set.disjoint_Union_left.mpr fun ha => _
     refine' set.disjoint_Union_right.mpr fun hb => _
     exact restrict_nonpos_seq_disjoint hab
-  · apply Set.unionᵢ_subset
+  · apply Set.iUnion_subset
     intro a x
-    simp only [and_imp, exists_prop, Set.mem_unionᵢ]
+    simp only [and_imp, exists_prop, Set.mem_iUnion]
     intro _ hx
     exact restrict_nonpos_seq_subset _ hx
   · infer_instance
@@ -325,13 +325,13 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     intro n
     convert hn (n + 1) <;>
       · ext l
-        simp only [exists_prop, Set.mem_unionᵢ, and_congr_left_iff]
+        simp only [exists_prop, Set.mem_iUnion, and_congr_left_iff]
         exact fun _ => nat.lt_succ_iff.symm
   have h₁ : s i = s A + ∑' l, s (restrict_nonpos_seq s i l) :=
     by
     rw [hA, ← s.of_disjoint_Union_nat, add_comm, of_add_of_diff]
-    exact MeasurableSet.unionᵢ fun _ => restrict_nonpos_seq_measurable_set _
-    exacts[hi₁, Set.unionᵢ_subset fun _ => restrict_nonpos_seq_subset _, fun _ =>
+    exact MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _
+    exacts[hi₁, Set.iUnion_subset fun _ => restrict_nonpos_seq_subset _, fun _ =>
       restrict_nonpos_seq_measurable_set _, restrict_nonpos_seq_disjoint]
   have h₂ : s A ≤ s i := by
     rw [h₁]
@@ -356,7 +356,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     convert at_top.tendsto_at_top_add_const_right (-1) h₃
     simp
   have A_meas : MeasurableSet A :=
-    hi₁.diff (MeasurableSet.unionᵢ fun _ => restrict_nonpos_seq_measurable_set _)
+    hi₁.diff (MeasurableSet.iUnion fun _ => restrict_nonpos_seq_measurable_set _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
   rw [restrict_le_restrict_iff _ _ A_meas] at hnn
@@ -379,7 +379,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     by
     apply Set.diff_subset_diff_right
     intro x
-    simp only [Set.mem_unionᵢ]
+    simp only [Set.mem_iUnion]
     rintro ⟨n, _, hn₂⟩
     exact ⟨n, hn₂⟩
   refine'
@@ -416,14 +416,14 @@ theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives :=
   have hfalse : ∀ n : ℕ, s A ≤ -n := by
     intro n
     refine' le_trans _ (le_of_lt (h_lt _))
-    rw [hA, ← Set.diff_union_of_subset (Set.subset_unionᵢ _ n),
+    rw [hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n),
       of_union Set.disjoint_sdiff_left _ (hmeas n)]
     · refine' add_le_of_nonpos_left _
       have : s ≤[A] 0 := restrict_le_restrict_Union _ _ hmeas hr
       refine' nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)
-      exact MeasurableSet.unionᵢ hmeas
+      exact MeasurableSet.iUnion hmeas
     · infer_instance
-    · exact (MeasurableSet.unionᵢ hmeas).diffₓ (hmeas n)
+    · exact (MeasurableSet.iUnion hmeas).diffₓ (hmeas n)
   rcases exists_nat_gt (-s A) with ⟨n, hn⟩
   exact lt_irrefl _ ((neg_lt.1 hn).trans_le (hfalse n))
 #align measure_theory.signed_measure.bdd_below_measure_of_negatives MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives
@@ -434,18 +434,18 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
     ∃ i : Set α, MeasurableSet i ∧ 0 ≤[i] s ∧ s ≤[iᶜ] 0 :=
   by
   obtain ⟨f, _, hf₂, hf₁⟩ :=
-    exists_seq_tendsto_infₛ ⟨0, @zero_mem_measure_of_negatives _ _ s⟩ bdd_below_measure_of_negatives
+    exists_seq_tendsto_sInf ⟨0, @zero_mem_measure_of_negatives _ _ s⟩ bdd_below_measure_of_negatives
   choose B hB using hf₁
   have hB₁ : ∀ n, MeasurableSet (B n) := fun n => (hB n).1.1
   have hB₂ : ∀ n, s ≤[B n] 0 := fun n => (hB n).1.2
   set A := ⋃ n, B n with hA
-  have hA₁ : MeasurableSet A := MeasurableSet.unionᵢ hB₁
+  have hA₁ : MeasurableSet A := MeasurableSet.iUnion hB₁
   have hA₂ : s ≤[A] 0 := restrict_le_restrict_Union _ _ hB₁ hB₂
   have hA₃ : s A = Inf s.measure_of_negatives :=
     by
     apply le_antisymm
     · refine' le_of_tendsto_of_tendsto tendsto_const_nhds hf₂ (eventually_of_forall fun n => _)
-      rw [← (hB n).2, hA, ← Set.diff_union_of_subset (Set.subset_unionᵢ _ n),
+      rw [← (hB n).2, hA, ← Set.diff_union_of_subset (Set.subset_iUnion _ n),
         of_union Set.disjoint_sdiff_left _ (hB₁ n)]
       · refine' add_le_of_nonpos_left _
         have : s ≤[A] 0 :=
@@ -454,10 +454,10 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
             h
         refine'
           nonpos_of_restrict_le_zero _ (restrict_le_zero_subset _ _ (Set.diff_subset _ _) this)
-        exact MeasurableSet.unionᵢ hB₁
+        exact MeasurableSet.iUnion hB₁
       · infer_instance
-      · exact (MeasurableSet.unionᵢ hB₁).diffₓ (hB₁ n)
-    · exact cinfₛ_le bdd_below_measure_of_negatives ⟨A, ⟨hA₁, hA₂⟩, rfl⟩
+      · exact (MeasurableSet.iUnion hB₁).diffₓ (hB₁ n)
+    · exact csInf_le bdd_below_measure_of_negatives ⟨A, ⟨hA₁, hA₂⟩, rfl⟩
   refine' ⟨Aᶜ, hA₁.compl, _, (compl_compl A).symm ▸ hA₂⟩
   rw [restrict_le_restrict_iff _ _ hA₁.compl]
   intro C hC hC₁
@@ -471,7 +471,7 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
     linarith
     infer_instance
   refine' not_le.2 this _
-  refine' cinfₛ_le bdd_below_measure_of_negatives ⟨A ∪ D, ⟨_, _⟩, rfl⟩
+  refine' csInf_le bdd_below_measure_of_negatives ⟨A ∪ D, ⟨_, _⟩, rfl⟩
   · exact hA₁.union hD₁
   · exact restrict_le_restrict_union _ _ hA₁ hA₂ hD₁ hD₂
 #align measure_theory.signed_measure.exists_compl_positive_negative MeasureTheory.SignedMeasure.exists_compl_positive_negative
Diff
@@ -350,7 +350,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
   have h₃ : tendsto (fun n => (bdd n : ℝ) + 1) at_top at_top :=
     by
     simp only [one_div] at h₃'
-    exact Summable.tendsto_top_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)
+    exact Summable.tendsto_atTop_of_pos h₃' fun n => Nat.cast_add_one_pos (bdd n)
   have h₄ : tendsto (fun n => (bdd n : ℝ)) at_top at_top :=
     by
     convert at_top.tendsto_at_top_add_const_right (-1) h₃
Diff
@@ -42,7 +42,7 @@ Hahn decomposition theorem
 
 noncomputable section
 
-open Classical BigOperators NNReal Ennreal MeasureTheory
+open Classical BigOperators NNReal ENNReal MeasureTheory
 
 variable {α β : Type _} [MeasurableSpace α]
 

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -279,7 +279,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
         exact fun _ => Nat.lt_succ_iff.symm
   have h₁ : s i = s A + ∑' l, s (restrictNonposSeq s i l) := by
     rw [hA, ← s.of_disjoint_iUnion_nat, add_comm, of_add_of_diff]
-    exact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
+    · exact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
     exacts [hi₁, Set.iUnion_subset fun _ => restrictNonposSeq_subset _, fun _ =>
       restrictNonposSeq_measurableSet _, restrictNonposSeq_disjoint]
   have h₂ : s A ≤ s i := by
chore: remove some mathlib3 names in doc comments (#11931)
Diff
@@ -364,7 +364,7 @@ theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives := by
   exact lt_irrefl _ ((neg_lt.1 hn).trans_le (hfalse n))
 #align measure_theory.signed_measure.bdd_below_measure_of_negatives MeasureTheory.SignedMeasure.bddBelow_measureOfNegatives
 
-/-- Alternative formulation of `measure_theory.signed_measure.exists_is_compl_positive_negative`
+/-- Alternative formulation of `MeasureTheory.SignedMeasure.exists_isCompl_positive_negative`
 (the Hahn decomposition theorem) using set complements. -/
 theorem exists_compl_positive_negative (s : SignedMeasure α) :
     ∃ i : Set α, MeasurableSet i ∧ 0 ≤[i] s ∧ s ≤[iᶜ] 0 := by
chore(*): remove empty lines between variable statements (#11418)

Empty lines were removed by executing the following Python script twice

import os
import re


# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
  for filename in files:
    if filename.endswith('.lean'):
      file_path = os.path.join(dir_path, filename)

      # Open the file and read its contents
      with open(file_path, 'r') as file:
        content = file.read()

      # Use a regular expression to replace sequences of "variable" lines separated by empty lines
      # with sequences without empty lines
      modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)

      # Write the modified content back to the file
      with open(file_path, 'w') as file:
        file.write(modified_content)
Diff
@@ -42,7 +42,6 @@ noncomputable section
 open scoped Classical BigOperators NNReal ENNReal MeasureTheory
 
 variable {α β : Type*} [MeasurableSpace α]
-
 variable {M : Type*} [AddCommMonoid M] [TopologicalSpace M] [OrderedAddCommMonoid M]
 
 namespace MeasureTheory
refactor: optimize proofs with omega (#11093)

I ran tryAtEachStep on all files under Mathlib to find all locations where omega succeeds. For each that was a linarith without an only, I tried replacing it with omega, and I verified that elaboration time got smaller. (In almost all cases, there was a noticeable speedup.) I also replaced some slow aesops along the way.

Diff
@@ -208,7 +208,7 @@ private theorem restrictNonposSeq_disjoint' {n m : ℕ} (h : n < m) :
     restrictNonposSeq s i n ∩ restrictNonposSeq s i m = ∅ := by
   rw [Set.eq_empty_iff_forall_not_mem]
   rintro x ⟨hx₁, hx₂⟩
-  cases m; · rw [Nat.zero_eq] at h; linarith
+  cases m; · rw [Nat.zero_eq] at h; omega
   · rw [restrictNonposSeq] at hx₂
     exact
       (someExistsOneDivLT_subset hx₂).2
chore: scope symmDiff notations (#9844)

Those notations are not scoped whereas the file is very low in the import hierarchy.

Diff
@@ -416,6 +416,7 @@ theorem exists_isCompl_positive_negative (s : SignedMeasure α) :
   ⟨i, iᶜ, hi₁, hi₂, hi₁.compl, hi₃, isCompl_compl⟩
 #align measure_theory.signed_measure.exists_is_compl_positive_negative MeasureTheory.SignedMeasure.exists_isCompl_positive_negative
 
+open scoped symmDiff in
 /-- The symmetric difference of two Hahn decompositions has measure zero. -/
 theorem of_symmDiff_compl_positive_negative {s : SignedMeasure α} {i j : Set α}
     (hi : MeasurableSet i) (hj : MeasurableSet j) (hi' : 0 ≤[i] s ∧ s ≤[iᶜ] 0)
chore: rename by_contra' to by_contra! (#8797)

To fit with the "please try harder" convention of ! tactics.

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -342,7 +342,7 @@ theorem zero_mem_measureOfNegatives : (0 : ℝ) ∈ s.measureOfNegatives :=
 
 theorem bddBelow_measureOfNegatives : BddBelow s.measureOfNegatives := by
   simp_rw [BddBelow, Set.Nonempty, mem_lowerBounds]
-  by_contra' h
+  by_contra! h
   have h' : ∀ n : ℕ, ∃ y : ℝ, y ∈ s.measureOfNegatives ∧ y < -n := fun n => h (-n)
   choose f hf using h'
   have hf' : ∀ n : ℕ, ∃ B, MeasurableSet B ∧ s ≤[B] 0 ∧ s B < -n := by
@@ -395,7 +395,7 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
   refine' ⟨Aᶜ, hA₁.compl, _, (compl_compl A).symm ▸ hA₂⟩
   rw [restrict_le_restrict_iff _ _ hA₁.compl]
   intro C _ hC₁
-  by_contra' hC₂
+  by_contra! hC₂
   rcases exists_subset_restrict_nonpos hC₂ with ⟨D, hD₁, hD, hD₂, hD₃⟩
   have : s (A ∪ D) < sInf s.measureOfNegatives := by
     rw [← hA₃,
chore: add missing hypothesis names to by_cases (#8533)

I've also got a change to make this required, but I'd like to land this first.

Diff
@@ -224,7 +224,8 @@ private theorem restrictNonposSeq_disjoint : Pairwise (Disjoint on restrictNonpo
 private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂ : s i < 0)
     (hn : ¬∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrictNonposSeq s i l] 0) :
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 := by
-  by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
+  by_cases h : s ≤[i] 0
+  · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
   push_neg at hn
   set k := Nat.find hn
   have hk₂ : s ≤[i \ ⋃ l < k, restrictNonposSeq s i l] 0 := Nat.find_spec hn
@@ -243,7 +244,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
       rw [sub_neg]
       exact lt_of_lt_of_le hi₂ this
     refine' tsum_nonneg _
-    intro l; by_cases l < k
+    intro l; by_cases h : l < k
     · convert h₁ _ h
       ext x
       rw [Set.mem_iUnion, exists_prop, and_iff_right_iff_imp]
@@ -266,7 +267,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
 theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 := by
   have hi₁ : MeasurableSet i := by_contradiction fun h => ne_of_lt hi <| s.not_measurable h
-  by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi⟩
+  by_cases h : s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi⟩
   by_cases hn : ∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrictNonposSeq s i l] 0
   swap; · exact exists_subset_restrict_nonpos' hi₁ hi hn
   set A := i \ ⋃ l, restrictNonposSeq s i l with hA
chore(InfiniteSum): use dot notation (#8358)

Rename

  • summable_of_norm_bounded -> Summable.of_norm_bounded;
  • summable_of_norm_bounded_eventually -> Summable.of_norm_bounded_eventually;
  • summable_of_nnnorm_bounded -> Summable.of_nnnorm_bounded;
  • summable_of_summable_norm -> Summable.of_norm;
  • summable_of_summable_nnnorm -> Summable.of_nnnorm;

New lemmas

  • Summable.of_norm_bounded_eventually_nat
  • Summable.norm

Misc changes

  • Golf a few proofs.
Diff
@@ -290,9 +290,8 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     have : Summable fun l => s (restrictNonposSeq s i l) :=
       HasSum.summable
         (s.m_iUnion (fun _ => restrictNonposSeq_measurableSet _) restrictNonposSeq_disjoint)
-    refine'
-      summable_of_nonneg_of_le (fun n => _) (fun n => _)
-        (Summable.comp_injective this Nat.succ_injective)
+    refine' .of_nonneg_of_le (fun n => _) (fun n => _)
+        (this.comp_injective Nat.succ_injective)
     · exact le_of_lt Nat.one_div_pos_of_nat
     · exact le_of_lt (restrictNonposSeq_lt n (hn' n))
   have h₃ : Tendsto (fun n => (bdd n : ℝ) + 1) atTop atTop := by
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -41,9 +41,9 @@ noncomputable section
 
 open scoped Classical BigOperators NNReal ENNReal MeasureTheory
 
-variable {α β : Type _} [MeasurableSpace α]
+variable {α β : Type*} [MeasurableSpace α]
 
-variable {M : Type _} [AddCommMonoid M] [TopologicalSpace M] [OrderedAddCommMonoid M]
+variable {M : Type*} [AddCommMonoid M] [TopologicalSpace M] [OrderedAddCommMonoid M]
 
 namespace MeasureTheory
 
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,15 +2,12 @@
 Copyright (c) 2021 Kexing Ying. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Kexing Ying
-
-! This file was ported from Lean 3 source module measure_theory.decomposition.signed_hahn
-! leanprover-community/mathlib commit bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Measure.VectorMeasure
 import Mathlib.Order.SymmDiff
 
+#align_import measure_theory.decomposition.signed_hahn from "leanprover-community/mathlib"@"bc7d81beddb3d6c66f71449c5bc76c38cb77cf9e"
+
 /-!
 # Hahn decomposition
 
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -254,7 +254,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     · convert le_of_eq s.empty.symm
       ext; simp only [exists_prop, Set.mem_empty_iff_false, Set.mem_iUnion, not_and, iff_false_iff]
       exact fun h' => False.elim (h h')
-  · intro ; exact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
+  · intro; exact MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
   · intro a b hab
     refine' Set.disjoint_iUnion_left.mpr fun _ => _
     refine' Set.disjoint_iUnion_right.mpr fun _ => _
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -228,7 +228,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
     (hn : ¬∀ n : ℕ, ¬s ≤[i \ ⋃ l < n, restrictNonposSeq s i l] 0) :
     ∃ j : Set α, MeasurableSet j ∧ j ⊆ i ∧ s ≤[j] 0 ∧ s j < 0 := by
   by_cases s ≤[i] 0; · exact ⟨i, hi₁, Set.Subset.refl _, h, hi₂⟩
-  push_neg  at hn
+  push_neg at hn
   set k := Nat.find hn
   have hk₂ : s ≤[i \ ⋃ l < k, restrictNonposSeq s i l] 0 := Nat.find_spec hn
   have hmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), restrictNonposSeq s i l) :=
@@ -307,7 +307,7 @@ theorem exists_subset_restrict_nonpos (hi : s i < 0) :
     hi₁.diff (MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _)
   refine' ⟨A, A_meas, Set.diff_subset _ _, _, h₂.trans_lt hi⟩
   by_contra hnn
-  rw [restrict_le_restrict_iff _ _ A_meas] at hnn; push_neg  at hnn
+  rw [restrict_le_restrict_iff _ _ A_meas] at hnn; push_neg at hnn
   obtain ⟨E, hE₁, hE₂, hE₃⟩ := hnn
   have : ∃ k, 1 ≤ bdd k ∧ 1 / (bdd k : ℝ) < s E := by
     rw [tendsto_atTop_atTop] at h₄
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -411,7 +411,7 @@ theorem exists_compl_positive_negative (s : SignedMeasure α) :
   · exact restrict_le_restrict_union _ _ hA₁ hA₂ hD₁ hD₂
 #align measure_theory.signed_measure.exists_compl_positive_negative MeasureTheory.SignedMeasure.exists_compl_positive_negative
 
-/-- **The Hahn decomposition thoerem**: Given a signed measure `s`, there exist
+/-- **The Hahn decomposition theorem**: Given a signed measure `s`, there exist
 complement measurable sets `i` and `j` such that `i` is positive, `j` is negative. -/
 theorem exists_isCompl_positive_negative (s : SignedMeasure α) :
     ∃ i j : Set α, MeasurableSet i ∧ 0 ≤[i] s ∧ MeasurableSet j ∧ s ≤[j] 0 ∧ IsCompl i j :=
style: allow _ for an argument in notation3 & replace _foo with _ in notation3 (#4652)
Diff
@@ -194,7 +194,7 @@ private theorem measure_of_restrictNonposSeq (hi₂ : ¬s ≤[i] 0) (n : ℕ)
     exact lt_trans Nat.one_div_pos_of_nat h
   | succ n =>
     rw [restrictNonposSeq_succ]
-    have h₁ : ¬s ≤[i \ ⋃ (k : ℕ) (_H : k ≤ n), restrictNonposSeq s i k] 0 := by
+    have h₁ : ¬s ≤[i \ ⋃ (k : ℕ) (_ : k ≤ n), restrictNonposSeq s i k] 0 := by
       refine' mt (restrict_le_zero_subset _ _ (by simp [Nat.lt_succ_iff]; rfl)) hn
       convert measurable_of_not_restrict_le_zero _ hn using 3
       exact funext fun x => by rw [Nat.lt_succ_iff]
@@ -231,7 +231,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
   push_neg  at hn
   set k := Nat.find hn
   have hk₂ : s ≤[i \ ⋃ l < k, restrictNonposSeq s i l] 0 := Nat.find_spec hn
-  have hmeas : MeasurableSet (⋃ (l : ℕ) (_H : l < k), restrictNonposSeq s i l) :=
+  have hmeas : MeasurableSet (⋃ (l : ℕ) (_ : l < k), restrictNonposSeq s i l) :=
     MeasurableSet.iUnion fun _ => MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
   refine' ⟨i \ ⋃ l < k, restrictNonposSeq s i l, hi₁.diff hmeas, Set.diff_subset _ _, hk₂, _⟩
   rw [of_diff hmeas hi₁, s.of_disjoint_iUnion_nat]
@@ -242,7 +242,7 @@ private theorem exists_subset_restrict_nonpos' (hi₁ : MeasurableSet i) (hi₂
       exact
         MeasurableSet.iUnion fun _ =>
           MeasurableSet.iUnion fun _ => restrictNonposSeq_measurableSet _
-    suffices 0 ≤ ∑' l : ℕ, s (⋃ _H : l < k, restrictNonposSeq s i l) by
+    suffices 0 ≤ ∑' l : ℕ, s (⋃ _ : l < k, restrictNonposSeq s i l) by
       rw [sub_neg]
       exact lt_of_lt_of_le hi₂ this
     refine' tsum_nonneg _
chore: fix many typos (#4535)

Run codespell Mathlib and keep some suggestions.

Diff
@@ -75,7 +75,7 @@ of negative measure, hence proving our claim.
 In the case that the sequence does not terminate, it is easy to see that
 $i \setminus \bigcup_{k = 0}^\infty A_k$ is the required negative set.
 
-To implement this in Lean, we define several auxilary definitions.
+To implement this in Lean, we define several auxiliary definitions.
 
 - given the sets `i` and the natural number `n`, `ExistsOneDivLT s i n` is the property that
   there exists a measurable set `k ⊆ i` such that `1 / (n + 1) < s k`.
feat: port MeasureTheory.Decomposition.SignedHahn (#4480)

Co-authored-by: Komyyy <pol_tta@outlook.jp>

Dependencies 12 + 716

717 files ported (98.4%)
320332 lines ported (98.3%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file