Theorem: MeasureTheory.Measure.InnerRegularWRT.restrict
File: Mathlib/MeasureTheory/Measure/Regular.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s : Set α
ε r : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A : Set α
⊢ (μ.restrict A).InnerRegularWRT p fun s => MeasurableSet s ∧ (μ.restrict A) s ≠ ⊤
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : (μ.restrict A) s ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
tactic: rintro s ⟨s_meas, hs⟩ r hr
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : (μ.restrict A) s ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
state_after: case intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
tactic: rw [restrict_apply s_meas] at hs
state_before: case intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
state_after: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
K : Set α
K_subs : K ⊆ toMeasurable μ (s ∩ A) ∩ s
pK : p K
rK : r < μ K
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
tactic: obtain ⟨K, K_subs, pK, rK⟩ : ∃ K, K ⊆ (toMeasurable μ (s ∩ A)) ∩ s ∧ p K ∧ r < μ K := by
    have : r < μ ((toMeasurable μ (s ∩ A)) ∩ s) := by
      apply hr.trans_le
      rw [restrict_apply s_meas]
      exact measure_mono <| subset_inter (subset_toMeasurable μ (s ∩ A)) inter_subset_left
    refine h ⟨(measurableSet_toMeasurable _ _).inter s_meas, ?_⟩ _ this
    apply (lt_of_le_of_lt _ hs.lt_top).ne
    rw [← measure_toMeasurable (s ∩ A)]
    exact measure_mono inter_subset_left
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
K : Set α
K_subs : K ⊆ toMeasurable μ (s ∩ A) ∩ s
pK : p K
rK : r < μ K
⊢ ∃ K ⊆ s, p K ∧ r < (μ.restrict A) K
state_after: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
K : Set α
K_subs : K ⊆ toMeasurable μ (s ∩ A) ∩ s
pK : p K
rK : r < μ K
⊢ r < (μ.restrict A) K
tactic: refine ⟨K, K_subs.trans inter_subset_right, pK, ?_⟩
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
inst✝¹ : MeasurableSpace α
inst✝ : TopologicalSpace α
μ : Measure α
p q : Set α → Prop
U s✝ : Set α
ε r✝ : ℝ≥0∞
h : μ.InnerRegularWRT p fun s => MeasurableSet s ∧ μ s ≠ ⊤
A s : Set α
s_meas : MeasurableSet s
hs : μ (s ∩ A) ≠ ⊤
r : ℝ≥0∞
hr : r < (μ.restrict A) s
K : Set α
K_subs : K ⊆ toMeasurable μ (s ∩ A) ∩ s
pK : p K
rK : r < μ K
⊢ r < (μ.restrict A) K
state_after: no goals
tactic: calc
  r < μ K := rK
  _ = μ.restrict (toMeasurable μ (s ∩ A)) K := by
    rw [restrict_apply' (measurableSet_toMeasurable μ (s ∩ A))]
    congr
    apply (inter_eq_left.2 ?_).symm
    exact K_subs.trans inter_subset_left
  _ = μ.restrict (s ∩ A) K := by rwa [restrict_toMeasurable]
  _ ≤ μ.restrict A K := Measure.le_iff'.1 (restrict_mono inter_subset_right le_rfl) K