-- Mathlib/MeasureTheory/Integral/MeanInequalities.lean
theorem lintegral_rpow_add_lt_top_of_lintegral_rpow_lt_top {p : ℝ} {f g : α → ℝ≥0∞}
    (hf : AEMeasurable f μ) (hf_top : (∫⁻ a, f a ^ p ∂μ) < ⊤) (hg_top : (∫⁻ a, g a ^ p ∂μ) < ⊤)
    (hp1 : 1 ≤ p) : (∫⁻ a, (f + g) a ^ p ∂μ) < ⊤

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
⊢ ∫⁻ (a : α), (f + g) a ^ p ∂μ < ⊤

Tactic:
have hp0 : 0 ≤ p := le_of_lt hp0_lt

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
⊢ ∫⁻ (a : α), (f + g) a ^ p ∂μ < ⊤

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
⊢ (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2

Tactic:
rw [sub_eq_add_neg, ENNReal.rpow_add _ _ two_ne_zero ENNReal.coe_ne_top, ← mul_assoc, ←
  ENNReal.mul_rpow_of_nonneg _ _ hp0, one_div,
  ENNReal.inv_mul_cancel two_ne_zero ENNReal.coe_ne_top, ENNReal.one_rpow, one_mul,
  ENNReal.rpow_neg_one]

Result:
no goals

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2) ^ p * (f a + g a) ^ p ≤ (1 / 2) ^ p * (2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p)

Tactic:
rw [mul_add, ← mul_assoc, ← mul_assoc, h_rw, ← ENNReal.mul_rpow_of_nonneg _ _ hp0, mul_add]

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2 * f a + 1 / 2 * g a) ^ p ≤ 1 / 2 * f a ^ p + 1 / 2 * g a ^ p

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ 1 / 2 ≠ ⊤

Tactic:
rw [one_div, ENNReal.inv_ne_top]

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ 2 ≠ 0

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
⊢ ∫⁻ (a : α), (f a + g a) ^ p ∂μ ≤ ∫⁻ (a : α), 2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p ∂μ

Tactic:
refine lintegral_mono fun a => ?_

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
⊢ (f a + g a) ^ p ≤ 2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ 2 ≠ 0

Tactic:
exact two_ne_zero

Result:
no goals

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2 * f a + 1 / 2 * g a) ^ p ≤ 1 / 2 * f a ^ p + 1 / 2 * g a ^ p

Tactic:
refine
  ENNReal.rpow_arith_mean_le_arith_mean2_rpow (1 / 2 : ℝ≥0∞) (1 / 2 : ℝ≥0∞) (f a) (g a) ?_
    hp1

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ 1 / 2 + 1 / 2 = 1

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
⊢ 0 ≤ p - 1

Tactic:
simp [hp1]

Result:
no goals

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (f a + g a) ^ p ≤ 2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p

Tactic:
rw [← ENNReal.mul_le_mul_left (ne_of_lt h_zero_lt_half_rpow).symm _]

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2) ^ p * (f a + g a) ^ p ≤ (1 / 2) ^ p * (2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p)

α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2) ^ p ≠ ⊤

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
⊢ ∫⁻ (a : α), 2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p ∂μ < ⊤

Tactic:
have h_two : (2 : ℝ≥0∞) ^ (p - 1) ≠ ⊤ :=
  ENNReal.rpow_ne_top_of_nonneg (by simp [hp1]) ENNReal.coe_ne_top

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
h_two : 2 ^ (p - 1) ≠ ⊤
⊢ ∫⁻ (a : α), 2 ^ (p - 1) * f a ^ p + 2 ^ (p - 1) * g a ^ p ∂μ < ⊤

Proof state:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ (1 / 2) ^ p < ⊤

Tactic:
refine ENNReal.rpow_lt_top_of_nonneg hp0 ?_

Result:
α : Type u_1
inst✝ : MeasurableSpace α
μ : Measure α
p : ℝ
f g : α → ℝ≥0∞
hf : AEMeasurable f μ
hf_top : ∫⁻ (a : α), f a ^ p ∂μ < ⊤
hg_top : ∫⁻ (a : α), g a ^ p ∂μ < ⊤
hp1 : 1 ≤ p
hp0_lt : 0 < p
hp0 : 0 ≤ p
a : α
h_zero_lt_half_rpow : 0 < (1 / 2) ^ p
h_rw : (1 / 2) ^ p * 2 ^ (p - 1) = 1 / 2
⊢ 1 / 2 ≠ ⊤