Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit Hamilton–Jacobi–Bellman equation: ∂tJ=12m∣∇J∣2−λjej\partial_tJ=\frac1{2m}|\nabla J|^2-\lambda^je_j∂t​J=2m1​∣∇J∣2−λjej​

Proved
LindgrenPriceDynamics.hjb_explicit_form

by LG · Sep 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

dynamic-programminggeneral-equilibriumhamilton-jacobi-bellmanlyapunov-stability

Let m>0m>0m>0, weights λ1,…,λn\lambda_1,\dots,\lambda_nλ1​,…,λn​, expenditure functions e1,…,en:Rl→Re_1,\dots,e_n:\mathbb R^l\to\mathbb Re1​,…,en​:Rl→R, and J(t,p)J(t,p)J(t,p) a function of time and prices. Suppose JJJ satisfies the Hamilton–Jacobi–Bellman equation in its minimization form, with the Hamiltonian (8):

−∂J∂t(t,p)=inf⁡v∈Rl(12m⟨v,v⟩+λjej(p)+⟨∇J(t,p),v⟩)for all t,p.-\frac{\partial J}{\partial t}(t,p)=\inf_{v\in\mathbb R^l}\Big(\tfrac12 m\langle v,v\rangle+\lambda^je_j(p)+\langle\nabla J(t,p),v\rangle\Big)\quad\text{for all }t,p .−∂t∂J​(t,p)=v∈Rlinf​(21​m⟨v,v⟩+λjej​(p)+⟨∇J(t,p),v⟩)for all t,p.

Then for all t,pt,pt,p,

∂J∂t(t,p)=12m ⟨∇J(t,p),∇J(t,p)⟩−∑j=1nλjej(p).\frac{\partial J}{\partial t}(t,p)=\frac1{2m}\,\langle\nabla J(t,p),\nabla J(t,p)\rangle-\sum_{j=1}^n\lambda_je_j(p).∂t∂J​(t,p)=2m1​⟨∇J(t,p),∇J(t,p)⟩−j=1∑n​λj​ej​(p).

This is eq. (10), the PDE for the value function of the price-adjustment problem.

Formalization Note The HJB equation itself is taken as a hypothesis, as in the paper; the value function is not defined from the cost functional.

Preamble
import Mathlib
import Definitions.Def_LindgrenPriceDynamics
Formal statement
namespace LindgrenPriceDynamics

/-- Eq. (10): if `J` satisfies the Hamilton–Jacobi–Bellman equation
`-∂J/∂t = min_v H` with the Hamiltonian (8), then
`∂J/∂t = (1/2m) ∇^i J ∇_i J - λ^j e_j`. -/
theorem hjb_explicit_form {n l : ℕ} (m : ℝ) (hm : 0 < m) (lam : Fin n → ℝ)
    (e : Fin n → (Fin l → ℝ) → ℝ) (J : ℝ → (Fin l → ℝ) → ℝ)
    (hHJB : ∀ t p, -timePartial J t p =
      ⨅ v : Fin l → ℝ, hamiltonian m (aggregateExpenditure lam e p) (priceGrad (J t) p) v) :
    ∀ t p, timePartial J t p =
      dot (priceGrad (J t) p) (priceGrad (J t) p) / (2 * m) - aggregateExpenditure lam e p := by
  sorry

end LindgrenPriceDynamics
Source
J. Lindgren, General Equilibrium with Price Adjustments — A Dynamic Programming Approach, Analytics 2022, 1, 27–34, https://doi.org/10.3390/analytics1010003, p. 30, eq. (10) (with eqs. (8)–(9))
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — non-blind, same agent as drafter

Non-blind read-back. This read-back was written by the same agent that drafted the Lean statements (Aristotle, by Harmonic), with full knowledge of the source paper and of the intended meaning. It is not blind, independent testimony and must not be treated as an independent audit; an independent blind read-back is still recommended before submission.

Let n,l∈Nn,l\in\mathbb Nn,l∈N, m∈Rm\in\mathbb Rm∈R with m>0m>0m>0, arbitrary real weights λ1,…,λn\lambda_1,\dots,\lambda_nλ1​,…,λn​, arbitrary functions ej:Rl→Re_j:\mathbb R^l\to\mathbb Rej​:Rl→R, and an arbitrary function J:R×Rl→RJ:\mathbb R\times\mathbb R^l\to\mathbb RJ:R×Rl→R (no regularity assumed). Write E(p)=∑jλjej(p)E(p)=\sum_j\lambda_je_j(p)E(p)=∑j​λj​ej​(p), g(t,p)=∇pJ(t,p)g(t,p)=\nabla_pJ(t,p)g(t,p)=∇p​J(t,p) (vector of price partial derivatives, each defined as 000 where J(t,⋅)J(t,\cdot)J(t,⋅) is not differentiable) and ∂tJ(t,p)\partial_tJ(t,p)∂t​J(t,p) for the derivative of τ↦J(τ,p)\tau\mapsto J(\tau,p)τ↦J(τ,p) at ttt (defined as 000 if it does not exist).

Hypothesis: for all t∈Rt\in\mathbb Rt∈R, p∈Rlp\in\mathbb R^lp∈Rl,

−∂tJ(t,p)=inf⁡v∈Rl(12m∑ivi2+E(p)+∑igi(t,p)vi),-\partial_tJ(t,p)=\inf_{v\in\mathbb R^l}\Big(\tfrac12 m\sum_iv_i^2+E(p)+\sum_ig_i(t,p)v_i\Big),−∂t​J(t,p)=v∈Rlinf​(21​mi∑​vi2​+E(p)+i∑​gi​(t,p)vi​),

where the infimum is the real-valued infimum (Lean's iInf on R\mathbb RR; the set of values is bounded below here because m>0m>0m>0).

Conclusion: for all t,pt,pt,p,

∂tJ(t,p)=12m∑igi(t,p)2−E(p).\partial_tJ(t,p)=\frac{1}{2m}\sum_ig_i(t,p)^2-E(p).∂t​J(t,p)=2m1​i∑​gi​(t,p)2−E(p).

Edge case: l=0l=0l=0 gives ∂tJ=−E\partial_tJ=-E∂t​J=−E in both hypothesis and conclusion.

Human review
  • Endorsed by Shuze Chen · Sep 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 30, 2026

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

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