l3lab/ntp-mathlib huggingface dataset:
/-- A regular measure is weakly regular in a T2 space or in a regular space. -/
instance (priority := 100) Regular.weaklyRegular [ClosableCompactSubsetOpenSpace α] [Regular μ] :
    WeaklyRegular μ := by
  constructor
  intro U hU r hr
  rcases Regular.innerRegular hU r hr with ⟨K, KU, K_comp, hK⟩
  

Proof state:
case innerRegular.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : ClosableCompactSubsetOpenSpace α
inst✝ : Regular μ
U : Set α
hU : IsOpen U
r : ℝ≥0∞
hr : r < ↑↑μ U
K : Set α
KU : K ⊆ U
K_comp : IsCompact K
hK : r < ↑↑μ K
⊢ ∃ K ⊆ U, IsClosed K ∧ r < ↑↑μ K

Next tactic:
exact ⟨closure K, K_comp.closure_subset_of_isOpen hU KU, isClosed_closure,
    hK.trans_le (measure_mono subset_closure)⟩
/-- Given `r` larger than the measure of a set `A`, there exists an open superset of `A` with
measure less than `r`. -/
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular μ] (A : Set α) (r : ℝ≥0∞) (hr : μ A < r) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < r := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < r

Next tactic:
rcases OuterRegular.outerRegular (measurableSet_toMeasurable μ A) r
      (by rwa [measure_toMeasurable]) with
    ⟨U, hAU, hUo, hU⟩
/-- Given `r` larger than the measure of a set `A`, there exists an open superset of `A` with
measure less than `r`. -/
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular μ] (A : Set α) (r : ℝ≥0∞) (hr : μ A < r) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < r := by
  rcases OuterRegular.outerRegular (measurableSet_toMeasurable μ A) r
      (by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ r > ↑↑?m.135977 (toMeasurable μ A)

Next tactic:
rwa [measure_toMeasurable]
/-- Given `r` larger than the measure of a set `A`, there exists an open superset of `A` with
measure less than `r`. -/
theorem _root_.Set.exists_isOpen_lt_of_lt [OuterRegular μ] (A : Set α) (r : ℝ≥0∞) (hr : μ A < r) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < r := by
  rcases OuterRegular.outerRegular (measurableSet_toMeasurable μ A) r
      (by rwa [measure_toMeasurable]) with
    ⟨U, hAU, hUo, hU⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
r : ℝ≥0∞
hr : ↑↑μ A < r
U : Set α
hAU : U ⊇ toMeasurable μ A
hUo : IsOpen U
hU : ↑↑μ U < r
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < r

Next tactic:
exact ⟨U, (subset_toMeasurable _ _).trans hAU, hUo, hU⟩
/-- For an outer regular measure, the measure of a set is the infimum of the measures of open sets
containing it. -/
theorem _root_.Set.measure_eq_iInf_isOpen (A : Set α) (μ : Measure α) [OuterRegular μ] :
    μ A = ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), μ U := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
⊢ ↑↑μ A = ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), ↑↑μ U

Next tactic:
refine' le_antisymm (le_iInf₂ fun s hs => le_iInf fun _ => μ.mono hs) _
/-- For an outer regular measure, the measure of a set is the infimum of the measures of open sets
containing it. -/
theorem _root_.Set.measure_eq_iInf_isOpen (A : Set α) (μ : Measure α) [OuterRegular μ] :
    μ A = ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), μ U := by
  refine' le_antisymm (le_iInf₂ fun s hs => le_iInf fun _ => μ.mono hs) _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
⊢ ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), ↑↑μ U ≤ ↑↑μ A

