Skip to content

feat: Stinespring dilation#1191

Merged
jstoobysmith merged 9 commits into
leanprover-community:masterfrom
bjoernkjoshanssen:master
Jun 18, 2026
Merged

feat: Stinespring dilation#1191
jstoobysmith merged 9 commits into
leanprover-community:masterfrom
bjoernkjoshanssen:master

Conversation

@bjoernkjoshanssen

Copy link
Copy Markdown
Contributor

Stinespring dilation theorem, finite-dimensional version.
One of the Top 100 Quantum Theorems from https://marcodavid.net/top100/

@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.

@jstoobysmith

Copy link
Copy Markdown
Member

This is my fault, but one of the linters for PhyslibAlpha is broken - meaning it is not properly checking whether or not the file is correctly imported into ./PhyslibAlpha.lean. I've prepared a fix at #1193. But in the meantime - please can add

public import  PhyslibAlpha.QuantumMechanics.StinespringDilation

to ./PhyslibAlpha.lean. This will end up triggering a bunch of other linters; primarily that a lot of your definitions don't have doc-strings.

@bjoernkjoshanssen

bjoernkjoshanssen commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

This is my fault, but one of the linters for PhyslibAlpha is broken - meaning it is not properly checking whether or not the file is correctly imported into ./PhyslibAlpha.lean. I've prepared a fix at #1193. But in the meantime - please can add

public import  PhyslibAlpha.QuantumMechanics.StinespringDilation

to ./PhyslibAlpha.lean. This will end up triggering a bunch of other linters; primarily that a lot of your definitions don't have doc-strings.

Sounds good, trying that! But I can't find a linter that picks up on the missing doc-strings, runPhyslibAlphaLinters has no comment about it.

@jstoobysmith

Copy link
Copy Markdown
Member

Ok, so what you have is technically not wrong, but your file here is missing a @[expose] public section. This means that every result in your file is 'private' and that your definitions don't need doc-strings. Adding:

@[expose] public section

underneath your module doc-string will result in these been picked up in your linters.

You can:

  1. either leave things as they are for now and I can merge,
  2. or, add this line and fix the linters.

Which would you rather do?

@bjoernkjoshanssen

Copy link
Copy Markdown
Contributor Author

(2) sounds best since it'll improve the document in a straightforward way.

@jstoobysmith jstoobysmith added PhyslibAlpha Pull requests which are for modifications to PhyslibAlpha. ready-to-merge This PR is approved and will be merged shortly labels Jun 18, 2026

@jstoobysmith jstoobysmith left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now. Approved. Will merge shortly

@jstoobysmith jstoobysmith merged commit 4073075 into leanprover-community:master Jun 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PhyslibAlpha Pull requests which are for modifications to PhyslibAlpha. ready-to-merge This PR is approved and will be merged shortly

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants