-- Mathlib/MeasureTheory/Integral/MeanInequalities.lean
theorem lintegral_rpow_add_le_add_eLpNorm_mul_lintegral_rpow_add {p q : ℝ}
    (hpq : p.IsConjExponent q) {f g : α → ℝ≥0∞} (hf : AEMeasurable f μ)
    (hf_top : (∫⁻ a, f a ^ p ∂μ) ≠ ⊤) (hg : AEMeasurable g μ) (hg_top : (∫⁻ a, g a ^ p ∂μ) ≠ ⊤) :
    (∫⁻ a, (f + g) a ^ p ∂μ) ≤
      ((∫⁻ a, f a ^ p ∂μ) ^ (1 / p) + (∫⁻ a, g a ^ p ∂μ) ^ (1 / p)) *
        (∫⁻ a, (f a + g a) ^ p ∂μ) ^ (1 / q)

Proof state:
case pos
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : (f + g) a = ⊤
⊢ ⊤ ^ p ≤ ⊤

Tactic:
exact le_top

Result:
no goals

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : ¬(f + g) a = ⊤
⊢ (f + g) a ^ p = (f + g) a ^ 1 * (f + g) a ^ (p - 1)

Tactic:
rw [← ENNReal.rpow_add _ _ h_zero h_top, add_sub_cancel]

Result:
no goals

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : ¬(f + g) a = ⊤
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Tactic:
refine le_of_eq ?_

Result:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : ¬(f + g) a = ⊤
⊢ (f + g) a ^ p = (f + g) a * (f + g) a ^ (p - 1)

Proof state:
case h₂
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), g a * (f + g) a ^ (p - 1) ∂μ ≤
    (∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q)

Tactic:
exact lintegral_mul_rpow_le_lintegral_rpow_mul_lintegral_rpow hpq hg (hf.add hg) hg_top

Result:
no goals

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
h_add_m : AEMeasurable (fun a => (f + g) a ^ (p - 1)) μ
⊢ ∫⁻ (a : α), (f + g) a * (f + g) a ^ (p - 1) ∂μ =
    ∫⁻ (a : α), f a * (f + g) a ^ (p - 1) ∂μ + ∫⁻ (a : α), g a * (f + g) a ^ (p - 1) ∂μ

Tactic:
have h_add_apply :
  (∫⁻ a : α, (f + g) a * (f + g) a ^ (p - 1) ∂μ) =
    ∫⁻ a : α, (f a + g a) * (f + g) a ^ (p - 1) ∂μ :=
  rfl

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
h_add_m : AEMeasurable (fun a => (f + g) a ^ (p - 1)) μ
h_add_apply : ∫⁻ (a : α), (f + g) a * (f + g) a ^ (p - 1) ∂μ = ∫⁻ (a : α), (f a + g a) * (f + g) a ^ (p - 1) ∂μ
⊢ ∫⁻ (a : α), (f + g) a * (f + g) a ^ (p - 1) ∂μ =
    ∫⁻ (a : α), f a * (f + g) a ^ (p - 1) ∂μ + ∫⁻ (a : α), g a * (f + g) a ^ (p - 1) ∂μ

Proof state:
case h₁
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), f a * (f + g) a ^ (p - 1) ∂μ ≤
    (∫⁻ (a : α), f a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q)

Tactic:
exact lintegral_mul_rpow_le_lintegral_rpow_mul_lintegral_rpow hpq hf (hf.add hg) hf_top

Result:
no goals

Proof state:
case hfg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Tactic:
by_cases h_zero : (f + g) a = 0

Result:
case pos
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : (f + g) a = 0
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Proof state:
case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Tactic:
by_cases h_top : (f + g) a = ⊤

Result:
case pos
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : (f + g) a = ⊤
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

case neg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
h_zero : ¬(f + g) a = 0
h_top : ¬(f + g) a = ⊤
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), (f + g) a ^ p ∂μ ≤ ∫⁻ (a : α), (f + g) a * (f + g) a ^ (p - 1) ∂μ

Tactic:
gcongr with a

Result:
case hfg
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
a : α
⊢ (f + g) a ^ p ≤ (f + g) a * (f + g) a ^ (p - 1)

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), f a * (f + g) a ^ (p - 1) ∂μ + ∫⁻ (a : α), g a * (f + g) a ^ (p - 1) ∂μ ≤
    (∫⁻ (a : α), f a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q) +
      (∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q)

Tactic:
gcongr

Result:
case h₁
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), f a * (f + g) a ^ (p - 1) ∂μ ≤
    (∫⁻ (a : α), f a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q)

case h₂
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p q : ℝ
hpq : p.IsConjExponent q
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ ≠ ⊤
hg : AEMeasurable g μ
hg_top : ∫⁻ (a : α), g a ^ p ∂μ ≠ ⊤
⊢ ∫⁻ (a : α), g a * (f + g) a ^ (p - 1) ∂μ ≤
    (∫⁻ (a : α), g a ^ p ∂μ) ^ (1 / p) * (∫⁻ (a : α), (f a + g a) ^ p ∂μ) ^ (1 / q)