l3lab/ntp-mathlib huggingface dataset:
theorem const_smul_mem_Lp (c : 𝕜) (f : Lp E p μ) : c • (f : α →ₘ[μ] E) ∈ Lp E p μ := by
  rw [mem_Lp_iff_snorm_lt_top, snorm_congr_ae (AEEqFun.coeFn_smul _ _)]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : ↥(Lp E p)
⊢ snorm (c • ↑↑f) p μ < ⊤

Next tactic:
refine' (snorm_const_smul_le _ _).trans_lt _
theorem const_smul_mem_Lp (c : 𝕜) (f : Lp E p μ) : c • (f : α →ₘ[μ] E) ∈ Lp E p μ := by
  rw [mem_Lp_iff_snorm_lt_top, snorm_congr_ae (AEEqFun.coeFn_smul _ _)]
  refine' (snorm_const_smul_le _ _).trans_lt _
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : ↥(Lp E p)
⊢ ‖c‖₊ • snorm (↑↑f) p μ < ⊤

Next tactic:
rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_lt_top_iff]
theorem const_smul_mem_Lp (c : 𝕜) (f : Lp E p μ) : c • (f : α →ₘ[μ] E) ∈ Lp E p μ := by
  rw [mem_Lp_iff_snorm_lt_top, snorm_congr_ae (AEEqFun.coeFn_smul _ _)]
  refine' (snorm_const_smul_le _ _).trans_lt _
  rw [ENNReal.smul_def, smul_eq_mul, ENNReal.mul_lt_top_iff]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
c : 𝕜
f : ↥(Lp E p)
⊢ ↑‖c‖₊ < ⊤ ∧ snorm (↑↑f) p μ < ⊤ ∨ ↑‖c‖₊ = 0 ∨ snorm (↑↑f) p μ = 0

