auto-task(positionOperatorSchwartz): fix doc-string mislabeling it the parity operator#1362
Conversation
…e parity operator Co-authored-by: Claude <noreply@anthropic.com>
|
Thank you for this PR, which will now be reviewed. If submitting to ./Physlib or ./QuantumInfo, please see our review guidelines if you are not familiar with the process. You should expect a back and forth with a reviewer before your PR is merged. See also that link for how to add appropriate labels to your PR. The PR will also go through a number of automated checks. You can learn more about these here, including how to run them locally. If you are submitting to ./PhyslibAlpha there will be a lighter review process, though your PR must still pass the automated checks. If you want to bring attention to this PR, please write a message on this thread of the Lean Zulip. Important: If a reviewer adds an |
Summary
Fixed one factually incorrect doc-string in
Physlib/QuantumMechanics/OneDimension/Operators/Position.lean.Location:
Physlib/QuantumMechanics/OneDimension/Operators/Position.lean:62Before → After:
/-- The parity operator on the Schwartz maps is defined as the linear map from𝓢(ℝ, ℂ)to itself, such thatψis taken tofun x => x * ψ x. -//-- The position operator on the Schwartz maps is defined as the linear map from𝓢(ℝ, ℂ)to itself, such thatψis taken tofun x => x * ψ x. -/Evidence the original was wrong
The doc-string documents
positionOperatorSchwartz(Position.lean:64),
which is
Distribution.powOneMul ℂ— the mapψ ↦ fun x => x * ψ x(confirmed by thepositionOperatorSchwartz_applysimp lemma). Multiplication by the coordinatexis theposition operator, and the enclosing section header (Position.lean:54) reads
"## The position operator on Schwartz maps".
The genuine parity operator is a different declaration,
parityOperatorSchwartz(Parity.lean:52-53),
which maps
ψ ↦ fun x => ψ (-x)— notx * ψ x. The old wording was a copy-paste of thatdoc-string, mislabeling the position operator as the "parity operator".
How to confirm in one step
Compare the doc-string at Position.lean:62 against the declaration name
positionOperatorSchwartzand its bodyDistribution.powOneMul ℂ(→x * ψ x) two lines below:the map is multiplication by
x(position), notψ(-x)(parity), so "position operator" is thecorrect label.
Only the one word
parity → positionwas changed; no code was touched.lake buildof themodule succeeds, and
./scripts/lint-style.shandlake exe runPhyslibLintersboth pass.