-- Mathlib/Analysis/SpecialFunctions/JapaneseBracket.lean
theorem finite_integral_rpow_sub_one_pow_aux {r : ℝ} (n : ℕ) (hnr : (n : ℝ) < r) :
    (∫⁻ x : ℝ in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n)) < ∞

Proof state:
case h.ha
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ x ^ (-r⁻¹) - 1

Tactic:
rw [sub_nonneg]

Result:
case h.ha
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 1 ≤ x ^ (-r⁻¹)

Proof state:
case h.hab.h
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ 1

Tactic:
norm_num

Result:
no goals

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ ENNReal.ofReal ((x ^ (-r⁻¹) - 0) ^ n) = ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))

Tactic:
simp [rpow_mul hx.1.le, ← neg_mul]

Result:
no goals

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n))) < ⊤

Tactic:
refine IntegrableOn.setLIntegral_lt_top ?_

Result:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntegrableOn (fun x => x ^ (-(r⁻¹ * ↑n))) (Ioc 0 1) volume

Proof state:
case h
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ -1 < -(r⁻¹ * ↑n)

Tactic:
rwa [neg_lt_neg_iff, inv_mul_lt_iff₀' hr, one_mul]

Result:
no goals

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal ((x ^ (-r⁻¹) - 0) ^ n)

Tactic:
gcongr

Result:
case h.ha
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ x ^ (-r⁻¹) - 1

case h.hab.h
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 0 ≤ 1

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntervalIntegrable (fun x => x ^ (-(r⁻¹ * ↑n))) volume 0 1

Tactic:
apply intervalIntegral.intervalIntegrable_rpow'

Result:
case h
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ -1 < -(r⁻¹ * ↑n)

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤

Tactic:
have hr : 0 < r := lt_of_le_of_lt n.cast_nonneg hnr

Result:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ -r⁻¹ ≤ 0

Tactic:
simpa using hr.le

Result:
no goals

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntegrableOn (fun x => x ^ (-(r⁻¹ * ↑n))) (Ioc 0 1) volume

Tactic:
rw [← intervalIntegrable_iff_integrableOn_Ioc_of_le zero_le_one]

Result:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ IntervalIntegrable (fun x => x ^ (-(r⁻¹ * ↑n))) volume 0 1

Proof state:
case h.ha
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
x : ℝ
hx : x ∈ Ioc 0 1
⊢ 1 ≤ x ^ (-r⁻¹)

Tactic:
exact Real.one_le_rpow_of_pos_of_le_one_of_nonpos hx.1 hx.2 (by simpa using hr.le)

Result:
no goals

Proof state:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) < ⊤

Tactic:
refine lt_of_le_of_lt (setLIntegral_mono' measurableSet_Ioc h_int) ?_

Result:
r : ℝ
n : ℕ
hnr : ↑n < r
hr : 0 < r
h_int : ∀ x ∈ Ioc 0 1, ENNReal.ofReal ((x ^ (-r⁻¹) - 1) ^ n) ≤ ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n)))
⊢ ∫⁻ (x : ℝ) in Ioc 0 1, ENNReal.ofReal (x ^ (-(r⁻¹ * ↑n))) < ⊤