Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Optimal control of the Hamiltonian: mvi=−∂J/∂pimv_i=-\partial J/\partial p_imvi​=−∂J/∂pi​

Proved
LindgrenPriceDynamics.hamiltonian_minimizer_iff

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

dynamic-programminggeneral-equilibriumhamilton-jacobi-bellmanlyapunov-stability

Let m>0m>0m>0, E∈RE\in\mathbb RE∈R and g∈Rlg\in\mathbb R^lg∈Rl (standing for the price gradient ∇J\nabla J∇J of the value function), and consider the Hamiltonian of eq. (8) as a function of the control v∈Rlv\in\mathbb R^lv∈Rl:

H(v)=12m⟨v,v⟩+E+⟨g,v⟩.H(v)=\tfrac12 m\langle v,v\rangle+E+\langle g,v\rangle .H(v)=21​m⟨v,v⟩+E+⟨g,v⟩.

Then vvv is a global minimizer of HHH if and only if

m vi=−gifor every commodity i.m\,v_i=-g_i\qquad\text{for every commodity } i .mvi​=−gi​for every commodity i.

This is the optimal price-adjustment policy (9): prices move along the negative gradient of the value function.

Preamble
import Mathlib
import Definitions.Def_LindgrenPriceDynamics
Formal statement
namespace LindgrenPriceDynamics

/-- Eq. (9): for `m > 0` the Hamiltonian (8) is minimized over the control `v`
exactly when `m v_i = -∂J/∂p_i` for every commodity `i`. -/
theorem hamiltonian_minimizer_iff {l : ℕ} (m : ℝ) (hm : 0 < m) (E : ℝ) (g v : Fin l → ℝ) :
    IsMinOn (hamiltonian m E g) Set.univ v ↔ ∀ i, m * v i = -g i := 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, 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 l∈Nl\in\mathbb Nl∈N, let mmm be a real number with m>0m>0m>0, let E∈RE\in\mathbb RE∈R, and let g,v∈Rlg,v\in\mathbb R^lg,v∈Rl be arbitrary. Define H(w)=12m∑iwi2+E+∑igiwiH(w)=\tfrac12 m\sum_i w_i^2+E+\sum_i g_iw_iH(w)=21​m∑i​wi2​+E+∑i​gi​wi​ for w∈Rlw\in\mathbb R^lw∈Rl. The statement asserts the equivalence: H(v)≤H(w)H(v)\le H(w)H(v)≤H(w) for all w∈Rlw\in\mathbb R^lw∈Rl (i.e. vvv is a global minimizer over the whole space) if and only if mvi=−gim v_i=-g_imvi​=−gi​ for every index iii. Edge case: for l=0l=0l=0 both sides are trivially true.

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