l3lab/ntp-mathlib huggingface dataset:
/-- A scheme on a complete space with vanishing diameter
such that each set contains the closure of its children
induces a total map. -/
theorem ClosureAntitone.map_of_vanishingDiam [CompleteSpace α] (hdiam : VanishingDiam A)
    (hanti : ClosureAntitone A) (hnonempty : ∀ l, (A l).Nonempty) : (inducedMap A).1 = univ := by
  rw [eq_univ_iff_forall]
  intro x
  choose u hu using fun n => hnonempty (res x n)
  have umem : ∀ n m : ℕ, n ≤ m → u m ∈ A (res x n) := by
    have : Antitone fun n : ℕ => A (res x n) := by
      refine' antitone_nat_of_succ_le _
      intro n
      apply hanti.antitone
    intro n m hnm
    exact this hnm (hu _)
  have : CauchySeq u := by
    rw [Metric.cauchySeq_iff]
    intro ε ε_pos
    cases' hdiam.dist_lt _ ε_pos x with n hn
    use n
    intro m₀ hm₀ m₁ hm₁
    apply hn <;> apply umem <;> assumption
  cases' cauchySeq_tendsto_of_complete this with y hy
  use y
  rw [mem_iInter]
  intro n
  apply hanti _ (x n)
  apply mem_closure_of_tendsto hy
  

Proof state:
case h.a
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝¹ : PseudoMetricSpace α
inst✝ : CompleteSpace α
hdiam : VanishingDiam A
hanti : ClosureAntitone A
hnonempty : ∀ (l : List β), Set.Nonempty (A l)
x : ℕ → β
u : ℕ → α
hu : ∀ (n : ℕ), u n ∈ A (res x n)
umem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)
this : CauchySeq u
y : α
hy : Tendsto u atTop (𝓝 y)
n : ℕ
⊢ ∀ᶠ (x_1 : ℕ) in atTop, u x_1 ∈ A (x n :: res x n)

Next tactic:
rw [eventually_atTop]
/-- A scheme on a complete space with vanishing diameter
such that each set contains the closure of its children
induces a total map. -/
theorem ClosureAntitone.map_of_vanishingDiam [CompleteSpace α] (hdiam : VanishingDiam A)
    (hanti : ClosureAntitone A) (hnonempty : ∀ l, (A l).Nonempty) : (inducedMap A).1 = univ := by
  rw [eq_univ_iff_forall]
  intro x
  choose u hu using fun n => hnonempty (res x n)
  have umem : ∀ n m : ℕ, n ≤ m → u m ∈ A (res x n) := by
    have : Antitone fun n : ℕ => A (res x n) := by
      refine' antitone_nat_of_succ_le _
      intro n
      apply hanti.antitone
    intro n m hnm
    exact this hnm (hu _)
  have : CauchySeq u := by
    rw [Metric.cauchySeq_iff]
    intro ε ε_pos
    cases' hdiam.dist_lt _ ε_pos x with n hn
    use n
    intro m₀ hm₀ m₁ hm₁
    apply hn <;> apply umem <;> assumption
  cases' cauchySeq_tendsto_of_complete this with y hy
  use y
  rw [mem_iInter]
  intro n
  apply hanti _ (x n)
  apply mem_closure_of_tendsto hy
  rw [eventually_atTop]
  

Proof state:
case h.a
β : Type u_1
α : Type u_2
A : List β → Set α
inst✝¹ : PseudoMetricSpace α
inst✝ : CompleteSpace α
hdiam : VanishingDiam A
hanti : ClosureAntitone A
hnonempty : ∀ (l : List β), Set.Nonempty (A l)
x : ℕ → β
u : ℕ → α
hu : ∀ (n : ℕ), u n ∈ A (res x n)
umem : ∀ (n m : ℕ), n ≤ m → u m ∈ A (res x n)
this : CauchySeq u
y : α
hy : Tendsto u atTop (𝓝 y)
n : ℕ
⊢ ∃ a, ∀ b ≥ a, u b ∈ A (x n :: res x n)

Next tactic:
exact ⟨n.succ, umem _⟩
theorem eq_mul_div_of_mul_eq_mul_of_dvd_left {a b c d : ℤ} (hb : b ≠ 0) (hbc : b ∣ c)
    (h : b * a = c * d) : a = c / b * d := by
  

Proof state:
a b c d : ℤ
hb : b ≠ 0
hbc : b ∣ c
h : b * a = c * d
⊢ a = c / b * d

