Theorem: MeasureTheory.snorm_indicator_eq_snorm_restrict
File: Mathlib/MeasureTheory/Function/LpSpace.lean

tactic: by_cases hp_zero : p = 0
state_before: α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)

tactic: by_cases hp_top : p = ∞
state_before: case neg
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)

tactic: simp_rw [snorm_eq_lintegral_rpow_nnnorm hp_zero hp_top]
state_before: case neg
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)

tactic: suffices (∫⁻ x, (‖s.indicator f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ) =
    ∫⁻ x in s, (‖f x‖₊ : ℝ≥0∞) ^ p.toReal ∂μ by rw [this]
state_before: case neg
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =
    (∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p)

tactic: rw [← lintegral_indicator _ hs]
state_before: case neg
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) = ∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ

tactic: congr
state_before: case neg
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) =
    ∫⁻ (a : α), Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a ∂μ

tactic: simp_rw [nnnorm_indicator_eq_indicator_nnnorm, ENNReal.coe_indicator]
state_before: case neg.e_f
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (fun x => ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p) = fun a =>
    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a

tactic: have h_zero : (fun x => x ^ p.toReal) (0 : ℝ≥0∞) = 0 := by
  simp [ENNReal.toReal_pos hp_zero hp_top]
state_before: case neg.e_f
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x ^ ENNReal.toReal p) = fun a =>
    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a

tactic: exact (Set.indicator_comp_of_zero (g := fun x : ℝ≥0∞ => x ^ p.toReal) h_zero).symm
state_before: case neg.e_f
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
h_zero : (fun x => x ^ ENNReal.toReal p) 0 = 0
⊢ (fun x => Set.indicator s (fun x => ↑‖f x‖₊) x ^ ENNReal.toReal p) = fun a =>
    Set.indicator s (fun x => ↑‖f x‖₊ ^ ENNReal.toReal p) a

tactic: simp only [hp_zero, snorm_exponent_zero]
state_before: case pos
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : p = 0
⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)

tactic: simp_rw [hp_top, snorm_exponent_top]
state_before: case pos
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : p = ⊤
⊢ snorm (Set.indicator s f) p μ = snorm f p (Measure.restrict μ s)

tactic: exact snormEssSup_indicator_eq_snormEssSup_restrict hs
state_before: case pos
α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : p = ⊤
⊢ snormEssSup (Set.indicator s f) μ = snormEssSup f (Measure.restrict μ s)

tactic: rw [this]
state_before: α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
this : (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) = ∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ
⊢ (∫⁻ (x : α), ↑‖Set.indicator s f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =
    (∫⁻ (x : α) in s, ↑‖f x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p)

tactic: simp [ENNReal.toReal_pos hp_zero hp_top]
state_before: α : Type u_1
E : Type ?u.658895
F : Type u_2
G : Type ?u.658901
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
s : Set α
hs✝ : MeasurableSet s
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → F
hs : MeasurableSet s
hp_zero : ¬p = 0
hp_top : ¬p = ⊤
⊢ (fun x => x ^ ENNReal.toReal p) 0 = 0