Use this theorem
Create a project
lake +leanprover/lean4:v4.35.0 new myproject std.toml cd myprojectStandard template, not
math: themathtemplate adds its own Mathlib requirement pinned to the Lean release tag, not to the Mathlib commit this package is built and tested with, so you would get a second, different Mathlib. Mathlib comes in through this package. Skip this step in an existing project with the same Lean and Mathlib.Add the dependency to
lakefile.toml[[require]] name = "formalizations" git = "https://github.com/karlesmarin/formalizations" rev = "v0.15.0"Import the minimal module
import Formalizations.Reusable.AnalysisIn a file of the project, e.g.
Example.lean.Paste the example
open Formalizations.Reusable Real Set open MeasureTheory ProbabilityTheory in /-- Margolus–Levitin: the orthogonalization time is at least `π / (2 Ebar)` when `Ebar > 0`. -/ example {p E : ℕ → ℝ} {Ebar τ : ℝ} (hp : ∀ n, 0 ≤ p n) (hE : ∀ n, 0 ≤ E n) (hτ : 0 ≤ τ) (hsum : HasSum p 1) (hmean : HasSum (fun n => p n * E n) Ebar) (hRe : HasSum (fun n => p n * Real.cos (E n * τ)) 0) (hIm : HasSum (fun n => p n * Real.sin (E n * τ)) 0) (hpos : 0 < Ebar) : Real.pi / (2 * Ebar) ≤ τ := by have h := margolus_levitin hp hE hτ hsum hmean hRe hIm rw [div_le_iff₀ (by positivity)] linarithSteps 3 and 4 together are a complete Lean file:
FormalizationsTest/ReusableAnalysisExample.leanat v0.15.0, compiled by the CI.Fetch and check
lake update lake lean Example.leanlake updatefetches this package and Mathlib, and Mathlib's update hook downloads the compiled Mathlib (lake exe cache get).lake lean Example.leanbuilds the imports of the file (steps 3 and 4) and checks it. If the file belongs to alean_libof your project,lake build <lib>does the same. Avoid a barelake buildin a project from the standard template: its default target is the executable, whose link compiles every imported Mathlib module to native code. Same versions required: Leanv4.35.0, Mathlibf0b4c81.
Alternative: import Formalizations.Reusable imports the whole layer (all areas).
The Margolus–Levitin quantum speed limit (ℏ = 1): for a normalized population p over nonnegative energies E with mean Ebar, if the autocorrelation Σ pₙ e^(−i Eₙ τ) vanishes at τ ≥ 0, then π ≤ 2 · Ebar · τ.
Lean statement
theorem margolus_levitin {p E : ℕ → ℝ} {Ebar τ : ℝ} (hp : ∀ n, 0 ≤ p n) (hE : ∀ n, 0 ≤ E n)
(hτ : 0 ≤ τ) (hsum : HasSum p 1) (hmean : HasSum (fun n => p n * E n) Ebar)
(hRe : HasSum (fun n => p n * Real.cos (E n * τ)) 0)
(hIm : HasSum (fun n => p n * Real.sin (E n * τ)) 0) :
Real.pi ≤ 2 * Ebar * τLinks
Lean docstring
The Margolus–Levitin theorem (ℏ = 1). If a normalized population distribution p over nonnegative energies E has mean energy Ebar and its autocorrelation S(τ) = ∑ₙ pₙ e^(−i Eₙ τ) vanishes at a time τ ≥ 0 (real and imaginary parts given separately), then π ≤ 2 · Ebar · τ: a state needs at least π / (2 ⟨E⟩) to evolve into an orthogonal one.
- Archive:
QSL.margolus_levitin(Formalizations.Physics.QuantumMechanics.SpeedLimit.MargolusLevitin, through the cosine inequality1 − (2/π)(x + sin x) ≤ cos xforx ≥ 0); the module cites no paper DOI of ours. - Classical reference: N. Margolus, L. B. Levitin, The maximum speed of dynamical evolution, Physica D 120 (1998) 188–195.
- Example: the orthogonalization time is at least
π / (2 Ebar)whenEbar > 0.
Upstream
a theorem of quantum speed-limit theory, not a lemma of an existing Mathlib theory
Depends on, in this repository
None besides the archive module (repo_dependencies = []).