Next tactic:
refine' le_of_forall_lt' fun r hr => _
/-- For an outer regular measure, the measure of a set is the infimum of the measures of open sets
containing it. -/
theorem _root_.Set.measure_eq_iInf_isOpen (A : Set α) (μ : Measure α) [OuterRegular μ] :
    μ A = ⨅ (U : Set α) (_ : A ⊆ U) (_ : IsOpen U), μ U := by
  refine' le_antisymm (le_iInf₂ fun s hs => le_iInf fun _ => μ.mono hs) _
  refine' le_of_forall_lt' fun r hr => _
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
r : ℝ≥0∞
hr : ↑↑μ A < r
⊢ ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), ↑↑μ U < r

Next tactic:
simpa only [iInf_lt_iff, exists_prop] using A.exists_isOpen_lt_of_lt r hr
theorem _root_.Set.exists_isOpen_le_add (A : Set α) (μ : Measure α) [OuterRegular μ] {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U ≤ μ A + ε := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε

Next tactic:
rcases eq_or_ne (μ A) ∞ with (H | H)
theorem _root_.Set.exists_isOpen_le_add (A : Set α) (μ : Measure α) [OuterRegular μ] {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U ≤ μ A + ε := by
  rcases eq_or_ne (μ A) ∞ with (H | H)
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A = ⊤
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε

Next tactic:
exact ⟨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]⟩
theorem _root_.Set.exists_isOpen_le_add (A : Set α) (μ : Measure α) [OuterRegular μ] {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U ≤ μ A + ε := by
  rcases eq_or_ne (μ A) ∞ with (H | H)
  · exact ⟨univ, subset_univ _, isOpen_univ, by 

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A = ⊤
⊢ ↑↑μ univ ≤ ↑↑μ A + ε

Next tactic:
simp only [H, _root_.top_add, le_top]
theorem _root_.Set.exists_isOpen_le_add (A : Set α) (μ : Measure α) [OuterRegular μ] {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U ≤ μ A + ε := by
  rcases eq_or_ne (μ A) ∞ with (H | H)
  · exact ⟨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]⟩
  · 

Proof state:
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A ≠ ⊤
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε

Next tactic:
rcases A.exists_isOpen_lt_add H hε with ⟨U, AU, U_open, hU⟩
theorem _root_.Set.exists_isOpen_le_add (A : Set α) (μ : Measure α) [OuterRegular μ] {ε : ℝ≥0∞}
    (hε : ε ≠ 0) : ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U ≤ μ A + ε := by
  rcases eq_or_ne (μ A) ∞ with (H | H)
  · exact ⟨univ, subset_univ _, isOpen_univ, by simp only [H, _root_.top_add, le_top]⟩
  · rcases A.exists_isOpen_lt_add H hε with ⟨U, AU, U_open, hU⟩
    

Proof state:
case inr.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
A : Set α
μ : Measure α
inst✝ : OuterRegular μ
ε : ℝ≥0∞
hε : ε ≠ 0
H : ↑↑μ A ≠ ⊤
U : Set α
AU : U ⊇ A
U_open : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U ≤ ↑↑μ A + ε

Next tactic:
exact ⟨U, AU, U_open, hU.le⟩
theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular μ] {A : Set α}
    (hA : MeasurableSet A) (hA' : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ A) < ε := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < ⊤ ∧ ↑↑μ (U \ A) < ε

Next tactic:
rcases A.exists_isOpen_lt_add hA' hε with ⟨U, hAU, hUo, hU⟩
theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular μ] {A : Set α}
    (hA : MeasurableSet A) (hA' : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ A) < ε := by
  rcases A.exists_isOpen_lt_add hA' hε with ⟨U, hAU, hUo, hU⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
U : Set α
hAU : U ⊇ A
hUo : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < ⊤ ∧ ↑↑μ (U \ A) < ε

Next tactic:
use U, hAU, hUo, hU.trans_le le_top
theorem _root_.MeasurableSet.exists_isOpen_diff_lt [OuterRegular μ] {A : Set α}
    (hA : MeasurableSet A) (hA' : μ A ≠ ∞) {ε : ℝ≥0∞} (hε : ε ≠ 0) :
    ∃ U, U ⊇ A ∧ IsOpen U ∧ μ U < ∞ ∧ μ (U \ A) < ε := by
  rcases A.exists_isOpen_lt_add hA' hε with ⟨U, hAU, hUo, hU⟩
  use U, hAU, hUo, hU.trans_le le_top
  

Proof state:
case right
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ : Measure α
inst✝ : OuterRegular μ
A : Set α
hA : MeasurableSet A
hA' : ↑↑μ A ≠ ⊤
ε : ℝ≥0∞
hε : ε ≠ 0
U : Set α
hAU : U ⊇ A
hUo : IsOpen U
hU : ↑↑μ U < ↑↑μ A + ε
⊢ ↑↑μ (U \ A) < ε

Next tactic:
exact measure_diff_lt_of_lt_add hA hAU hA' hU
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
⊢ OuterRegular (map (⇑f) μ)

Next tactic:
refine' ⟨fun A hA r hr => _⟩
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  refine' ⟨fun A hA r hr => _⟩
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑(map (⇑f) μ) A
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(map (⇑f) μ) U < r

Next tactic:
rw [map_apply f.measurable hA, ← f.image_symm] at hr
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  refine' ⟨fun A hA r hr => _⟩
  rw [map_apply f.measurable hA, ← f.image_symm] at hr
  

Proof state:
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (⇑(Homeomorph.symm f) '' A)
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(map (⇑f) μ) U < r

Next tactic:
rcases Set.exists_isOpen_lt_of_lt _ r hr with ⟨U, hAU, hUo, hU⟩
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  refine' ⟨fun A hA r hr => _⟩
  rw [map_apply f.measurable hA, ← f.image_symm] at hr
  rcases Set.exists_isOpen_lt_of_lt _ r hr with ⟨U, hAU, hUo, hU⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (⇑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ⇑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(map (⇑f) μ) U < r

Next tactic:
have : IsOpen (f.symm ⁻¹' U) := hUo.preimage f.symm.continuous
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  refine' ⟨fun A hA r hr => _⟩
  rw [map_apply f.measurable hA, ← f.image_symm] at hr
  rcases Set.exists_isOpen_lt_of_lt _ r hr with ⟨U, hAU, hUo, hU⟩
  have : IsOpen (f.symm ⁻¹' U) := hUo.preimage f.symm.continuous
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (⇑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ⇑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
this : IsOpen (⇑(Homeomorph.symm f) ⁻¹' U)
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(map (⇑f) μ) U < r

Next tactic:
refine' ⟨f.symm ⁻¹' U, image_subset_iff.1 hAU, this, _⟩
protected theorem map [OpensMeasurableSpace α] [MeasurableSpace β] [TopologicalSpace β]
    [BorelSpace β] (f : α ≃ₜ β) (μ : Measure α) [OuterRegular μ] :
    (Measure.map f μ).OuterRegular := by
  refine' ⟨fun A hA r hr => _⟩
  rw [map_apply f.measurable hA, ← f.image_symm] at hr
  rcases Set.exists_isOpen_lt_of_lt _ r hr with ⟨U, hAU, hUo, hU⟩
  have : IsOpen (f.symm ⁻¹' U) := hUo.preimage f.symm.continuous
  refine' ⟨f.symm ⁻¹' U, image_subset_iff.1 hAU, this, _⟩
  

Proof state:
case intro.intro.intro
α : Type u_1
β : Type u_2
inst✝⁶ : MeasurableSpace α
inst✝⁵ : TopologicalSpace α
μ✝ : Measure α
inst✝⁴ : OpensMeasurableSpace α
inst✝³ : MeasurableSpace β
inst✝² : TopologicalSpace β
inst✝¹ : BorelSpace β
f : α ≃ₜ β
μ : Measure α
inst✝ : OuterRegular μ
A : Set β
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ (⇑(Homeomorph.symm f) '' A)
U : Set α
hAU : U ⊇ ⇑(Homeomorph.symm f) '' A
hUo : IsOpen U
hU : ↑↑μ U < r
this : IsOpen (⇑(Homeomorph.symm f) ⁻¹' U)
⊢ ↑↑(map (⇑f) μ) (⇑(Homeomorph.symm f) ⁻¹' U) < r

Next tactic:
rwa [map_apply f.measurable this.measurableSet, f.preimage_symm, f.preimage_image]
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
⊢ OuterRegular (x • μ)

Next tactic:
rcases eq_or_ne x 0 with (rfl | h0)
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  rcases eq_or_ne x 0 with (rfl | h0)
  · 

Proof state:
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
hx : 0 ≠ ⊤
⊢ OuterRegular (0 • μ)

Next tactic:
rw [zero_smul]
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  rcases eq_or_ne x 0 with (rfl | h0)
  · rw [zero_smul]
    

Proof state:
case inl
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
hx : 0 ≠ ⊤
⊢ OuterRegular 0

Next tactic:
exact OuterRegular.zero
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  rcases eq_or_ne x 0 with (rfl | h0)
  · rw [zero_smul]
    exact OuterRegular.zero
  · 

Proof state:
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
⊢ OuterRegular (x • μ)

Next tactic:
refine' ⟨fun A _ r hr => _⟩
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  rcases eq_or_ne x 0 with (rfl | h0)
  · rw [zero_smul]
    exact OuterRegular.zero
  · refine' ⟨fun A _ r hr => _⟩
    

Proof state:
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
A : Set α
x✝ : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑(x • μ) A
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(x • μ) U < r

Next tactic:
rw [smul_apply, A.measure_eq_iInf_isOpen, smul_eq_mul] at hr
protected theorem smul (μ : Measure α) [OuterRegular μ] {x : ℝ≥0∞} (hx : x ≠ ∞) :
    (x • μ).OuterRegular := by
  rcases eq_or_ne x 0 with (rfl | h0)
  · rw [zero_smul]
    exact OuterRegular.zero
  · refine' ⟨fun A _ r hr => _⟩
    rw [smul_apply, A.measure_eq_iInf_isOpen, smul_eq_mul] at hr
    

Proof state:
case inr
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ μ : Measure α
inst✝ : OuterRegular μ
x : ℝ≥0∞
hx : x ≠ ⊤
h0 : x ≠ 0
A : Set α
x✝ : MeasurableSet A
r : ℝ≥0∞
hr : r > x * ⨅ U, ⨅ (_ : A ⊆ U), ⨅ (_ : IsOpen U), ↑↑μ U
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑(x • μ) U < r

Next tactic:
simpa only [ENNReal.mul_iInf_of_ne h0 hx, gt_iff_lt, iInf_lt_iff, exists_prop] using hr
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
⊢ OuterRegular μ

Next tactic:
refine' ⟨fun A hA r hr => _⟩
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  refine' ⟨fun A hA r hr => _⟩
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < r

Next tactic:
have HA : μ A < ∞ := lt_of_lt_of_le hr le_top
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  refine' ⟨fun A hA r hr => _⟩
  have HA : μ A < ∞ := lt_of_lt_of_le hr le_top
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
HA : ↑↑μ A < ⊤
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < r

Next tactic:
have hm : ∀ n, MeasurableSet (s n) := fun n => (h' n).measurableSet
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  refine' ⟨fun A hA r hr => _⟩
  have HA : μ A < ∞ := lt_of_lt_of_le hr le_top
  have hm : ∀ n, MeasurableSet (s n) := fun n => (h' n).measurableSet
  -- Note that `A = ⋃ n, A ∩ disjointed s n`. We replace `A` with this sequence.
  

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
HA : ↑↑μ A < ⊤
hm : ∀ (n : ℕ), MeasurableSet (s n)
⊢ ∃ U ⊇ A, IsOpen U ∧ ↑↑μ U < r

Next tactic:
obtain ⟨A, hAm, hAs, hAd, rfl⟩ :
    ∃ A' : ℕ → Set α,
      (∀ n, MeasurableSet (A' n)) ∧
        (∀ n, A' n ⊆ s n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ n, A' n := by
    refine'
      ⟨fun n => A ∩ disjointed s n, fun n => hA.inter (MeasurableSet.disjointed hm _), fun n =>
        (inter_subset_right _ _).trans (disjointed_subset _ _),
        (disjoint_disjointed s).mono fun k l hkl => hkl.mono inf_le_right inf_le_right, _⟩
    rw [← inter_iUnion, iUnion_disjointed, univ_subset_iff.mp h'', inter_univ]
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  refine' ⟨fun A hA r hr => _⟩
  have HA : μ A < ∞ := lt_of_lt_of_le hr le_top
  have hm : ∀ n, MeasurableSet (s n) := fun n => (h' n).measurableSet
  -- Note that `A = ⋃ n, A ∩ disjointed s n`. We replace `A` with this sequence.
  obtain ⟨A, hAm, hAs, hAd, rfl⟩ :
    ∃ A' : ℕ → Set α,
      (∀ n, MeasurableSet (A' n)) ∧
        (∀ n, A' n ⊆ s n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ n, A' n := by
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
HA : ↑↑μ A < ⊤
hm : ∀ (n : ℕ), MeasurableSet (s n)
⊢ ∃ A', (∀ (n : ℕ), MeasurableSet (A' n)) ∧ (∀ (n : ℕ), A' n ⊆ s n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ n, A' n

Next tactic:
refine'
      ⟨fun n => A ∩ disjointed s n, fun n => hA.inter (MeasurableSet.disjointed hm _), fun n =>
        (inter_subset_right _ _).trans (disjointed_subset _ _),
        (disjoint_disjointed s).mono fun k l hkl => hkl.mono inf_le_right inf_le_right, _⟩
/-- If the restrictions of a measure to countably many open sets covering the space are
outer regular, then the measure itself is outer regular. -/
lemma of_restrict [OpensMeasurableSpace α] {μ : Measure α} {s : ℕ → Set α}
    (h : ∀ n, OuterRegular (μ.restrict (s n))) (h' : ∀ n, IsOpen (s n)) (h'' : univ ⊆ ⋃ n, s n) :
    OuterRegular μ := by
  refine' ⟨fun A hA r hr => _⟩
  have HA : μ A < ∞ := lt_of_lt_of_le hr le_top
  have hm : ∀ n, MeasurableSet (s n) := fun n => (h' n).measurableSet
  -- Note that `A = ⋃ n, A ∩ disjointed s n`. We replace `A` with this sequence.
  obtain ⟨A, hAm, hAs, hAd, rfl⟩ :
    ∃ A' : ℕ → Set α,
      (∀ n, MeasurableSet (A' n)) ∧
        (∀ n, A' n ⊆ s n) ∧ Pairwise (Disjoint on A') ∧ A = ⋃ n, A' n := by
    refine'
      ⟨fun n => A ∩ disjointed s n, fun n => hA.inter (MeasurableSet.disjointed hm _), fun n =>
        (inter_subset_right _ _).trans (disjointed_subset _ _),
        (disjoint_disjointed s).mono fun k l hkl => hkl.mono inf_le_right inf_le_right, _⟩
    

Proof state:
α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : TopologicalSpace α
μ✝ : Measure α
inst✝ : OpensMeasurableSpace α
μ : Measure α
s : ℕ → Set α
h : ∀ (n : ℕ), OuterRegular (restrict μ (s n))
h' : ∀ (n : ℕ), IsOpen (s n)
h'' : univ ⊆ ⋃ n, s n
A : Set α
hA : MeasurableSet A
r : ℝ≥0∞
hr : r > ↑↑μ A
HA : ↑↑μ A < ⊤
hm : ∀ (n : ℕ), MeasurableSet (s n)
⊢ A = ⋃ n, (fun n => A ∩ disjointed s n) n

Next tactic:
rw [← inter_iUnion, iUnion_disjointed, univ_subset_iff.mp h'', inter_univ]