Next tactic:
cases' hbc with k hk
theorem eq_mul_div_of_mul_eq_mul_of_dvd_left {a b c d : ℤ} (hb : b ≠ 0) (hbc : b ∣ c)
    (h : b * a = c * d) : a = c / b * d := by
  cases' hbc with k hk
  

Proof state:
case intro
a b c d : ℤ
hb : b ≠ 0
h : b * a = c * d
k : ℤ
hk : c = b * k
⊢ a = c / b * d

Next tactic:
subst hk
theorem eq_mul_div_of_mul_eq_mul_of_dvd_left {a b c d : ℤ} (hb : b ≠ 0) (hbc : b ∣ c)
    (h : b * a = c * d) : a = c / b * d := by
  cases' hbc with k hk
  subst hk
  

Proof state:
case intro
a b d : ℤ
hb : b ≠ 0
k : ℤ
h : b * a = b * k * d
⊢ a = b * k / b * d

Next tactic:
rw [Int.mul_ediv_cancel_left _ hb]
theorem eq_mul_div_of_mul_eq_mul_of_dvd_left {a b c d : ℤ} (hb : b ≠ 0) (hbc : b ∣ c)
    (h : b * a = c * d) : a = c / b * d := by
  cases' hbc with k hk
  subst hk
  rw [Int.mul_ediv_cancel_left _ hb]
  

Proof state:
case intro
a b d : ℤ
hb : b ≠ 0
k : ℤ
h : b * a = b * k * d
⊢ a = k * d

Next tactic:
rw [mul_assoc] at h
theorem eq_mul_div_of_mul_eq_mul_of_dvd_left {a b c d : ℤ} (hb : b ≠ 0) (hbc : b ∣ c)
    (h : b * a = c * d) : a = c / b * d := by
  cases' hbc with k hk
  subst hk
  rw [Int.mul_ediv_cancel_left _ hb]
  rw [mul_assoc] at h
  

Proof state:
case intro
a b d : ℤ
hb : b ≠ 0
k : ℤ
h : b * a = b * (k * d)
⊢ a = k * d

Next tactic:
apply mul_left_cancel₀ hb h
/-- If an integer with larger absolute value divides an integer, it is
zero. -/
theorem eq_zero_of_dvd_of_natAbs_lt_natAbs {a b : ℤ} (w : a ∣ b) (h : natAbs b < natAbs a) :
    b = 0 := by
  

Proof state:
a b : ℤ
w : a ∣ b
h : natAbs b < natAbs a
⊢ b = 0

Next tactic:
rw [← natAbs_dvd, ← dvd_natAbs, coe_nat_dvd] at w
/-- If an integer with larger absolute value divides an integer, it is
zero. -/
theorem eq_zero_of_dvd_of_natAbs_lt_natAbs {a b : ℤ} (w : a ∣ b) (h : natAbs b < natAbs a) :
    b = 0 := by
  rw [← natAbs_dvd, ← dvd_natAbs, coe_nat_dvd] at w
  

Proof state:
a b : ℤ
w : natAbs a ∣ natAbs b
h : natAbs b < natAbs a
⊢ b = 0

Next tactic:
rw [← natAbs_eq_zero]
/-- If an integer with larger absolute value divides an integer, it is
zero. -/
theorem eq_zero_of_dvd_of_natAbs_lt_natAbs {a b : ℤ} (w : a ∣ b) (h : natAbs b < natAbs a) :
    b = 0 := by
  rw [← natAbs_dvd, ← dvd_natAbs, coe_nat_dvd] at w
  rw [← natAbs_eq_zero]
  

Proof state:
a b : ℤ
w : natAbs a ∣ natAbs b
h : natAbs b < natAbs a
⊢ natAbs b = 0

Next tactic:
exact eq_zero_of_dvd_of_lt w h
theorem ofNat_add_negSucc_of_ge {m n : ℕ} (h : n.succ ≤ m) :
    ofNat m + -[n+1] = ofNat (m - n.succ) := by
  

Proof state:
m n : ℕ
h : Nat.succ n ≤ m
⊢ ofNat m + -[n+1] = ofNat (m - Nat.succ n)

Next tactic:
rw [negSucc_eq, ofNat_eq_cast, ofNat_eq_cast, ← Nat.cast_one, ← Nat.cast_add,
    ← sub_eq_add_neg, ← Nat.cast_sub h]
theorem measure_eq_iSup (H : InnerRegularWRT μ p q) (hU : q U) :
    μ U = ⨆ (K) (_ : K ⊆ U) (_ : p K), μ K := by
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
hU : q U
⊢ ↑↑μ U = ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), ↑↑μ K

