Offline · exact source
Exact Lean source

MatrixFidelityEmbedding

formalization/Cloning/MatrixFidelityEmbedding.lean

Source hash: 050ec1857e1364a5b5d097d99c5aeb9f0c07a4729996445a429365225d89adda

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.MatrixFidelity
2 
3/-!
4# Isometric invariance of concrete matrix root fidelity
5 
6Rectangular isometries are allowed, so this also proves invariance under
7embedding a state into a larger support, as used by rank compression.
8-/
9 
10open scoped MatrixOrder ComplexOrder
11open Matrix
12 
13noncomputable section
14 
15namespace Cloning.MatrixFidelity
16 
17set_option autoImplicit false
18set_option backward.isDefEq.respectTransparency false
19 
20variable {m n : Type*} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
21 
22theorem sqrt_isometric_embedding (J : Matrix m n ℂ) (hJ : Jᴴ * J = 1)
23    {A : Matrix n n ℂ} (hA : A.PosSemidef) :
24    CFC.sqrt (J * A * Jᴴ) = J * CFC.sqrt A * Jᴴ := by
25  apply CFC.sqrt_unique
26  · calc
27      (J * CFC.sqrt A * Jᴴ) * (J * CFC.sqrt A * Jᴴ) =
28          J * CFC.sqrt A * (Jᴴ * J) * CFC.sqrt A * Jᴴ := by
29        simp only [Matrix.mul_assoc]
30      _ = J * A * Jᴴ := by
31        rw [hJ, Matrix.mul_one, Matrix.mul_assoc J, sqrt_mul_self hA]
32  · exact ((sqrt_posSemidef A).mul_mul_conjTranspose_same J).nonneg
33 
34theorem fidelity_isometric_embedding (J : Matrix m n ℂ) (hJ : Jᴴ * J = 1)
35    {A B : Matrix n n ℂ} (hA : A.PosSemidef) (hB : B.PosSemidef) :
36    fidelity (J * A * Jᴴ) (J * B * Jᴴ) = fidelity A B := by
37  unfold fidelity
38  rw [sqrt_isometric_embedding J hJ hB]
39  have hs : (J * CFC.sqrt B * Jᴴ) * (J * A * Jᴴ) *
40      (J * CFC.sqrt B * Jᴴ) = J * (CFC.sqrt B * A * CFC.sqrt B) * Jᴴ := by
41    calc
42      _ = J * CFC.sqrt B * (Jᴴ * J) * A * (Jᴴ * J) * CFC.sqrt B * Jᴴ := by
43        simp only [Matrix.mul_assoc]
44      _ = _ := by simp [hJ, Matrix.mul_assoc]
45  rw [hs, sqrt_isometric_embedding J hJ (sandwich_posSemidef hA B)]
46  rw [Matrix.trace_mul_comm, ← Matrix.mul_assoc, hJ, Matrix.one_mul]
47 
48/-- Unitary change of basis is the square-isometry special case. -/
49theorem fidelity_unitary_conjugation (U : Matrix n n ℂ) (hU : Uᴴ * U = 1)
50    {A B : Matrix n n ℂ} (hA : A.PosSemidef) (hB : B.PosSemidef) :
51    fidelity (U * A * Uᴴ) (U * B * Uᴴ) = fidelity A B :=
52  fidelity_isometric_embedding U hU hA hB
53 
54end Cloning.MatrixFidelity