Zulip Chat Archive

Stream: new members

Topic: x^3 is convex on positive


Li Xuanji (Apr 05 2025 at 23:49):

I want to show that the function xx3x \mapsto x^3 is convex on (0,)(0, ∞), which seems tailor-made for convexOn_zpow, but I can't get the apply to work.

import Mathlib

example : ConvexOn  (Set.Ioi (0: )) (fun x => x ^ 3) := by
  apply convexOn_zpow

error:

tactic 'apply' failed, failed to unify
  ConvexOn ?𝕜 (Set.Ioi 0) fun x => x ^ ?n
with
  ConvexOn  (Set.Ioi 0) fun x => x ^ 3

Not sure what the issue is, since it looks like ?𝕜=ℝ, ?n=3 should work.

Li Xuanji (Apr 05 2025 at 23:53):

Oh, it looks like I need the 3 to be integer...

example : ConvexOn  (Set.Ioi (0: )) (fun x => x ^ (3: )) := by
    apply convexOn_zpow

Ruben Van de Velde (Apr 06 2025 at 07:21):

Indeed, that's what the "z" in "zpow" means. There's also convexOn_pow which is even slightly stronger


Last updated: May 02 2025 at 03:31 UTC