l3lab/ntp-mathlib huggingface dataset:
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
⊢ x / y - 1 < 0

Next tactic:
linarith only [hyx'']
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have hyx'''' : 0 ≤ x / y := by positivity
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
⊢ 0 ≤ x / y

Next tactic:
positivity
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
⊢ -1 ≤ x / y - 1

Next tactic:
linarith only [hyx'''']
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
⊢ 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)

Next tactic:
linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
rw [div_lt_iff h3, ← div_lt_div_right hy']
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ (y ^ p - x ^ p) / y ^ p < p * y ^ (p - 1) * (y - x) / y ^ p

Next tactic:
convert this using 1
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · 

Proof state:
case h.e'_3
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ (y ^ p - x ^ p) / y ^ p = 1 - (1 + (x / y - 1)) ^ p

Next tactic:
have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      

Proof state:
case h.e'_3
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
H : (x / y) ^ p = x ^ p / y ^ p
⊢ (y ^ p - x ^ p) / y ^ p = 1 - (1 + (x / y - 1)) ^ p

Next tactic:
ring_nf at H ⊢
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      

Proof state:
case h.e'_3
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
H : (x * y⁻¹) ^ p = x ^ p * (y ^ p)⁻¹
⊢ -(x ^ p * (y ^ p)⁻¹) + y ^ p * (y ^ p)⁻¹ = 1 - (x * y⁻¹) ^ p

Next tactic:
field_simp at H ⊢
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      

Proof state:
case h.e'_3
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
H : (x / y) ^ p * y ^ p = x ^ p
⊢ -x ^ p + y ^ p = (1 - (x / y) ^ p) * y ^ p

Next tactic:
linear_combination H
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · 

Proof state:
case h.e'_4
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ p * y ^ (p - 1) * (y - x) / y ^ p = -p * (x / y - 1)

Next tactic:
ring_nf at H1 ⊢
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · ring_nf at H1 ⊢
      

Proof state:
case h.e'_4
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ p * y ^ (-1 + p) * y * (y ^ p)⁻¹ - p * y ^ (-1 + p) * x * (y ^ p)⁻¹ = p - p * x * y⁻¹

Next tactic:
field_simp
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · ring_nf at H1 ⊢
      field_simp
      

Proof state:
case h.e'_4
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
h3 : 0 < y - x
hyx'' : x / y < 1
hyx''' : x / y - 1 < 0
hyx'''' : 0 ≤ x / y
hyx''''' : -1 ≤ x / y - 1
this : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1)
⊢ (p * y ^ (-1 + p) * y - p * y ^ (-1 + p) * x) * y = (p * y - p * x) * y ^ p

Next tactic:
linear_combination p * (-y + x) * H1
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · ring_nf at H1 ⊢
      field_simp
      linear_combination p * (-y + x) * H1
  · 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)

Next tactic:
have hyz' : 0 < z - y := by linarith only [hyz]
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · ring_nf at H1 ⊢
      field_simp
      linear_combination p * (-y + x) * H1
  · have hyz' : 0 < z - y := by 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
⊢ 0 < z - y

Next tactic:
linarith only [hyz]
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
  rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy hyz
  have hy : 0 < y := by linarith
  have hy' : 0 < y ^ p := rpow_pos_of_pos hy _
  have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
  ring_nf at H1
  trans p * y ^ (p - 1)
  · have h3 : 0 < y - x := by linarith only [hxy]
    have hyx'' : x / y < 1 := by rwa [div_lt_one hy]
    have hyx''' : x / y - 1 < 0 := by linarith only [hyx'']
    have hyx'''' : 0 ≤ x / y := by positivity
    have hyx''''' : -1 ≤ x / y - 1 := by linarith only [hyx'''']
    have : 1 - (1 + (x / y - 1)) ^ p < -p * (x / y - 1) := by
      linarith [one_add_mul_self_lt_rpow_one_add hyx''''' hyx'''.ne hp]
    rw [div_lt_iff h3, ← div_lt_div_right hy']
    convert this using 1
    · have H : (x / y) ^ p = x ^ p / y ^ p := div_rpow hx hy.le _
      ring_nf at H ⊢
      field_simp at H ⊢
      linear_combination H
    · ring_nf at H1 ⊢
      field_simp
      linear_combination p * (-y + x) * H1
  · have hyz' : 0 < z - y := by linarith only [hyz]
    

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
hy : 0 < y
hy' : 0 < y ^ p
H1 : y ^ p = y ^ (-1 + p) * y
hyz' : 0 < z - y
⊢ p * y ^ (p - 1) < (z ^ p - y ^ p) / (z - y)

Next tactic:
have hyz'' : 1 < z / y := by rwa [one_lt_div hy]