The quantum harmonic oscillator is the exactly solvable model that anchors much of quantum mechanics: it is the local approximation to any smooth potential near a stable equilibrium, and the building block of quantum field theory, where each field mode is an independent oscillator. Its Hamiltonian is invariant under spatial reflection, and this parity symmetry is what lets one classify the oscillator's eigenfunctions by even and odd parity. The present mission formalizes the elementary operator theory of the one-dimensional oscillator — the definition of its Schrödinger operator, the characteristic length that sets its scale, the operator's linearity, and its commutation with parity — as it appears in the Lean physics library Physlib, file QuantumMechanics/HarmonicOscillator/OneDimension/Basic.lean. These are standard textbook results; see for instance Griffiths, Introduction to Quantum Mechanics, 3rd ed., §2.3, or Shankar, Principles of Quantum Mechanics, 2nd ed., §7.3.
A one-dimensional harmonic oscillator is a triple of positive real parameters: the particle mass , the reduced Planck constant , and the angular frequency . In Lean this is the structure HarmonicOscillator1D.HarmonicOscillator, with fields m, ω, ℏ and positivity proofs. Its characteristic length is
written Q.ξ and defined with Real.sqrt. The Schrödinger operator acts on wavefunctions by
where is Mathlib's deriv (deriv ψ). The parity operator is the reflection , written parityOperator. All wavefunctions are complex-valued functions on the real line; no square-integrability or Schwartz-space restriction is imposed at this level.
The goal is the parity commutation, the structural headline of the file:
The milestones are the supporting operator calculus, ordered from the scale identities to the operator normal forms and linearity: positivity ; the identity ; the reciprocal and its square ; the decomposition of into kinetic and potential scalar multiples; the characteristic-length normal form ; and additivity and homogeneity on twice-differentiable wavefunctions.
These facts are the foundation on which the oscillator's spectrum and eigenfunctions are built: linearity makes an operator whose eigenspaces are meaningful, the characteristic-length normal form is the standard route to the Hermite-function eigenfunctions, and parity commutation is the reason eigenfunctions can be chosen of definite parity. The reusable output is a Mathlib-only account of the oscillator's operator calculus, independent of Physlib's development, that later missions (spectra, ladder operators, higher dimensions) can import.
Status. Every statement in this mission is already machine-checked in Physlib (the source file compiles against Physlib's Mathlib pin). The platform cannot import Physlib, so the remaining work is to re-prove these known results in the platform's Mathlib-only environment, against the definitions restated here. Nothing here is an open research question; the mission is a faithful port of established textbook theory.
The operator is built from Mathlib's total derivative deriv, which returns on non-differentiable input. Consequently additivity and homogeneity of are not unconditional: they require the wavefunctions and their derivatives to be differentiable, exactly as the source assumes. The naive move of dropping these hypotheses yields a false statement. Parity commutation, by contrast, needs no differentiability, because the reflection rule for deriv (deriv_comp_neg) holds unconditionally; conflating the two regimes is the main trap. The characteristic-length normal form requires dividing by and , so the positivity facts must be established first and fed to field simplification.
The development lives in the namespace HarmonicOscillator1D and targets the platform's default Mathlib environment. Two deliberate adaptations from the source are made for self-containment, both flagged for audit: (1) the source fixes to the physical constant Constants.ℏ, whereas here is a positive parameter of the oscillator, matching the source's own docstring ("specified by three real parameters "); every source theorem is recovered by instantiating to the physical value. (2) The source packages parity as a -linear map; here it is the underlying function , which is all the statements use. The trivial projection lemmas (, , etc.) are included as proved simp lemmas in the definition bundle; the purely preliminary Complex.ofReal derivative lemmas and the unused momentum/position notations of the source are omitted, as is ξ_inverse (a one-line rewrite of the reciprocal identity). Contributions that re-prove the milestones, extend the operator to a genuine unbounded operator on , or develop the spectrum are welcome.
namespace HarmonicOscillator1D
theorem schrodingerOperator_parity (Q : HarmonicOscillator) (ψ : ℝ → ℂ) :
Q.schrodingerOperator (parityOperator ψ) = parityOperator (Q.schrodingerOperator ψ) := by sorry
end HarmonicOscillator1DThe parity operator sends a wavefunction to its reflection, . This theorem states that the Schrödinger operator of the harmonic oscillator commutes with parity: for every ,
Physically, the harmonic-oscillator Hamiltonian is invariant under spatial reflection , because the potential is even and the second derivative is reflection-equivariant. This is the structural reason the oscillator's eigenfunctions can be chosen of definite parity.
Formalization Note. In Lean this is Q.schrodingerOperator (parityOperator ψ) = parityOperator (Q.schrodingerOperator ψ) with parityOperator ψ = fun x => ψ (-x). No differentiability hypothesis is needed: the proof uses the reflection rule for deriv, which holds unconditionally.
No open leaves. Every sub-goal is proved or awaiting decomposition.