Next tactic:
exact Or.inl ⟨ENNReal.coe_lt_top, f.prop⟩
/-- The `𝕜`-submodule of elements of `α →ₘ[μ] E` whose `Lp` norm is finite.  This is `Lp E p μ`,
with extra structure. -/
def LpSubmodule : Submodule 𝕜 (α →ₘ[μ] E) :=
  { Lp E p μ with smul_mem' := fun c f hf => by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁸ : NormedAddCommGroup E
inst✝⁷ : NormedAddCommGroup F
inst✝⁶ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁵ : NormedRing 𝕜
inst✝⁴ : NormedRing 𝕜'
inst✝³ : Module 𝕜 E
inst✝² : Module 𝕜' E
inst✝¹ : BoundedSMul 𝕜 E
inst✝ : BoundedSMul 𝕜' E
src✝ : AddSubgroup (α →ₘ[μ] E) := Lp E p
c : 𝕜
f : α →ₘ[μ] E
hf : f ∈ src✝.carrier
⊢ c • f ∈ src✝.carrier

Next tactic:
simpa using const_smul_mem_Lp c ⟨f, hf⟩
instance instBoundedSMul [Fact (1 ≤ p)] : BoundedSMul 𝕜 (Lp E p μ) :=
  -- TODO: add `BoundedSMul.of_nnnorm_smul_le`
  BoundedSMul.of_norm_smul_le fun r f => by
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedRing 𝕜'
inst✝⁴ : Module 𝕜 E
inst✝³ : Module 𝕜' E
inst✝² : BoundedSMul 𝕜 E
inst✝¹ : BoundedSMul 𝕜' E
inst✝ : Fact (1 ≤ p)
r : 𝕜
f : ↥(Lp E p)
⊢ ‖r • f‖ ≤ ‖r‖ * ‖f‖

Next tactic:
suffices (‖r • f‖₊ : ℝ≥0∞) ≤ ‖r‖₊ * ‖f‖₊ from mod_cast this
instance instBoundedSMul [Fact (1 ≤ p)] : BoundedSMul 𝕜 (Lp E p μ) :=
  -- TODO: add `BoundedSMul.of_nnnorm_smul_le`
  BoundedSMul.of_norm_smul_le fun r f => by
    suffices (‖r • f‖₊ : ℝ≥0∞) ≤ ‖r‖₊ * ‖f‖₊ from mod_cast this
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedRing 𝕜'
inst✝⁴ : Module 𝕜 E
inst✝³ : Module 𝕜' E
inst✝² : BoundedSMul 𝕜 E
inst✝¹ : BoundedSMul 𝕜' E
inst✝ : Fact (1 ≤ p)
r : 𝕜
f : ↥(Lp E p)
⊢ ↑‖r • f‖₊ ≤ ↑‖r‖₊ * ↑‖f‖₊

Next tactic:
rw [nnnorm_def, nnnorm_def, ENNReal.coe_toNNReal (Lp.snorm_ne_top _),
      snorm_congr_ae (coeFn_smul _ _), ENNReal.coe_toNNReal (Lp.snorm_ne_top _)]
instance instBoundedSMul [Fact (1 ≤ p)] : BoundedSMul 𝕜 (Lp E p μ) :=
  -- TODO: add `BoundedSMul.of_nnnorm_smul_le`
  BoundedSMul.of_norm_smul_le fun r f => by
    suffices (‖r • f‖₊ : ℝ≥0∞) ≤ ‖r‖₊ * ‖f‖₊ from mod_cast this
    rw [nnnorm_def, nnnorm_def, ENNReal.coe_toNNReal (Lp.snorm_ne_top _),
      snorm_congr_ae (coeFn_smul _ _), ENNReal.coe_toNNReal (Lp.snorm_ne_top _)]
    

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedAddCommGroup F
inst✝⁷ : NormedAddCommGroup G
𝕜 : Type u_5
𝕜' : Type u_6
inst✝⁶ : NormedRing 𝕜
inst✝⁵ : NormedRing 𝕜'
inst✝⁴ : Module 𝕜 E
inst✝³ : Module 𝕜' E
inst✝² : BoundedSMul 𝕜 E
inst✝¹ : BoundedSMul 𝕜' E
inst✝ : Fact (1 ≤ p)
r : 𝕜
f : ↥(Lp E p)
⊢ snorm (r • ↑↑f) p μ ≤ ↑‖r‖₊ * snorm (↑↑f) p μ

Next tactic:
exact snorm_const_smul_le r f
theorem snormEssSup_indicator_le (s : Set α) (f : α → G) :
    snormEssSup (s.indicator f) μ ≤ snormEssSup f μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
s : Set α
f : α → G
⊢ snormEssSup (Set.indicator s f) μ ≤ snormEssSup f μ

Next tactic:
refine' essSup_mono_ae (eventually_of_forall fun x => _)
theorem snormEssSup_indicator_le (s : Set α) (f : α → G) :
    snormEssSup (s.indicator f) μ ≤ snormEssSup f μ := by
  refine' essSup_mono_ae (eventually_of_forall fun x => _)
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
s : Set α
f : α → G
x : α
⊢ (fun x => ↑‖Set.indicator s f x‖₊) x ≤ (fun x => ↑‖f x‖₊) x

Next tactic:
rw [ENNReal.coe_le_coe, nnnorm_indicator_eq_indicator_nnnorm]
theorem snormEssSup_indicator_le (s : Set α) (f : α → G) :
    snormEssSup (s.indicator f) μ ≤ snormEssSup f μ := by
  refine' essSup_mono_ae (eventually_of_forall fun x => _)
  rw [ENNReal.coe_le_coe, nnnorm_indicator_eq_indicator_nnnorm]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
s : Set α
f : α → G
x : α
⊢ Set.indicator s (fun a => ‖f a‖₊) x ≤ ‖f x‖₊

Next tactic:
exact Set.indicator_le_self s _ x
theorem snormEssSup_indicator_const_le (s : Set α) (c : G) :
    snormEssSup (s.indicator fun _ : α => c) μ ≤ ‖c‖₊ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊

Next tactic:
by_cases hμ0 : μ = 0
theorem snormEssSup_indicator_const_le (s : Set α) (c : G) :
    snormEssSup (s.indicator fun _ : α => c) μ ≤ ‖c‖₊ := by
  by_cases hμ0 : μ = 0
  · 

Proof state:
case pos
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμ0 : μ = 0
⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊

Next tactic:
rw [hμ0, snormEssSup_measure_zero]
theorem snormEssSup_indicator_const_le (s : Set α) (c : G) :
    snormEssSup (s.indicator fun _ : α => c) μ ≤ ‖c‖₊ := by
  by_cases hμ0 : μ = 0
  · rw [hμ0, snormEssSup_measure_zero]
    

Proof state:
case pos
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμ0 : μ = 0
⊢ 0 ≤ ↑‖c‖₊

Next tactic:
exact zero_le _
theorem snormEssSup_indicator_const_le (s : Set α) (c : G) :
    snormEssSup (s.indicator fun _ : α => c) μ ≤ ‖c‖₊ := by
  by_cases hμ0 : μ = 0
  · rw [hμ0, snormEssSup_measure_zero]
    exact zero_le _
  · 

Proof state:
case neg
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμ0 : ¬μ = 0
⊢ snormEssSup (Set.indicator s fun x => c) μ ≤ ↑‖c‖₊

Next tactic:
exact (snormEssSup_indicator_le s fun _ => c).trans (snormEssSup_const c hμ0).le
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
⊢ snormEssSup (Set.indicator s fun x => c) μ = ↑‖c‖₊

Next tactic:
refine' le_antisymm (snormEssSup_indicator_const_le s c) _
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  refine' le_antisymm (snormEssSup_indicator_const_le s c) _
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
⊢ ↑‖c‖₊ ≤ snormEssSup (Set.indicator s fun x => c) μ

Next tactic:
by_contra! h
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  refine' le_antisymm (snormEssSup_indicator_const_le s c) _
  by_contra! h
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
h : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊
⊢ False

Next tactic:
have h' := ae_iff.mp (ae_lt_of_essSup_lt h)
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  refine' le_antisymm (snormEssSup_indicator_const_le s c) _
  by_contra! h
  have h' := ae_iff.mp (ae_lt_of_essSup_lt h)
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
h : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊
h' : ↑↑μ {a | ¬↑‖Set.indicator s (fun x => c) a‖₊ < ↑‖c‖₊} = 0
⊢ False

Next tactic:
push_neg at h'
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  refine' le_antisymm (snormEssSup_indicator_const_le s c) _
  by_contra! h
  have h' := ae_iff.mp (ae_lt_of_essSup_lt h)
  push_neg at h'
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
h : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊
h' : ↑↑μ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊} = 0
⊢ False

Next tactic:
refine' hμs (measure_mono_null (fun x hx_mem => _) h')
theorem snormEssSup_indicator_const_eq (s : Set α) (c : G) (hμs : μ s ≠ 0) :
    snormEssSup (s.indicator fun _ : α => c) μ = ‖c‖₊ := by
  refine' le_antisymm (snormEssSup_indicator_const_le s c) _
  by_contra! h
  have h' := ae_iff.mp (ae_lt_of_essSup_lt h)
  push_neg at h'
  refine' hμs (measure_mono_null (fun x hx_mem => _) h')
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hμs : ↑↑μ s ≠ 0
h : snormEssSup (Set.indicator s fun x => c) μ < ↑‖c‖₊
h' : ↑↑μ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊} = 0
x : α
hx_mem : x ∈ s
⊢ x ∈ {a | ↑‖c‖₊ ≤ ↑‖Set.indicator s (fun x => c) a‖₊}

