Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lema 3.2 — canonical commutation relations iℏ[Pj,Xj]=Id\frac{i}{\hbar}[P_j,X_j]=\mathrm{Id}ℏi​[Pj​,Xj​]=Id

Proved
LopesQM.canonical_commutation_relations

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

commutatorquantum-mechanics

Let ℏ>0\hbar>0ℏ>0 and j,k∈{1,…,n}j,k\in\{1,\dots,n\}j,k∈{1,…,n}, with XjX_jXj​ the position and Pj=−iℏ ∂/∂xjP_j=-i\hbar\,\partial/\partial x_jPj​=−iℏ∂/∂xj​ the momentum operators on functions ψ:Rn→C\psi:\mathbb R^n\to\mathbb Cψ:Rn→C. Then, pointwise at every x∈Rnx\in\mathbb R^nx∈Rn:

  1. [Xk,Xj]ψ=0[X_k,X_j]\psi=0[Xk​,Xj​]ψ=0 for every ψ\psiψ;
  2. [Pk,Pj]ψ=0[P_k,P_j]\psi=0[Pk​,Pj​]ψ=0 for every ψ\psiψ of class C2C^2C2;
  3. for every differentiable ψ\psiψ,
iℏ [Pj,Xj]ψ=ψ;\frac{i}{\hbar}\,[P_j,X_j]\psi=\psi;ℏi​[Pj​,Xj​]ψ=ψ;
  1. if j≠kj\ne kj=k, then iℏ[Pj,Xk]ψ=0\frac{i}{\hbar}[P_j,X_k]\psi=0ℏi​[Pj​,Xk​]ψ=0 for every differentiable ψ\psiψ.

These are the canonical commutation relations, the quantum counterpart of the Poisson brackets {xk,pj}=δkj\{x_k,p_j\}=\delta_{kj}{xk​,pj​}=δkj​; relation 3 is the identity that drives the proof of Heisenberg's uncertainty principle.

Formalization Note The book states the relations as operator identities and remarks that domain questions are glossed over; here each relation is stated pointwise for the smoothness class used in its proof (C2C^2C2 for relation 2, differentiability for 3 and 4).

Preamble
import Mathlib
import Definitions.Def_LopesQM_Defs
open MeasureTheory
Formal statement
namespace LopesQM
theorem canonical_commutation_relations {n : ℕ} (hbar : ℝ) (hhbar : 0 < hbar) (j k : Fin n) :
    (∀ ψ : WaveFn n, ∀ x : Rn n,
        commutator (positionOp k) (positionOp j) ψ x = 0) ∧
    (∀ ψ : WaveFn n, ContDiff ℝ 2 ψ → ∀ x : Rn n,
        commutator (momentumOp hbar k) (momentumOp hbar j) ψ x = 0) ∧
    (∀ ψ : WaveFn n, Differentiable ℝ ψ → ∀ x : Rn n,
        Complex.I / (hbar : ℂ) * commutator (momentumOp hbar j) (positionOp j) ψ x = ψ x) ∧
    (j ≠ k → ∀ ψ : WaveFn n, Differentiable ℝ ψ → ∀ x : Rn n,
        Complex.I / (hbar : ℂ) * commutator (momentumOp hbar j) (positionOp k) ψ x = 0) := by sorry
end LopesQM
Source
A. O. Lopes, "Uma Breve Introdução à Matemática da Mecânica Quântica", 31º Colóquio Brasileiro de Matemática, IMPA, 2017 (http://mat.ufrgs.br/~alopes/hom/livroquantum.pdf is the extended version); Lema 3.2, p. 65 (commutator: Definição 3.1, p. 64).
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic)

NON-BLIND READ-BACK — not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement it describes, with full knowledge of the source text and of the intended meaning, at the explicit request of the account owner. It is therefore not a blind audit and must not be mistaken for independent testimony; reviewers should read the Lean code themselves and, ideally, obtain an independent blind read-back before relying on it.

Fix a natural number nnn, a real number ℏ\hbarℏ with ℏ>0\hbar>0ℏ>0, and two indices j,k∈{0,…,n−1}j,k\in\{0,\dots,n-1\}j,k∈{0,…,n−1} (so the statement is vacuous when n=0n=0n=0, there being no indices). With XjX_jXj​, Pj=PjℏP_j=P_j^{\hbar}Pj​=Pjℏ​ and the commutator [A,B]ψ=A(Bψ)−B(Aψ)[A,B]\psi=A(B\psi)-B(A\psi)[A,B]ψ=A(Bψ)−B(Aψ) as in the definition file, the statement asserts the conjunction of four claims:

  1. For every function ψ:Rn→C\psi:\mathbb R^n\to\mathbb Cψ:Rn→C (no regularity) and every x∈Rnx\in\mathbb R^nx∈Rn: ([Xk,Xj]ψ)(x)=0([X_k,X_j]\psi)(x)=0([Xk​,Xj​]ψ)(x)=0.
  2. For every ψ\psiψ that is C2C^2C2 (twice continuously real-differentiable) and every xxx: ([Pk,Pj]ψ)(x)=0([P_k,P_j]\psi)(x)=0([Pk​,Pj​]ψ)(x)=0.
  3. For every ψ\psiψ that is real-differentiable at every point and every xxx:
iℏ ([Pj,Xj]ψ)(x)=ψ(x).\frac{i}{\hbar}\,\big([P_j,X_j]\psi\big)(x)=\psi(x).ℏi​([Pj​,Xj​]ψ)(x)=ψ(x).
  1. If j≠kj\neq kj=k, then for every everywhere-differentiable ψ\psiψ and every xxx: iℏ([Pj,Xk]ψ)(x)=0\frac{i}{\hbar}\big([P_j,X_k]\psi\big)(x)=0ℏi​([Pj​,Xk​]ψ)(x)=0.

The claims are pointwise equalities of complex numbers at every point; no integrability or square-integrability is assumed or asserted. The case j=kj=kj=k is allowed in claims 1 and 2 (where they reduce to [Xj,Xj]=0[X_j,X_j]=0[Xj​,Xj​]=0 and [Pj,Pj]=0[P_j,P_j]=0[Pj​,Pj​]=0). The hypothesis ℏ>0\hbar>0ℏ>0 is imposed for all four claims, although only claims 3–4 involve division by ℏ\hbarℏ.

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

    Confirmed by the moderator at approval.

  • Endorsed by LG · Sep 26, 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