Theorem: MeasureTheory.snorm_sub_le_of_dist_bdd
File: Mathlib/MeasureTheory/Function/UniformIntegrable.lean

tactic: by_cases hp : p = 0
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
⊢ snorm (Set.indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)

tactic: refine' le_trans (snorm_mono this) _
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
this : ∀ (x : α), ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖
⊢ snorm (Set.indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)

tactic: rw [snorm_indicator_const hs hp hp']
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
this : ∀ (x : α), ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖
⊢ snorm (fun x => Set.indicator s (fun x => c) x) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)

tactic: refine' mul_le_mul_right' (le_of_eq _) _
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
this : ∀ (x : α), ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖
⊢ ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p) ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)

tactic: rw [← ofReal_norm_eq_coe_nnnorm, Real.norm_eq_abs, abs_of_nonneg hc]
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
this : ∀ (x : α), ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖
⊢ ↑‖c‖₊ = ENNReal.ofReal c

tactic: simp [hp]
state_before: case pos
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : p = 0
⊢ snorm (Set.indicator s (f - g)) p μ ≤ ENNReal.ofReal c * ↑↑μ s ^ (1 / ENNReal.toReal p)

tactic: intro x
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
⊢ ∀ (x : α), ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖

tactic: by_cases hx : x ∈ s
state_before: α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
x : α
⊢ ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖

tactic: rw [Set.indicator_of_mem hx, Set.indicator_of_mem hx, Pi.sub_apply, ← dist_eq_norm,
  Real.norm_eq_abs, abs_of_nonneg hc]
state_before: case pos
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
x : α
hx : x ∈ s
⊢ ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖

tactic: exact hf x hx
state_before: case pos
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
x : α
hx : x ∈ s
⊢ dist (f x) (g x) ≤ c

tactic: simp [Set.indicator_of_not_mem hx]
state_before: case neg
α : Type u_1
β : Type u_2
ι : Type ?u.346477
m : MeasurableSpace α
μ : Measure α
inst✝ : NormedAddCommGroup β
p✝ p : ℝ≥0∞
hp' : p ≠ ⊤
s : Set α
hs : MeasurableSet s
f g : α → β
c : ℝ
hc : 0 ≤ c
hf : ∀ (x : α), x ∈ s → dist (f x) (g x) ≤ c
hp : ¬p = 0
x : α
hx : ¬x ∈ s
⊢ ‖Set.indicator s (f - g) x‖ ≤ ‖Set.indicator s (fun x => c) x‖