Next tactic:
refine'
    le_antisymm (le_of_forall_lt fun r hr => _) (iSup₂_le fun K hK => iSup_le fun _ => μ.mono hK)
theorem measure_eq_iSup (H : InnerRegularWRT μ p q) (hU : q U) :
    μ U = ⨆ (K) (_ : K ⊆ U) (_ : p K), μ K := by
  refine'
    le_antisymm (le_of_forall_lt fun r hr => _) (iSup₂_le fun K hK => iSup_le fun _ => μ.mono hK)
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
hU : q U
r : ℝ≥0∞
hr : r < ↑↑μ U
⊢ r < ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), ↑↑μ K

Next tactic:
simpa only [lt_iSup_iff, exists_prop] using H hU r hr
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞)
    (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
⊢ ∃ K ⊆ U, p K ∧ ↑↑μ U < ↑↑μ K + ε

Next tactic:
rcases eq_or_ne (μ U) 0 with h₀ | h₀
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞)
    (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
  rcases eq_or_ne (μ U) 0 with h₀ | h₀
  · 

Proof state:
case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ∃ K ⊆ U, p K ∧ ↑↑μ U < ↑↑μ K + ε

Next tactic:
refine' ⟨∅, empty_subset _, h0, _⟩
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞)
    (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
  rcases eq_or_ne (μ U) 0 with h₀ | h₀
  · refine' ⟨∅, empty_subset _, h0, _⟩
    

Proof state:
case inl
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U = 0
⊢ ↑↑μ U < ↑↑μ ∅ + ε

Next tactic:
rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero]
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞)
    (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
  rcases eq_or_ne (μ U) 0 with h₀ | h₀
  · refine' ⟨∅, empty_subset _, h0, _⟩
    rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero]
  · 

Proof state:
case inr
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
⊢ ∃ K ⊆ U, p K ∧ ↑↑μ U < ↑↑μ K + ε

Next tactic:
rcases H hU _ (ENNReal.sub_lt_self hμU h₀ hε) with ⟨K, hKU, hKc, hrK⟩
theorem exists_subset_lt_add (H : InnerRegularWRT μ p q) (h0 : p ∅) (hU : q U) (hμU : μ U ≠ ∞)
    (hε : ε ≠ 0) : ∃ K, K ⊆ U ∧ p K ∧ μ U < μ K + ε := by
  rcases eq_or_ne (μ U) 0 with h₀ | h₀
  · refine' ⟨∅, empty_subset _, h0, _⟩
    rwa [measure_empty, h₀, zero_add, pos_iff_ne_zero]
  · rcases H hU _ (ENNReal.sub_lt_self hμU h₀ hε) with ⟨K, hKU, hKc, hrK⟩
    

Proof state:
case inr.intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
h0 : p ∅
hU : q U
hμU : ↑↑μ U ≠ ⊤
hε : ε ≠ 0
h₀ : ↑↑μ U ≠ 0
K : Set α
hKU : K ⊆ U
hKc : p K
hrK : ↑↑μ U - ε < ↑↑μ K
⊢ ∃ K ⊆ U, p K ∧ ↑↑μ U < ↑↑μ K + ε

Next tactic:
exact ⟨K, hKU, hKc, ENNReal.lt_add_of_sub_lt_right (Or.inl hμU) hrK⟩
protected theorem map {α β} [MeasurableSpace α] [MeasurableSpace β]
    {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) {f : α → β} (hf : AEMeasurable f μ) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K))
    (hB₂ : ∀ U, qb U → MeasurableSet U) :
    InnerRegularWRT (map f μ) pb qb := by
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α → β
hf : AEMeasurable f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (f '' K)
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
⊢ InnerRegularWRT (map f μ) pb qb

Next tactic:
intro U hU r hr
protected theorem map {α β} [MeasurableSpace α] [MeasurableSpace β]
    {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) {f : α → β} (hf : AEMeasurable f μ) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K))
    (hB₂ : ∀ U, qb U → MeasurableSet U) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α → β
hf : AEMeasurable f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (f '' K)
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑(map f μ) U
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map f μ) K

Next tactic:
rw [map_apply_of_aemeasurable hf (hB₂ _ hU)] at hr
protected theorem map {α β} [MeasurableSpace α] [MeasurableSpace β]
    {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) {f : α → β} (hf : AEMeasurable f μ) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K))
    (hB₂ : ∀ U, qb U → MeasurableSet U) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [map_apply_of_aemeasurable hf (hB₂ _ hU)] at hr
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α → β
hf : AEMeasurable f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (f '' K)
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (f ⁻¹' U)
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map f μ) K

