Skip to content

feat(CPTPMap): close 6 sorries around piProd#1067

Open
dennj wants to merge 1 commit intoleanprover-community:masterfrom
dennj:matrixmap
Open

feat(CPTPMap): close 6 sorries around piProd#1067
dennj wants to merge 1 commit intoleanprover-community:masterfrom
dennj:matrixmap

Conversation

@dennj
Copy link
Copy Markdown
Contributor

@dennj dennj commented Apr 30, 2026

MatrixMap:

  • exists_kraus: prove via explicit Kraus decomposition over ((B × A) × A) × B (now requires [StarRing R] [Fintype B]).
  • Basis.piTensorProduct: drop the local opaque stub and use Mathlib's PiTensorProduct.Basis.
  • Add choi_matrix_piProd characterising the Choi matrix of piProd.

Unbundled:

  • Add IsTracePreserving.piProd.
  • Discharge IsCompletelyPositive.piProd via choi_matrix_piProd and Matrix.PosSemidef.piProd.

CPTP:

  • Fill CPTPMap.piProd.TP using IsTracePreserving.piProd (needs maxRecDepth 1000).
  • fin_1_piProd: replace the sorry-in-type statement with the real equality using ofEquiv (Equiv.funUnique (Fin 1) _) and prove it.

MatrixMap:
- exists_kraus: prove via explicit Kraus decomposition over
  ((B × A) × A) × B (now requires [StarRing R] [Fintype B]).
- Basis.piTensorProduct: drop the local opaque stub and use Mathlib's
  PiTensorProduct.Basis.
- Add choi_matrix_piProd characterising the Choi matrix of piProd.

Unbundled:
- Add IsTracePreserving.piProd.
- Discharge IsCompletelyPositive.piProd via choi_matrix_piProd and
  Matrix.PosSemidef.piProd.

CPTP:
- Fill CPTPMap.piProd.TP using IsTracePreserving.piProd
  (needs maxRecDepth 1000).
- fin_1_piProd: replace the sorry-in-type statement with the real
  equality using ofEquiv (Equiv.funUnique (Fin 1) _) and prove it.
Copy link
Copy Markdown
Member

@jstoobysmith jstoobysmith left a comment

Choose a reason for hiding this comment

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

Two comments - though one is really just a comment, the other a question.


/-- Finite Pi-type tensor product of MatrixMaps. Defined as `PiTensorProduct.tprod` of the
underlying Linear maps. Notation `⨂ₜₘ[R] i, f i`, eventually. -/
noncomputable def piProd (Λi : ∀ i, MatrixMap (dI i) (dO i) R) : MatrixMap (∀i, dI i) (∀i, dO i) R :=
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.

Is this definition equivalent to the existing one? What is the reason for the change?

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.

At some point, I think these CPTP files should be broken up. Maybe we should add a TODO item for this at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants