lemmaprojector_polarization (x y : n →ℂ) :
projector (x+y)-projector x-projector y+
Complex.I • (projector (x+Complex.I • y)-projector x-projector y)=
(2 : ℂ) • Matrix.vecMulVec x (star y) :=by
proof · 7
lines
ext i j
simp only [projector,Matrix.vecMulVec_apply,Matrix.add_apply,Matrix.sub_apply,
Matrix.smul_apply,Pi.add_apply,Pi.smul_apply,Pi.star_apply,smul_eq_mul,
star_add,star_mul,Complex.star_def,Complex.conj_I]
ring_nf
simp only [Complex.I_sq,Complex.I_pow_three]
ring
theoremlinear_eq_zero_of_projector_tests (L : Mat n →ₗ[ℂ] ℂ)
(hbase : ∀ i, L (projector (testBasis i))=0)
(hplus : ∀ i j, L (projector (testBasis i+testBasis j))=0)
(himag : ∀ i j, L (projector (testBasis i+Complex.I • testBasis j))=0) :
L=0:=by
proof · 12
lines
have hs (i j : n) : L (Matrix.single i j 1)=0:=byhave h := congrArg L (single_projector_polarization i j)
simp only [map_smul,map_add,map_sub,hbase,hplus,himag,sub_zero,zero_add,smul_zero] at h
simpa using h
ext A
induction AusingMatrix.induction_on' with
| h_zero => exact map_zero L
| h_add AB hA hB => simp [hA,hB]
| h_std_basis i j c =>havehe : Matrix.single i j c=c • Matrix.single i j (1 : ℂ) :=by simp
rw [he,map_smul,hs,smul_zero]
rfl
lemmalinear_eq_zero_of_positive_tests (L : Mat n →ₗ[ℂ] ℂ)
(h : ∀ k, L (positiveTest k)=0) : L=0:=by
proof · 4
lines
apply linear_eq_zero_of_projector_tests L
· exact fun i => h (.inl i)
· exact fun i j => h (.inr (.inl (i,j)))
· exact fun i j => h (.inr (.inr (i,j)))
theoremtensor_product_of_positive_tests (W : Mat (n×m)) (X : Mat n) (Y : Mat m)
(htest : ∀e : PositiveTestIndex n, ∀g : PositiveTestIndex m,
Matrix.trace ((positiveTest e ⊗ₖ positiveTest g)*W)=
Matrix.trace (positiveTest e*X)*Matrix.trace (positiveTest g*Y)) :
W=X ⊗ₖ Y:=by
proof · 14
lines
letL:= tensorTraceDifference WXYhave hL (g : PositiveTestIndex m) : ∀E, LE (positiveTest g)=0:=byhave hz := linear_eq_zero_of_positive_tests (L.flip (positiveTest g))
(fun e => sub_eq_zero.mpr (htest e g))
intro E
exact LinearMap.congr_fun hz Ehave hz (E : Mat n) : LE=0:=
linear_eq_zero_of_positive_tests (LE) (fun g => hL g E)
ext ⟨i,a⟩ ⟨j,b⟩
have h :=LinearMap.congr_fun (hz (Matrix.single j i 1)) (Matrix.single b a 1)
change Matrix.trace (((Matrix.single j i (1 : ℂ)) ⊗ₖ Matrix.single b a 1)*W)-
Matrix.trace (Matrix.single j i 1*X)*Matrix.trace (Matrix.single b a 1*Y)=0 at h
simpa only [Matrix.single_kronecker_single,one_mul,Matrix.trace_single_mul,one_smul,
sub_eq_zero,Matrix.kronecker_apply] using h