Next tactic:
rw [Set.mem_setOf_eq, Set.indicator_of_mem hx_mem]
theorem snorm_indicator_le (f : α → E) {s : Set α} :
    snorm (s.indicator f) p μ ≤ snorm f p μ := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → E
s : Set α
⊢ snorm (Set.indicator s f) p μ ≤ snorm f p μ

Next tactic:
refine' snorm_mono_ae (eventually_of_forall fun x => _)
theorem snorm_indicator_le (f : α → E) {s : Set α} :
    snorm (s.indicator f) p μ ≤ snorm f p μ := by
  refine' snorm_mono_ae (eventually_of_forall fun x => _)
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → E
s : Set α
x : α
⊢ ‖Set.indicator s f x‖ ≤ ‖f x‖

Next tactic:
suffices ‖s.indicator f x‖₊ ≤ ‖f x‖₊ by exact NNReal.coe_mono this
theorem snorm_indicator_le (f : α → E) {s : Set α} :
    snorm (s.indicator f) p μ ≤ snorm f p μ := by
  refine' snorm_mono_ae (eventually_of_forall fun x => _)
  suffices ‖s.indicator f x‖₊ ≤ ‖f x‖₊ by 

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → E
s : Set α
x : α
this : ‖Set.indicator s f x‖₊ ≤ ‖f x‖₊
⊢ ‖Set.indicator s f x‖ ≤ ‖f x‖

Next tactic:
exact NNReal.coe_mono this
theorem snorm_indicator_le (f : α → E) {s : Set α} :
    snorm (s.indicator f) p μ ≤ snorm f p μ := by
  refine' snorm_mono_ae (eventually_of_forall fun x => _)
  suffices ‖s.indicator f x‖₊ ≤ ‖f x‖₊ by exact NNReal.coe_mono this
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → E
s : Set α
x : α
⊢ ‖Set.indicator s f x‖₊ ≤ ‖f x‖₊

