l3lab/ntp-mathlib huggingface dataset:
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ∀ ⦃x : ℝ≥0⦄,
    x ∈ univ →
      ∀ ⦃y : ℝ≥0⦄,
        y ∈ univ →
          ∀ ⦃a b : ℝ≥0⦄,
            0 ≤ a →
              0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)

Next tactic:
simp [hp']
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by simp [hp']⟩
    

Proof state:
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p

Next tactic:
case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by simp [hp']⟩
    

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p

Next tactic:
case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by simp [hp']⟩
    case neg =>
      

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p

Next tactic:
push_neg at hp'
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by simp [hp']⟩
    case neg =>
      push_neg at hp'
      

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ ConcaveOn ℝ≥0 univ fun x => x ^ p

Next tactic:
exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ≥0 univ fun x : ℝ≥0 ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_univ, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_univ, by simp [hp']⟩
    case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p ≠ 1
⊢ 0 < p

Next tactic:
positivity
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  

Proof state:
⊢ StrictConcaveOn ℝ≥0 univ ⇑sqrt

Next tactic:
have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; exact mod_cast NNReal.sqrt_eq_rpow x
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    

Proof state:
⊢ ⇑sqrt = fun x => x ^ (1 / 2)

Next tactic:
ext x
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; 

Proof state:
case h.a
x : ℝ≥0
⊢ ↑(sqrt x) = ↑(x ^ (1 / 2))

Next tactic:
exact mod_cast NNReal.sqrt_eq_rpow x
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; exact mod_cast NNReal.sqrt_eq_rpow x
  

Proof state:
this : ⇑sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ≥0 univ ⇑sqrt

Next tactic:
rw [this]
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; exact mod_cast NNReal.sqrt_eq_rpow x
  rw [this]
  

Proof state:
this : ⇑sqrt = fun x => x ^ (1 / 2)
⊢ StrictConcaveOn ℝ≥0 univ fun x => x ^ (1 / 2)

Next tactic:
exact strictConcaveOn_rpow (by positivity) (by linarith)
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; exact mod_cast NNReal.sqrt_eq_rpow x
  rw [this]
  exact strictConcaveOn_rpow (by 

Proof state:
this : ⇑sqrt = fun x => x ^ (1 / 2)
⊢ 0 < 1 / 2

Next tactic:
positivity
lemma strictConcaveOn_sqrt : StrictConcaveOn ℝ≥0 univ NNReal.sqrt := by
  have : NNReal.sqrt = fun (x:ℝ≥0) ↦ x ^ (1 / (2:ℝ)) := by
    ext x; exact mod_cast NNReal.sqrt_eq_rpow x
  rw [this]
  exact strictConcaveOn_rpow (by positivity) (by 

Proof state:
this : ⇑sqrt = fun x => x ^ (1 / 2)
⊢ 1 / 2 < 1

Next tactic:
linarith
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  

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

Next tactic:
refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
let x' : ℝ≥0 := ⟨x, hx⟩
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
let y' : ℝ≥0 := ⟨y, hy⟩
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
let a' : ℝ≥0 := ⟨a, by positivity⟩
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by 

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
⊢ 0 ≤ a

Next tactic:
positivity
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
let b' : ℝ≥0 := ⟨b, by positivity⟩
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by 

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
⊢ 0 ≤ b

Next tactic:
positivity
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
have hab' : a' + b' = 1 := by ext; simp [hab]
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
  have hab' : a' + b' = 1 := by 

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ a' + b' = 1

Next tactic:
ext
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
  have hab' : a' + b' = 1 := by ext; 

Proof state:
case a
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
⊢ ↑(a' + b') = ↑1

Next tactic:
simp [hab]
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
  have hab' : a' + b' = 1 := by ext; simp [hab]
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ a • (fun x => x ^ p) x + b • (fun x => x ^ p) y < (fun x => x ^ p) (a • x + b • y)

Next tactic:
rw [hx', hy']
lemma strictConcaveOn_rpow {p : ℝ} (hp₀ : 0 < p) (hp₁ : p < 1) :
    StrictConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  refine ⟨convex_Ici _, fun x hx y hy hxy a b ha hb hab => ?_⟩
  let x' : ℝ≥0 := ⟨x, hx⟩
  let y' : ℝ≥0 := ⟨y, hy⟩
  let a' : ℝ≥0 := ⟨a, by positivity⟩
  let b' : ℝ≥0 := ⟨b, by positivity⟩
  have hx' : (fun z => z ^ p) x = (fun z => z ^ p) x' := rfl
  have hy' : (fun z => z ^ p) y = (fun z => z ^ p) y' := rfl
  have hxy' : x' ≠ y' := Subtype.ne_of_val_ne hxy
  have hab' : a' + b' = 1 := by ext; simp [hab]
  rw [hx', hy']
  

Proof state:
p : ℝ
hp₀ : 0 < p
hp₁ : p < 1
x : ℝ
hx : x ∈ Ici 0
y : ℝ
hy : y ∈ Ici 0
hxy : x ≠ y
a b : ℝ
ha : 0 < a
hb : 0 < b
hab : a + b = 1
x' : ℝ≥0 := { val := x, property := hx }
y' : ℝ≥0 := { val := y, property := hy }
a' : ℝ≥0 := { val := a, property := (_ : 0 ≤ a) }
b' : ℝ≥0 := { val := b, property := (_ : 0 ≤ b) }
hx' : (fun z => z ^ p) x = ↑((fun z => z ^ p) x')
hy' : (fun z => z ^ p) y = ↑((fun z => z ^ p) y')
hxy' : x' ≠ y'
hab' : a' + b' = 1
⊢ a • ↑((fun z => z ^ p) x') + b • ↑((fun z => z ^ p) y') < (fun x => x ^ p) (a • x + b • y)

Next tactic:
exact (NNReal.strictConcaveOn_rpow hp₀ hp₁).2 (Set.mem_univ x') (Set.mem_univ y')
    hxy' (mod_cast ha) (mod_cast hb) hab'
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
by_cases hp : p = 0
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  

Proof state:
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : ¬p = 0 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p = 0
x✝⁷ : ℝ
x✝⁶ : x✝⁷ ∈ Ici 0
x✝⁵ : ℝ
x✝⁴ : x✝⁵ ∈ Ici 0
x✝³ x✝² : ℝ
x✝¹ : 0 ≤ x✝³
x✝ : 0 ≤ x✝²
hab : x✝³ + x✝² = 1
⊢ x✝³ • (fun x => x ^ p) x✝⁷ + x✝² • (fun x => x ^ p) x✝⁵ ≤ (fun x => x ^ p) (x✝³ • x✝⁷ + x✝² • x✝⁵)

Next tactic:
simp [hp, hab]
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  

Proof state:
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
    case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
    case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : ¬p = 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
push_neg at hp
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
by_cases hp' : p = 1
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    

Proof state:
case pos
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p
case neg p : ℝ hp₀ : 0 ≤ p hp₁ : p ≤ 1 hp : p ≠ 0 hp' : ¬p = 1 ⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
exact ⟨convex_Ici 0, by simp [hp']⟩
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by 

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : p = 1
⊢ ∀ ⦃x : ℝ⦄,
    x ∈ Ici 0 →
      ∀ ⦃y : ℝ⦄,
        y ∈ Ici 0 →
          ∀ ⦃a b : ℝ⦄,
            0 ≤ a →
              0 ≤ b → a + b = 1 → a • (fun x => x ^ p) x + b • (fun x => x ^ p) y ≤ (fun x => x ^ p) (a • x + b • y)

Next tactic:
simp [hp']
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
    

Proof state:
case neg
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
    

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
case neg =>
      push_neg at hp'
      exact (strictConcaveOn_rpow (by positivity) (lt_of_le_of_ne hp₁ hp')).concaveOn
lemma concaveOn_rpow {p : ℝ} (hp₀ : 0 ≤ p) (hp₁ : p ≤ 1) :
    ConcaveOn ℝ (Set.Ici 0) fun x : ℝ ↦ x ^ p := by
  by_cases hp : p = 0
  case pos => exact ⟨convex_Ici 0, fun _ _ _ _ _ _ _ _ hab => by simp [hp, hab]⟩
  case neg =>
    push_neg at hp
    by_cases hp' : p = 1
    case pos => exact ⟨convex_Ici 0, by simp [hp']⟩
    case neg =>
      

Proof state:
p : ℝ
hp₀ : 0 ≤ p
hp₁ : p ≤ 1
hp : p ≠ 0
hp' : ¬p = 1
⊢ ConcaveOn ℝ (Ici 0) fun x => x ^ p

Next tactic:
push_neg at hp'