File size: 4,413 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Probability.InvariantIsing.Cavity.CavityRetainedNorm
import OAI.Probability.InvariantIsing.Cavity.CavityConcreteFrameOrbit

namespace OAI

/-! A single physical base eigenframe identifies every retained group
overlap with the corresponding projected spin overlap. -/

noncomputable section
open scoped BigOperators Matrix

namespace InvariantIsing

lemma cavity_physical_frame_coordinates {N n : β„•} {ΞΉ : Type*} [Fintype ΞΉ]
    (e : ΞΉ ≃ Fin N) (U : SpecialOrthogonal (N + n))
    (F : Matrix (Fin (N + n)) ΞΉ ℝ)
    (hF : βˆ€ i : Fin n, βˆ€ j,
      ((U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ).transpose * F) (Fin.natAdd N i) j = 0)
    (V : Orthogonal N)
    (hV : βˆ€ i j, (V : Matrix (Fin N) (Fin N) ℝ) i j =
      cavityReservoirRows ((U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ).transpose * F)
        i (e.symm j))
    (Οƒ : Spin (N + n)) (j : ΞΉ) :
    matrixRotation V⁻¹ (spinVector (fun i => Οƒ (Fin.castAdd n i))) (e j) =
      (F.transpose *α΅₯ (specialRotation U (spinVector Οƒ)).ofLp) j := by
  let P := (U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ).transpose * F
  have he : F.transpose *α΅₯ (specialRotation U (spinVector Οƒ)).ofLp =
      P.transpose *α΅₯ (spinVector Οƒ).ofLp := by
    change F.transpose *α΅₯ ((U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ) *α΅₯
      (spinVector Οƒ).ofLp) = _
    simp only [P, Matrix.transpose_mul, Matrix.transpose_transpose, Matrix.mulVec_mulVec]
  rw [he]
  change (βˆ‘ i : Fin N, (V : Matrix (Fin N) (Fin N) ℝ) i (e j) *
    spinValue (Οƒ (Fin.castAdd n i))) = βˆ‘ i : Fin (N + n), P i j * spinValue (Οƒ i)
  rw [Fin.sum_univ_add]
  simp only [hF, zero_mul, Finset.sum_const_zero, add_zero, hV,
    Equiv.symm_apply_apply, cavityReservoirRows, P]

def cavityBaseGroup {N m d : β„•} (k : Fin m β†’ β„•)
    (e : (((a : Fin m) Γ— Fin (k a)) βŠ• Fin d) ≃ Fin N)
    (aβ‚€ : Fin d β†’ Fin m) (a : Fin m) : Finset (Fin N) :=
  Finset.univ.filter (fun j => Sum.elim (fun v => v.1) aβ‚€ (e.symm j) = a)

theorem cavity_base_group_overlap {N n m d : β„•}
    (g : Fin (N + n) β†’ Fin m) (U : SpecialOrthogonal (N + n))
    (B : Matrix (Fin (m * n)) (Fin d) ℝ)
    (k : Fin m β†’ β„•) (R : (a : Fin m) β†’ Matrix (Fin (N + n)) (Fin (k a)) ℝ)
    (e : (((a : Fin m) Γ— Fin (k a)) βŠ• Fin d) ≃ Fin N)
    (aβ‚€ : Fin d β†’ Fin m)
    (hF : βˆ€ i : Fin n, βˆ€ j,
      ((U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ).transpose *
        Matrix.fromCols (cavityRetainedStack k R)
          (cavityEigenspaceFrame (cavitySpectralImage g
            (cavityColumns (cavitySpecialOrthogonal U))) * B)) (Fin.natAdd N i) j = 0)
    (V : Orthogonal N)
    (hV : βˆ€ i j, (V : Matrix (Fin N) (Fin N) ℝ) i j =
      cavityReservoirRows ((U : Matrix (Fin (N + n)) (Fin (N + n)) ℝ).transpose *
        Matrix.fromCols (cavityRetainedStack k R)
          (cavityEigenspaceFrame (cavitySpectralImage g
            (cavityColumns (cavitySpecialOrthogonal U))) * B)) i (e.symm j))
    (a : Fin m) (Οƒ Ο„ : Spin (N + n)) :
    projectedOverlap (matrixRotation V⁻¹) (cavityBaseGroup k e aβ‚€ a)
      (fun i => Οƒ (Fin.castAdd n i)) (fun i => Ο„ (Fin.castAdd n i)) =
      cavityRetainedBaseOverlap g U B k R
        (fun a => Finset.univ.filter (fun j => aβ‚€ j = a)) a Οƒ Ο„ := by
  let F := Matrix.fromCols (cavityRetainedStack k R)
    (cavityEigenspaceFrame (cavitySpectralImage g (cavityColumns (cavitySpecialOrthogonal U))) * B)
  let z := fun Οƒ : Spin (N + n) => F.transpose *α΅₯ (specialRotation U (spinVector Οƒ)).ofLp
  have hc (Οƒ : Spin (N + n)) (j) :
      matrixRotation V⁻¹ (spinVector (fun i => Οƒ (Fin.castAdd n i))) (e j) = z Οƒ j :=
    cavity_physical_frame_coordinates e U F hF V hV Οƒ j
  have hr (Οƒ : Spin (N + n)) (b : Fin m) (i : Fin (k b)) :
      z Οƒ (Sum.inl ⟨b, i⟩) =
        ((R b).transpose *α΅₯ (specialRotation U (spinVector Οƒ)).ofLp) i := rfl
  have hy (Οƒ : Spin (N + n)) (i : Fin d) :
      z Οƒ (Sum.inr i) = cavityFullSpecialCoordinates g B U Οƒ i := rfl
  rw [projectedOverlap, cavityBaseGroup, Finset.sum_filter]
  rw [← Equiv.sum_comp e]
  simp only [Equiv.symm_apply_apply, hc, Fintype.sum_sum_type, Fintype.sum_sigma,
    Sum.elim_inl, Sum.elim_inr, hr, hy]
  simp only [Finset.sum_ite_irrel]
  rw [cavityRetainedBaseOverlap, Finset.sum_filter, div_eq_inv_mul]
  simp only [Finset.sum_const_zero, Finset.sum_ite_eq', Finset.mem_univ, ite_true, dotProduct]

end InvariantIsing

end

end OAI