import OAI.Geometry.RCD.Metric.QuantitativeDimensionalCross namespace OAI /-! # A quantitative frame-energy identity from centered square data -/ open Finset Real noncomputable section namespace RegularPointCoordinates theorem bochner_frame_defect {E : Type*} [AddCommGroup E] [Module ℝ E] {n : ℕ} (hn : 0 rw [Finset.sum_comm] simp only [q,map_smul,map_sum,LinearMap.smul_apply,LinearMap.sum_apply,smul_eq_mul,hBz, ← mul_sum] ring have hBv : B v v=r^2 := by simp [v,hBw]; ring have hqv : B q v=∑ i, (a i)^2 := by simp only [q,v,map_smul,map_sum,LinearMap.smul_apply,LinearMap.sum_apply,smul_eq_mul, hcross,← mul_sum] ring have hvq : B v q=∑ i, (a i)^2 := (hsym v q).trans hqv apply dimensional_cross_abs_defect (N := (n:ℝ)) (by exact_mod_cast hn) hD hD1 htrace hsquare intro t have hh := hBE (q+t • v) simp only [map_add,map_smul,LinearMap.add_apply,LinearMap.smul_apply,smul_eq_mul, hLq,hLv,hBq,hBv,hqv,hvq] at hh convert hh using 1 ring end RegularPointCoordinates end end OAI