auto-task(conj_isCompletelyPositive): reuse congruence_CP to shorten proof#1285
auto-task(conj_isCompletelyPositive): reuse congruence_CP to shorten proof#1285jstoobysmith wants to merge 1 commit into
Conversation
…proof 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
Golfs the proof of
MatrixMap.conj_isCompletelyPositiveinQuantumInfo/Channels/Unbundled.lean, collapsing a 52-line tactic block downto two lines.
Motivation
The existing proof carried the note
--TODO: This is identical to congruence_CP.Indeed,
congruence_CP(proved earlier in the same file) already establishes(conj M).IsCompletelyPositiveforM : Matrix B A 𝕜with[RCLike 𝕜], via theclean
conj_kron/conj_isPositiveroute.conj_isCompletelyPositiveis theexact same statement over
[RCLike R]; the only thingcongruence_CPneeds thatthe ambient context here does not provide is
DecidableEqon the codomainB,which the original proof already pulled in with
classical. (The companion lemmaof_kraus_CPlikewise reachescongruence_CPand supplies decidability the sameway.)
So the long, manual Kronecker-index manipulation is entirely redundant and is
replaced by a direct appeal to the existing lemma.
Change
Before (52-line tactic proof doing a manual
suffices … PosSemidef, indexjuggling over
Matrix.single/kron_def,convert, and a Cholesky-stylem = m'ᴴ * m'decomposition):After:
The statement (name, binders, type) is unchanged. Only the proof body is edited;
no other declaration, import, or docstring is touched.
Verification
lake build QuantumInfo.Channels.Unbundled— succeeds.lake build QuantumInfo— succeeds (8636 jobs), so all downstream users stillcompile.
MatrixMap.conj_isCompletelyPositive: onlypropext,Classical.choice,Quot.sound(nosorry, no new axioms).