Next tactic:
rw [nnnorm_indicator_eq_indicator_nnnorm]
theorem snorm_indicator_le (f : α → E) {s : Set α} :
    snorm (s.indicator f) p μ ≤ snorm f p μ := by
  refine' snorm_mono_ae (eventually_of_forall fun x => _)
  suffices ‖s.indicator f x‖₊ ≤ ‖f x‖₊ by exact NNReal.coe_mono this
  rw [nnnorm_indicator_eq_indicator_nnnorm]
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c : E
f✝ : α → E
hf : AEStronglyMeasurable f✝ μ
f : α → E
s : Set α
x : α
⊢ Set.indicator s (fun a => ‖f a‖₊) x ≤ ‖f x‖₊

Next tactic:
exact s.indicator_le_self _ x
theorem snorm_indicator_const₀ {c : G} (hs : NullMeasurableSet s μ) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) :=
  have hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp hp_top
  calc
    snorm (s.indicator fun _ => c) p μ
      = (∫⁻ x, ((‖(s.indicator fun _ ↦ c) x‖₊ : ℝ≥0∞) ^ p.toReal) ∂μ) ^ (1 / p.toReal) :=
          snorm_eq_lintegral_rpow_nnnorm hp hp_top
    _ = (∫⁻ x, (s.indicator fun _ ↦ (‖c‖₊ : ℝ≥0∞) ^ p.toReal) x ∂μ) ^ (1 / p.toReal) := by
      

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : NullMeasurableSet s
hp : p ≠ 0
hp_top : p ≠ ⊤
hp_pos : 0 < ENNReal.toReal p
⊢ (∫⁻ (x : α), ↑‖Set.indicator s (fun x => c) x‖₊ ^ ENNReal.toReal p ∂μ) ^ (1 / ENNReal.toReal p) =
    (∫⁻ (x : α), Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x ∂μ) ^ (1 / ENNReal.toReal p)

Next tactic:
congr 2
theorem snorm_indicator_const₀ {c : G} (hs : NullMeasurableSet s μ) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) :=
  have hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp hp_top
  calc
    snorm (s.indicator fun _ => c) p μ
      = (∫⁻ x, ((‖(s.indicator fun _ ↦ c) x‖₊ : ℝ≥0∞) ^ p.toReal) ∂μ) ^ (1 / p.toReal) :=
          snorm_eq_lintegral_rpow_nnnorm hp hp_top
    _ = (∫⁻ x, (s.indicator fun _ ↦ (‖c‖₊ : ℝ≥0∞) ^ p.toReal) x ∂μ) ^ (1 / p.toReal) := by
      congr 2
      

Proof state:
case e_a.e_f
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : NullMeasurableSet s
hp : p ≠ 0
hp_top : p ≠ ⊤
hp_pos : 0 < ENNReal.toReal p
⊢ (fun x => ↑‖Set.indicator s (fun x => c) x‖₊ ^ ENNReal.toReal p) = fun x =>
    Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x

Next tactic:
refine (Set.comp_indicator_const c (fun x : G ↦ (‖x‖₊ : ℝ≥0∞) ^ p.toReal) ?_)
theorem snorm_indicator_const₀ {c : G} (hs : NullMeasurableSet s μ) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) :=
  have hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp hp_top
  calc
    snorm (s.indicator fun _ => c) p μ
      = (∫⁻ x, ((‖(s.indicator fun _ ↦ c) x‖₊ : ℝ≥0∞) ^ p.toReal) ∂μ) ^ (1 / p.toReal) :=
          snorm_eq_lintegral_rpow_nnnorm hp hp_top
    _ = (∫⁻ x, (s.indicator fun _ ↦ (‖c‖₊ : ℝ≥0∞) ^ p.toReal) x ∂μ) ^ (1 / p.toReal) := by
      congr 2
      refine (Set.comp_indicator_const c (fun x : G ↦ (‖x‖₊ : ℝ≥0∞) ^ p.toReal) ?_)
      

Proof state:
case e_a.e_f
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : NullMeasurableSet s
hp : p ≠ 0
hp_top : p ≠ ⊤
hp_pos : 0 < ENNReal.toReal p
⊢ (fun x => ↑‖x‖₊ ^ ENNReal.toReal p) 0 = 0

