cfahlgren1/math / lean /OAI /Analysis /MutuallyUnbiased /Moments /DifferentMatrices.lean
cfahlgren1's picture
download
raw
3.64 kB
import OAI.Analysis.MutuallyUnbiased.Matrix.Hadamard
import OAI.Analysis.MutuallyUnbiased.Matrix.OffDiagonal
namespace OAI
noncomputable section
open scoped BigOperators ComplexConjugate
namespace MUB6
theorem difference_reverse (i j : Coord) : difference j i = -difference i j := by
simp [difference, neg_sub]
theorem cross_character_gram (x y : Coord → ℂ)
(hx : ∀ i, Complex.normSq (x i) = 1) (hy : ∀ i, Complex.normSq (y i) = 1) :
(∑ i, ∑ j, character x (difference i j) * character y (-difference i j)) =
(Complex.normSq (∑ i, x i * conj (y i)) : ℂ) := by
rw [← sum_mul_conj]
apply Finset.sum_congr rfl
intro i _
apply Finset.sum_congr rfl
intro j _
rw [character_neg y hy, character_difference x hx, character_difference y hy]
simp only [map_mul, starRingEnd_apply, star_star]
ring
theorem cross_character_offdiag (x y : Coord → ℂ)
(hx : ∀ i, Complex.normSq (x i) = 1) (hy : ∀ i, Complex.normSq (y i) = 1)
(hc : Complex.normSq (∑ i, x i * conj (y i)) = 6) :
offDiagSum (fun i j => character x (difference i j) * character y (-difference i j)) = 0 := by
have h := offDiagSum_add_diag
(fun i j => character x (difference i j) * character y (-difference i j))
rw [cross_character_gram x y hx hy, hc] at h
have hd : (∑ i, character x (difference i i) * character y (-difference i i)) = (6 : ℂ) := by
simp [difference]
rw [hd] at h
exact add_right_cancel (show _ + (6 : ℂ) = 0 + 6 by simpa using h)
theorem weighted_cross_character (x y : Coord → ℂ)
(hx : ∀ i, Complex.normSq (x i) = 1) (hy : ∀ i, Complex.normSq (y i) = 1)
(hc : Complex.normSq (∑ i, x i * conj (y i)) = 6) (a b : Charge) :
offDiagSum (fun i j =>
character x (a + difference i j) * character y (b + difference j i)) = 0 := by
have he (i j : Coord) :
character x (a + difference i j) * character y (b + difference j i) =
(character x a * character y b) *
(character x (difference i j) * character y (-difference i j)) := by
rw [character_add x (fun i => unit_ne_zero (hx i)),
character_add y (fun i => unit_ne_zero (hy i)), difference_reverse j i]
ring_nf
simp_rw [he]
rw [offDiagSum_mul, cross_character_offdiag x y hx hy hc, mul_zero]
theorem g_product_expand (H K : CMatrix) (a b : Charge) :
g H a * g K b = (6 : ℂ)⁻¹ * (6 : ℂ)⁻¹ *
∑ k, ∑ l, character (fun i => H i k) a * character (fun i => K i l) b := by
unfold g
calc
_ = (6 : ℂ)⁻¹ * (6 : ℂ)⁻¹ *
((∑ k, character (fun i => H i k) a) * ∑ l, character (fun i => K i l) b) := by ring
_ = _ := by
simp only [Finset.sum_mul, Finset.mul_sum]
exact Finset.sum_comm
/-- The different-matrix Fourier identity from unbiasedness of every pair of
columns. The off-diagonal indexing lists each difference `e_i-e_j` once. -/
theorem different_matrices_identity {H K : CMatrix} (hH : IsHadamard H) (hK : IsHadamard K)
(hc : ∀ k l, Complex.normSq (∑ i, H i k * conj (K i l)) = 6) (a b : Charge) :
offDiagSum (fun i j => g H (a + difference i j) * g K (b + difference j i)) = 0 := by
simp_rw [g_product_expand]
rw [offDiagSum_mul, offDiagSum_sum]
simp_rw [offDiagSum_sum]
have hz : (∑ k, ∑ l, offDiagSum (fun i j =>
character (fun r => H r k) (a + difference i j) *
character (fun r => K r l) (b + difference j i))) = 0 := by
apply Finset.sum_eq_zero
intro k _
apply Finset.sum_eq_zero
intro l _
exact weighted_cross_character _ _ (fun i => hH.1 i k) (fun i => hK.1 i l) (hc k l) a b
rw [hz, mul_zero]
end MUB6
end
end OAI

Xet Storage Details

Size:
3.64 kB
·
Xet hash:
f0dd7bf9f5365c3b3ede0b57504fe7e75f1d1d26c6b65c29940e40914d4717bc

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.