import OAI.Probability.CubeShuffle.NetworkSpectral import OAI.Probability.CubeShuffle.Physical import OAI.RepresentationTheory.YoungSymmetry.ShapeBounds namespace OAI namespace CubeShuffle.DimensionEstimates open scoped BigOperators Classical open Filter lemma medium_parameters (h : ℝ) (hh : 0 p (Fin.cons false u) 0)=p := by apply Equiv.ext intro x rw [←Fin.cons_self_tail x] generalize x 0=b generalize Fin.tail x=u apply funext intro i refine Fin.cases ?_ (fun j => ?_) i · change Bool.xor b (p (Fin.cons false u) 0)=p (Fin.cons b u) 0 cases b with | false => simp | true => have hn : p (Fin.cons false u) 0 ≠ p (Fin.cons true u) 0 := by intro he have hh : p (Fin.cons false u)=p (Fin.cons true u) := by rw [←Fin.cons_self_tail (p (Fin.cons false u)),←Fin.cons_self_tail (p (Fin.cons true u)), hp,hp,Fin.tail_cons,Fin.tail_cons,he] have hh := congrFun (p.injective hh) 0 simp only [Fin.cons_zero] at hh contradiction cases h0 : p (Fin.cons false u) 0 <;> cases h1 : p (Fin.cons true u) 0 <;> simp_all · change u j=p (Fin.cons b u) j.succ have h := congrFun (hp (Fin.cons b u)) j simpa only [Fin.tail_cons,Fin.tail,Fin.cons_succ] using h.symm lemma pairSwitch_injective (d : ℕ) : Function.Injective (pairSwitch (d := d)) := by intro ξ η h funext u have hh := congrArg (fun p : Equiv.Perm (Card (d+1)) => p (Fin.cons false u) 0) h change Bool.xor false (ξ u)=Bool.xor false (η u) at hh simpa only [Bool.false_xor] using hh end CubeShuffle namespace CubeShuffle.Specht open scoped BigOperators Classical noncomputable def pairFiberEquiv (d : ℕ) (μ : YoungDiagram) (e : Card (d+1) ≃ Cell μ) : (Card d → Bool) ≃ fiberGroup (fun x => Fin.tail (e.symm x)) := Equiv.ofBijective (fun ξ => ⟨e.permCongr (pairSwitch ξ),by intro x simp only [Equiv.permCongr_apply,e.symm_apply_apply] exact Fin.tail_cons _ _⟩) ⟨fun ξ η h => pairSwitch_injective d (e.permCongr.injective (congrArg Subtype.val h)),by intro p let q := e.symm.permCongr p.1 have hq : ∀ x, Fin.tail (q x)=Fin.tail x := by intro x have h := p.2 (e x) simpa only [q,Equiv.permCongr_apply,Equiv.symm_symm,e.symm_apply_apply] using h refine ⟨fun u => q (Fin.cons false u) 0,?_⟩ apply Subtype.ext change e.permCongr (pairSwitch (fun u => q (Fin.cons false u) 0))=p.1 rw [tail_preserving_pairSwitch d q hq] apply Equiv.ext intro x simp only [q,Equiv.permCongr_apply,Equiv.symm_symm,e.apply_symm_apply]⟩ lemma pair_sum_taboid_zero (d : ℕ) (μ : YoungDiagram) (e : Card (d+1) ≃ Cell μ) (hj : 2^d < μ.colLen 0) (v : space μ) : (∑ ξ : Card d → Bool, tabloidRep μ (e.permCongr (pairSwitch ξ))) v.1=0 := by have he : (∑ ξ : Card d → Bool, tabloidRep μ (e.permCongr (pairSwitch ξ)))= symmetrizer (fiberGroup (fun x => Fin.tail (e.symm x))) (tabloidRep μ) := Fintype.sum_equiv (pairFiberEquiv d μ e) _ _ (fun _ => rfl) rw [he] exact tall_column_average_zero μ _ 0 (by simpa only [card_positions] using hj) v.1 v.2 lemma pair_operator_tall_zero (d : ℕ) (μ : YoungDiagram) (e : Card (d+1) ≃ Cell μ) (hj : 2^d < μ.colLen 0) : UnitaryFinite.sampleOperator (V := hilbertSpace μ) (relabelledUnitary μ e) pairSwitch=0 := by apply ContinuousLinearMap.ext intro v obtain ⟨w,rfl⟩ := (spaceHilbertEquiv μ).surjective v have hh : (∑ ξ : Card d → Bool, representation μ (e.permCongr (pairSwitch ξ))) w=0 := by apply Subtype.ext simp only [LinearMap.sum_apply,Submodule.coe_sum,Submodule.coe_zero] change (∑ ξ : Card d → Bool, tabloidRep μ (e.permCongr (pairSwitch ξ)) w.1)=0 simpa only [LinearMap.sum_apply] using pair_sum_taboid_zero d μ e hj w have hh' := congrArg (spaceHilbertEquiv μ) hh simp only [LinearMap.sum_apply,map_sum,map_zero] at hh' change ((Fintype.card (Card d → Bool):ℂ)⁻¹ • ∑ ξ : Card d → Bool, UnitaryFinite.continuousRepresentation (relabelledUnitary μ e) (pairSwitch ξ)) (spaceHilbertEquiv μ w)=0 rw [smul_apply,sum_apply] change (Fintype.card (Card d → Bool):ℂ)⁻¹ • (∑ ξ : Card d → Bool, spaceHilbertEquiv μ (representation μ (e.permCongr (pairSwitch ξ)) ((spaceHilbertEquiv μ).symm (spaceHilbertEquiv μ w))))=0 simp only [LinearEquiv.symm_apply_apply,hh',smul_zero] end CubeShuffle.Specht namespace CubeShuffle.Specht open scoped BigOperators Classical open UnitaryFinite lemma palindrome_tall_zero (d : ℕ) (μ : YoungDiagram) (e : Card (d+1) ≃ Cell μ) (hj : 2^d<μ.colLen 0) : sampleOperator (V := hilbertSpace μ) (relabelledUnitary μ e) (palindromePerm (d+1))=0 := by let ρ := relabelledUnitary μ e let : NormedAddCommGroup (hilbertSpace μ) := inferInstance let : InnerProductSpace ℂ (hilbertSpace μ) := inferInstance let : FiniteDimensional ℂ (hilbertSpace μ) := inferInstance have hpair : sampleOperator (V := hilbertSpace μ) ρ (pairSwitch (d := d))=0 := pair_operator_tall_zero d μ e hj have hi : sampleOperator ρ (fun ω => (butterflyPerm (d+1) (decodeButterfly (d+1) ω))⁻¹)=0 := by rw [inverse_butterfly_average_step,hpair,mul_zero] rw [sampleOperator_inv ρ (relabelledUnitary_unitary μ e)] at hi rw [sampleOperator_palindrome _ _ (relabelledUnitary_unitary μ e),hi,mul_zero] lemma palindrome_tall_zero_general (d : ℕ) (hd : 0