Next tactic:
simp [hp_pos]
theorem snorm_indicator_const₀ {c : G} (hs : NullMeasurableSet s μ) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) :=
  have hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp hp_top
  calc
    snorm (s.indicator fun _ => c) p μ
      = (∫⁻ x, ((‖(s.indicator fun _ ↦ c) x‖₊ : ℝ≥0∞) ^ p.toReal) ∂μ) ^ (1 / p.toReal) :=
          snorm_eq_lintegral_rpow_nnnorm hp hp_top
    _ = (∫⁻ x, (s.indicator fun _ ↦ (‖c‖₊ : ℝ≥0∞) ^ p.toReal) x ∂μ) ^ (1 / p.toReal) := by
      congr 2
      refine (Set.comp_indicator_const c (fun x : G ↦ (‖x‖₊ : ℝ≥0∞) ^ p.toReal) ?_)
      simp [hp_pos]
    _ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by
      

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : NullMeasurableSet s
hp : p ≠ 0
hp_top : p ≠ ⊤
hp_pos : 0 < ENNReal.toReal p
⊢ (∫⁻ (x : α), Set.indicator s (fun x => ↑‖c‖₊ ^ ENNReal.toReal p) x ∂μ) ^ (1 / ENNReal.toReal p) =
    ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)

Next tactic:
rw [lintegral_indicator_const₀ hs, ENNReal.mul_rpow_of_nonneg, ← ENNReal.rpow_mul,
        mul_one_div_cancel hp_pos.ne', ENNReal.rpow_one]
theorem snorm_indicator_const₀ {c : G} (hs : NullMeasurableSet s μ) (hp : p ≠ 0) (hp_top : p ≠ ∞) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) :=
  have hp_pos : 0 < p.toReal := ENNReal.toReal_pos hp hp_top
  calc
    snorm (s.indicator fun _ => c) p μ
      = (∫⁻ x, ((‖(s.indicator fun _ ↦ c) x‖₊ : ℝ≥0∞) ^ p.toReal) ∂μ) ^ (1 / p.toReal) :=
          snorm_eq_lintegral_rpow_nnnorm hp hp_top
    _ = (∫⁻ x, (s.indicator fun _ ↦ (‖c‖₊ : ℝ≥0∞) ^ p.toReal) x ∂μ) ^ (1 / p.toReal) := by
      congr 2
      refine (Set.comp_indicator_const c (fun x : G ↦ (‖x‖₊ : ℝ≥0∞) ^ p.toReal) ?_)
      simp [hp_pos]
    _ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by
      rw [lintegral_indicator_const₀ hs, ENNReal.mul_rpow_of_nonneg, ← ENNReal.rpow_mul,
        mul_one_div_cancel hp_pos.ne', ENNReal.rpow_one]
      

Proof state:
case hz
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : NullMeasurableSet s
hp : p ≠ 0
hp_top : p ≠ ⊤
hp_pos : 0 < ENNReal.toReal p
⊢ 0 ≤ 1 / ENNReal.toReal p

Next tactic:
positivity
theorem snorm_indicator_const' {c : G} (hs : MeasurableSet s) (hμs : μ s ≠ 0) (hp : p ≠ 0) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by
  

Proof state:
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : MeasurableSet s
hμs : ↑↑μ s ≠ 0
hp : p ≠ 0
⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)

Next tactic:
by_cases hp_top : p = ∞
theorem snorm_indicator_const' {c : G} (hs : MeasurableSet s) (hμs : μ s ≠ 0) (hp : p ≠ 0) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by
  by_cases hp_top : p = ∞
  · 

Proof state:
case pos
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : MeasurableSet s
hμs : ↑↑μ s ≠ 0
hp : p ≠ 0
hp_top : p = ⊤
⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)

Next tactic:
simp [hp_top, snormEssSup_indicator_const_eq s c hμs]
theorem snorm_indicator_const' {c : G} (hs : MeasurableSet s) (hμs : μ s ≠ 0) (hp : p ≠ 0) :
    snorm (s.indicator fun _ => c) p μ = ‖c‖₊ * μ s ^ (1 / p.toReal) := by
  by_cases hp_top : p = ∞
  · simp [hp_top, snormEssSup_indicator_const_eq s c hμs]
  · 

Proof state:
case neg
α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
c✝ : E
f : α → E
hf : AEStronglyMeasurable f μ
s : Set α
c : G
hs : MeasurableSet s
hμs : ↑↑μ s ≠ 0
hp : p ≠ 0
hp_top : ¬p = ⊤
⊢ snorm (Set.indicator s fun x => c) p μ = ↑‖c‖₊ * ↑↑μ s ^ (1 / ENNReal.toReal p)

Next tactic:
exact snorm_indicator_const hs hp hp_top