-
Notifications
You must be signed in to change notification settings - Fork 106
feat(QuantumMechanics): add Canonical commutation on the Schwartz submodule #1096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
or4nge19
wants to merge
26
commits into
leanprover-community:master
Choose a base branch
from
or4nge19:Uncertainty-SchwartzCCR
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
1424548
definitions
gloges c6ecab2
dense domain
gloges a70b940
closability
gloges 51887ab
adjoints
gloges 17a0990
symmetric
gloges fc4f9eb
self-adjoint
gloges 13ab904
ess. self-adjoint
gloges 530b3b1
unbounded
gloges 6495a91
toc + refs
gloges 0884721
mul operator
gloges 25d8ba4
mul docs
gloges dce1e06
feat(QuantumMechanics): State observables
or4nge19 cbfe314
feat(QuantumMechanics): Uncertainty bounds for partial linear maps
or4nge19 96f5836
feat(QuantumMechanics): add Canonical commutation on the Schwartz sub…
or4nge19 620679b
Merge branch 'leanprover-community:master' into Uncertainty-SchwartzCCR
or4nge19 b140df8
fix lints + minor improvements
or4nge19 25ec540
fix lints
or4nge19 57d19c3
Merge upstream/master into Uncertainty-SchwartzCCR (post #1090)
or4nge19 fa38926
Update Uncertainty.lean
or4nge19 dca2c0e
Update CanonicalCommutation.lean
or4nge19 5ae5d49
fix after revisions to dependency PRs
or4nge19 a80796f
Merge branch 'master' into Uncertainty-SchwartzCCR
or4nge19 9b621ec
(CanonicalCommutation, Uncertainty): refactor + golf and idiomatic ph…
or4nge19 49800e1
Merge branch 'leanprover-community:master' into Uncertainty-SchwartzCCR
or4nge19 ce47e8c
address review
or4nge19 720d75c
Update Position.lean
or4nge19 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
190 changes: 190 additions & 0 deletions
190
Physlib/QuantumMechanics/DDimensions/Operators/CanonicalCommutation.lean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,190 @@ | ||
| /- | ||
| Copyright (c) 2026 Axiomatic-AI. All rights reserved. | ||
| Released under Apache 2.0 license as described in the file LICENSE. | ||
| Authors: Matteo Cipollina, Austin Letson | ||
| -/ | ||
| module | ||
|
|
||
| public import Physlib.QuantumMechanics.DDimensions.Operators.Commutation | ||
| public import Physlib.QuantumMechanics.DDimensions.Operators.Momentum | ||
| public import Physlib.QuantumMechanics.DDimensions.Operators.Position | ||
| public import Physlib.QuantumMechanics.DDimensions.Operators.Uncertainty | ||
| /-! | ||
|
|
||
| # Canonical commutation on the Schwartz submodule | ||
|
|
||
| ## i. Overview | ||
|
|
||
| In this module we transport the Schwartz canonical commutation relation to | ||
| `schwartzPositionOperator` and `momentumOperator` (`𝓟`) on `schwartzSubmodule d`, and derive the | ||
| same-coordinate uncertainty lower bounds for normalized states. | ||
|
|
||
| The operators are defined in `Position` and `Momentum`. The abstract inequalities are proved in | ||
| `Uncertainty` and applied here via `LinearPMap.state_uncertainty_*_of_raw_commutator`. | ||
|
|
||
| ## ii. Key results | ||
|
|
||
| - `schwartzPositionOperator_commutator_momentumOperator` : the transported CCR on | ||
| `SpaceDHilbertSpace d` as an equality of partial linear maps. | ||
| - `inner_schwartzPositionOperator_commutator_momentumOperator_same` : the same-coordinate | ||
| commutator expectation for `‖ψ‖ = 1`. | ||
| - `position_momentum_same_coordinate_uncertainty_squared` : the squared Robertson bound. | ||
| - `position_momentum_same_coordinate_uncertainty_squared_with_covariance` : the | ||
| Robertson–Schrödinger bound. | ||
| - `position_momentum_same_coordinate_uncertainty` : the standard-deviation form. | ||
|
|
||
| ## iii. Table of contents | ||
|
|
||
| - A. Schwartz canonical commutation | ||
| - B. Same-coordinate uncertainty bounds | ||
|
|
||
| ## iv. References | ||
|
|
||
| - [B. C. Hall, *Quantum Theory for Mathematicians*, Chapter 12][hall2013quantum]. | ||
|
|
||
| -/ | ||
|
|
||
| @[expose] public section | ||
|
|
||
| namespace QuantumMechanics | ||
|
|
||
| open Bracket Complex Constants | ||
| open KroneckerDelta | ||
| open SpaceDHilbertSpace | ||
| open SchwartzSubmodule | ||
| open SchwartzMap | ||
| open InnerProductSpace | ||
| open LinearPMap | ||
| open ContinuousLinearMap | ||
|
|
||
| noncomputable section | ||
|
|
||
| variable {d : ℕ} | ||
|
|
||
| /-! | ||
|
|
||
| ## A. Schwartz canonical commutation | ||
|
|
||
| -/ | ||
|
|
||
| /-- The momentum operator preserves the domain of the Schwartz-domain position operator. -/ | ||
| lemma momentumOperator_mem_schwartzPositionOperator_domain | ||
| (i j : Fin d) (ψ : (momentumOperator j).domain) : | ||
| (momentumOperator j ψ : SpaceDHilbertSpace d) ∈ (schwartzPositionOperator i).domain := by | ||
| rw [schwartzPositionOperator_domain] | ||
| exact momentumOperator_range j ψ | ||
|
|
||
| /-- The Schwartz-domain position operator preserves the domain of the momentum operator. -/ | ||
| lemma schwartzPositionOperator_mem_momentumOperator_domain | ||
| (i j : Fin d) (ψ : (schwartzPositionOperator i).domain) : | ||
| (schwartzPositionOperator i ψ : SpaceDHilbertSpace d) ∈ (momentumOperator j).domain := by | ||
| change (schwartzPositionOperator i ψ : SpaceDHilbertSpace d) ∈ schwartzSubmodule d | ||
| have hψ : (ψ : SpaceDHilbertSpace d) ∈ schwartzSubmodule d := by | ||
| rw [← schwartzPositionOperator_domain] | ||
| exact ψ.2 | ||
| exact schwartzPositionOperator_range i ⟨ψ, hψ⟩ | ||
|
|
||
| /-- Pointwise form of the canonical commutation relation on the Schwartz domain. -/ | ||
| lemma schwartzPositionOperator_commutator_momentumOperator_apply (i j : Fin d) | ||
| (ψ : schwartzSubmodule d) : | ||
| schwartzPositionOperator i (⟨(momentumOperator j ψ : SpaceDHilbertSpace d), | ||
| momentumOperator_range j ψ⟩ : schwartzSubmodule d) - | ||
| momentumOperator j | ||
| ⟨(schwartzPositionOperator i ψ : SpaceDHilbertSpace d), | ||
| schwartzPositionOperator_range i ψ⟩ = | ||
| (I * ℏ) • δ[i,j] • (ψ : SpaceDHilbertSpace d) := by | ||
| have hψ := congrArg | ||
| (fun F : 𝓢(Space d, ℂ) →L[ℂ] 𝓢(Space d, ℂ) => F (schwartzEquiv.symm ψ)) | ||
| (position_commutation_momentum i j) | ||
| simpa [schwartzPositionOperator_apply, momentumOperator_apply, schwartzEquiv.apply_symm_apply, | ||
| Bracket.bracket, ContinuousLinearMap.sub_apply, ContinuousLinearMap.smul_apply, | ||
| ContinuousLinearMap.id_apply, Submodule.coe_smul, Submodule.coe_sub] using | ||
| congrArg Subtype.val (congrArg schwartzEquiv hψ) | ||
|
|
||
| /-- The canonical commutation relation for `schwartzPositionOperator` and `momentumOperator` as an | ||
| equality of partial linear maps on the Schwartz domain. -/ | ||
| lemma schwartzPositionOperator_commutator_momentumOperator (i j : Fin d) : | ||
| (schwartzPositionOperator i).comp (momentumOperator j) | ||
| (momentumOperator_mem_schwartzPositionOperator_domain i j) - | ||
| (momentumOperator j).comp (schwartzPositionOperator i) | ||
| (schwartzPositionOperator_mem_momentumOperator_domain i j) = | ||
| (I * ℏ * (δ[i,j] : ℂ)) • | ||
| (LinearMap.id.toPMap (schwartzSubmodule d) : | ||
| SpaceDHilbertSpace d →ₗ.[ℂ] SpaceDHilbertSpace d) := by | ||
| apply LinearPMap.ext | ||
| · rw [LinearPMap.sub_domain, LinearPMap.smul_domain] | ||
| simp [momentumOperator, schwartzPositionOperator_domain] | ||
| · intro x hx hy | ||
| rw [LinearPMap.sub_domain] at hx | ||
| have hxS : x ∈ schwartzSubmodule d := by | ||
| simpa [momentumOperator] using hx.1 | ||
| let ψ : schwartzSubmodule d := ⟨x, hxS⟩ | ||
| have hpoint := schwartzPositionOperator_commutator_momentumOperator_apply i j ψ | ||
| simp [ψ, LinearPMap.sub_apply] at hpoint ⊢ | ||
| rw [← Nat.cast_smul_eq_nsmul ℂ δ[i,j] (x : SpaceDHilbertSpace d), smul_smul] at hpoint | ||
| simpa [mul_assoc] using hpoint | ||
|
|
||
| /-- Expectation-level form of the same-coordinate canonical commutation relation. -/ | ||
| lemma inner_schwartzPositionOperator_commutator_momentumOperator_same | ||
| (i : Fin d) (ψ : schwartzSubmodule d) (hψ_norm : ‖(ψ : SpaceDHilbertSpace d)‖ = 1) : | ||
| ⟪(ψ : SpaceDHilbertSpace d), (schwartzPositionOperator i | ||
| (⟨(momentumOperator i ψ : SpaceDHilbertSpace d), | ||
| momentumOperator_range i ψ⟩ : schwartzSubmodule d) - | ||
| momentumOperator i | ||
| ⟨(schwartzPositionOperator i ψ : SpaceDHilbertSpace d), | ||
| schwartzPositionOperator_range i ψ⟩)⟫_ℂ = | ||
| I * ℏ := by | ||
| rw [schwartzPositionOperator_commutator_momentumOperator_apply i i ψ] | ||
| simp only [KroneckerDelta.eq_one_of_same, one_smul] | ||
| rw [inner_smul_right, inner_self_eq_norm_sq_to_K, hψ_norm, sq] | ||
| simp | ||
|
|
||
| /-! | ||
|
|
||
| ## B. Same-coordinate uncertainty bounds | ||
|
|
||
| -/ | ||
|
|
||
| /-- The same-coordinate position and momentum variances satisfy the squared Heisenberg lower bound | ||
| on normalized Schwartz-domain states. -/ | ||
| lemma position_momentum_same_coordinate_uncertainty_squared | ||
| (i : Fin d) (ψ : schwartzSubmodule d) (hψ_norm : ‖(ψ : SpaceDHilbertSpace d)‖ = 1) : | ||
| (ℏ / 2) ^ 2 ≤ variance (schwartzPositionOperator i) ψ * | ||
| variance (momentumOperator i) ⟨ψ, ψ.2⟩ := by | ||
| have hbound := | ||
| state_uncertainty_squared_of_raw_commutator (schwartzPositionOperator i) (momentumOperator i) | ||
| (schwartzPositionOperator_isSymmetric i) (momentumOperator_isSymmetric i) ψ ψ.2 hψ_norm | ||
| (schwartzPositionOperator_range i ψ) | ||
| (momentumOperator_mem_schwartzPositionOperator_domain i i ψ) (c := ℏ) | ||
| (inner_schwartzPositionOperator_commutator_momentumOperator_same i ψ hψ_norm) | ||
| simpa only [abs_of_nonneg ℏ_nonneg] using hbound | ||
|
|
||
| /-- The same-coordinate Robertson–Schrödinger lower bound on normalized Schwartz-domain states. -/ | ||
| lemma position_momentum_same_coordinate_uncertainty_squared_with_covariance | ||
| (i : Fin d) (ψ : schwartzSubmodule d) (hψ_norm : ‖(ψ : SpaceDHilbertSpace d)‖ = 1) : | ||
| (stateCovariance (schwartzPositionOperator i) (momentumOperator i) ψ ψ.2) ^ 2 + | ||
| (ℏ / 2) ^ 2 ≤ | ||
| variance (schwartzPositionOperator i) ψ * | ||
| variance (momentumOperator i) ⟨ψ, ψ.2⟩ := by | ||
| exact state_uncertainty_squared_with_covariance_of_raw_commutator (schwartzPositionOperator i) | ||
| (momentumOperator i) (schwartzPositionOperator_isSymmetric i) | ||
| (momentumOperator_isSymmetric i) ψ ψ.2 hψ_norm (schwartzPositionOperator_range i ψ) | ||
| (momentumOperator_mem_schwartzPositionOperator_domain i i ψ) (c := ℏ) | ||
| (inner_schwartzPositionOperator_commutator_momentumOperator_same i ψ hψ_norm) | ||
|
|
||
| /-- The same-coordinate position and momentum standard deviations satisfy the Heisenberg lower | ||
| bound on normalized Schwartz-domain states. -/ | ||
| lemma position_momentum_same_coordinate_uncertainty | ||
| (i : Fin d) (ψ : schwartzSubmodule d) (hψ_norm : ‖(ψ : SpaceDHilbertSpace d)‖ = 1) : | ||
| ℏ / 2 ≤ standardDeviation (schwartzPositionOperator i) ψ * | ||
| standardDeviation (momentumOperator i) ⟨ψ, ψ.2⟩ := by | ||
| have hbound := | ||
| state_uncertainty_of_raw_commutator (schwartzPositionOperator i) (momentumOperator i) | ||
| (schwartzPositionOperator_isSymmetric i) (momentumOperator_isSymmetric i) ψ ψ.2 hψ_norm | ||
| (schwartzPositionOperator_range i ψ) | ||
| (momentumOperator_mem_schwartzPositionOperator_domain i i ψ) (c := ℏ) | ||
| (inner_schwartzPositionOperator_commutator_momentumOperator_same i ψ hψ_norm) | ||
| simpa only [abs_of_nonneg ℏ_nonneg] using hbound | ||
|
|
||
| end | ||
| end QuantumMechanics | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same