Exact Lean source
TensorWeightFrameLimit
formalization/Cloning/TensorWeightFrameLimit.lean
Source hash: e6ba64e27213207c08b490e915c37316fb8641d0aef7b8d48827b5ddc8029f18
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
theorem
Cloning.TensorLie.varying_norm_tendsto_of_closetheorem Cloning.TensorLie.varying_inner_tendsto_zero_of_closetheorem Cloning.TensorLie.varying_vector_norm_tendstotheorem Cloning.TensorLie.gramSchmidt_sub_tendsto_zerotheorem Cloning.TensorLie.gramSchmidt_norm_tendsto_onetheorem Cloning.TensorLie.gramSchmidtNormed_sub_tendsto_zero1import Cloning.TensorWeightFrameOrthogonal
2import Mathlib.Analysis.SpecificLimits.Basic
3
4/-! Gram convergence to the identity produces nearby common orthonormal
5frames, even when the physical Hilbert spaces vary with the sample size.
6The orthogonalization is literal Gram--Schmidt, so the exact weight labels
7proved in `TensorWeightFrameOrthogonal` are retained. -/
8noncomputable section
9open scoped BigOperators InnerProductSpace Topology Classical
10open Filter InnerProductSpace
11namespace Cloning.TensorLie
12
13variable {H : ℕ → Type*} [∀ N, NormedAddCommGroup (H N)]
14 [∀ N, InnerProductSpace ℂ (H N)]
15
16theorem varying_norm_tendsto_of_close (x y : ∀ N, H N) (a : ℝ)
17 (hy : Tendsto (fun N ↦ ‖y N‖) atTop (𝓝 a))
18 (hxy : Tendsto (fun N ↦ ‖x N - y N‖) atTop (𝓝 0)) :
19 Tendsto (fun N ↦ ‖x N‖) atTop (𝓝 a) := by
20 have hl := hy.sub hxy
21 have hu := hy.add hxy
22 simp only [sub_zero, add_zero] at hl hu
23 apply tendsto_of_tendsto_of_tendsto_of_le_of_le hl hu
24 · intro N
25 have h := norm_sub_norm_le (y N) (x N)
26 rw [norm_sub_rev] at h
27 linarith
28 · intro N
29 have h := norm_sub_norm_le (x N) (y N)
30 linarith
31
32theorem varying_inner_tendsto_zero_of_close (x y z : ∀ N, H N) (a : ℝ)
33 (hxy : Tendsto (fun N ↦ ‖x N - y N‖) atTop (𝓝 0))
34 (hz : Tendsto (fun N ↦ ‖z N‖) atTop (𝓝 a))
35 (hyz : Tendsto (fun N ↦ ⟪y N, z N⟫_ℂ) atTop (𝓝 0)) :
36 Tendsto (fun N ↦ ⟪x N, z N⟫_ℂ) atTop (𝓝 0) := by
37 have hb := hxy.mul hz
38 simp only [zero_mul] at hb
39 have hd : Tendsto (fun N ↦ ‖⟪x N - y N, z N⟫_ℂ‖) atTop (𝓝 0) :=
40 squeeze_zero (fun _ ↦ norm_nonneg _) (fun N ↦ norm_inner_le_norm _ _) hb
41 have hd' := (tendsto_zero_iff_norm_tendsto_zero).mpr hd
42 have hsum := hd'.add hyz
43 simpa only [inner_sub_left, sub_add_cancel, add_zero] using hsum
44
45variable {ι : Type*} [LinearOrder ι] [LocallyFiniteOrderBot ι] [WellFoundedLT ι]
46 (v : ∀ N, ι → H N)
47 (hgram : ∀ i j, Tendsto (fun N ↦ ⟪v N i, v N j⟫_ℂ) atTop
48 (𝓝 (if i = j then 1 else 0)))
49
50include hgram
51
52theorem varying_vector_norm_tendsto (i : ι) :
53 Tendsto (fun N ↦ ‖v N i‖) atTop (𝓝 1) := by
54 have hself : Tendsto (fun N ↦ ⟪v N i, v N i⟫_ℂ) atTop (𝓝 1) := by
55 simpa only [if_pos rfl] using hgram i i
56 have hs := (Complex.continuous_re.tendsto 1).comp hself
57 have h := Real.continuous_sqrt.continuousAt.tendsto.comp hs
58 simpa only [Function.comp_def, norm_eq_sqrt_re_inner (𝕜 := ℂ),
59 Complex.one_re, Real.sqrt_one] using h
60
61/-- Every unnormalized Gram--Schmidt vector approaches its original vector
62when the original Gram matrices approach the identity. -/
63theorem gramSchmidt_sub_tendsto_zero (i : ι) :
64 Tendsto (fun N ↦ ‖gramSchmidt ℂ (v N) i - v N i‖) atTop (𝓝 0) := by
65 induction i using (wellFounded_lt (α := ι)).induction with
66 | h i ih =>
67 have hp (j : ι) (hj : j ∈ Finset.Iio i) :
68 Tendsto (fun N ↦ ‖(ℂ ∙ gramSchmidt ℂ (v N) j).starProjection (v N i)‖)
69 atTop (𝓝 0) := by
70 have hji : j < i := Finset.mem_Iio.mp hj
71 have hjnorm := varying_norm_tendsto_of_close
72 (fun N ↦ gramSchmidt ℂ (v N) j) (fun N ↦ v N j) 1
73 (varying_vector_norm_tendsto v hgram j) (ih j hji)
74 have hij := varying_inner_tendsto_zero_of_close
75 (fun N ↦ gramSchmidt ℂ (v N) j) (fun N ↦ v N j) (fun N ↦ v N i) 1
76 (ih j hji) (varying_vector_norm_tendsto v hgram i)
77 (by simpa only [if_neg (ne_of_lt hji)] using hgram j i)
78 have hc := Complex.continuous_ofReal.continuousAt.tendsto.comp hjnorm
79 have hcoef := hij.div (hc.pow 2) (by norm_num : (1 : ℂ)^2 ≠ 0)
80 have hnorm := hcoef.norm.mul hjnorm
81 simpa only [Submodule.starProjection_singleton, norm_smul, Complex.ofReal_one,
82 one_pow, zero_div, norm_zero, zero_mul, Pi.div_apply, Function.comp_def,
83 RCLike.ofReal_eq_complex_ofReal, Complex.ofReal_pow] using hnorm
84 have hsum := tendsto_finset_sum (Finset.Iio i) hp
85 simp only [Finset.sum_const_zero] at hsum
86 apply squeeze_zero (fun _ ↦ norm_nonneg _) _ hsum
87 intro N
88 rw [gramSchmidt_def]
89 have heq : v N i - (∑ j ∈ Finset.Iio i,
90 (ℂ ∙ gramSchmidt ℂ (v N) j).starProjection (v N i)) - v N i =
91 -(∑ j ∈ Finset.Iio i,
92 (ℂ ∙ gramSchmidt ℂ (v N) j).starProjection (v N i)) := by abel
93 rw [heq, norm_neg]
94 exact norm_sum_le _ _
95
96theorem gramSchmidt_norm_tendsto_one (i : ι) :
97 Tendsto (fun N ↦ ‖gramSchmidt ℂ (v N) i‖) atTop (𝓝 1) :=
98 varying_norm_tendsto_of_close _ _ 1 (varying_vector_norm_tendsto v hgram i)
99 (gramSchmidt_sub_tendsto_zero v hgram i)
100
101/-- The literal normalized frame approaches the PBW vectors in Hilbert norm.
102Together with exact eigenvalue preservation, this is a common frame in every
103weight block, including blocks with repeated weights. -/
104theorem gramSchmidtNormed_sub_tendsto_zero (i : ι) :
105 Tendsto (fun N ↦ ‖gramSchmidtNormed ℂ (v N) i - v N i‖) atTop (𝓝 0) := by
106 have hnorm := gramSchmidt_norm_tendsto_one v hgram i
107 have hcast := Complex.continuous_ofReal.continuousAt.tendsto.comp
108 (hnorm.inv₀ (by norm_num : (1 : ℝ) ≠ 0))
109 have hc := (hcast.sub_const 1).norm.mul hnorm
110 simp only [inv_one, Complex.ofReal_one, sub_self, norm_zero, zero_mul] at hc
111 have hgs : Tendsto (fun N ↦
112 ‖gramSchmidtNormed ℂ (v N) i - gramSchmidt ℂ (v N) i‖) atTop (𝓝 0) := by
113 convert hc using 1
114 ext N
115 rw [gramSchmidtNormed]
116 calc
117 _ = ‖(((‖gramSchmidt ℂ (v N) i‖ : ℂ)⁻¹ - 1) •
118 gramSchmidt ℂ (v N) i)‖ := by
119 rw [sub_smul, one_smul]
120 rfl
121 _ = _ := by rw [norm_smul]; simp only [Function.comp_apply, Complex.ofReal_inv]
122 have hs := hgs.add (gramSchmidt_sub_tendsto_zero v hgram i)
123 simp only [add_zero] at hs
124 exact squeeze_zero (fun _ ↦ norm_nonneg _)
125 (fun N ↦ norm_sub_le_norm_sub_add_norm_sub _ (gramSchmidt ℂ (v N) i) _) hs
126
127end Cloning.TensorLie