File size: 13,187 Bytes
607ee45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
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