Next tactic:
rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
protected theorem map {α β} [MeasurableSpace α] [MeasurableSpace β]
    {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) {f : α → β} (hf : AEMeasurable f μ) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K))
    (hB₂ : ∀ U, qb U → MeasurableSet U) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [map_apply_of_aemeasurable hf (hB₂ _ hU)] at hr
  rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
  

Proof state:
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α → β
hf : AEMeasurable f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (f '' K)
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (f ⁻¹' U)
K : Set α
hKU : K ⊆ f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map f μ) K

Next tactic:
refine ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_⟩
protected theorem map {α β} [MeasurableSpace α] [MeasurableSpace β]
    {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) {f : α → β} (hf : AEMeasurable f μ) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K))
    (hB₂ : ∀ U, qb U → MeasurableSet U) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [map_apply_of_aemeasurable hf (hB₂ _ hU)] at hr
  rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
  refine ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, ?_⟩
  

Proof state:
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α → β
hf : AEMeasurable f
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (f '' K)
hB₂ : ∀ (U : Set β), qb U → MeasurableSet U
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (f ⁻¹' U)
K : Set α
hKU : K ⊆ f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ r < ↑↑(map f μ) (f '' K)

Next tactic:
exact hK.trans_le (le_map_apply_image hf _)
theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb := by
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α ≃ᵐ β
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K)
⊢ InnerRegularWRT (map (⇑f) μ) pb qb

Next tactic:
intro U hU r hr
theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α ≃ᵐ β
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K)
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑(map (⇑f) μ) U
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map (⇑f) μ) K

Next tactic:
rw [f.map_apply U] at hr
theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [f.map_apply U] at hr
  

Proof state:
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α ≃ᵐ β
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K)
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (⇑f ⁻¹' U)
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map (⇑f) μ) K

Next tactic:
rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [f.map_apply U] at hr
  rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
  

