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

tactic: have bdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i) := by
  refine' ⟨(∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q), _⟩
  rintro a ⟨s, rfl⟩
  exact H₁ s
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
⊢ (Summable fun i => f i * g i) ∧
    (∑' (i : ι), f i * g i) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: have H₂ : Summable _ := (hasSum_of_isLUB _ (isLUB_ciSup bdd)).summable
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
bdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i)
⊢ (Summable fun i => f i * g i) ∧
    (∑' (i : ι), f i * g i) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: exact ⟨H₂, tsum_le_of_sum_le H₂ H₁⟩
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
bdd : BddAbove (Set.range fun s => ∑ i in s, f i * g i)
H₂ : Summable fun i => f i * g i
⊢ (Summable fun i => f i * g i) ∧
    (∑' (i : ι), f i * g i) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: intro s
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
⊢ ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: refine' le_trans (inner_le_Lp_mul_Lq s f g hpq) (mul_le_mul _ _ bot_le bot_le)
state_before: ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
s : Finset ι
⊢ ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.pos)]
state_before: case refine'_1
ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
s : Finset ι
⊢ (∑ i in s, f i ^ p) ^ (1 / p) ≤ (∑' (i : ι), f i ^ p) ^ (1 / p)

tactic: exact sum_le_tsum _ (fun _ _ => zero_le _) hf
state_before: case refine'_1
ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
s : Finset ι
⊢ ∑ i in s, f i ^ p ≤ ∑' (i : ι), f i ^ p

tactic: rw [NNReal.rpow_le_rpow_iff (one_div_pos.mpr hpq.symm.pos)]
state_before: case refine'_2
ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
s : Finset ι
⊢ (∑ i in s, g i ^ q) ^ (1 / q) ≤ (∑' (i : ι), g i ^ q) ^ (1 / q)

tactic: exact sum_le_tsum _ (fun _ _ => zero_le _) hg
state_before: case refine'_2
ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
s : Finset ι
⊢ ∑ i in s, g i ^ q ≤ ∑' (i : ι), g i ^ q

tactic: refine' ⟨(∑' i, f i ^ p) ^ (1 / p) * (∑' i, g i ^ q) ^ (1 / q), _⟩
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
⊢ BddAbove (Set.range fun s => ∑ i in s, f i * g i)

tactic: rintro a ⟨s, rfl⟩
state_before: ι : Type u
s : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
⊢ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q) ∈
    upperBounds (Set.range fun s => ∑ i in s, f i * g i)

tactic: exact H₁ s
state_before: case intro
ι : Type u
s✝ : Finset ι
f g : ι → ℝ≥0
p q : ℝ
hpq : Real.IsConjugateExponent p q
hf : Summable fun i => f i ^ p
hg : Summable fun i => g i ^ q
H₁ : ∀ (s : Finset ι), ∑ i in s, f i * g i ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)
s : Finset ι
⊢ (fun s => ∑ i in s, f i * g i) s ≤ (∑' (i : ι), f i ^ p) ^ (1 / p) * (∑' (i : ι), g i ^ q) ^ (1 / q)