Theorem: MeasureTheory.StronglyMeasurable.exists_spanning_measurableSet_norm_le
File: Mathlib/MeasureTheory/Function/StronglyMeasurable/Basic.lean

tactic: let sigma_finite_sets := spanningSets (μ.trim hm)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: let norm_sets := fun n : ℕ => { x | ‖f x‖ ≤ n }
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: have norm_sets_spanning : (⋃ n, norm_sets n) = Set.univ := by
  ext1 x
  simp only [Set.mem_iUnion, Set.mem_setOf_eq, Set.mem_univ, iff_true_iff]
  exact ⟨⌈‖f x‖⌉₊, Nat.le_ceil ‖f x‖⟩
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: let sets n := sigma_finite_sets n ∩ norm_sets n
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: have h_finite : ∀ n, μ (sets n) < ∞ := by
  refine' fun n => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
  exact (le_trim hm).trans_lt (measure_spanningSets_lt_top (μ.trim hm) n)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: refine' ⟨sets, fun n => ⟨h_meas n, h_finite n, _⟩, _⟩
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
⊢ ∃ s, (∀ (n : ℕ), MeasurableSet (s n) ∧ ↑↑μ (s n) < ⊤ ∧ ∀ (x : α), x ∈ s n → ‖f x‖ ≤ ↑n) ∧ (⋃ (i : ℕ), s i) = univ

tactic: ext1 x
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
⊢ (⋃ (n : ℕ), norm_sets n) = univ

tactic: simp only [Set.mem_iUnion, Set.mem_setOf_eq, Set.mem_univ, iff_true_iff]
state_before: case h
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
x : α
⊢ (x ∈ ⋃ (n : ℕ), norm_sets n) ↔ x ∈ univ

tactic: exact ⟨⌈‖f x‖⌉₊, Nat.le_ceil ‖f x‖⟩
state_before: case h
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
x : α
⊢ ∃ i, ‖f x‖ ≤ ↑i

tactic: refine' fun n => MeasurableSet.inter _ _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
⊢ ∀ (n : ℕ), MeasurableSet (sets n)

tactic: exact measurable_spanningSets (μ.trim hm) n
state_before: case refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
n : ℕ
⊢ MeasurableSet (sigma_finite_sets n)

tactic: exact hf.norm.measurableSet_le stronglyMeasurable_const
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
n : ℕ
⊢ MeasurableSet (norm_sets n)

tactic: refine' fun n => (measure_mono (Set.inter_subset_left _ _)).trans_lt _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
⊢ ∀ (n : ℕ), ↑↑μ (sets n) < ⊤

tactic: exact (le_trim hm).trans_lt (measure_spanningSets_lt_top (μ.trim hm) n)
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
n : ℕ
⊢ ↑↑μ (sigma_finite_sets n) < ⊤

tactic: exact fun x hx => hx.2
state_before: case refine'_1
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
n : ℕ
⊢ ∀ (x : α), x ∈ sets n → ‖f x‖ ≤ ↑n

tactic: have :
  (⋃ i, sigma_finite_sets i ∩ norm_sets i) = (⋃ i, sigma_finite_sets i) ∩ ⋃ i, norm_sets i := by
  refine' Set.iUnion_inter_of_monotone (monotone_spanningSets (μ.trim hm)) fun i j hij x => _
  simp only [Set.mem_setOf_eq]
  refine' fun hif => hif.trans _
  exact_mod_cast hij
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
⊢ (⋃ (i : ℕ), sets i) = univ

tactic: rw [this, norm_sets_spanning, iUnion_spanningSets (μ.trim hm), Set.inter_univ]
state_before: case refine'_2
α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
this : (⋃ (i : ℕ), sigma_finite_sets i ∩ norm_sets i) = (⋃ (i : ℕ), sigma_finite_sets i) ∩ ⋃ (i : ℕ), norm_sets i
⊢ (⋃ (i : ℕ), sets i) = univ

tactic: refine' Set.iUnion_inter_of_monotone (monotone_spanningSets (μ.trim hm)) fun i j hij x => _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
⊢ (⋃ (i : ℕ), sigma_finite_sets i ∩ norm_sets i) = (⋃ (i : ℕ), sigma_finite_sets i) ∩ ⋃ (i : ℕ), norm_sets i

tactic: simp only [Set.mem_setOf_eq]
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
i j : ℕ
hij : i ≤ j
x : α
⊢ x ∈ norm_sets i → x ∈ norm_sets j

tactic: refine' fun hif => hif.trans _
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
i j : ℕ
hij : i ≤ j
x : α
⊢ ‖f x‖ ≤ ↑i → ‖f x‖ ≤ ↑j

tactic: exact_mod_cast hij
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.233047
ι : Type ?u.233050
inst✝² : Countable ι
f g : α → β
inst✝¹ : SeminormedAddCommGroup β
m m0 : MeasurableSpace α
hm : m ≤ m0
hf : StronglyMeasurable f
μ : Measure α
inst✝ : SigmaFinite (trim μ hm)
sigma_finite_sets : ℕ → Set α := spanningSets (trim μ hm)
norm_sets : ℕ → Set α := fun n => {x | ‖f x‖ ≤ ↑n}
norm_sets_spanning : (⋃ (n : ℕ), norm_sets n) = univ
sets : ℕ → Set α := fun n => sigma_finite_sets n ∩ norm_sets n
h_meas : ∀ (n : ℕ), MeasurableSet (sets n)
h_finite : ∀ (n : ℕ), ↑↑μ (sets n) < ⊤
i j : ℕ
hij : i ≤ j
x : α
hif : ‖f x‖ ≤ ↑i
⊢ ↑i ≤ ↑j