introvoyz045's picture
Migrated from GitHub
4a56cd6 verified
Raw History Blame Contribute Delete
13.2 kB
import OAI.RepresentationTheory.RowColumn.OverlapBound
import OAI.Probability.CubeShuffle.FourierBound
namespace OAI
section
noncomputable section
open scoped BigOperators Classical
namespace RowColumn
/-- Absorption of the exact polynomial loss into the absolute occupied-board
constant. This is used for both halves of the min. -/
lemma occupied_numeric_absorb (m n h s : β„•) (hh : 1 ≀ h) (hs : s ≀ m*n) :
16 * ((s : ℝ)+1)^((16*(m+n)+8)*h^2) * Real.exp ((m*n-s : β„•) : ℝ) ≀
Real.exp (128 * (((m+n+1 : β„•) : ℝ)*(h : ℝ)^2 * Real.log ((m*n : β„•)+2) +
(m*n-s : β„•))) := by
let N : ℝ := (m*n : β„•)+2
let E : β„• := (16*(m+n)+8)*h^2
have hN : 2 ≀ N := by dsimp [N]; have := (Nat.cast_nonneg (m*n) : (0 : ℝ) ≀ (m*n : β„•)); linarith
have hNp : 0 < N := lt_of_lt_of_le (by norm_num) hN
have hb : 0 ≀ (s : ℝ)+1 := by positivity
have hbs : (s : ℝ)+1 ≀ N := by dsimp [N]; exact_mod_cast (by omega : s+1 ≀ m*n+2)
have h16 : (16 : ℝ) ≀ N^4 := by
calc 16 = (2 : ℝ)^4 := by norm_num
_ ≀ N^4 := pow_le_pow_leftβ‚€ (by norm_num) hN _
have hp : 16 * ((s : ℝ)+1)^E ≀ N^(E+4) := by
calc _ ≀ N^4 * N^E := mul_le_mul h16 (pow_le_pow_leftβ‚€ hb hbs _) (by positivity) (by positivity)
_ = N^(E+4) := by rw [pow_add]; ring
have hh2 : (1 : ℝ) ≀ (h : ℝ)^2 := by exact_mod_cast (Nat.one_le_pow 2 h hh)
have he : ((E+4 : β„•) : ℝ) ≀ 128*((m+n+1 : β„•) : ℝ)*(h : ℝ)^2 := by
dsimp [E]
push_cast
nlinarith [sq_nonneg (h : ℝ), mul_nonneg (show 0 ≀ (m:ℝ)+(n:ℝ) by positivity) (sq_nonneg (h:ℝ))]
have hl : 0 ≀ Real.log N := Real.log_nonneg (by linarith)
have ht : (0 : ℝ) ≀ (m*n-s : β„•) := Nat.cast_nonneg _
have hexp : N^(E+4) = Real.exp (((E+4 : β„•) : ℝ)*Real.log N) := by
rw [Real.exp_nat_mul, Real.exp_log hNp]
change 16 * ((s : ℝ)+1)^E * Real.exp ((m*n-s : β„•) : ℝ) ≀ _
calc
_ ≀ N^(E+4) * Real.exp ((m*n-s : β„•) : ℝ) := mul_le_mul_of_nonneg_right hp (Real.exp_pos _).le
_ = Real.exp (((E+4 : β„•) : ℝ)*Real.log N + (m*n-s : β„•)) := by rw [hexp, Real.exp_add]
_ ≀ _ := by
apply Real.exp_le_exp.mpr
change ((E+4 : β„•) : ℝ)*Real.log N + (m*n-s : β„•) ≀
128 * (((m+n+1 : β„•) : ℝ)*(h : ℝ)^2 * Real.log N + (m*n-s : β„•))
nlinarith [mul_le_mul_of_nonneg_right he hl]
end RowColumn
end
end
section
noncomputable section
open scoped BigOperators Classical
namespace RowColumn
lemma occupied_factor_bound (s m n h u v D : β„•) (t : ℝ)
(hu : u ≀ (s+1)^(4*m*h^2)) (hv : v ≀ (s+1)^(4*n*h^2))
(hD : D ≀ (s+1)^(4*h^2)) :
16 * ((s+1 : β„•) : ℝ)^(4*m*h^2*3) * ((s+1 : β„•) : ℝ)^(4*n*h^2*3) *
(D : ℝ)^2 * Real.exp t * u * v ≀
16 * ((s : ℝ)+1)^((16*(m+n)+8)*h^2) * Real.exp t := by
have hu' : (u : ℝ) ≀ ((s : ℝ)+1)^(4*m*h^2) := by exact_mod_cast hu
have hv' : (v : ℝ) ≀ ((s : ℝ)+1)^(4*n*h^2) := by exact_mod_cast hv
have hD' : (D : ℝ) ≀ ((s : ℝ)+1)^(4*h^2) := by exact_mod_cast hD
calc
_ ≀ 16 * ((s : ℝ)+1)^(4*m*h^2*3) * ((s : ℝ)+1)^(4*n*h^2*3) *
(((s : ℝ)+1)^(4*h^2))^2 * Real.exp t * ((s : ℝ)+1)^(4*m*h^2) *
((s : ℝ)+1)^(4*n*h^2) := by
push_cast
gcongr
_ = _ := by
rw [show (16*(m+n)+8)*h^2 = 4*m*h^2*3 + 4*n*h^2*3 + (4*h^2)*2 + 4*m*h^2 + 4*n*h^2 by ring]
simp only [pow_add, pow_mul]
ring
lemma occupied_count_bound (s m n h u v : β„•) (t : ℝ) (ht : 0 ≀ t)
(hu : u ≀ (s+1)^(4*m*h^2)) (hv : v ≀ (s+1)^(4*n*h^2)) :
(u : ℝ)*v ≀ 16 * ((s : ℝ)+1)^((16*(m+n)+8)*h^2) * Real.exp t := by
have huv : (u : ℝ)*v ≀ ((s : ℝ)+1)^(4*(m+n)*h^2) := by
have hu' : (u : ℝ) ≀ ((s : ℝ)+1)^(4*m*h^2) := by exact_mod_cast hu
have hv' : (v : ℝ) ≀ ((s : ℝ)+1)^(4*n*h^2) := by exact_mod_cast hv
calc _ ≀ ((s : ℝ)+1)^(4*m*h^2) * ((s : ℝ)+1)^(4*n*h^2) :=
mul_le_mul hu' hv' (by positivity) (by positivity)
_ = _ := by rw [← pow_add]; congr 1; ring
have he : 4*(m+n)*h^2 ≀ (16*(m+n)+8)*h^2 := Nat.mul_le_mul_right _ (by omega)
have hb : 1 ≀ (s : ℝ)+1 := by have := Nat.cast_nonneg (Ξ± := ℝ) s; linarith
have hp := pow_le_pow_rightβ‚€ hb he
have hx : 1 ≀ Real.exp t := Real.one_le_exp_iff.mpr ht
have hbase : 0 ≀ ((s : ℝ)+1)^((16*(m+n)+8)*h^2) := by positivity
calc _ ≀ ((s : ℝ)+1)^((16*(m+n)+8)*h^2) := huv.trans hp
_ ≀ _ := by nlinarith [mul_le_mul_of_nonneg_left hx hbase]
end RowColumn
end
end
section
noncomputable section
open scoped BigOperators Classical
namespace RowColumn
open CubeShuffle.Specht Signed MatrixState
lemma irreducible_nontrivial {G V : Type*} [Group G] [AddCommGroup V] [Module β„‚ V]
(ρ : Representation β„‚ G V) [Representation.IsIrreducible ρ] : Nontrivial V := by
let := IsSimpleModule.nontrivial (MonoidAlgebra β„‚ G) ρ.asModule
exact ρ.asModuleEquiv.symm.toEquiv.nontrivial
lemma empty_hook_dimension_le (a : YoungDiagram) (h : β„•) (H : InHook a h)
(ha : Fintype.card (Cell a)=0) : Module.finrank β„‚ (space a) ≀ 1 := by
have hi := LinearMap.finrank_le_finrank_of_injective (HookModel.hookEmbedding_injective a h H)
change Module.finrank β„‚ (space a) ≀
Module.finrank β„‚ (EuclideanSpace β„‚ (Words (S := Cell a) (HookModel.IsOdd (h := h)) (HookModel.oddCount a h H))) at hi
rw [finrank_euclideanSpace] at hi
calc _ ≀ Fintype.card (Words (S := Cell a) (HookModel.IsOdd (h := h)) (HookModel.oddCount a h H)) := hi
_ ≀ Fintype.card (Cell a β†’ HookModel.Color h) := Fintype.card_subtype_le _
_ = 1 := by rw [Fintype.card_fun, ha, pow_zero]
lemma hook_lineCost {S L : Type*} [Fintype S] [Fintype L] (h : β„•) :
lineCost (S := S) (C := HookModel.Color h) (L := L) =
(Fintype.card S+1)^(4*Fintype.card L*h^2) := by
simp only [lineCost, HookModel.Color, Fintype.card_sum, Fintype.card_fin]
congr 1
ring
lemma hook_sectorAlgebra_bound {S : Type*} [Fintype S] [DecidableEq S] (h k : β„•) :
Module.finrank β„‚ (sectorAlgebra (S := S) (HookModel.IsOdd (h := h)) k) ≀
(Fintype.card S+1)^(4*h^2) := by
have hh := sectorAlgebra_finrank (S := S) (HookModel.IsOdd (h := h)) k
simpa only [HookModel.Color, Fintype.card_sum, Fintype.card_fin, show (h+h)^2=4*h^2 by ring] using hh
end RowColumn
end
end
section
noncomputable section
open scoped BigOperators Classical
namespace RowColumn
open CubeShuffle.Specht CubeShuffle.UnitaryFinite Signed MatrixState
/-- The dimension-ratio half of the occupied main, now for the literal occupied
subset and all prescribed row and column embeddings. -/
theorem occupied_dimension_ratio (m n : β„•) (Ξ© : Finset (Board m n)) [Nonempty Ξ©]
(a : YoungDiagram) (e : Ξ© ≃ Cell a) (h : β„•) (hh : 1 ≀ h) (H : InHook a h)
(r c u v : β„•)
(ρ : Representation β„‚ (rowGroup Ξ©) (EuclideanSpace β„‚ (Fin r)))
(Ο„ : Representation β„‚ (columnGroup Ξ©) (EuclideanSpace β„‚ (Fin c)))
(hρ : IsUnitary ρ) (hΟ„ : IsUnitary Ο„)
(I : Fin u β†’ EuclideanSpace β„‚ (Fin r) β†’β‚—α΅’[β„‚] hilbertSpace a)
(J : Fin v β†’ EuclideanSpace β„‚ (Fin c) β†’β‚—α΅’[β„‚] hilbertSpace a)
(hI : βˆ€ i, Intertwines (V := EuclideanSpace β„‚ (Fin r)) (W := hilbertSpace a)
ρ ((relabelledUnitary a e).comp (rowGroup Ω).subtype) (I i).toLinearMap)
(hJ : βˆ€ i, Intertwines (V := EuclideanSpace β„‚ (Fin c)) (W := hilbertSpace a)
Ο„ ((relabelledUnitary a e).comp (columnGroup Ξ©).subtype) (J i).toLinearMap)
(hu : u ≀ (Ξ©.card+1)^(4*m*h^2)) (hv : v ≀ (Ξ©.card+1)^(4*n*h^2)) :
allCopyOverlap (V := EuclideanSpace β„‚ (Fin r)) (W := EuclideanSpace β„‚ (Fin c))
(X := hilbertSpace a) I J ≀
(16 * ((Ξ©.card : ℝ)+1)^((16*(m+n)+8)*h^2) * Real.exp ((m*n-Ξ©.card : β„•) : ℝ)) *
((r : ℝ)*c / Module.finrank β„‚ (space a)) := by
let board : Ξ© β†ͺ Fin m Γ— Fin n := ⟨Subtype.val, Subtype.val_injective⟩
let cβ‚€ : HookModel.Color h := Sum.inl ⟨0, by omega⟩
have ha := actual_copy_overlap_bound (V := EuclideanSpace β„‚ (Fin r))
(W := EuclideanSpace β„‚ (Fin c)) board a e h H cβ‚€ ρ Ο„ hρ hΟ„ I J hI hJ
have hc : Fintype.card (Cell a) = Ξ©.card := (Fintype.card_congr e).symm.trans (Fintype.card_coe Ξ©)
have hD := hook_sectorAlgebra_bound (S := Cell a) h (HookModel.oddCount a h H)
rw [hc] at hD
let D := Module.finrank β„‚ (sectorAlgebra (S := Cell a) (HookModel.IsOdd (h := h)) (HookModel.oddCount a h H))
have hp := occupied_factor_bound Ξ©.card m n h u v D ((m*n-Ξ©.card : β„•) : ℝ) hu hv hD
have hratio : 0 ≀ (r : ℝ)*c / (Module.finrank β„‚ (space a) : ℝ) := by positivity
have hmul := mul_le_mul_of_nonneg_right hp hratio
simp only [hook_lineCost, hc, Fintype.card_fin, Fintype.card_coe, finrank_euclideanSpace,
Nat.cast_mul, Nat.cast_pow, ← pow_mul] at ha
apply ha.trans
convert hmul using 1; dsimp [D]; ring
end RowColumn
end
end
section
noncomputable section
open scoped BigOperators Classical
namespace RowColumn
open CubeShuffle.Specht CubeShuffle.UnitaryFinite Signed MatrixState
/-- `thm:occupied` (weighted.tex:76–84), including the empty occupied subset,
arbitrary deletion layout and every orthogonal multiplicity copy. The absolute
constant is 128; dimensions, unnormalized trace and operator norm are literal. -/
theorem occupied_overlap_endpoint : OccupiedOverlapEndpoint := by
refine ⟨128, by norm_num, ?_⟩
intro m n Ξ© a e h hh hN H r c u v ρ Ο„ hirρ hirΟ„ hρ hΟ„ I J hI hJ
let : Representation.IsIrreducible ρ := hirρ
let : Representation.IsIrreducible Ο„ := hirΟ„
let : Nontrivial (EuclideanSpace β„‚ (Fin r)) := irreducible_nontrivial ρ
let : Nontrivial (EuclideanSpace β„‚ (Fin c)) := irreducible_nontrivial Ο„
have hu : u ≀ (Ξ©.card+1)^(4*m*h^2) := by
simpa only [Fintype.card_coe, Fintype.card_fin] using
hook_line_copy_count (V := EuclideanSpace β„‚ (Fin r)) (fun x : Ξ© => x.1.1) a e h H ρ hρ I hI
have hv : v ≀ (Ξ©.card+1)^(4*n*h^2) := by
simpa only [Fintype.card_coe, Fintype.card_fin] using
hook_line_copy_count (V := EuclideanSpace β„‚ (Fin c)) (fun x : Ξ© => x.1.2) a e h H Ο„ hΟ„ J hJ
let loss : ℝ := 16 * ((Ξ©.card : ℝ)+1)^((16*(m+n)+8)*h^2) * Real.exp ((m*n-Ξ©.card : β„•) : ℝ)
let ratio : ℝ := (r : ℝ)*c / Module.finrank β„‚ (space a)
have hloss : 0 ≀ loss := by dsimp [loss]; positivity
have hratio : 0 ≀ ratio := by dsimp [ratio]; positivity
have hplain : allCopyOverlap (V := EuclideanSpace β„‚ (Fin r)) (W := EuclideanSpace β„‚ (Fin c))
(X := hilbertSpace a) I J ≀ loss :=
(@allCopyOverlap_le_count (EuclideanSpace β„‚ (Fin r)) (EuclideanSpace β„‚ (Fin c))
(hilbertSpace a) inferInstance inferInstance inferInstance
inferInstance inferInstance inferInstance inferInstance inferInstance inferInstance u v I J).trans
(occupied_count_bound Ξ©.card m n h u v ((m*n-Ξ©.card : β„•) : ℝ) (Nat.cast_nonneg _) hu hv)
have hdim : allCopyOverlap (V := EuclideanSpace β„‚ (Fin r)) (W := EuclideanSpace β„‚ (Fin c))
(X := hilbertSpace a) I J ≀ loss * ratio := by
by_cases hΞ© : Ξ©.Nonempty
· obtain ⟨x,hx⟩ := hΩ
let : Nonempty Ω := ⟨⟨x,hx⟩⟩
exact occupied_dimension_ratio m n Ξ© a e h hh H r c u v ρ Ο„ hρ hΟ„ I J hI.1 hJ.1 hu hv
Β· have hempty : Ξ©=βˆ… := Finset.not_nonempty_iff_eq_empty.mp hΞ©
have ha : Fintype.card (Cell a)=0 := by
rw [← Fintype.card_congr e, Fintype.card_coe, hempty, Finset.card_empty]
have hd : (Module.finrank β„‚ (space a) : ℝ) ≀ 1 := by exact_mod_cast empty_hook_dimension_le a h H ha
have hdpos : (0 : ℝ) < Module.finrank β„‚ (space a) := by exact_mod_cast dimension_pos a
have hr : (1 : ℝ) ≀ r := by
have hh : 0 < Module.finrank β„‚ (EuclideanSpace β„‚ (Fin r)) := Module.finrank_pos
simp only [finrank_euclideanSpace, Fintype.card_fin] at hh
exact_mod_cast hh
have hc : (1 : ℝ) ≀ c := by
have hh : 0 < Module.finrank β„‚ (EuclideanSpace β„‚ (Fin c)) := Module.finrank_pos
simp only [finrank_euclideanSpace, Fintype.card_fin] at hh
exact_mod_cast hh
have hrc : 1 ≀ ratio := by
dsimp [ratio]
apply (le_div_iffβ‚€ hdpos).mpr
simp only [one_mul]
exact hd.trans (one_le_mul_of_one_le_of_one_le hr hc)
exact hplain.trans (by simpa using mul_le_mul_of_nonneg_left hrc hloss)
have hmin : allCopyOverlap (V := EuclideanSpace β„‚ (Fin r)) (W := EuclideanSpace β„‚ (Fin c))
(X := hilbertSpace a) I J ≀ loss * min 1 ratio := by
by_cases hx : ratio ≀ 1
Β· rw [min_eq_right hx]; exact hdim
Β· rw [min_eq_left (le_of_not_ge hx), mul_one]; exact hplain
have hs : Ξ©.card ≀ m*n := by
simpa only [Fintype.card_prod, Fintype.card_fin] using Finset.card_le_univ Ξ©
have hbound := occupied_numeric_absorb m n h Ξ©.card hh hs
exact hmin.trans (mul_le_mul_of_nonneg_right hbound (le_min (by norm_num) hratio))
end RowColumn
end
end
/-- The occupied row-column overlap bound. -/
theorem RowColumn.occupied_overlap : RowColumn.OccupiedOverlapEndpoint :=
RowColumn.occupied_overlap_endpoint
end OAI