Proof state:
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α ≃ᵐ β
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K)
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (⇑f ⁻¹' U)
K : Set α
hKU : K ⊆ ⇑f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ ∃ K ⊆ U, pb K ∧ r < ↑↑(map (⇑f) μ) K

Next tactic:
refine' ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, _⟩
theorem map' {α β} [MeasurableSpace α] [MeasurableSpace β] {μ : Measure α} {pa qa : Set α → Prop}
    (H : InnerRegularWRT μ pa qa) (f : α ≃ᵐ β) {pb qb : Set β → Prop}
    (hAB : ∀ U, qb U → qa (f ⁻¹' U)) (hAB' : ∀ K, pa K → pb (f '' K)) :
    InnerRegularWRT (map f μ) pb qb := by
  intro U hU r hr
  rw [f.map_apply U] at hr
  rcases H (hAB U hU) r hr with ⟨K, hKU, hKc, hK⟩
  refine' ⟨f '' K, image_subset_iff.2 hKU, hAB' _ hKc, _⟩
  

Proof state:
case intro.intro.intro
α✝ : Type u_1
m : MeasurableSpace α✝
μ✝ : Measure α✝
p q : Set α✝ → Prop
U✝ : Set α✝
ε : ℝ≥0∞
α : Type u_2
β : Type u_3
inst✝¹ : MeasurableSpace α
inst✝ : MeasurableSpace β
μ : Measure α
pa qa : Set α → Prop
H : InnerRegularWRT μ pa qa
f : α ≃ᵐ β
pb qb : Set β → Prop
hAB : ∀ (U : Set β), qb U → qa (⇑f ⁻¹' U)
hAB' : ∀ (K : Set α), pa K → pb (⇑f '' K)
U : Set β
hU : qb U
r : ℝ≥0∞
hr : r < ↑↑μ (⇑f ⁻¹' U)
K : Set α
hKU : K ⊆ ⇑f ⁻¹' U
hKc : pa K
hK : r < ↑↑μ K
⊢ r < ↑↑(map (⇑f) μ) (⇑f '' K)

Next tactic:
rwa [f.map_apply, f.preimage_image]
theorem smul (H : InnerRegularWRT μ p q) (c : ℝ≥0∞) : InnerRegularWRT (c • μ) p q := by
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
c : ℝ≥0∞
⊢ InnerRegularWRT (c • μ) p q

Next tactic:
intro U hU r hr
theorem smul (H : InnerRegularWRT μ p q) (c : ℝ≥0∞) : InnerRegularWRT (c • μ) p q := by
  intro U hU r hr
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
c : ℝ≥0∞
U : Set α
hU : q U
r : ℝ≥0∞
hr : r < ↑↑(c • μ) U
⊢ ∃ K ⊆ U, p K ∧ r < ↑↑(c • μ) K

Next tactic:
rw [smul_apply, H.measure_eq_iSup hU, smul_eq_mul] at hr
theorem smul (H : InnerRegularWRT μ p q) (c : ℝ≥0∞) : InnerRegularWRT (c • μ) p q := by
  intro U hU r hr
  rw [smul_apply, H.measure_eq_iSup hU, smul_eq_mul] at hr
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
H : InnerRegularWRT μ p q
c : ℝ≥0∞
U : Set α
hU : q U
r : ℝ≥0∞
hr : r < c * ⨆ K, ⨆ (_ : K ⊆ U), ⨆ (_ : p K), ↑↑μ K
⊢ ∃ K ⊆ U, p K ∧ r < ↑↑(c • μ) K

Next tactic:
simpa only [ENNReal.mul_iSup, lt_iSup_iff, exists_prop] using hr
theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') :
    InnerRegularWRT μ p q' := by
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegularWRT μ p q
H' : InnerRegularWRT μ q q'
⊢ InnerRegularWRT μ p q'

Next tactic:
intro U hU r hr
theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') :
    InnerRegularWRT μ p q' := by
  intro U hU r hr
  

Proof state:
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegularWRT μ p q
H' : InnerRegularWRT μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
⊢ ∃ K ⊆ U, p K ∧ r < ↑↑μ K

Next tactic:
rcases H' hU r hr with ⟨F, hFU, hqF, hF⟩
theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') :
    InnerRegularWRT μ p q' := by
  intro U hU r hr
  rcases H' hU r hr with ⟨F, hFU, hqF, hF⟩; 

Proof state:
case intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegularWRT μ p q
H' : InnerRegularWRT μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
F : Set α
hFU : F ⊆ U
hqF : q F
hF : r < ↑↑μ F
⊢ ∃ K ⊆ U, p K ∧ r < ↑↑μ K

Next tactic:
rcases H hqF _ hF with ⟨K, hKF, hpK, hrK⟩
theorem trans {q' : Set α → Prop} (H : InnerRegularWRT μ p q) (H' : InnerRegularWRT μ q q') :
    InnerRegularWRT μ p q' := by
  intro U hU r hr
  rcases H' hU r hr with ⟨F, hFU, hqF, hF⟩; rcases H hqF _ hF with ⟨K, hKF, hpK, hrK⟩
  

Proof state:
case intro.intro.intro.intro.intro.intro
α : Type u_1
m : MeasurableSpace α
μ : Measure α
p q : Set α → Prop
U✝ : Set α
ε : ℝ≥0∞
q' : Set α → Prop
H : InnerRegularWRT μ p q
H' : InnerRegularWRT μ q q'
U : Set α
hU : q' U
r : ℝ≥0∞
hr : r < ↑↑μ U
F : Set α
hFU : F ⊆ U
hqF : q F
hF : r < ↑↑μ F
K : Set α
hKF : K ⊆ F
hpK : p K
hrK : r < ↑↑μ K
⊢ ∃ K ⊆ U, p K ∧ r < ↑↑μ K

Next tactic:
exact ⟨K, hKF.trans hFU, hpK, hrK⟩
/-- A regular measure is weakly regular in a T2 space or in a regular space. -/
instance (priority := 100) Regular.weaklyRegular [ClosableCompactSubsetOpenSpace α] [Regular μ] :
    WeaklyRegular μ := by
  

Proof state:
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : ClosableCompactSubsetOpenSpace α
inst✝ : Regular μ
⊢ WeaklyRegular μ

Next tactic:
constructor
/-- 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
  

Proof state:
case innerRegular
α : Type u_1
β : Type u_2
inst✝³ : MeasurableSpace α
inst✝² : TopologicalSpace α
μ : Measure α
inst✝¹ : ClosableCompactSubsetOpenSpace α
inst✝ : Regular μ
⊢ InnerRegularWRT μ IsClosed IsOpen

Next tactic:
intro U hU r hr
/-- 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
  

Proof state:
case innerRegular
α : 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 ⊆ U, IsClosed K ∧ r < ↑↑μ K

Next tactic:
rcases Regular.innerRegular hU r hr with ⟨K, KU, K_comp, hK⟩