l3lab/ntp-mathlib huggingface dataset:
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    

Proof state:
case inr.inr.a.inl
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s < 0
this : 1 ∈ Ioi 0
⊢ log (1 + s) / s < log (1 + p * s) / p / s

Next tactic:
convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · 

Proof state:
case h.e'_3
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s < 0
this : 1 ∈ Ioi 0
⊢ log (1 + s) / s = (log (1 + s) - log 1) / (1 + s - 1)

Next tactic:
field_simp
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · 

Proof state:
case h.e'_4
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s < 0
this : 1 ∈ Ioi 0
⊢ log (1 + p * s) / p / s = (log (1 + p * s) - log 1) / (1 + p * s - 1)

Next tactic:
field_simp
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · 

Proof state:
case inr.inr.a.inl
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s < 0
this : 1 ∈ Ioi 0
⊢ 1 + p * s < 1 + s

Next tactic:
nlinarith
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · 

Proof state:
case inr.inr.a.inr
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
⊢ log (1 + p * s) < log (1 + s) * p

Next tactic:
rw [← div_lt_iff hp, ← div_lt_div_right hs']
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · rw [← div_lt_iff hp, ← div_lt_div_right hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    

Proof state:
case inr.inr.a.inr
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
⊢ log (1 + p * s) / p / s < log (1 + s) / s

Next tactic:
haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · rw [← div_lt_iff hp, ← div_lt_div_right hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    

Proof state:
case inr.inr.a.inr
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
this : 1 ∈ Ioi 0
⊢ log (1 + p * s) / p / s < log (1 + s) / s

Next tactic:
convert strictConcaveOn_log_Ioi.secant_strict_mono this hs1 hs2 hs3 hs4 _ using 1
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · rw [← div_lt_iff hp, ← div_lt_div_right hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs1 hs2 hs3 hs4 _ using 1
    · 

Proof state:
case h.e'_3
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
this : 1 ∈ Ioi 0
⊢ log (1 + p * s) / p / s = (log (1 + p * s) - log 1) / (1 + p * s - 1)

Next tactic:
field_simp
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · rw [← div_lt_iff hp, ← div_lt_div_right hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs1 hs2 hs3 hs4 _ using 1
    · field_simp
    · 

Proof state:
case h.e'_4
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
this : 1 ∈ Ioi 0
⊢ log (1 + s) / s = (log (1 + s) - log 1) / (1 + s - 1)

Next tactic:
field_simp
/-- **Bernoulli's inequality** for real exponents, strict version: for `1 < p` and `-1 ≤ s`, with
`s ≠ 0`, we have `1 + p * s < (1 + s) ^ p`. -/
theorem one_add_mul_self_lt_rpow_one_add {s : ℝ} (hs : -1 ≤ s) (hs' : s ≠ 0) {p : ℝ} (hp : 1 < p) :
    1 + p * s < (1 + s) ^ p := by
  rcases eq_or_lt_of_le hs with (rfl | hs)
  · have : p ≠ 0 := by positivity
    simpa [zero_rpow this]
  have hs1 : 0 < 1 + s := by linarith
  rcases le_or_lt (1 + p * s) 0 with hs2 | hs2
  · exact hs2.trans_lt (rpow_pos_of_pos hs1 _)
  rw [rpow_def_of_pos hs1, ← exp_log hs2]
  apply exp_strictMono
  have hp : 0 < p := by positivity
  have hs3 : 1 + s ≠ 1 := by contrapose! hs'; linarith
  have hs4 : 1 + p * s ≠ 1 := by contrapose! hs'; nlinarith
  cases' lt_or_gt_of_ne hs' with hs' hs'
  · rw [← div_lt_iff hp, ← div_lt_div_right_of_neg hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs2 hs1 hs4 hs3 _ using 1
    · field_simp
    · field_simp
    · nlinarith
  · rw [← div_lt_iff hp, ← div_lt_div_right hs']
    -- Porting note: previously we could write `zero_lt_one` inline,
    -- but now Lean doesn't guess we are talking about `1` fast enough.
    haveI : (1 : ℝ) ∈ Ioi 0 := zero_lt_one
    convert strictConcaveOn_log_Ioi.secant_strict_mono this hs1 hs2 hs3 hs4 _ using 1
    · field_simp
    · field_simp
    · 

Proof state:
case inr.inr.a.inr
s : ℝ
hs✝ : -1 ≤ s
hs'✝ : s ≠ 0
p : ℝ
hp✝ : 1 < p
hs : -1 < s
hs1 : 0 < 1 + s
hs2 : 0 < 1 + p * s
hp : 0 < p
hs3 : 1 + s ≠ 1
hs4 : 1 + p * s ≠ 1
hs' : s > 0
this : 1 ∈ Ioi 0
⊢ 1 + s < 1 + p * s

Next tactic:
nlinarith
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `1 ≤ p` and `-1 ≤ s`
we have `1 + p * s ≤ (1 + s) ^ p`. -/
theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
    1 + p * s ≤ (1 + s) ^ p := by
  

Proof state:
s : ℝ
hs : -1 ≤ s
p : ℝ
hp : 1 ≤ p
⊢ 1 + p * s ≤ (1 + s) ^ p

Next tactic:
rcases eq_or_lt_of_le hp with (rfl | hp)
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `1 ≤ p` and `-1 ≤ s`
we have `1 + p * s ≤ (1 + s) ^ p`. -/
theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
    1 + p * s ≤ (1 + s) ^ p := by
  rcases eq_or_lt_of_le hp with (rfl | hp)
  · 

Proof state:
case inl
s : ℝ
hs : -1 ≤ s
hp : 1 ≤ 1
⊢ 1 + 1 * s ≤ (1 + s) ^ 1

Next tactic:
simp
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `1 ≤ p` and `-1 ≤ s`
we have `1 + p * s ≤ (1 + s) ^ p`. -/
theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
    1 + p * s ≤ (1 + s) ^ p := by
  rcases eq_or_lt_of_le hp with (rfl | hp)
  · simp
  

Proof state:
case inr
s : ℝ
hs : -1 ≤ s
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
⊢ 1 + p * s ≤ (1 + s) ^ p

Next tactic:
by_cases hs' : s = 0
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `1 ≤ p` and `-1 ≤ s`
we have `1 + p * s ≤ (1 + s) ^ p`. -/
theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
    1 + p * s ≤ (1 + s) ^ p := by
  rcases eq_or_lt_of_le hp with (rfl | hp)
  · simp
  by_cases hs' : s = 0
  · 

Proof state:
case pos
s : ℝ
hs : -1 ≤ s
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hs' : s = 0
⊢ 1 + p * s ≤ (1 + s) ^ p

Next tactic:
simp [hs']
/-- **Bernoulli's inequality** for real exponents, non-strict version: for `1 ≤ p` and `-1 ≤ s`
we have `1 + p * s ≤ (1 + s) ^ p`. -/
theorem one_add_mul_self_le_rpow_one_add {s : ℝ} (hs : -1 ≤ s) {p : ℝ} (hp : 1 ≤ p) :
    1 + p * s ≤ (1 + s) ^ p := by
  rcases eq_or_lt_of_le hp with (rfl | hp)
  · simp
  by_cases hs' : s = 0
  · simp [hs']
  

Proof state:
case neg
s : ℝ
hs : -1 ≤ s
p : ℝ
hp✝ : 1 ≤ p
hp : 1 < p
hs' : ¬s = 0
⊢ 1 + p * s ≤ (1 + s) ^ p

Next tactic:
exact (one_add_mul_self_lt_rpow_one_add hs hs' hp).le
theorem strictConvexOn_rpow {p : ℝ} (hp : 1 < p) : StrictConvexOn ℝ (Ici 0) fun x : ℝ => x ^ p := by
  

Proof state:
p : ℝ
hp : 1 < p
⊢ StrictConvexOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
apply strictConvexOn_of_slope_strict_mono_adjacent (convex_Ici (0 : ℝ))
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 : ℝ))
  

Proof state:
p : ℝ
hp : 1 < p
⊢ ∀ {x y z : ℝ}, x ∈ Ici 0 → z ∈ Ici 0 → x < y → y < z → (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)

Next tactic:
rintro x y z (hx : 0 ≤ x) (hz : 0 ≤ z) hxy 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
  

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)

Next tactic:
have hy : 0 < y := by linarith
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 

Proof state:
p : ℝ
hp : 1 < p
x y z : ℝ
hx : 0 ≤ x
hz : 0 ≤ z
hxy : x < y
hyz : y < z
⊢ 0 < y

Next tactic:
linarith
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
  

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

Next tactic:
have hy' : 0 < y ^ p := rpow_pos_of_pos 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 _
  

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
⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)

Next tactic:
have H1 : y ^ (p - 1 + 1) = y ^ (p - 1) * y := rpow_add_one hy.ne' _
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' _
  

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 - 1 + 1) = y ^ (p - 1) * y
⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)

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
  

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
⊢ (y ^ p - x ^ p) / (y - x) < (z ^ p - y ^ p) / (z - y)

Next tactic:
trans p * y ^ (p - 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)
  · 

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
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have h3 : 0 < y - x := by linarith only [hxy]
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 

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 < y - x

Next tactic:
linarith only [hxy]
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]
    

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
⊢ (y ^ p - x ^ p) / (y - x) < p * y ^ (p - 1)

Next tactic:
have hyx'' : x / y < 1 := by rwa [div_lt_one 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 

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
⊢ x / y < 1

Next tactic:
rwa [div_lt_one hy]