introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
45.4 kB
import Mathlib
import OAI.RepresentationTheory.SignedTensor.Domination
namespace OAI
noncomputable section
open scoped BigOperators Matrix.Norms.L2Operator ComplexOrder
attribute [local instance] Classical.propDecidable
noncomputable section
open scoped BigOperators ComplexConjugate Matrix.Norms.L2Operator
attribute [local instance] Classical.propDecidable
noncomputable section
open scoped BigOperators ComplexOrder MatrixOrder
attribute [local instance] Classical.propDecidable
noncomputable section
open scoped BigOperators ENNReal
open MeasureTheory
namespace CoordinateSweeps.SignedTensor
variable {B : Type} [Fintype B] [DecidableEq B]
/- Tensorization of finite density domination, preserving
finite probability normalization and the exact product of local dimensions. -/
theorem finite_block_density_domination (s p : β„•) (hp : 0 < p) (hps : p ≀ s)
(l : B β†’ β„•) (hl : βˆ€ i, l i ≀ s) (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (l i)))) :
βˆƒ (K : Type) (_ : Fintype K) (_ : Nonempty K) (r : K β†’ B β†’ EvenDensity p),
(((∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(Fintype.card B*(41*p^2))) β€’
((Fintype.card K : β„‚)⁻¹ β€’ βˆ‘ x, DependentTensor.tensor (fun i => densityPower (l i) (r x i).val))-
DependentTensor.tensor (fun i => isotypic (p := p) (ρ i))).PosSemidef := by
choose K fK nK r hr using fun i => finite_density_domination s p (l i) hp hps (hl i) (ρ i)
let : βˆ€ i, Fintype (K i) := fK
let : βˆ€ i, Nonempty (K i) := nK
refine ⟨(βˆ€ i, K i),inferInstance,inferInstance,fun x i => r i (x i),?_⟩
have hh := DependentTensor.tensor_mono
(fun i => isotypic (p := p) (ρ i))
(fun i => (((ρ i).dimension : β„‚)*((s+1 : β„•) : β„‚)^(41*p^2)) β€’
((Fintype.card (K i) : β„‚)⁻¹ β€’ βˆ‘ x, densityPower (l i) (r i x).val))
(fun i => isotypic_posSemidef (ρ i)) hr
rw [DependentTensor.tensor_smul] at hh
have hm : DependentTensor.tensor (fun i => (Fintype.card (K i) : β„‚)⁻¹ β€’
βˆ‘ x, densityPower (l i) (r i x).val) =
(Fintype.card (βˆ€ i, K i) : β„‚)⁻¹ β€’ βˆ‘ x : βˆ€ i, K i,
DependentTensor.tensor (fun i => densityPower (l i) (r i (x i)).val) := by
simp only [Finset.smul_sum]
rw [DependentTensor.tensor_mixture]
rw [Fintype.card_pi,Nat.cast_prod,Finset.prod_inv_distrib]
have hc : (∏ i, ((ρ i).dimension : β„‚)*((s+1 : β„•) : β„‚)^(41*p^2)) =
(∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(Fintype.card B*(41*p^2)) := by
rw [Finset.prod_mul_distrib,Finset.prod_const,Finset.card_univ,← pow_mul,mul_comm (41*p^2)]
rwa [hm,hc] at hh
end CoordinateSweeps.SignedTensor
noncomputable section
open scoped BigOperators Matrix.Norms.L2Operator ComplexOrder
noncomputable section
open scoped BigOperators
attribute [local instance] Classical.propDecidable
namespace CoordinateSweeps.OrderedBlocks
variable {r : β„•} (n : Fin r β†’ β„•)
def offset (i : Fin r) : β„• := βˆ‘ j ∈ Finset.Iio i, n j
lemma offset_next_le (i j : Fin r) (hij : i < j) : offset n i+n i ≀ offset n j := by
have he : Finset.Iic i=insert i (Finset.Iio i) := by ext x; simp [le_iff_lt_or_eq,or_comm]
have hh : βˆ‘ k ∈ Finset.Iic i, n k ≀ βˆ‘ k ∈ Finset.Iio j, n k :=
Finset.sum_le_sum_of_subset (fun k hk => Finset.mem_Iio.mpr (lt_of_le_of_lt (Finset.mem_Iic.mp hk) hij))
rw [he,Finset.sum_insert (by simp)] at hh
simpa only [offset,add_comm] using hh
lemma offset_next_le_total (i : Fin r) : offset n i+n i ≀ βˆ‘ j, n j := by
have he : Finset.Iic i=insert i (Finset.Iio i) := by ext x; simp [le_iff_lt_or_eq,or_comm]
have hh : βˆ‘ k ∈ Finset.Iic i, n k ≀ βˆ‘ k, n k := Finset.sum_le_sum_of_subset (Finset.subset_univ _)
rw [he,Finset.sum_insert (by simp)] at hh
simpa only [offset,add_comm] using hh
def encode (x : (i : Fin r) Γ— Fin (n i)) : Fin (βˆ‘ i, n i) :=
⟨offset n x.1+x.2,lt_of_lt_of_le (Nat.add_lt_add_left x.2.isLt _) (offset_next_le_total n x.1)⟩
lemma encode_lt_of_block {i j : Fin r} (hij : i < j) (a : Fin (n i)) (b : Fin (n j)) :
encode n ⟨i,a⟩ < encode n ⟨j,b⟩ := by
change offset n i+a.val < offset n j+b.val
have hh := offset_next_le n i j hij
have ha := a.isLt
omega
lemma encode_lt_same {i : Fin r} (a b : Fin (n i)) :
encode n ⟨i,a⟩ < encode n ⟨i,b⟩ ↔ a < b := by
change offset n i+a.val < offset n i+b.val ↔ a.val < b.val
omega
lemma encode_injective : Function.Injective (encode n) := by
rintro ⟨i,a⟩ ⟨j,b⟩ h
have hi : i=j := by
rcases lt_trichotomy i j with hij | hij | hij
Β· exact False.elim ((ne_of_lt (encode_lt_of_block n hij a b)) h)
Β· exact hij
Β· exact False.elim ((ne_of_lt (encode_lt_of_block n hij b a)) h.symm)
subst j
have hab : a=b := Fin.ext (by have hh := congrArg Fin.val h; dsimp [encode] at hh; omega)
subst b
rfl
/- Explicit contiguous coordinate chart, including zero-length blocks. -/
def positions : ((i : Fin r) Γ— Fin (n i)) ≃ Fin (βˆ‘ i, n i) :=
Equiv.ofBijective (encode n) ((Fintype.bijective_iff_injective_and_card _).mpr
⟨encode_injective n,by simp [Fintype.card_sigma]⟩)
lemma positions_apply (x : (i : Fin r) Γ— Fin (n i)) : positions n x=encode n x := rfl
lemma positions_lt_of_block {i j : Fin r} (hij : i < j) (a : Fin (n i)) (b : Fin (n j)) :
positions n ⟨i,a⟩ < positions n ⟨j,b⟩ := encode_lt_of_block n hij a b
lemma positions_lt_same {i : Fin r} (a b : Fin (n i)) :
positions n ⟨i,a⟩ < positions n ⟨i,b⟩ ↔ a < b := encode_lt_same n a b
def perm (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) : Equiv.Perm (Fin (βˆ‘ i, n i)) :=
(positions n).permCongr (Equiv.sigmaCongrRight Οƒ)
@[simp] lemma perm_apply (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) (i : Fin r) (j : Fin (n i)) :
perm n Οƒ (positions n ⟨i,j⟩)=positions n ⟨i,Οƒ i j⟩ := by
simp [perm,Equiv.permCongr_apply]
lemma perm_inv (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) :
(perm n Οƒ)⁻¹=perm n (fun i => (Οƒ i)⁻¹) := by
apply Equiv.ext
intro x
obtain ⟨⟨i,j⟩,rfl⟩ := (positions n).surjective x
apply (perm n Οƒ).injective
simp
def permHom : (βˆ€ i, Equiv.Perm (Fin (n i))) β†’* Equiv.Perm (Fin (βˆ‘ i, n i)) where
toFun := perm n
map_one' := by
apply Equiv.ext; intro x
obtain ⟨⟨i,j⟩,rfl⟩ := (positions n).surjective x
simp
map_mul' Οƒ Ο„ := by
apply Equiv.ext; intro x
obtain ⟨⟨i,j⟩,rfl⟩ := (positions n).surjective x
simp
end CoordinateSweeps.OrderedBlocks
namespace CoordinateSweeps.SignedTensor
lemma phase_double_prod {p l : β„•} (Οƒ : Equiv.Perm (Fin l)) (w : Word p l) :
phase Οƒ w=∏ i : Fin l, ∏ j : Fin l,
if j < i ∧ odd (w i) ∧ odd (w j) ∧ Οƒ i < Οƒ j then (-1 : β„‚) else 1 := by
have he : Equiv.Perm.finPairsLT l=(Finset.univ : Finset ((i : Fin l) Γ— Fin l)).filter (fun x => x.2 < x.1) := by
ext x
simp only [Equiv.Perm.mem_finPairsLT,Finset.mem_filter,Finset.mem_univ,true_and]
rw [phase_prod,he,Finset.prod_filter,Fintype.prod_sigma]
apply Finset.prod_congr rfl
intro i hi
apply Finset.prod_congr rfl
intro j hj
split_ifs <;> simp_all
def blockPerm {m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n)) :
Equiv.Perm (Fin (m+n)) := finSumFinEquiv.permCongr (Equiv.Perm.sumCongr Οƒ Ο„)
@[simp] lemma blockPerm_left {m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n)) (i : Fin m) :
blockPerm Οƒ Ο„ (Fin.castAdd n i)=Fin.castAdd n (Οƒ i) := by
simp [blockPerm,Equiv.permCongr_apply]
@[simp] lemma blockPerm_right {m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n)) (i : Fin n) :
blockPerm Οƒ Ο„ (Fin.natAdd m i)=Fin.natAdd m (Ο„ i) := by
simp [blockPerm,Equiv.permCongr_apply]
lemma blockPerm_inv {m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n)) :
(blockPerm Οƒ Ο„)⁻¹=blockPerm σ⁻¹ τ⁻¹ := by
apply Equiv.ext
intro i
apply (blockPerm Οƒ Ο„).injective
induction i using Fin.addCases <;> simp
lemma phase_blockPerm {p m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n))
(w : Word p (m+n)) :
phase (blockPerm Οƒ Ο„) w=phase Οƒ (fun i => w (Fin.castAdd n i))*
phase Ο„ (fun i => w (Fin.natAdd m i)) := by
have hlr (i : Fin m) (j : Fin n) : Β¬ Fin.natAdd m j<Fin.castAdd n i := by
simp only [Fin.lt_def,Fin.val_natAdd,Fin.val_castAdd]
omega
have hll (i j : Fin m) : Fin.castAdd n i<Fin.castAdd n j ↔ i<j := Iff.rfl
have hrr (i j : Fin n) : Fin.natAdd m i<Fin.natAdd m j ↔ i<j := by
simp only [Fin.lt_def,Fin.val_natAdd,Nat.add_lt_add_iff_left]
simp only [phase_double_prod]
rw [Fin.prod_univ_add]
simp_rw [Fin.prod_univ_add]
simp only [blockPerm_left,blockPerm_right,hlr,false_and,and_false,ite_false,
Finset.prod_const_one,mul_one,one_mul,hll,hrr]
/- The explicit unitary reindexing between a concatenated tensor word and
its two block words. The Koszul signs are retained in phase_blockPerm. -/
def splitWord (p m n : β„•) : Word p (m+n) ≃ Word p m Γ— Word p n where
toFun w := (fun i => w (Fin.castAdd n i),fun i => w (Fin.natAdd m i))
invFun w := Fin.addCases w.1 w.2
left_inv w := by funext i; induction i using Fin.addCases <;> simp
right_inv w := by ext <;> simp
lemma splitWord_wordPerm {p m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n))
(w : Word p (m+n)) :
splitWord p m n (wordPerm (blockPerm Οƒ Ο„) w)=
(wordPerm Οƒ (splitWord p m n w).1,wordPerm Ο„ (splitWord p m n w).2) := by
ext i <;> simp [splitWord,wordPerm,blockPerm_inv]
def blockMatrix {p m n : β„•} (A : Matrix (Word p m) (Word p m) β„‚)
(B : Matrix (Word p n) (Word p n) β„‚) : Matrix (Word p (m+n)) (Word p (m+n)) β„‚ :=
fun u w => A (splitWord p m n u).1 (splitWord p m n w).1 *
B (splitWord p m n u).2 (splitWord p m n w).2
/- Exact block multiplicativity of the signed permutation action. -/
theorem matrix_blockPerm {p m n : β„•} (Οƒ : Equiv.Perm (Fin m)) (Ο„ : Equiv.Perm (Fin n)) :
matrix (p := p) (blockPerm Οƒ Ο„)=blockMatrix (matrix Οƒ) (matrix Ο„) := by
ext u w
have he : u=wordPerm (blockPerm Οƒ Ο„) w ↔
(splitWord p m n u).1=wordPerm Οƒ (splitWord p m n w).1 ∧
(splitWord p m n u).2=wordPerm Ο„ (splitWord p m n w).2 := by
rw [← (splitWord p m n).injective.eq_iff,splitWord_wordPerm,Prod.mk.injEq]
simp only [matrix,blockMatrix,he,phase_blockPerm]
split_ifs <;> simp_all [splitWord]
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open OrderedBlocks
variable {p r : β„•} (n : Fin r β†’ β„•)
lemma prod_positions (f : Fin (βˆ‘ i, n i) β†’ β„‚) :
∏ x, f x=∏ i, ∏ j : Fin (n i), f (positions n ⟨i,j⟩) := by
rw [← Equiv.prod_comp (positions n) f,Fintype.prod_sigma]
lemma phase_grouped (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) (w : Word p (βˆ‘ i, n i)) :
phase (perm n Οƒ) w=∏ i, phase (Οƒ i) (fun j => w (positions n ⟨i,j⟩)) := by
rw [phase_double_prod,prod_positions n]
apply Finset.prod_congr rfl
intro i hi
rw [phase_double_prod]
apply Finset.prod_congr rfl
intro a ha
rw [prod_positions n,Finset.prod_eq_single i]
Β· apply Finset.prod_congr rfl
intro b hb
simp only [perm_apply,positions_lt_same]
Β· intro j hj hji
apply Finset.prod_eq_one
intro b hb
rcases lt_or_gt_of_ne hji with hlt | hgt
Β· have hn : Β¬ positions n ⟨i,Οƒ i a⟩ < positions n ⟨j,Οƒ j b⟩ :=
not_lt_of_ge (positions_lt_of_block n hlt _ _).le
simp [hn]
· have hn : ¬ positions n ⟨j,b⟩ < positions n ⟨i,a⟩ :=
not_lt_of_ge (positions_lt_of_block n hgt _ _).le
simp [hn]
Β· simp
def groupWord (p : β„•) : Word p (βˆ‘ i, n i) ≃ (βˆ€ i, Word p (n i)) where
toFun w i j := w (positions n ⟨i,j⟩)
invFun w x := w ((positions n).symm x).1 ((positions n).symm x).2
left_inv w := by funext x; simp
right_inv w := by
funext i j
change (fun x : (i : Fin r) Γ— Fin (n i) => w x.1 x.2) ((positions n).symm (positions n ⟨i,j⟩)) = _
rw [Equiv.symm_apply_apply]
lemma groupWord_wordPerm (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) (w : Word p (βˆ‘ i, n i)) :
groupWord n p (wordPerm (perm n Οƒ) w)=fun i => wordPerm (Οƒ i) (groupWord n p w i) := by
funext i j
simp [groupWord,wordPerm,perm_inv]
/- Genuine product-subgroup action, with no suppressed Koszul signs. -/
theorem matrix_grouped (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) :
matrix (p := p) (perm n Οƒ)=
Matrix.reindex (groupWord n p).symm (groupWord n p).symm
(DependentTensor.tensor (fun i => matrix (Οƒ i))) := by
ext u w
have he : u=wordPerm (perm n Οƒ) w ↔
βˆ€ i, groupWord n p u i=wordPerm (Οƒ i) (groupWord n p w i) := by
rw [← (groupWord n p).injective.eq_iff,groupWord_wordPerm]
exact funext_iff
change (if u=wordPerm (perm n Οƒ) w then phase (perm n Οƒ) w else 0)=
∏ i, if groupWord n p u i=wordPerm (Οƒ i) (groupWord n p w i)
then phase (Οƒ i) (groupWord n p w i) else 0
simp only [he]
by_cases h : βˆ€ i, groupWord n p u i=wordPerm (Οƒ i) (groupWord n p w i)
Β· rw [ite_eq_left h,phase_grouped]
simp only [h,ite_true]
rfl
Β· rw [ite_eq_right h]
obtain ⟨i,hi⟩ := not_forall.mp h
symm
apply Finset.prod_eq_zero (Finset.mem_univ i)
simp [hi]
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open OrderedBlocks UnitaryIrrep
variable {p r : β„•} (n : Fin r β†’ β„•)
/- The subgroup operator is an actual group-algebra average on the full set
of slots, not an operator posited to factor. -/
def groupedAverage {Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
Matrix (Word p (βˆ‘ i, n i)) (Word p (βˆ‘ i, n i)) β„‚ :=
averageMatrix (action p (βˆ‘ i, n i)) (fun Ο‰ : βˆ€ i, Ξ© i => ∏ i, w i (Ο‰ i))
(fun Ο‰ => perm n (fun i => g i (Ο‰ i)))
lemma groupedAverage_factor {Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
groupedAverage (p := p) n w g=
Matrix.reindex (groupWord n p).symm (groupWord n p).symm
(DependentTensor.tensor (fun i => averageMatrix (action p (n i)) (w i) (g i))) := by
ext u v
simp only [groupedAverage,averageMatrix,Matrix.reindex_apply,Matrix.submatrix_apply,
Equiv.symm_symm,DependentTensor.tensor,Matrix.sum_apply,Matrix.smul_apply,smul_eq_mul]
change (βˆ‘ Ο‰ : βˆ€ i, Ξ© i, (∏ i, w i (Ο‰ i))*
matrix (perm n (fun i => g i (Ο‰ i))) u v)=
∏ i, βˆ‘ Ο‰ : Ξ© i, w i Ο‰*matrix (g i Ο‰) (groupWord n p u i) (groupWord n p v i)
have he (Οƒ : βˆ€ i, Equiv.Perm (Fin (n i))) :
matrix (perm n Οƒ) u v=∏ i, matrix (Οƒ i) (groupWord n p u i) (groupWord n p v i) := by
have hh := congrArg (fun A : Matrix (Word p (βˆ‘ i, n i)) (Word p (βˆ‘ i, n i)) β„‚ => A u v)
(matrix_grouped (p := p) n Οƒ)
exact hh
simp only [he]
rw [Fintype.prod_sum]
apply Finset.sum_congr rfl
intro ω hω
exact (Finset.prod_mul_distrib :
(∏ i, w i (Ο‰ i)*matrix (g i (Ο‰ i)) (groupWord n p u i) (groupWord n p v i))=_).symm
def groupedProjector (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
Matrix (Word p (βˆ‘ i, n i)) (Word p (βˆ‘ i, n i)) β„‚ :=
groupedAverage n (fun i => (ρ i).coefficient) (fun _ => id)
lemma groupedProjector_factor (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
groupedProjector (p := p) n ρ=
Matrix.reindex (groupWord n p).symm (groupWord n p).symm
(DependentTensor.tensor (fun i => (ρ i).projector (action p (n i)))) := by
exact groupedAverage_factor n _ _
lemma matrix_trace_reindex {X Y : Type*} [Fintype X] [Fintype Y] (e : X ≃ Y)
(A : Matrix X X β„‚) : Matrix.trace (Matrix.reindex e e A)=Matrix.trace A := by
exact Equiv.sum_comp e.symm (fun i => A i i)
lemma reindex_moment {X Y : Type*} [Fintype X] [Fintype Y] [DecidableEq X] [DecidableEq Y]
(e : X ≃ Y) (A : Matrix X X β„‚) (q : β„•) :
Matrix.trace ((((Matrix.reindexAlgEquiv β„‚ β„‚ e A).conjTranspose)*(Matrix.reindexAlgEquiv β„‚ β„‚ e A))^q)=
Matrix.trace ((A.conjTranspose*A)^q) := by
have hs : (Matrix.reindexAlgEquiv β„‚ β„‚ e A).conjTranspose=
Matrix.reindexAlgEquiv β„‚ β„‚ e A.conjTranspose := by ext i j; rfl
rw [hs,← map_mul,← map_pow]
exact matrix_trace_reindex e _
/- Exact isotypic child moment factorization, including the true Hom
multiplicities and all zero-length blocks. -/
theorem grouped_projected_moment {Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i)))
{q : β„•} (hq : q β‰  0) :
Matrix.trace (((groupedProjector (p := p) n ρ*groupedAverage n w g).conjTranspose*
(groupedProjector n ρ*groupedAverage n w g))^q)=
∏ i, (Module.finrank β„‚ ((ρ i).asRepresentation.IntertwiningMap
(matrixRepresentation (action p (n i)))) : β„‚)*
Matrix.trace (((averageMatrix (ρ i).matrix (w i) (g i)).conjTranspose*
averageMatrix (ρ i).matrix (w i) (g i))^q) := by
rw [groupedProjector_factor,groupedAverage_factor]
let e := (groupWord n p).symm
change Matrix.trace (((Matrix.reindexAlgEquiv β„‚ β„‚ e _*Matrix.reindexAlgEquiv β„‚ β„‚ e _).conjTranspose*
(Matrix.reindexAlgEquiv β„‚ β„‚ e _*Matrix.reindexAlgEquiv β„‚ β„‚ e _))^q)=_
rw [← map_mul,reindex_moment,← DependentTensor.tensor_mul,DependentTensor.tensor_moment]
apply Finset.prod_congr rfl
intro i hi
exact (ρ i).projected_operator_moment _ (fun Οƒ => (matrix_inv Οƒ).symm) (w i) (g i) hq
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
variable {p : β„•}
def IsEven (A : Matrix (Letter p) (Letter p) β„‚) : Prop :=
βˆ€ i j, (odd i ↔ Β¬ odd j) β†’ A i j=0
def grading (p : β„•) : Matrix (Letter p) (Letter p) β„‚ :=
Matrix.diagonal (fun i => if odd i then 1 else 0)
lemma isEven_iff_commute (A : Matrix (Letter p) (Letter p) β„‚) :
IsEven A ↔ Commute A (grading p) := by
constructor
Β· intro h
show A*grading p=grading p*A
ext i j
simp only [grading,Matrix.mul_diagonal,Matrix.diagonal_mul]
by_cases hi : odd i
Β· by_cases hj : odd j
Β· simp [hi,hj]
Β· simp [hi,hj,h i j (by tauto)]
Β· by_cases hj : odd j
Β· simp [hi,hj,h i j (by tauto)]
Β· simp [hi,hj]
Β· intro h i j hij
have hh := congrArg (fun M : Matrix (Letter p) (Letter p) β„‚ => M i j) h.eq
simp only [grading,Matrix.mul_diagonal,Matrix.diagonal_mul] at hh
by_cases hi : odd i
Β· have hj : Β¬ odd j := hij.mp hi
simpa [hi,hj] using hh.symm
Β· have hj : odd j := by tauto
simpa [hi,hj] using hh
lemma isEven_add {A B : Matrix (Letter p) (Letter p) β„‚} (hA : IsEven A) (hB : IsEven B) :
IsEven (A+B) := by intro i j hij; simp only [Matrix.add_apply,hA i j hij,hB i j hij,add_zero]
lemma isEven_smul (c : β„‚) {A : Matrix (Letter p) (Letter p) β„‚} (hA : IsEven A) :
IsEven (c β€’ A) := by intro i j hij; simp only [Matrix.smul_apply,smul_eq_mul,hA i j hij,mul_zero]
lemma isEven_sum {I : Type*} [Fintype I] (A : I β†’ Matrix (Letter p) (Letter p) β„‚)
(hA : βˆ€ i, IsEven (A i)) : IsEven (βˆ‘ i, A i) := by
intro i j hij
simp only [Matrix.sum_apply]
exact Finset.sum_eq_zero (fun a _ => hA a i j hij)
lemma isEven_one : IsEven (1 : Matrix (Letter p) (Letter p) β„‚) := by
intro i j hij
apply Matrix.one_apply_ne
intro he
subst j
tauto
lemma densityPower_commute_of_even {l : β„•} (r : Matrix (Letter p) (Letter p) β„‚)
(hr : IsEven r) (Οƒ : Equiv.Perm (Fin l)) :
matrix Οƒ*densityPower l r=densityPower l r*matrix Οƒ := by
have hpar {u w : Word p l} (h : densityPower l r u w β‰  0) :
βˆ€ i, odd (u i) ↔ odd (w i) := by
intro i
have he : r (u i) (w i) β‰  0 := (Finset.prod_ne_zero_iff.mp h) i (Finset.mem_univ _)
by_contra hn
exact he (hr _ _ (by tauto))
ext u w
simp only [Matrix.mul_apply,matrix]
rw [Finset.sum_eq_single ((wordPerm Οƒ).symm u),Finset.sum_eq_single (wordPerm Οƒ w)]
Β· simp only [(wordPerm Οƒ).apply_symm_apply,ite_true]
have hd : densityPower l r u (wordPerm Οƒ w)=densityPower l r ((wordPerm Οƒ).symm u) w := by
simpa using densityPower_permute Οƒ r ((wordPerm Οƒ).symm u) w
rw [hd]
by_cases hn : densityPower l r ((wordPerm Οƒ).symm u) w=0
Β· simp [hn]
Β· rw [phase_eq_of_parity Οƒ _ _ (hpar hn),mul_comm]
Β· intro v hv hne; simp [hne]
Β· simp
Β· intro v hv hne
have hh : u β‰  wordPerm Οƒ v := by
intro he
exact hne ((Equiv.eq_symm_apply _).mpr he.symm)
simp [hh]
Β· simp
lemma densityPower_commute_lift {l : β„•} (r : Matrix (Letter p) (Letter p) β„‚)
(hr : IsEven r) (x : MonoidAlgebra β„‚ (Equiv.Perm (Fin l))) :
(MonoidAlgebra.lift β„‚ _ _ (action p l) x)*densityPower l r =
densityPower l r*(MonoidAlgebra.lift β„‚ _ _ (action p l) x) := by
induction x using MonoidAlgebra.induction_on with
| of g => simpa [action] using densityPower_commute_of_even r hr g
| add x y hx hy => simp only [map_add,add_mul,mul_add,hx,hy]
| smul c x hx => simp only [map_smul,smul_mul_assoc,mul_smul_comm,hx]
/- Constructed even whitening of the regularized empirical row density. -/
theorem exists_even_whitening {R : Type*} [Fintype R] [Nonempty R]
(r : R β†’ EvenDensity p) {Ξ΅ : ℝ} (hΞ΅ : 0 < Ξ΅) :
let B := (Fintype.card R : β„‚)⁻¹ β€’ βˆ‘ i, (r i).val + (Ξ΅ : β„‚) β€’ (1 : Matrix (Letter p) (Letter p) β„‚)
βˆƒ A : Matrix (Letter p) (Letter p) β„‚, A.PosSemidef ∧ IsEven A ∧ A*B*A=1 ∧
((Fintype.card R : β„‚) β€’ (1 : Matrix (Letter p) (Letter p) β„‚)-
βˆ‘ i, A*(r i).val*A).PosSemidef := by
dsimp only
let B := (Fintype.card R : β„‚)⁻¹ β€’ βˆ‘ i, (r i).val + (Ξ΅ : β„‚) β€’ (1 : Matrix (Letter p) (Letter p) β„‚)
have hBp : B.PosDef := TensorBoard.average_regularization_posDef (fun i => (r i).val)
(fun i => (r i).property.1) hΞ΅
have hBe : IsEven B := isEven_add (isEven_smul _ (isEven_sum _ (fun i => (r i).property.2.2)))
(isEven_smul _ isEven_one)
obtain ⟨A,hA,hABA,hcomm⟩ := TensorBoard.exists_whitening B hBp
refine ⟨A,hA,(isEven_iff_commute A).mpr (hcomm _ ((isEven_iff_commute B).mp hBe)),hABA,?_⟩
apply TensorBoard.whitening_sum_bound _ B A hA.isHermitian hABA
dsimp [B]
convert (Matrix.PosSemidef.one (n := Letter p) (R := β„‚)).smul hΞ΅.le using 1
module
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
variable {p l : β„•}
/- Even inhomogeneous site tensors transform by the *signed* permutation
matrix with no residual phase. This is what permits regrouping deleted rows
and columns without identifying the two Koszul charts by an unsigned map. -/
lemma tensor_covariance (A : Fin l β†’ Matrix (Letter p) (Letter p) β„‚)
(hA : βˆ€ i, IsEven (A i)) (Οƒ : Equiv.Perm (Fin l)) :
matrix Οƒ*TensorBoard.tensor A=
TensorBoard.tensor (fun i => A (σ⁻¹ i))*matrix Οƒ := by
have hpar {u w : Word p l} (h : TensorBoard.tensor A u w β‰  0) :
βˆ€ i, odd (u i) ↔ odd (w i) := by
intro i
have he : A i (u i) (w i) β‰  0 := (Finset.prod_ne_zero_iff.mp h) i (Finset.mem_univ _)
by_contra hn
exact he (hA i _ _ (by tauto))
ext u w
simp only [Matrix.mul_apply,matrix]
rw [Finset.sum_eq_single ((wordPerm Οƒ).symm u),Finset.sum_eq_single (wordPerm Οƒ w)]
Β· simp only [(wordPerm Οƒ).apply_symm_apply,ite_true]
have hd : TensorBoard.tensor (fun i => A (σ⁻¹ i)) u (wordPerm Οƒ w)=
TensorBoard.tensor A ((wordPerm Οƒ).symm u) w := by
change (∏ i, A (σ⁻¹ i) (u i) (w (σ⁻¹ i)))=∏ i, A i (u (Οƒ i)) (w i)
simpa using (Equiv.prod_comp Οƒ (fun i => A (σ⁻¹ i) (u i) (w (σ⁻¹ i)))).symm
rw [hd]
by_cases hn : TensorBoard.tensor A ((wordPerm Οƒ).symm u) w=0
Β· simp [hn]
Β· rw [phase_eq_of_parity Οƒ _ _ (hpar hn),mul_comm]
Β· intro v hv hne; simp [hne]
Β· simp
Β· intro v hv hne
have hh : u β‰  wordPerm Οƒ v := by
intro he
exact hne ((Equiv.eq_symm_apply _).mpr he.symm)
simp [hh]
Β· simp
lemma tensor_signed_conjugate (A : Fin l β†’ Matrix (Letter p) (Letter p) β„‚)
(hA : βˆ€ i, IsEven (A i)) (Οƒ : Equiv.Perm (Fin l)) :
matrix Οƒ*TensorBoard.tensor A*(matrix Οƒ).conjTranspose=
TensorBoard.tensor (fun i => A (σ⁻¹ i)) := by
rw [tensor_covariance A hA Οƒ,mul_assoc,← matrix_inv,← matrix_mul,mul_inv_cancel,matrix_one,mul_one]
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open OrderedBlocks
variable {p r : β„•} (n : Fin r β†’ β„•)
def groupedSite (a : Fin r β†’ EvenDensity p) (k : Fin (βˆ‘ i, n i)) : EvenDensity p :=
a ((positions n).symm k).1
lemma grouped_densityPower (a : Fin r β†’ EvenDensity p) :
(DependentTensor.tensor (fun i => densityPower (n i) (a i).val)).submatrix
(groupWord n p) (groupWord n p)=TensorBoard.tensor (fun k => (groupedSite n a k).val) := by
ext u v
change (∏ i, ∏ j : Fin (n i), (a i).val (u (positions n ⟨i,j⟩)) (v (positions n ⟨i,j⟩)))=
∏ k, (a ((positions n).symm k).1).val (u k) (v k)
rw [prod_positions]
apply Finset.prod_congr rfl
intro i _
apply Finset.prod_congr rfl
intro j _
rw [Equiv.symm_apply_apply]
/- Literal contiguous-block projectors are dominated by independent finite
mixtures of even site densities, with all local dimension factors. -/
theorem finite_grouped_density_domination (s : β„•) (hp : 0 < p) (hps : p ≀ s)
(hn : βˆ€ i, n i ≀ s) (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
βˆƒ (K : Type) (_ : Fintype K) (_ : Nonempty K) (a : K β†’ Fin r β†’ EvenDensity p),
(((∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(r*(41*p^2))) β€’
((Fintype.card K : β„‚)⁻¹ β€’ βˆ‘ x,
TensorBoard.tensor (fun k => (groupedSite n (a x) k).val))-
groupedProjector (p := p) n ρ).PosSemidef := by
obtain ⟨K,hK,nK,a,ha⟩ := finite_block_density_domination s p hp hps n hn ρ
let := hK
let := nK
refine ⟨K,hK,nK,a,?_⟩
have hh := ha.submatrix (groupWord n p)
have hm : (βˆ‘ x, DependentTensor.tensor (fun i => densityPower (n i) (a x i).val)).submatrix
(groupWord n p) (groupWord n p)=βˆ‘ x, TensorBoard.tensor (fun k => (groupedSite n (a x) k).val) := by
ext u v
simp only [Matrix.submatrix_apply,Matrix.sum_apply]
apply Finset.sum_congr rfl
intro x _
exact congrArg (fun M => M u v) (grouped_densityPower n (a x))
simp only [Fintype.card_fin,Matrix.submatrix_sub,Matrix.submatrix_smul,
Pi.sub_apply,Pi.smul_apply,hm] at hh
have he : (DependentTensor.tensor (fun i => isotypic (p := p) (ρ i))).submatrix
(groupWord n p) (groupWord n p)=groupedProjector (p := p) n ρ := by
simp only [groupedProjector_factor,isotypic_eq_projector]
rfl
rwa [he] at hh
/- The same domination after an arbitrary *signed* change of slot chart. -/
theorem finite_regrouped_density_domination (s : β„•) (hp : 0 < p) (hps : p ≀ s)
(hn : βˆ€ i, n i ≀ s) (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(Οƒ : Equiv.Perm (Fin (βˆ‘ i, n i))) :
βˆƒ (K : Type) (_ : Fintype K) (_ : Nonempty K) (a : K β†’ Fin r β†’ EvenDensity p),
(((∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(r*(41*p^2))) β€’
((Fintype.card K : β„‚)⁻¹ β€’ βˆ‘ x,
TensorBoard.tensor (fun k => (groupedSite n (a x) (σ⁻¹ k)).val))-
matrix Οƒ*groupedProjector (p := p) n ρ*(matrix Οƒ).conjTranspose).PosSemidef := by
obtain ⟨K,hK,nK,a,ha⟩ := finite_grouped_density_domination n s hp hps hn ρ
let := hK
let := nK
refine ⟨K,hK,nK,a,?_⟩
have hh := ha.mul_mul_conjTranspose_same (matrix Οƒ)
simp only [mul_sub,sub_mul,Matrix.mul_smul,Matrix.smul_mul,Matrix.mul_sum,Matrix.sum_mul] at hh
have ht (x : K) : matrix Οƒ*TensorBoard.tensor (fun k => (groupedSite n (a x) k).val)*(matrix Οƒ).conjTranspose=
TensorBoard.tensor (fun k => (groupedSite n (a x) (σ⁻¹ k)).val) :=
tensor_signed_conjugate _ (fun k => (groupedSite n (a x) k).property.2.2) Οƒ
simpa only [ht] using hh
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
variable {p r : β„•} (n : Fin r β†’ β„•)
lemma groupedProjector_posSemidef (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
(groupedProjector (p := p) n ρ).PosSemidef := by
rw [groupedProjector_factor]
exact (DependentTensor.tensor_posSemidef _ (fun i => (ρ i).projector_posSemidef _
(fun Οƒ => (matrix_inv Οƒ).symm))).submatrix _
lemma groupedProjector_idempotent (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
groupedProjector (p := p) n ρ*groupedProjector n ρ=groupedProjector n ρ := by
rw [groupedProjector_factor]
change Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _*
Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _=Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _
rw [← map_mul,← DependentTensor.tensor_mul]
simp only [UnitaryIrrep.projector_idempotent]
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open OrderedBlocks UnitaryIrrep
variable {p r l : β„•} (n : Fin r β†’ β„•)
def lengthMatrix {a b : β„•} (h : a=b) (M : Matrix (Word p a) (Word p a) β„‚) :
Matrix (Word p b) (Word p b) β„‚ := h β–Έ M
def ambientProjector (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) : Matrix (Word p l) (Word p l) β„‚ :=
matrix Οƒ*lengthMatrix h (groupedProjector n ρ)*(matrix Οƒ).conjTranspose
def ambientProjectorAlgebra (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) : MonoidAlgebra β„‚ (Equiv.Perm (Fin l)) :=
averageAlgebra (fun Ο‰ : βˆ€ i, Equiv.Perm (Fin (n i)) => ∏ i, (ρ i).coefficient (Ο‰ i))
(fun Ο‰ => Οƒ*(Equiv.permCongr (finCongr h) (perm n Ο‰))*σ⁻¹)
lemma ambientProjectorAlgebra_lift (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
MonoidAlgebra.lift β„‚ _ _ (action p l) (ambientProjectorAlgebra n h Οƒ ρ)=
ambientProjector (p := p) n h Οƒ ρ := by
subst l
simp only [ambientProjectorAlgebra,lift_averageAlgebra,averageMatrix,ambientProjector,
lengthMatrix,groupedProjector,groupedAverage,Matrix.mul_sum,Matrix.sum_mul,Matrix.mul_smul,Matrix.smul_mul]
apply Finset.sum_congr rfl
intro Ο‰ _
congr 1
change matrix (Οƒ*(Equiv.permCongr (finCongr rfl) (perm n Ο‰))*σ⁻¹)=_
simp only [finCongr_refl,matrix_mul,matrix_inv]
rfl
lemma ambientProjector_posSemidef (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
(ambientProjector (p := p) n h Οƒ ρ).PosSemidef := by
subst l
exact (groupedProjector_posSemidef n ρ).mul_mul_conjTranspose_same (matrix Οƒ)
lemma ambientProjector_idempotent (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) :
ambientProjector (p := p) n h Οƒ ρ*ambientProjector n h Οƒ ρ=ambientProjector n h Οƒ ρ := by
subst l
unfold ambientProjector lengthMatrix
calc
_ = matrix Οƒ*(groupedProjector n ρ*((matrix Οƒ).conjTranspose*matrix Οƒ)*groupedProjector n ρ)*
(matrix (p := p) Οƒ).conjTranspose := by noncomm_ring
_ = _ := by rw [matrix_unitary,mul_one,groupedProjector_idempotent]
/- Actual ambient projectors, not hypothesized density mixtures. -/
theorem finite_ambient_density_domination (s : β„•) (hp : 0 < p) (hps : p ≀ s)
(hn : βˆ€ i, n i ≀ s) (ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l)) :
βˆƒ (K : Type) (_ : Fintype K) (_ : Nonempty K) (a : K β†’ Fin r β†’ EvenDensity p),
(((∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(r*(41*p^2))) β€’
((Fintype.card K : β„‚)⁻¹ β€’ βˆ‘ x,
TensorBoard.tensor (fun k => (groupedSite n (a x) ((finCongr h).symm (σ⁻¹ k))).val))-
ambientProjector (p := p) n h Οƒ ρ).PosSemidef := by
subst l
simpa [ambientProjector,lengthMatrix] using
finite_regrouped_density_domination n s hp hps hn ρ Οƒ
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open OrderedBlocks UnitaryIrrep
variable {p r l : β„•} (n : Fin r β†’ β„•)
def ambientAverage (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
{Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
Matrix (Word p l) (Word p l) β„‚ :=
averageMatrix (action p l) (fun Ο‰ : βˆ€ i, Ξ© i => ∏ i, w i (Ο‰ i))
(fun Ο‰ => Οƒ*Equiv.permCongr (finCongr h) (perm n (fun i => g i (Ο‰ i)))*σ⁻¹)
lemma ambientAverage_factor (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
{Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
ambientAverage (p := p) n h Οƒ w g=
matrix Οƒ*lengthMatrix h (groupedAverage n w g)*(matrix Οƒ).conjTranspose := by
subst l
simp only [ambientAverage,averageMatrix,groupedAverage,lengthMatrix,
Matrix.mul_sum,Matrix.sum_mul,Matrix.mul_smul,Matrix.smul_mul]
apply Finset.sum_congr rfl
intro Ο‰ _
congr 1
change matrix (Οƒ*Equiv.permCongr (finCongr rfl) (perm n (fun i => g i (Ο‰ i)))*σ⁻¹)=_
simp only [finCongr_refl,matrix_mul,matrix_inv]
rfl
lemma matrix_unitary_reverse (Οƒ : Equiv.Perm (Fin l)) :
matrix (p := p) Οƒ*(matrix Οƒ).conjTranspose=1 := by
rw [← matrix_inv,← matrix_mul,mul_inv_cancel,matrix_one]
lemma conjugate_mul {X : Type*} [Fintype X] [DecidableEq X]
(U A B : Matrix X X β„‚) (hU : U.conjTranspose*U=1) :
(U*A*U.conjTranspose)*(U*B*U.conjTranspose)=U*(A*B)*U.conjTranspose := by
calc
_ = U*A*(U.conjTranspose*U)*B*U.conjTranspose := by noncomm_ring
_ = _ := by rw [hU,mul_one]; noncomm_ring
lemma conjugate_pow {X : Type*} [Fintype X] [DecidableEq X]
(U A : Matrix X X β„‚) (hU : U.conjTranspose*U=1) (hU' : U*U.conjTranspose=1) (q : β„•) :
(U*A*U.conjTranspose)^q=U*A^q*U.conjTranspose := by
induction q with
| zero => simpa using hU'.symm
| succ q ih => rw [pow_succ,ih,conjugate_mul U _ _ hU,pow_succ]
lemma conjugate_moment {X : Type*} [Fintype X] [DecidableEq X]
(U A : Matrix X X β„‚) (hU : U.conjTranspose*U=1) (hU' : U*U.conjTranspose=1) (q : β„•) :
Matrix.trace (((U*A*U.conjTranspose).conjTranspose*(U*A*U.conjTranspose))^q)=
Matrix.trace ((A.conjTranspose*A)^q) := by
have hs : (U*A*U.conjTranspose).conjTranspose=U*A.conjTranspose*U.conjTranspose := by
simp only [Matrix.conjTranspose_mul,Matrix.conjTranspose_conjTranspose]
noncomm_ring
rw [hs,conjugate_mul U _ _ hU,conjugate_pow U _ hU hU']
rw [Matrix.trace_mul_cycle,hU,one_mul]
/- The child moment formula survives the literal slot chart, with actual Hom multiplicities. -/
theorem ambient_projected_moment (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
{Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i)))
{q : β„•} (hq : q β‰  0) :
Matrix.trace (((ambientProjector (p := p) n h Οƒ ρ*ambientAverage n h Οƒ w g).conjTranspose*
(ambientProjector n h Οƒ ρ*ambientAverage n h Οƒ w g))^q)=
∏ i, (Module.finrank β„‚ ((ρ i).asRepresentation.IntertwiningMap
(matrixRepresentation (action p (n i)))) : β„‚)*
Matrix.trace (((averageMatrix (ρ i).matrix (w i) (g i)).conjTranspose*
averageMatrix (ρ i).matrix (w i) (g i))^q) := by
subst l
rw [ambientAverage_factor]
unfold ambientProjector lengthMatrix
rw [conjugate_mul _ _ _ (matrix_unitary Οƒ),conjugate_moment _ _
(matrix_unitary Οƒ) (matrix_unitary_reverse Οƒ)]
exact grouped_projected_moment n ρ w g hq
end CoordinateSweeps.SignedTensor
/-!
All definitions are finite and use ordinary probability and trace normalizations.
-/
noncomputable section
open scoped BigOperators Matrix.Norms.L2Operator ComplexOrder
attribute [local instance] Classical.propDecidable
noncomputable section
attribute [local instance] Classical.propDecidable
namespace CoordinateSweeps.FiberBlocks
open OrderedBlocks
variable {L : Type*} [Fintype L] {r : β„•} (f : L β†’ Fin r)
def size (i : Fin r) : β„• := Fintype.card {x : L // f x=i}
def cards (i : Fin r) : Fin (size f i) ≃ {x : L // f x=i} := (Fintype.equivFin _).symm
/- Contiguous finite label fibers give a genuine ordered slot chart. -/
def slots : Fin (βˆ‘ i, size f i) ≃ L :=
(positions (size f)).symm.trans
((Equiv.sigmaCongrRight (cards f)).trans (Equiv.sigmaFiberEquiv f))
lemma total : βˆ‘ i, size f i=Fintype.card L := by
simpa only [Fintype.card_fin] using Fintype.card_congr (slots f)
lemma label_slots (k : Fin (βˆ‘ i, size f i)) :
f (slots f k)=((positions (size f)).symm k).1 := by
exact (cards f ((positions (size f)).symm k).1 ((positions (size f)).symm k).2).property
/- The same chart with the literal cardinal as ambient length. -/
def chart : Fin (Fintype.card L) ≃ L :=
(finCongr (total f).symm).trans (slots f)
/- Permutation changing the contiguous fiber chart to any given ambient chart. -/
def regroup (e : Fin (Fintype.card L) ≃ L) : Equiv.Perm (Fin (Fintype.card L)) :=
(chart f).trans e.symm
lemma label_regroup (e : Fin (Fintype.card L) ≃ L) (k : Fin (Fintype.card L)) :
((positions (size f)).symm ((finCongr (total f)).symm ((regroup f e)⁻¹ k))).1=f (e k) := by
have he : slots f ((finCongr (total f)).symm ((regroup f e)⁻¹ k))=e k := by
change chart f ((regroup f e).symm k)=e k
simp [regroup]
rw [← label_slots f,he]
end CoordinateSweeps.FiberBlocks
namespace CoordinateSweeps.FiberBlocks
open OrderedBlocks
variable {L : Type*} [Fintype L] {r : β„•} (f : L β†’ Fin r)
lemma slots_positions (i : Fin r) (j : Fin (size f i)) :
slots f (positions (size f) ⟨i,j⟩)=(cards f i j).val := by
simp [slots]
/- Independent permutations of the actual fibers, on the literal ambient set. -/
def action : (βˆ€ i, Equiv.Perm (Fin (size f i))) β†’* Equiv.Perm L :=
(slots f).permCongrHom.toMonoidHom.comp (permHom (size f))
lemma action_apply (Οƒ : βˆ€ i, Equiv.Perm (Fin (size f i))) (i : Fin r) (j : Fin (size f i)) :
action f Οƒ (cards f i j).val=(cards f i (Οƒ i j)).val := by
rw [← slots_positions f i j,← slots_positions f i (Οƒ i j)]
change slots f (perm (size f) Οƒ ((slots f).symm (slots f (positions (size f) ⟨i,j⟩))))=_
rw [Equiv.symm_apply_apply,perm_apply]
lemma ambient_action (e : Fin (Fintype.card L) ≃ L)
(Οƒ : βˆ€ i, Equiv.Perm (Fin (size f i))) :
Equiv.permCongr e.symm (action f Οƒ)=
regroup f e*Equiv.permCongr (finCongr (total f)) (perm (size f) Οƒ)*(regroup f e)⁻¹ := by
apply Equiv.ext
intro x
change e.symm (slots f (perm (size f) Οƒ ((slots f).symm (e x))))=_
simp only [Equiv.Perm.mul_apply,Equiv.permCongr_apply,regroup,chart,
Equiv.trans_apply,Equiv.symm_trans_apply,Equiv.Perm.coe_inv]
simp
/- A label-preserving permutation has genuine induced local permutations. -/
def restrict (Οƒ : Equiv.Perm L) (hΟƒ : βˆ€ x, f (Οƒ x)=f x) (i : Fin r) : Equiv.Perm (Fin (size f i)) :=
Equiv.permCongr (cards f i).symm (Equiv.subtypeEquiv Οƒ (by
intro x
change f x=i ↔ f (Οƒ x)=i
rw [hσ x]))
lemma restrict_apply (Οƒ : Equiv.Perm L) (hΟƒ : βˆ€ x, f (Οƒ x)=f x)
(i : Fin r) (j : Fin (size f i)) :
(cards f i (restrict f σ hσ i j)).val=σ (cards f i j).val := by
simp [restrict,Equiv.permCongr_apply]
lemma action_restrict (Οƒ : Equiv.Perm L) (hΟƒ : βˆ€ x, f (Οƒ x)=f x) :
action f (restrict f σ hσ)=σ := by
apply Equiv.ext
intro x
let i := f x
let j := (cards f i).symm ⟨x,rfl⟩
have hx : (cards f i j).val=x := congrArg Subtype.val ((cards f i).apply_symm_apply ⟨x,rfl⟩)
rw [← hx,action_apply,restrict_apply]
end CoordinateSweeps.FiberBlocks
namespace CoordinateSweeps.SignedTensor
open UnitaryIrrep
variable {p r l : β„•} (n : Fin r β†’ β„•)
lemma groupedProjector_commute_average {Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
groupedProjector (p := p) n ρ*groupedAverage n w g=groupedAverage n w g*groupedProjector n ρ := by
rw [groupedProjector_factor,groupedAverage_factor]
change Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _*
Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _=
Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _*
Matrix.reindexAlgEquiv β„‚ β„‚ (groupWord n p).symm _
rw [← map_mul,← map_mul,← DependentTensor.tensor_mul,← DependentTensor.tensor_mul]
congr 1
apply congrArg DependentTensor.tensor
funext i
simp only [averageMatrix,Matrix.mul_sum,Matrix.sum_mul,Matrix.mul_smul,Matrix.smul_mul]
apply Finset.sum_congr rfl
intro Ο‰ _
exact congrArg (fun A => w i Ο‰ β€’ A) ((ρ i).projector_commute (action p (n i)) (g i Ο‰)).symm
lemma ambientProjector_commute_average (h : (βˆ‘ i, n i)=l) (Οƒ : Equiv.Perm (Fin l))
{Ξ© : Fin r β†’ Type*} [βˆ€ i, Fintype (Ξ© i)]
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i))))
(w : βˆ€ i, Ξ© i β†’ β„‚) (g : βˆ€ i, Ξ© i β†’ Equiv.Perm (Fin (n i))) :
ambientProjector (p := p) n h Οƒ ρ*ambientAverage n h Οƒ w g=
ambientAverage n h Οƒ w g*ambientProjector n h Οƒ ρ := by
subst l
rw [ambientAverage_factor]
unfold ambientProjector lengthMatrix
rw [conjugate_mul _ _ _ (matrix_unitary Οƒ),conjugate_mul _ _ _ (matrix_unitary Οƒ)]
rw [groupedProjector_commute_average]
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
open UnitaryIrrep
variable {p r : β„•} (n : Fin r β†’ β„•)
lemma child_product_bound (s : β„•) (hn : βˆ€ i, n i ≀ s)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (n i)))) (T E : Fin r β†’ ℝ)
(hT : βˆ€ i, 0 ≀ T i) (hE : βˆ€ i, T i ≀ Real.exp (E i)) :
(∏ i, (Module.finrank β„‚ ((ρ i).asRepresentation.IntertwiningMap
(matrixRepresentation (action p (n i)))) : ℝ)*T i) ≀
((s+1 : β„•) : ℝ)^(r*((2*p)*(2*p)))*Real.exp (βˆ‘ i, E i) := by
rw [Finset.prod_mul_distrib]
have hm : (∏ i, (Module.finrank β„‚ ((ρ i).asRepresentation.IntertwiningMap
(matrixRepresentation (action p (n i)))) : ℝ)) ≀ ((s+1 : β„•) : ℝ)^(r*((2*p)*(2*p))) := by
calc
_ ≀ ∏ _ : Fin r, ((s+1 : β„•) : ℝ)^((2*p)*(2*p)) := Finset.prod_le_prodβ‚€
(fun _ _ => Nat.cast_nonneg _) (fun i _ => by
exact_mod_cast (multiplicity_le p (n i) (ρ i)).trans
(Nat.pow_le_pow_left (Nat.add_le_add_right (hn i) 1) _))
_ = _ := by rw [Finset.prod_const,Finset.card_univ,Fintype.card_fin,← pow_mul,Nat.mul_comm]
have ht : (∏ i, T i) ≀ Real.exp (βˆ‘ i, E i) := by
rw [Real.exp_sum]
exact Finset.prod_le_prodβ‚€ (fun i _ => hT i) (fun i _ => hE i)
exact mul_le_mul hm ht (Finset.prod_nonneg (fun i _ => hT i)) (by positivity)
end CoordinateSweeps.SignedTensor
namespace CoordinateSweeps.SignedTensor
variable {p r : β„•} {L : Type*} [Fintype L] (f : L β†’ Fin r)
def fiberProjector (e : Fin (Fintype.card L) ≃ L)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :=
ambientProjector (p := p) (FiberBlocks.size f) (FiberBlocks.total f) (FiberBlocks.regroup f e) ρ
def fiberProjectorAlgebra (e : Fin (Fintype.card L) ≃ L)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :=
ambientProjectorAlgebra (FiberBlocks.size f) (FiberBlocks.total f) (FiberBlocks.regroup f e) ρ
lemma fiberProjectorAlgebra_lift (e : Fin (Fintype.card L) ≃ L)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :
MonoidAlgebra.lift β„‚ _ _ (action p (Fintype.card L)) (fiberProjectorAlgebra f e ρ)=
fiberProjector (p := p) f e ρ := ambientProjectorAlgebra_lift _ _ _ _
lemma fiberProjector_posSemidef (e : Fin (Fintype.card L) ≃ L)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :
(fiberProjector (p := p) f e ρ).PosSemidef := ambientProjector_posSemidef _ _ _ _
lemma fiberProjector_idempotent (e : Fin (Fintype.card L) ≃ L)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :
fiberProjector (p := p) f e ρ*fiberProjector f e ρ=fiberProjector f e ρ :=
ambientProjector_idempotent _ _ _ _
/- Exact regrouping connects local isotypic products to the literal site labels. -/
theorem finite_fiber_density_domination (e : Fin (Fintype.card L) ≃ L)
(s : β„•) (hp : 0 < p) (hps : p ≀ s) (hn : βˆ€ i, FiberBlocks.size f i ≀ s)
(ρ : βˆ€ i, UnitaryIrrep (Equiv.Perm (Fin (FiberBlocks.size f i)))) :
βˆƒ (K : Type) (_ : Fintype K) (_ : Nonempty K) (a : K β†’ Fin r β†’ EvenDensity p),
(((∏ i, ((ρ i).dimension : β„‚))*((s+1 : β„•) : β„‚)^(r*(41*p^2))) β€’
((Fintype.card K : β„‚)⁻¹ β€’ βˆ‘ x,
TensorBoard.tensor (fun k => (a x (f (e k))).val))-fiberProjector (p := p) f e ρ).PosSemidef := by
obtain ⟨K,hK,nK,a,ha⟩ := finite_ambient_density_domination (FiberBlocks.size f) s hp hps hn ρ
(FiberBlocks.total f) (FiberBlocks.regroup f e)
let := hK
let := nK
refine ⟨K,hK,nK,a,?_⟩
simpa only [groupedSite,FiberBlocks.label_regroup,fiberProjector] using ha
end CoordinateSweeps.SignedTensor
end
end
end
end
end
end
end
end
open scoped Matrix.Norms.L2Operator
end OAI