Skip to content

feat(QuantumMechanics): add algebraic properties for mulOperator#1448

Merged
jstoobysmith merged 6 commits into
leanprover-community:masterfrom
gloges:mulOp-algebraic
Jul 21, 2026
Merged

feat(QuantumMechanics): add algebraic properties for mulOperator#1448
jstoobysmith merged 6 commits into
leanprover-community:masterfrom
gloges:mulOp-algebraic

Conversation

@gloges

@gloges gloges commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

Adds some basic results about multiplication operators and smul/neg/add/sub:

  • c • 𝓜 μ f ≤ 𝓜 μ (c • f) with equality when c ≠ 0,
  • 𝓜 μ (-f) = -𝓜 μ f,
  • 𝓜 μ f + 𝓜 μ g ≤ 𝓜 μ (f + g) (and a sub variant).

@github-actions

Copy link
Copy Markdown
Contributor

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 awaiting-author label to your PR, once you have addressed the review comments, please remove that label by adding a comment with -awaiting-author. This helps us keep track of reviews.

@github-actions github-actions Bot added the t-quantum-mechanics Quantum mechanics label Jul 20, 2026
@nateabr

nateabr commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

This looks good to me. One comment is that it would be good to have more documentation than is available at the moment. Some doc strings for key lemmas, and a general elaboration on "why" behind the code would be great for readability and would improve the file greatly.

@gloges

gloges commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks, I'll aim to improve the documentation for this and other QM files in the near future.

@nateabr

nateabr commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Okayy sounds good, just one more question:

For smul and composition, the PR (and existing code) follow a nice proof pattern. However, for add, we only get the inequality 𝓜 f + 𝓜 g ≤ 𝓜 (f + g). Would it be worth adding something like mulOperator_add_eq for the case where both domains are ⊤? Maybe a todo?

@nateabr

nateabr commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

awaiting-author

@github-actions github-actions Bot added the awaiting-author A reviewer has asked the author a question or requested changes label Jul 21, 2026
@gloges

gloges commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator Author

That's a good point. The condition c ≠ 0 is particularly simple for mulOperator_smul_eq but for add/sub it seems much messier. I've added mulOperator_add_eq (and a sub variant) which uses the hypothesis h : (𝓜 μ g).domain = ⊤ and a TODO to expand on this; I'm not sure at this point what conditions would be most useful to pin down.

@gloges gloges removed the awaiting-author A reviewer has asked the author a question or requested changes label Jul 21, 2026
@nateabr

nateabr commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Okayy looks good to me, will tag as reviewer approved :)

@jstoobysmith jstoobysmith added ready-to-merge This PR is approved and will be merged shortly and removed reviewer-approved labels Jul 21, 2026
@jstoobysmith
jstoobysmith merged commit f737b30 into leanprover-community:master Jul 21, 2026
6 checks passed
@gloges
gloges deleted the mulOp-algebraic branch July 22, 2026 00:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge This PR is approved and will be merged shortly t-quantum-mechanics Quantum mechanics

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants