Offline · exact source
Exact Lean source

GeneralSymmetricOccupation

formalization/Cloning/GeneralSymmetricOccupation.lean

Source hash: 0fac885af1d7ef711350c8f86bec78ec650ff3385040e27c0a030a11143e40d1

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
definition Cloning.GeneralSymmetricOccupation.Worddefinition Cloning.GeneralSymmetricOccupation.TensorSpacedefinition Cloning.GeneralSymmetricOccupation.profiledefinition Cloning.GeneralSymmetricOccupation.Occupationdefinition Cloning.GeneralSymmetricOccupation.labeltheorem Cloning.GeneralSymmetricOccupation.label_surjectivetheorem Cloning.GeneralSymmetricOccupation.profile_eq_iff_permtheorem Cloning.GeneralSymmetricOccupation.label_eq_iff_permtheorem Cloning.GeneralSymmetricOccupation.profile_permutetheorem Cloning.GeneralSymmetricOccupation.label_permutedefinition Cloning.GeneralSymmetricOccupation.multiplicitytheorem Cloning.GeneralSymmetricOccupation.multiplicity_posdefinition Cloning.GeneralSymmetricOccupation.weighttheorem Cloning.GeneralSymmetricOccupation.weight_nonnegtheorem Cloning.GeneralSymmetricOccupation.weight_hasSumdefinition Cloning.GeneralSymmetricOccupation.columntheorem Cloning.GeneralSymmetricOccupation.column_applytheorem Cloning.GeneralSymmetricOccupation.column_normtheorem Cloning.GeneralSymmetricOccupation.column_orthonormaldefinition Cloning.GeneralSymmetricOccupation.OccupationSpacedefinition Cloning.GeneralSymmetricOccupation.isometrytheorem Cloning.GeneralSymmetricOccupation.isometry_singletheorem Cloning.GeneralSymmetricOccupation.isometry_applydefinition Cloning.GeneralSymmetricOccupation.symmetricSubspacetheorem Cloning.GeneralSymmetricOccupation.symmetric_iff_constant_on_fiberstheorem Cloning.GeneralSymmetricOccupation.isometry_mem_symmetrictheorem Cloning.GeneralSymmetricOccupation.isometry_range
1import Cloning.SymmetricOccupation
2import Mathlib.Logic.Equiv.Fintype
3import Mathlib.Algebra.BigOperators.Group.Finset.Sigma
4 
5/-!
6# Arbitrary-dimensional symmetric tensors in the computational basis
7 
8The ambient space has computational words `Fin L → Fin d`. Occupations are
9actual multiplicity profiles of words. We prove that these profiles classify
10slot-permutation orbits and that the normalized uniform vectors on their
11fibers form an orthonormal family. The range of the resulting isometry is
12exactly the permutation-invariant (symmetric tensor) subspace.
13-/
14 
15noncomputable section
16set_option synthInstance.maxHeartbeats 200000
17set_option maxHeartbeats 1000000
18open scoped BigOperators InnerProductSpace
19 
20namespace Cloning.GeneralSymmetricOccupation
21 
22abbrev Word (L d : ℕ) := Fin L → Fin d
23abbrev TensorSpace (L d : ℕ) := lp (fun _ : Word L d => ℂ) 2
24 
25/-- Multiplicity of each one-particle basis vector in a computational tensor. -/
26def profile {L d : ℕ} (w : Word L d) (a : Fin d) : ℕ :=
27  Fintype.card {i : Fin L // w i = a}
28 
29/-- Realized occupation profiles; no nonemptiness assumption on a fiber is hidden. -/
30def Occupation (L d : ℕ) := Set.range (@profile L d)
31 
32instance (L d : ℕ) : Fintype (Occupation L d) := by
33  unfold Occupation
34  exact Fintype.ofFinite _
35instance (L d : ℕ) : DecidableEq (Occupation L d) := Classical.decEq _
36 
37/-- The occupation associated to a computational word. -/
38def label {L d : ℕ} (w : Word L d) : Occupation L d := ⟨profile w, ⟨w, rfl⟩⟩
39 
40theorem label_surjective (L d : ℕ) : Function.Surjective (@label L d) := by
41  rintro ⟨q, w, hw⟩
42  exact ⟨w, Subtype.ext hw⟩
43 
44/-- Equal occupations are precisely equivalent under permutation of the tensor slots. -/
45theorem profile_eq_iff_perm {L d : ℕ} (w z : Word L d) :
46    profile w = profile z ↔ ∃ σ : Equiv.Perm (Fin L), ∀ i, z (σ i) = w i := by
47  classical
48  constructor
49  · intro h
50    let e (a : Fin d) : {i : Fin L // w i = a} ≃ {i : Fin L // z i = a} :=
51      Fintype.equivOfCardEq (congrFun h a)
52    exact ⟨Equiv.ofFiberEquiv e, Equiv.ofFiberEquiv_map e⟩
53  · rintro ⟨σ, hσ⟩
54    funext a
55    exact Fintype.card_congr
56      { toFun := fun i => ⟨σ i, (hσ i).trans i.property⟩
57        invFun := fun i => ⟨σ.symm i, by rw [← hσ, σ.apply_symm_apply]; exact i.property⟩
58        left_inv := fun i => by simp
59        right_inv := fun i => by simp }
60 
61theorem label_eq_iff_perm {L d : ℕ} (w z : Word L d) :
62    label w = label z ↔ ∃ σ : Equiv.Perm (Fin L), ∀ i, z (σ i) = w i := by
63  rw [← profile_eq_iff_perm]
64  exact Subtype.ext_iff
65 
66theorem profile_permute {L d : ℕ} (w : Word L d) (σ : Equiv.Perm (Fin L)) :
67    profile (w ∘ σ) = profile w :=
68  (profile_eq_iff_perm _ _).mpr ⟨σ, fun _ => rfl⟩
69 
70@[simp] theorem label_permute {L d : ℕ} (w : Word L d) (σ : Equiv.Perm (Fin L)) :
71    label (w ∘ σ) = label w := Subtype.ext (profile_permute w σ)
72 
73/-- Number of computational words of an occupation. -/
74def multiplicity {L d : ℕ} (q : Occupation L d) : ℕ :=
75  (Finset.univ.filter (fun w : Word L d => label w = q)).card
76 
77theorem multiplicity_pos {L d : ℕ} (q : Occupation L d) : 0 < multiplicity q := by
78  obtain ⟨w, hw⟩ := label_surjective L d q
79  exact Finset.card_pos.mpr ⟨w, by simp [hw]⟩
80 
81def weight {L d : ℕ} (q : Occupation L d) (w : Word L d) : ℝ :=
82  if label w = q then (multiplicity q : ℝ)⁻¹ else 0
83 
84theorem weight_nonneg {L d : ℕ} (q : Occupation L d) (w : Word L d) :
85    0 ≤ weight q w := by unfold weight; split_ifs <;> positivity
86 
87theorem weight_hasSum {L d : ℕ} (q : Occupation L d) : HasSum (weight q) 1 := by
88  classical
89  have hm : (multiplicity q : ℝ) ≠ 0 := by exact_mod_cast (multiplicity_pos q).ne'
90  have hs : ∑ w : Word L d, weight q w = 1 := by
91    simp only [weight, ← Finset.sum_filter, Finset.sum_const, nsmul_eq_mul]
92    exact mul_inv_cancel₀ hm
93  exact hs ▸ hasSum_fintype _
94 
95/-- Normalized uniform occupation vector in the physical computational tensor basis. -/
96def column {L d : ℕ} (q : Occupation L d) : TensorSpace L d :=
97  Cloning.CoherentCoefficients.amplitudeVector (weight q) (weight_nonneg q) (weight_hasSum q)
98 
99theorem column_apply {L d : ℕ} (q : Occupation L d) (w : Word L d) :
100    column q w = if label w = q then
101      ((Real.sqrt (multiplicity q : ℝ))⁻¹ : ℂ) else 0 := by
102  simp only [column, Cloning.CoherentCoefficients.amplitudeVector_apply, weight]
103  split_ifs <;> simp [Real.sqrt_inv]
104 
105theorem column_norm {L d : ℕ} (q : Occupation L d) : ‖column q‖ = 1 :=
106  Cloning.CoherentCoefficients.amplitudeVector_norm _ _ _
107 
108theorem column_orthonormal (L d : ℕ) : Orthonormal ℂ (@column L d) := by
109  refine ⟨column_norm, ?_⟩
110  intro q r hqr
111  rw [lp.inner_eq_tsum]
112  have hz : ∀ w : Word L d, ⟪column q w, column r w⟫_ℂ = 0 := by
113    intro w
114    rw [column_apply, column_apply]
115    split_ifs with hq hr
116    · exact False.elim (hqr (hq.symm.trans hr))
117    all_goals simp
118  simp only [hz, tsum_zero]
119 
120abbrev OccupationSpace (L d : ℕ) := lp (fun _ : Occupation L d => ℂ) 2
121 
122/-- Occupation coordinates embedded into the actual finite tensor product. -/
123def isometry (L d : ℕ) : OccupationSpace L d →ₗᵢ[ℂ] TensorSpace L d :=
124  (column_orthonormal L d).orthogonalFamily.linearIsometry
125 
126theorem isometry_single (L d : ℕ) (q : Occupation L d) :
127    isometry L d (lp.single 2 q 1) = column q := by
128  rw [isometry, OrthogonalFamily.linearIsometry_apply_single]
129  exact one_smul ℂ _
130 
131theorem isometry_apply {L d : ℕ} (v : OccupationSpace L d) (w : Word L d) :
132    isometry L d v w = v (label w) / (Real.sqrt (multiplicity (label w) : ℝ) : ℂ) := by
133  classical
134  have hs : isometry L d v = ∑ q : Occupation L d, v q • column q := by
135    rw [isometry, OrthogonalFamily.linearIsometry_apply, tsum_fintype]
136    rfl
137  rw [hs]
138  simp only [lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul]
139  rw [Finset.sum_eq_single (label w)]
140  · simp [column_apply, div_eq_mul_inv]
141  · intro q hq hn
142    simp [column_apply, Ne.symm hn]
143  · simp
144 
145/-- Symmetric tensors are the fixed vectors of every permutation of tensor slots. -/
146def symmetricSubspace (L d : ℕ) : Submodule ℂ (TensorSpace L d) where
147  carrier := {v | ∀ (w : Word L d) (σ : Equiv.Perm (Fin L)), v (w ∘ σ) = v w}
148  zero_mem' := by intro w σ; rfl
149  add_mem' := by intro v u hv hu w σ; exact congrArg₂ (· + ·) (hv w σ) (hu w σ)
150  smul_mem' := by intro a v hv w σ; exact congrArg (a • ·) (hv w σ)
151 
152theorem symmetric_iff_constant_on_fibers {L d : ℕ} (v : TensorSpace L d) :
153    v ∈ symmetricSubspace L d ↔ ∀ w z : Word L d, label w = label z → v w = v z := by
154  constructor
155  · intro hv w z h
156    obtain ⟨σ, hσ⟩ := (label_eq_iff_perm w z).mp h
157    have hw : z ∘ σ = w := funext hσ
158    simpa only [hw] using hv z σ
159  · intro hv w σ
160    exact hv _ _ (label_permute w σ)
161 
162theorem isometry_mem_symmetric {L d : ℕ} (v : OccupationSpace L d) :
163    isometry L d v ∈ symmetricSubspace L d := by
164  intro w σ
165  simp only [isometry_apply, label_permute]
166 
167/-- Every symmetric tensor has occupation coordinates, with no dimension restriction. -/
168theorem isometry_range (L d : ℕ) :
169    (isometry L d).toLinearMap.range = symmetricSubspace L d := by
170  classical
171  ext v
172  constructor
173  · rintro ⟨u, rfl⟩
174    exact isometry_mem_symmetric u
175  · intro hv
176    let rep : Occupation L d → Word L d := fun q => (label_surjective L d q).choose
177    have hrep : ∀ q, label (rep q) = q := fun q => (label_surjective L d q).choose_spec
178    let coeff : OccupationSpace L d :=
179      ⟨fun q => (Real.sqrt (multiplicity q : ℝ) : ℂ) * v (rep q),
180        memℓp_gen (by simp only [ENNReal.toReal_ofNat]; exact (hasSum_fintype _).summable)⟩
181    refine ⟨coeff, ?_⟩
182    ext w
183    change isometry L d coeff w = v w
184    rw [isometry_apply]
185    change ((Real.sqrt (multiplicity (label w) : ℝ) : ℂ) * v (rep (label w))) /
186      (Real.sqrt (multiplicity (label w) : ℝ) : ℂ) = v w
187    have hm : (Real.sqrt (multiplicity (label w) : ℝ) : ℂ) ≠ 0 := by
188      exact_mod_cast (Real.sqrt_pos.mpr (by exact_mod_cast multiplicity_pos (label w))).ne'
189    rw [mul_div_cancel_left₀ _ hm]
190    exact (symmetric_iff_constant_on_fibers v).mp hv _ _ (hrep _)
191 
192end Cloning.GeneralSymmetricOccupation