Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The scalar power potential, its gradient, and the scalar Bregman divergence

Definition
HlawkaSchatten_ScalarBregman

by savarin · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

bregman-divergenceconvex-analysishlawka-schattenpower-potentialscalar-analysis

For real p,xp,xp,x:

  • signedPower q x :=sign(x) ∣x∣q:= \mathrm{sign}(x)\,|x|^q:=sign(x)∣x∣q — the signed real power (Lean totalizes it at x=0x=0x=0 and for every real exponent qqq, via Real.rpow and SignType.sign).
  • powerPotential p x :=∣x∣p/p=:Fp(x):= |x|^p/p =: F_p(x):=∣x∣p/p=:Fp​(x) — the scalar potential. The division by ppp is deliberate and load-bearing: it is FpF_pFp​, not ∣x∣p|x|^p∣x∣p, whose derivative (for p>1p>1p>1) is the plain signed (p−1)(p-1)(p−1)-power with no extra factor of ppp.
  • powerGradient p x :=∣x∣p−2x=:Gp(x):= |x|^{p-2}x =: G_p(x):=∣x∣p−2x=:Gp​(x) — the signed power that is the gradient of FpF_pFp​ when p>1p>1p>1.
  • scalarMazur p x :=:=:= signedPower (p/2) x =:ψp(x)=: \psi_p(x)=:ψp​(x) — the scalar Mazur map, used to compare the power geometry of FpF_pFp​ with an ordinary (squared-distance) Hilbert geometry.
  • scalarBregman p a b :=Fp(a)−Fp(b)−Gp(b)(a−b)=:βp(a,b):= F_p(a)-F_p(b)-G_p(b)(a-b) =: \beta_p(a,b):=Fp​(a)−Fp​(b)−Gp​(b)(a−b)=:βp​(a,b) — the Bregman divergence of FpF_pFp​, written with its explicit gradient term.

All five definitions are total in ppp and in their real arguments; no positivity or size hypothesis on ppp is imposed here.

The bundle also proves several elementary algebraic facts used throughout the rest of the construction: signedPower/scalarMazur vanish at 000 and are odd (signedPower q (−x)=−signedPower q x\mathrm{signedPower}\,q\,(-x)=-\mathrm{signedPower}\,q\,xsignedPowerq(−x)=−signedPowerqx, and likewise for scalarMazur); signedPower 1 x=x\mathrm{signedPower}\,1\,x=xsignedPower1x=x; composing signed powers multiplies their exponents, signedPower q (signedPower r x)=signedPower (qr) x\mathrm{signedPower}\,q\,(\mathrm{signedPower}\,r\,x)=\mathrm{signedPower}\,(qr)\,xsignedPowerq(signedPowerrx)=signedPower(qr)x; ∣x∣p=(x2)p/2|x|^p=(x^2)^{p/2}∣x∣p=(x2)p/2, so Fp(x)=(x2)p/2/pF_p(x)=(x^2)^{p/2}/pFp​(x)=(x2)p/2/p is manifestly even; and FpF_pFp​ is homogeneous under positive scaling, Fp(cx)=cpFp(x)F_p(cx)=c^pF_p(x)Fp​(cx)=cpFp​(x) for c>0c>0c>0.

Definition code
import Mathlib.Analysis.Convex.Deriv
import Mathlib.Analysis.Convex.SpecificFunctions.Basic
import Mathlib.Analysis.InnerProductSpace.Basic
import Mathlib.Analysis.InnerProductSpace.Dual
import Mathlib.Analysis.InnerProductSpace.NormPow
import Mathlib.Data.Sign.Basic
import Mathlib.Topology.Instances.Sign

/-
Copyright (c) 2026 Ezzeri Esa. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Ezzeri Esa
-/

/-!
# Scalar power Bregman data

These are the scalar objects used in the first layer of the audited
Bregman--Mazur proof. The normalization of `powerPotential` is important:
its derivative is the signed `(p - 1)`-power with no extra factor of `p`.
-/

namespace HlawkaSchatten

open Filter
open scoped Topology

/-- The signed real power `sign(x) * |x| ^ q`. -/
noncomputable def signedPower (q x : ℝ) : ℝ :=
  (SignType.sign x : ℝ) * |x| ^ q

