l3lab/ntp-mathlib huggingface dataset:
/-- If `L : C ⥤ D` is a localization for `W : MorphismProperty C`, then it is also
the case of a functor obtained by post-composing `L` with an equivalence of categories. -/
theorem of_equivalence_target {E : Type*} [Category E] (L' : C ⥤ E) (eq : D ≌ E)
    [L.IsLocalization W] (e : L ⋙ eq.functor ≅ L') : L'.IsLocalization W := by
  have h : W.IsInvertedBy L' := by
    rw [← MorphismProperty.IsInvertedBy.iff_of_iso W e]
    

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_6, u_1} C
inst✝³ : Category.{u_7, u_2} D
L : C ⥤ D
W : MorphismProperty C
E✝ : Type u_3
inst✝² : Category.{?u.80704, u_3} E✝
E : Type u_4
inst✝¹ : Category.{u_5, u_4} E
L' : C ⥤ E
eq : D ≌ E
inst✝ : IsLocalization L W
e : L ⋙ eq.functor ≅ L'
⊢ MorphismProperty.IsInvertedBy W (L ⋙ eq.functor)

Next tactic:
exact MorphismProperty.IsInvertedBy.of_comp W L (Localization.inverts L W) eq.functor
/-- If `L : C ⥤ D` is a localization for `W : MorphismProperty C`, then it is also
the case of a functor obtained by post-composing `L` with an equivalence of categories. -/
theorem of_equivalence_target {E : Type*} [Category E] (L' : C ⥤ E) (eq : D ≌ E)
    [L.IsLocalization W] (e : L ⋙ eq.functor ≅ L') : L'.IsLocalization W := by
  have h : W.IsInvertedBy L' := by
    rw [← MorphismProperty.IsInvertedBy.iff_of_iso W e]
    exact MorphismProperty.IsInvertedBy.of_comp W L (Localization.inverts L W) eq.functor
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_6, u_1} C
inst✝³ : Category.{u_7, u_2} D
L : C ⥤ D
W : MorphismProperty C
E✝ : Type u_3
inst✝² : Category.{?u.80704, u_3} E✝
E : Type u_4
inst✝¹ : Category.{u_5, u_4} E
L' : C ⥤ E
eq : D ≌ E
inst✝ : IsLocalization L W
e : L ⋙ eq.functor ≅ L'
h : MorphismProperty.IsInvertedBy W L'
⊢ IsLocalization L' W

Next tactic:
let F₁ := Localization.Construction.lift L (Localization.inverts L W)
/-- If `L : C ⥤ D` is a localization for `W : MorphismProperty C`, then it is also
the case of a functor obtained by post-composing `L` with an equivalence of categories. -/
theorem of_equivalence_target {E : Type*} [Category E] (L' : C ⥤ E) (eq : D ≌ E)
    [L.IsLocalization W] (e : L ⋙ eq.functor ≅ L') : L'.IsLocalization W := by
  have h : W.IsInvertedBy L' := by
    rw [← MorphismProperty.IsInvertedBy.iff_of_iso W e]
    exact MorphismProperty.IsInvertedBy.of_comp W L (Localization.inverts L W) eq.functor
  let F₁ := Localization.Construction.lift L (Localization.inverts L W)
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_6, u_1} C
inst✝³ : Category.{u_7, u_2} D
L : C ⥤ D
W : MorphismProperty C
E✝ : Type u_3
inst✝² : Category.{?u.80704, u_3} E✝
E : Type u_4
inst✝¹ : Category.{u_5, u_4} E
L' : C ⥤ E
eq : D ≌ E
inst✝ : IsLocalization L W
e : L ⋙ eq.functor ≅ L'
h : MorphismProperty.IsInvertedBy W L'
F₁ : MorphismProperty.Localization W ⥤ D := Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)
⊢ IsLocalization L' W

Next tactic:
let F₂ := Localization.Construction.lift L' h
/-- If `L : C ⥤ D` is a localization for `W : MorphismProperty C`, then it is also
the case of a functor obtained by post-composing `L` with an equivalence of categories. -/
theorem of_equivalence_target {E : Type*} [Category E] (L' : C ⥤ E) (eq : D ≌ E)
    [L.IsLocalization W] (e : L ⋙ eq.functor ≅ L') : L'.IsLocalization W := by
  have h : W.IsInvertedBy L' := by
    rw [← MorphismProperty.IsInvertedBy.iff_of_iso W e]
    exact MorphismProperty.IsInvertedBy.of_comp W L (Localization.inverts L W) eq.functor
  let F₁ := Localization.Construction.lift L (Localization.inverts L W)
  let F₂ := Localization.Construction.lift L' h
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_6, u_1} C
inst✝³ : Category.{u_7, u_2} D
L : C ⥤ D
W : MorphismProperty C
E✝ : Type u_3
inst✝² : Category.{?u.80704, u_3} E✝
E : Type u_4
inst✝¹ : Category.{u_5, u_4} E
L' : C ⥤ E
eq : D ≌ E
inst✝ : IsLocalization L W
e : L ⋙ eq.functor ≅ L'
h : MorphismProperty.IsInvertedBy W L'
F₁ : MorphismProperty.Localization W ⥤ D := Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)
F₂ : MorphismProperty.Localization W ⥤ E := Construction.lift L' h
⊢ IsLocalization L' W

Next tactic:
let e' : F₁ ⋙ eq.functor ≅ F₂ := liftNatIso W.Q W (L ⋙ eq.functor) L' _ _ e
/-- If `L : C ⥤ D` is a localization for `W : MorphismProperty C`, then it is also
the case of a functor obtained by post-composing `L` with an equivalence of categories. -/
theorem of_equivalence_target {E : Type*} [Category E] (L' : C ⥤ E) (eq : D ≌ E)
    [L.IsLocalization W] (e : L ⋙ eq.functor ≅ L') : L'.IsLocalization W := by
  have h : W.IsInvertedBy L' := by
    rw [← MorphismProperty.IsInvertedBy.iff_of_iso W e]
    exact MorphismProperty.IsInvertedBy.of_comp W L (Localization.inverts L W) eq.functor
  let F₁ := Localization.Construction.lift L (Localization.inverts L W)
  let F₂ := Localization.Construction.lift L' h
  let e' : F₁ ⋙ eq.functor ≅ F₂ := liftNatIso W.Q W (L ⋙ eq.functor) L' _ _ e
  

Proof state:
C : Type u_1
D : Type u_2
inst✝⁴ : Category.{u_6, u_1} C
inst✝³ : Category.{u_7, u_2} D
L : C ⥤ D
W : MorphismProperty C
E✝ : Type u_3
inst✝² : Category.{?u.80704, u_3} E✝
E : Type u_4
inst✝¹ : Category.{u_5, u_4} E
L' : C ⥤ E
eq : D ≌ E
inst✝ : IsLocalization L W
e : L ⋙ eq.functor ≅ L'
h : MorphismProperty.IsInvertedBy W L'
F₁ : MorphismProperty.Localization W ⥤ D := Construction.lift L (_ : MorphismProperty.IsInvertedBy W L)
F₂ : MorphismProperty.Localization W ⥤ E := Construction.lift L' h
e' : F₁ ⋙ eq.functor ≅ F₂ := liftNatIso (MorphismProperty.Q W) W (L ⋙ eq.functor) L' (F₁ ⋙ eq.functor) F₂ e
⊢ IsLocalization L' W

Next tactic:
exact
    { inverts := h
      nonempty_isEquivalence := Nonempty.intro (IsEquivalence.ofIso e' inferInstance) }
@[simp]
theorem coe_fn_eq {f g : F} : (f : ∀ a : α, β a) = (g : ∀ a : α, β a) ↔ f = g :=
  ⟨fun h ↦ FunLike.coe_injective' h, fun h ↦ by 

Proof state:
F : Sort u_1
α : Sort u_2
β : α → Sort u_3
i : FunLike F α β
f g : F
h : f = g
⊢ ⇑f = ⇑g

Next tactic:
cases h
@[simp]
theorem coe_fn_eq {f g : F} : (f : ∀ a : α, β a) = (g : ∀ a : α, β a) ↔ f = g :=
  ⟨fun h ↦ FunLike.coe_injective' h, fun h ↦ by cases h; 

Proof state:
case refl
F : Sort u_1
α : Sort u_2
β : α → Sort u_3
i : FunLike F α β
f : F
⊢ ⇑f = ⇑f

Next tactic:
rfl
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (n_nonzero : (n : α) ≠ 0) :
    ((m / n : ℕ) : α) = m / n := by
  

Proof state:
α : Type u_1
inst✝ : DivisionSemiring α
m n : ℕ
n_dvd : n ∣ m
n_nonzero : ↑n ≠ 0
⊢ ↑(m / n) = ↑m / ↑n

Next tactic:
rcases n_dvd with ⟨k, rfl⟩
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (n_nonzero : (n : α) ≠ 0) :
    ((m / n : ℕ) : α) = m / n := by
  rcases n_dvd with ⟨k, rfl⟩
  

Proof state:
case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
n_nonzero : ↑n ≠ 0
k : ℕ
⊢ ↑(n * k / n) = ↑(n * k) / ↑n

Next tactic:
have : n ≠ 0 := by
    rintro rfl
    simp at n_nonzero
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (n_nonzero : (n : α) ≠ 0) :
    ((m / n : ℕ) : α) = m / n := by
  rcases n_dvd with ⟨k, rfl⟩
  have : n ≠ 0 := by
    

Proof state:
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
n_nonzero : ↑n ≠ 0
k : ℕ
⊢ n ≠ 0

Next tactic:
rintro rfl
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (n_nonzero : (n : α) ≠ 0) :
    ((m / n : ℕ) : α) = m / n := by
  rcases n_dvd with ⟨k, rfl⟩
  have : n ≠ 0 := by
    rintro rfl
    

Proof state:
α : Type u_1
inst✝ : DivisionSemiring α
k : ℕ
n_nonzero : ↑0 ≠ 0
⊢ False

Next tactic:
simp at n_nonzero
@[simp]
theorem cast_div [DivisionSemiring α] {m n : ℕ} (n_dvd : n ∣ m) (n_nonzero : (n : α) ≠ 0) :
    ((m / n : ℕ) : α) = m / n := by
  rcases n_dvd with ⟨k, rfl⟩
  have : n ≠ 0 := by
    rintro rfl
    simp at n_nonzero
  

Proof state:
case intro
α : Type u_1
inst✝ : DivisionSemiring α
n : ℕ
n_nonzero : ↑n ≠ 0
k : ℕ
this : n ≠ 0
⊢ ↑(n * k / n) = ↑(n * k) / ↑n

Next tactic:
rw [Nat.mul_div_cancel_left _ this.bot_lt, mul_comm n k,cast_mul, mul_div_cancel _ n_nonzero]
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  

Proof state:
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n d : ℕ
hn : d ∣ n
hm : d ∣ m
⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n

Next tactic:
rcases eq_or_ne d 0 with (rfl | hd)
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  rcases eq_or_ne d 0 with (rfl | hd); · 

Proof state:
case inl
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n : ℕ
hn : 0 ∣ n
hm : 0 ∣ m
⊢ ↑(m / 0) / ↑(n / 0) = ↑m / ↑n

Next tactic:
simp [zero_dvd_iff.mp hm]
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  rcases eq_or_ne d 0 with (rfl | hd); · simp [zero_dvd_iff.mp hm]
  

Proof state:
case inr
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n d : ℕ
hn : d ∣ n
hm : d ∣ m
hd : d ≠ 0
⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n

Next tactic:
replace hd : (d : α) ≠ 0
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  rcases eq_or_ne d 0 with (rfl | hd); · simp [zero_dvd_iff.mp hm]
  replace hd : (d : α) ≠ 0;
  · 

Proof state:
case hd
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n d : ℕ
hn : d ∣ n
hm : d ∣ m
hd : d ≠ 0
⊢ ↑d ≠ 0

Next tactic:
norm_cast
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  rcases eq_or_ne d 0 with (rfl | hd); · simp [zero_dvd_iff.mp hm]
  replace hd : (d : α) ≠ 0;
  · norm_cast
  

Proof state:
case inr
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n d : ℕ
hn : d ∣ n
hm : d ∣ m
hd : ↑d ≠ 0
⊢ ↑(m / d) / ↑(n / d) = ↑m / ↑n

Next tactic:
rw [cast_div hm, cast_div hn, div_div_div_cancel_right _ hd]
theorem cast_div_div_div_cancel_right [DivisionSemiring α] [CharZero α] {m n d : ℕ}
    (hn : d ∣ n) (hm : d ∣ m) :
    (↑(m / d) : α) / (↑(n / d) : α) = (m : α) / n := by
  rcases eq_or_ne d 0 with (rfl | hd); · simp [zero_dvd_iff.mp hm]
  replace hd : (d : α) ≠ 0;
  · norm_cast
  rw [cast_div hm, cast_div hn, div_div_div_cancel_right _ hd] <;> 

Proof state:
case inr
α : Type u_1
inst✝¹ : DivisionSemiring α
inst✝ : CharZero α
m n d : ℕ
hn : d ∣ n
hm : d ∣ m
hd : ↑d ≠ 0
⊢ ↑d ≠ 0

Next tactic:
exact hd
/-- Natural division is always less than division in the field. -/
theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n : ℕ
⊢ ↑(m / n) ≤ ↑m / ↑n

Next tactic:
cases n
/-- Natural division is always less than division in the field. -/
theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by
  cases n
  · 

Proof state:
case zero
α : Type u_1
inst✝ : LinearOrderedSemifield α
m : ℕ
⊢ ↑(m / zero) ≤ ↑m / ↑zero

Next tactic:
rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
/-- Natural division is always less than division in the field. -/
theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by
  cases n
  · rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
  

Proof state:
case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ ↑(m / succ n✝) ≤ ↑m / ↑(succ n✝)

Next tactic:
rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]
/-- Natural division is always less than division in the field. -/
theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by
  cases n
  · rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
  rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]
  

Proof state:
case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ m / succ n✝ * succ n✝ ≤ m
case succ α : Type u_1 inst✝ : LinearOrderedSemifield α m n✝ : ℕ ⊢ 0 < ↑(succ n✝)

Next tactic:
exact (Nat.div_mul_le_self m _)
/-- Natural division is always less than division in the field. -/
theorem cast_div_le {m n : ℕ} : ((m / n : ℕ) : α) ≤ m / n := by
  cases n
  · rw [cast_zero, div_zero, Nat.div_zero, cast_zero]
  rw [le_div_iff, ← Nat.cast_mul, @Nat.cast_le]
  exact (Nat.div_mul_le_self m _)
  · 

Proof state:
case succ
α : Type u_1
inst✝ : LinearOrderedSemifield α
m n✝ : ℕ
⊢ 0 < ↑(succ n✝)

Next tactic:
exact Nat.cast_pos.2 (Nat.succ_pos _)
theorem one_div_pos_of_nat {n : ℕ} : 0 < 1 / ((n : α) + 1) := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 0 < 1 / (↑n + 1)

Next tactic:
rw [one_div]
theorem one_div_pos_of_nat {n : ℕ} : 0 < 1 / ((n : α) + 1) := by
  rw [one_div]
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedSemifield α
n : ℕ
⊢ 0 < (↑n + 1)⁻¹

Next tactic:
exact inv_pos_of_nat
theorem one_div_le_one_div {n m : ℕ} (h : n ≤ m) : 1 / ((m : α) + 1) ≤ 1 / ((n : α) + 1) := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n ≤ m
⊢ 1 / (↑m + 1) ≤ 1 / (↑n + 1)

Next tactic:
refine' one_div_le_one_div_of_le _ _
theorem one_div_le_one_div {n m : ℕ} (h : n ≤ m) : 1 / ((m : α) + 1) ≤ 1 / ((n : α) + 1) := by
  refine' one_div_le_one_div_of_le _ _
  

Proof state:
case refine'_1
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n ≤ m
⊢ 0 < ↑n + 1
case refine'_2 α : Type u_1 inst✝ : LinearOrderedSemifield α n m : ℕ h : n ≤ m ⊢ ↑n + 1 ≤ ↑m + 1

Next tactic:
exact Nat.cast_add_one_pos _
theorem one_div_le_one_div {n m : ℕ} (h : n ≤ m) : 1 / ((m : α) + 1) ≤ 1 / ((n : α) + 1) := by
  refine' one_div_le_one_div_of_le _ _
  exact Nat.cast_add_one_pos _
  

Proof state:
case refine'_2
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n ≤ m
⊢ ↑n + 1 ≤ ↑m + 1

Next tactic:
simpa
theorem one_div_lt_one_div {n m : ℕ} (h : n < m) : 1 / ((m : α) + 1) < 1 / ((n : α) + 1) := by
  

Proof state:
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n < m
⊢ 1 / (↑m + 1) < 1 / (↑n + 1)

Next tactic:
refine' one_div_lt_one_div_of_lt _ _
theorem one_div_lt_one_div {n m : ℕ} (h : n < m) : 1 / ((m : α) + 1) < 1 / ((n : α) + 1) := by
  refine' one_div_lt_one_div_of_lt _ _
  

Proof state:
case refine'_1
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n < m
⊢ 0 < ↑n + 1
case refine'_2 α : Type u_1 inst✝ : LinearOrderedSemifield α n m : ℕ h : n < m ⊢ ↑n + 1 < ↑m + 1

Next tactic:
exact Nat.cast_add_one_pos _
theorem one_div_lt_one_div {n m : ℕ} (h : n < m) : 1 / ((m : α) + 1) < 1 / ((n : α) + 1) := by
  refine' one_div_lt_one_div_of_lt _ _
  exact Nat.cast_add_one_pos _
  

Proof state:
case refine'_2
α : Type u_1
inst✝ : LinearOrderedSemifield α
n m : ℕ
h : n < m
⊢ ↑n + 1 < ↑m + 1

Next tactic:
simpa
/-- A Vitali family for a measure `μ` is also a Vitali family for any measure absolutely continuous
with respect to `μ`. -/
def mono (v : VitaliFamily μ) (ν : Measure α) (hν : ν ≪ μ) : VitaliFamily ν where
  setsAt := v.setsAt
  MeasurableSet' := v.MeasurableSet'
  nonempty_interior := v.nonempty_interior
  Nontrivial := v.Nontrivial
  covering s f h h' := by
    

Proof state:
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
ν : Measure α
hν : ν ≪ μ
s : Set α
f : α → Set (Set α)
h : ∀ x ∈ s, f x ⊆ setsAt v x
h' : ∀ x ∈ s, ∀ ε > 0, ∃ a ∈ f x, a ⊆ closedBall x ε
⊢ ∃ t, (∀ p ∈ t, p.1 ∈ s) ∧ (PairwiseDisjoint t fun p => p.2) ∧ (∀ p ∈ t, p.2 ∈ f p.1) ∧ ↑↑ν (s \ ⋃ p ∈ t, p.2) = 0

Next tactic:
rcases v.covering s f h h' with ⟨t, ts, disj, mem_f, hμ⟩
/-- A Vitali family for a measure `μ` is also a Vitali family for any measure absolutely continuous
with respect to `μ`. -/
def mono (v : VitaliFamily μ) (ν : Measure α) (hν : ν ≪ μ) : VitaliFamily ν where
  setsAt := v.setsAt
  MeasurableSet' := v.MeasurableSet'
  nonempty_interior := v.nonempty_interior
  Nontrivial := v.Nontrivial
  covering s f h h' := by
    rcases v.covering s f h h' with ⟨t, ts, disj, mem_f, hμ⟩
    

Proof state:
case intro.intro.intro.intro
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
ν : Measure α
hν : ν ≪ μ
s : Set α
f : α → Set (Set α)
h : ∀ x ∈ s, f x ⊆ setsAt v x
h' : ∀ x ∈ s, ∀ ε > 0, ∃ a ∈ f x, a ⊆ closedBall x ε
t : Set (α × Set α)
ts : ∀ p ∈ t, p.1 ∈ s
disj : PairwiseDisjoint t fun p => p.2
mem_f : ∀ p ∈ t, p.2 ∈ f p.1
hμ : ↑↑μ (s \ ⋃ p ∈ t, p.2) = 0
⊢ ∃ t, (∀ p ∈ t, p.1 ∈ s) ∧ (PairwiseDisjoint t fun p => p.2) ∧ (∀ p ∈ t, p.2 ∈ f p.1) ∧ ↑↑ν (s \ ⋃ p ∈ t, p.2) = 0

Next tactic:
exact ⟨t, ts, disj, mem_f, hν hμ⟩
theorem measure_le_tsum_of_absolutelyContinuous [SecondCountableTopology α] {ρ : Measure α}
    (hρ : ρ ≪ μ) : ρ s ≤ ∑' p : h.index, ρ (h.covering p) :=
  calc
    ρ s ≤ ρ ((s \ ⋃ p ∈ h.index, h.covering p) ∪ ⋃ p ∈ h.index, h.covering p) :=
      measure_mono (by 

Proof state:
α : Type u_1
inst✝¹ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
f : α → Set (Set α)
s : Set α
h : FineSubfamilyOn v f s
inst✝ : SecondCountableTopology α
ρ : Measure α
hρ : ρ ≪ μ
⊢ s ⊆
    (s \ ⋃ p ∈ FineSubfamilyOn.index h, FineSubfamilyOn.covering h p) ∪
      ⋃ p ∈ FineSubfamilyOn.index h, FineSubfamilyOn.covering h p

Next tactic:
simp only [subset_union_left, diff_union_self]
theorem measure_le_tsum_of_absolutelyContinuous [SecondCountableTopology α] {ρ : Measure α}
    (hρ : ρ ≪ μ) : ρ s ≤ ∑' p : h.index, ρ (h.covering p) :=
  calc
    ρ s ≤ ρ ((s \ ⋃ p ∈ h.index, h.covering p) ∪ ⋃ p ∈ h.index, h.covering p) :=
      measure_mono (by simp only [subset_union_left, diff_union_self])
    _ ≤ ρ (s \ ⋃ p ∈ h.index, h.covering p) + ρ (⋃ p ∈ h.index, h.covering p) :=
      (measure_union_le _ _)
    _ = ∑' p : h.index, ρ (h.covering p) := by
      

Proof state:
α : Type u_1
inst✝¹ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
f : α → Set (Set α)
s : Set α
h : FineSubfamilyOn v f s
inst✝ : SecondCountableTopology α
ρ : Measure α
hρ : ρ ≪ μ
⊢ ↑↑ρ (s \ ⋃ p ∈ FineSubfamilyOn.index h, FineSubfamilyOn.covering h p) +
      ↑↑ρ (⋃ p ∈ FineSubfamilyOn.index h, FineSubfamilyOn.covering h p) =
    ∑' (p : ↑(FineSubfamilyOn.index h)), ↑↑ρ (FineSubfamilyOn.covering h ↑p)

Next tactic:
rw [hρ h.measure_diff_biUnion, zero_add,
        measure_biUnion h.index_countable h.covering_disjoint fun x hx => h.measurableSet_u hx]
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    

Proof state:
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ (fun x => setsAt v x ∪ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}) x
⊢ MeasurableSet a

Next tactic:
cases' ha with ha ha
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    cases' ha with ha ha
    

Proof state:
case inl
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ setsAt v x
⊢ MeasurableSet a
case inr
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}
⊢ MeasurableSet a

Next tactic:
exacts [v.MeasurableSet' _ _ ha, ha.1]
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    cases' ha with ha ha
    exacts [v.MeasurableSet' _ _ ha, ha.1]
  nonempty_interior x a ha := by
    

Proof state:
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ (fun x => setsAt v x ∪ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}) x
⊢ Set.Nonempty (interior a)

Next tactic:
cases' ha with ha ha
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    cases' ha with ha ha
    exacts [v.MeasurableSet' _ _ ha, ha.1]
  nonempty_interior x a ha := by
    cases' ha with ha ha
    

Proof state:
case inl
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ setsAt v x
⊢ Set.Nonempty (interior a)
case inr
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
a : Set α
ha : a ∈ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}
⊢ Set.Nonempty (interior a)

Next tactic:
exacts [v.nonempty_interior _ _ ha, ha.2.1]
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    cases' ha with ha ha
    exacts [v.MeasurableSet' _ _ ha, ha.1]
  nonempty_interior x a ha := by
    cases' ha with ha ha
    exacts [v.nonempty_interior _ _ ha, ha.2.1]
  Nontrivial := by
    

Proof state:
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
⊢ ∀ (x : α),
    ∀ ε > 0,
      ∃ y ∈ (fun x => setsAt v x ∪ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}) x,
        y ⊆ closedBall x ε

Next tactic:
intro x ε εpos
/-- One can enlarge a Vitali family by adding to the sets `f x` at `x` all sets which are not
contained in a `δ`-neighborhood on `x`. This does not change the local filter at a point, but it
can be convenient to get a nicer global behavior. -/
def enlarge (v : VitaliFamily μ) (δ : ℝ) (δpos : 0 < δ) : VitaliFamily μ where
  setsAt x := v.setsAt x ∪ { a | MeasurableSet a ∧ (interior a).Nonempty ∧ ¬a ⊆ closedBall x δ }
  MeasurableSet' x a ha := by
    cases' ha with ha ha
    exacts [v.MeasurableSet' _ _ ha, ha.1]
  nonempty_interior x a ha := by
    cases' ha with ha ha
    exacts [v.nonempty_interior _ _ ha, ha.2.1]
  Nontrivial := by
    intro x ε εpos
    

Proof state:
α : Type u_1
inst✝ : MetricSpace α
m0 : MeasurableSpace α
μ : Measure α
v : VitaliFamily μ
δ : ℝ
δpos : 0 < δ
x : α
ε : ℝ
εpos : ε > 0
⊢ ∃ y ∈ (fun x => setsAt v x ∪ {a | MeasurableSet a ∧ Set.Nonempty (interior a) ∧ ¬a ⊆ closedBall x δ}) x,
    y ⊆ closedBall x ε

Next tactic:
rcases v.Nontrivial x ε εpos with ⟨a, ha, h'a⟩