Model of the one-dimensional infinite potential well
DefinitionSchrodingerEquation_infinite_well_modelThis file fixes the model for a particle of mass in a one-dimensional infinite potential well of width , with reduced Planck constant .
Stationary states. For real parameters and a function , the predicate IsStationaryState holds when all of the following are true:
- is continuous on the closed interval ;
- is differentiable at every point of the open interval , and its derivative is again differentiable at every point of ;
- the time-independent Schrödinger equation with vanishing potential holds inside the box,
where the real coefficient is coerced into ;
- the wave function vanishes at the two walls: and .
Nothing is required of outside : the infinite walls make the wave function vanish there, and no statement in this mission refers to those values.
Energy levels. energyLevel is the real number
defined for all natural (including , where it equals ).
Eigenfunctions. eigenfunction is the unnormalized standing wave
regarded as a complex-valued function of the real variable .
import Mathlib
namespace SchrodingerEquation
/-- `IsStationaryState hbar m L E psi` says that the complex-valued function `psi` is a
stationary state of energy `E` for a particle of mass `m` in the one-dimensional infinite
potential well of width `L`: inside the box the potential vanishes, so `psi` solves the
time-independent Schrödinger equation `-(hbar^2 / (2 * m)) * psi'' = E * psi` on the open
interval `(0, L)`; `psi` is continuous up to the walls and vanishes at both walls. -/
def IsStationaryState (hbar m L E : ℝ) (psi : ℝ → ℂ) : Prop :=
ContinuousOn psi (Set.Icc 0 L) ∧
(∀ x ∈ Set.Ioo 0 L, DifferentiableAt ℝ psi x) ∧
(∀ x ∈ Set.Ioo 0 L, DifferentiableAt ℝ (deriv psi) x) ∧
(∀ x ∈ Set.Ioo 0 L,
((-(hbar ^ 2 / (2 * m)) : ℝ) : ℂ) * deriv (deriv psi) x = (E : ℂ) * psi x) ∧
psi 0 = 0 ∧ psi L = 0
/-- The `n`-th energy level of the one-dimensional infinite potential well of width `L`:
`energyLevel hbar m L n = n ^ 2 * π ^ 2 * hbar ^ 2 / (2 * m * L ^ 2)`. -/
noncomputable def energyLevel (hbar m L : ℝ) (n : ℕ) : ℝ :=
(n : ℝ) ^ 2 * Real.pi ^ 2 * hbar ^ 2 / (2 * m * L ^ 2)
/-- The unnormalized `n`-th eigenfunction of the one-dimensional infinite potential well of
width `L`: `x ↦ sin (n * π * x / L)`, regarded as a complex-valued function of a real
variable. -/
noncomputable def eigenfunction (L : ℝ) (n : ℕ) : ℝ → ℂ :=
fun x => (Real.sin ((n : ℝ) * Real.pi * x / L) : ℂ)
end SchrodingerEquation
Read-back
What the Lean code literally says, in plain math · non-blind self-read-back by the drafting agent (Aristotle, Harmonic)
Disclosure — this read-back is NOT independent testimony. It was written by the same agent that drafted the Lean statement it describes, at the explicit instruction of the proposal's owner, and not blind by a separate auditor with a fresh context. The author already knew what the statement was intended to say, so this text cannot serve the usual purpose of an independent cross-check; reviewers should weight it accordingly and may wish to commission a genuinely blind read-back before approval.
This bundle introduces three declarations, all parameterized by real numbers, with wave functions modelled as functions from the reals to the complex numbers.
1. A predicate IsStationaryState of four real parameters and a function . It is the conjunction of six conditions:
- is continuous on the closed interval (as a set of real numbers; if this set is empty and the condition is vacuous);
- for every real with , is differentiable at ;
- for every real with , the function — the pointwise derivative function of , which is defined at every real number and takes the junk value wherever fails to be differentiable — is differentiable at ;
- for every real with ,
an equation between complex numbers, where the real scalar and the real scalar are embedded into , and denotes the derivative function of the derivative function of . Note that if the coefficient is by the convention that division by zero yields zero, and the condition degenerates to ;
- ;
- .
No condition constrains at real arguments outside , and none of , , , is required to be positive, non-zero, or otherwise restricted here. If the open interval is empty, so all four interval conditions hold vacuously and the predicate reduces to continuity on a degenerate set together with .
2. A real-valued quantity energyLevel of three real parameters and a natural number , defined by the formula
with cast from a natural number to a real number and the usual circle constant. It is defined for every natural , including , where its value is ; if or the denominator vanishes and the value is by the division-by-zero convention.
3. A complex-valued function eigenfunction of a real parameter and a natural number , namely the function sending a real to the complex number whose real part is and whose imaginary part is zero. Again may be (giving the constant function ), and if the argument of the sine is for every by the division-by-zero convention, so the function is identically .