Theorem: NNReal.Lp_add_le
File: Mathlib/Analysis/MeanInequalities.lean

tactic: rcases eq_or_lt_of_le hp with (rfl | hp)
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp : 1 ≤ p
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: have hpq := Real.isConjugateExponent_conjugateExponent hp
state_before: case inr
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: have := isGreatest_Lp s (f + g) hpq
state_before: case inr
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hpq : Real.IsConjugateExponent p (Real.conjugateExponent p)
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: simp only [Pi.add_apply, add_mul, sum_add_distrib] at this
state_before: case inr
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hpq : Real.IsConjugateExponent p (Real.conjugateExponent p)
this :
  IsGreatest ((fun g_1 => ∑ i in s, (f + g) i * g_1 i) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})
    ((∑ i in s, (f + g) i ^ p) ^ (1 / p))
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: rcases this.1 with ⟨φ, hφ, H⟩
state_before: case inr
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hpq : Real.IsConjugateExponent p (Real.conjugateExponent p)
this :
  IsGreatest
    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})
    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: rw [← H]
state_before: case inr.intro.intro
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hpq : Real.IsConjugateExponent p (Real.conjugateExponent p)
this :
  IsGreatest
    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})
    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))
φ : ι → ℝ≥0
hφ : φ ∈ {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1}
H : (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ = (∑ x in s, (f x + g x) ^ p) ^ (1 / p)
⊢ (∑ i in s, (f i + g i) ^ p) ^ (1 / p) ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: exact
  add_le_add ((isGreatest_Lp s f hpq).2 ⟨φ, hφ, rfl⟩) ((isGreatest_Lp s g hpq).2 ⟨φ, hφ, rfl⟩)
state_before: case inr.intro.intro
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hpq : Real.IsConjugateExponent p (Real.conjugateExponent p)
this :
  IsGreatest
    ((fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) '' {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1})
    ((∑ x in s, (f x + g x) ^ p) ^ (1 / p))
φ : ι → ℝ≥0
hφ : φ ∈ {g | ∑ i in s, g i ^ Real.conjugateExponent p ≤ 1}
H : (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ = (∑ x in s, (f x + g x) ^ p) ^ (1 / p)
⊢ (fun a => ∑ x in s, f x * a x + ∑ x in s, g x * a x) φ ≤ (∑ i in s, f i ^ p) ^ (1 / p) + (∑ i in s, g i ^ p) ^ (1 / p)

tactic: simp [Finset.sum_add_distrib]
state_before: case inl
ι : Type u
s : Finset ι
f g : ι → ℝ≥0
hp : 1 ≤ 1
⊢ (∑ i in s, (f i + g i) ^ 1) ^ (1 / 1) ≤ (∑ i in s, f i ^ 1) ^ (1 / 1) + (∑ i in s, g i ^ 1) ^ (1 / 1)