AFTD Auto-Formalizing Theoretical Domains

MatrixMap.of_kraus

defimported Lean

Construct a matrix map out of families of matrices M N : Σ → Matrix B A R indexed by κ via X ↦ ∑ k : κ, (M k) * X * (N k)ᴴ

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {A B C D E F R : Type*} [Fintype A] [DecidableEq A] in
variable [Star R] [CommSemiring R] in
variable {κ : Type*} [Fintype κ] in
def MatrixMap.of_kraus (M N : κ → Matrix B A R) : MatrixMap A B R
Defined in
QuantumInfo, `MatrixMap.of_kraus`
Lean proof
By Alex Meiburg, from github.com/leanprover-community/physlib at e411c6e89692 (Copyright (c) 2025 Alex Meiburg. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.34.1.
Verified
17 Oct 2026
Axioms
none listed
Built on 3
  • MatrixMapA MatrixMap is a linear map between squares matrices of size A to size B, over R.
  • MatrixMap.map_choi_invProves that MatrixMap.of_choi_matrix and MatrixMap.choi_matrix inverses.
  • MatrixMap.choi_map_invProves that MatrixMap.choi_matrix and MatrixMap.of_choi_matrix inverses.
Used by 1

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
variable {A B C D E F R : Type*} [Fintype A] [DecidableEq A] in
variable [Star R] [CommSemiring R] in
variable {κ : Type*} [Fintype κ] in
/-- Construct a matrix map out of families of matrices M N : Σ → Matrix B A R indexed by κ via X ↦ ∑ k : κ, (M k) * X * (N k)ᴴ -/
def MatrixMap.of_kraus (M N : κ → Matrix B A R) : MatrixMap A B R :=
  ∑ k : κ, {
    toFun X := M k * X * (N k).conjTranspose
    map_add' x y := by rw [Matrix.mul_add, Matrix.add_mul]
    map_smul' r x := by rw [RingHom.id_apply, Matrix.mul_smul, Matrix.smul_mul]
  }
See it in the graphDiscuss this resultChallenge it