/-- The convex scalar potential `|x| ^ p / p`. -/
noncomputable def powerPotential (p x : ℝ) : ℝ :=
  |x| ^ p / p

/-- The signed power that is the gradient of `powerPotential` for `p > 1`. -/
noncomputable def powerGradient (p x : ℝ) : ℝ :=
  |x| ^ (p - 2) * x

/-- The scalar Mazur map used to compare a power geometry with a Hilbert geometry. -/
noncomputable def scalarMazur (p x : ℝ) : ℝ :=
  signedPower (p / 2) x

/-- The Bregman divergence of `powerPotential`, written with its explicit gradient. -/
noncomputable def scalarBregman (p a b : ℝ) : ℝ :=
  powerPotential p a - powerPotential p b - powerGradient p b * (a - b)

@[simp]
theorem signedPower_zero (q : ℝ) : signedPower q 0 = 0 := by
  simp [signedPower]







@[simp]
theorem scalarMazur_zero (p : ℝ) : scalarMazur p 0 = 0 := by
  simp [scalarMazur]



@[simp]
theorem signedPower_one (x : ℝ) : signedPower 1 x = x := by
  simp [signedPower]

@[simp]
theorem signedPower_neg (q x : ℝ) : signedPower q (-x) = -signedPower q x := by
  simp [signedPower, Left.sign_neg]

/-- Composition of signed real powers multiplies their exponents. -/
theorem signedPower_comp (q r x : ℝ) :
    signedPower q (signedPower r x) = signedPower (q * r) x := by
  by_cases hx : x = 0
  · subst x
    simp
  rcases lt_or_gt_of_ne hx with hxneg | hxpos
  · have habs : 0 < |x| := abs_pos.mpr hx
    have hpow : 0 < |x| ^ r := Real.rpow_pos_of_pos habs r
    simp only [signedPower, sign_neg hxneg, SignType.coe_neg,
      SignType.coe_one, neg_mul, one_mul]
    rw [sign_neg (neg_lt_zero.mpr hpow), SignType.coe_neg,
      SignType.coe_one, neg_mul, one_mul, abs_neg, abs_of_pos hpow,
      ← Real.rpow_mul habs.le]
    congr 2
    ring
  · have hpow : 0 < |x| ^ r :=
      Real.rpow_pos_of_pos (abs_pos.mpr hx) r
    simp only [signedPower, sign_pos hxpos, SignType.coe_one, one_mul]
    rw [sign_pos hpow, SignType.coe_one, one_mul, abs_of_pos hpow,
      ← Real.rpow_mul (abs_nonneg x)]
    congr 1
    ring





@[simp]
theorem scalarMazur_neg (p x : ℝ) : scalarMazur p (-x) = -scalarMazur p x := by
  simp [scalarMazur]













/-- An absolute real power factors through the square of its argument. -/
theorem sq_rpow_div_two (p x : ℝ) :
    (x ^ 2) ^ (p / 2) = |x| ^ p := by
  rw [Real.rpow_div_two_eq_sqrt p (sq_nonneg x), Real.sqrt_sq_eq_abs]

/-- The power potential is an even function expressed through a nonnegative
square. -/
theorem powerPotential_eq_sq_rpow_div_two (p x : ℝ) :
    powerPotential p x = (x ^ 2) ^ (p / 2) / p := by
  rw [powerPotential, sq_rpow_div_two]













/-- The power potential is homogeneous under positive scalar multiplication. -/
theorem powerPotential_mul_of_pos (p x : ℝ) {c : ℝ} (hc : 0 < c) :
    powerPotential p (c * x) = c ^ p * powerPotential p x := by
  simp only [powerPotential, abs_mul, abs_of_pos hc, Real.mul_rpow hc.le (abs_nonneg x)]
  ring













end HlawkaSchatten
Source
https://github.com/savarin/hlawka-schatten/blob/79aa498bfcf7b22bd91d771fb32ec278e2d4704b/HlawkaSchatten/ScalarBregman.lean#L26-L328
Human review
  • Endorsed by Shuze Chen · Sep 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by savarin · Sep 29, 2026

    Confirmed by the mission captain (proposal self-audit).

  • Endorsed by marwahaha · Sep 30, 2026

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me