theoremhasSum_column (b : HilbertBasisJℂE) (Z : E→L[ℂ] E) (j : J) :
HasSum (fun i =>Complex.normSq (entry b Z i j)) (‖Z (b j)‖^2) := basis_hasSum_normSq b _
theoremweighted_row_summable (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0≤ p j) (hs : Summable p) (Z : E→L[ℂ] E) :
Summable (funij : J×J=> p ij.1*Complex.normSq (entry b Z ij.1 ij.2)) :=by
proof · 2
lines
have hh := (Equiv.prodComm JJ).summable_iff.mpr (weighted_column_summable b p hp hs Z.adjoint)
simpa only [Function.comp_def, Equiv.prodComm_apply, Prod.swap, entry_adjoint, Complex.normSq_conj] using hh
theoremfinite_hessian_to_variance (v : J×J→ℝ) (m : J→ℝ) (μ A α γ W : ℝ)
(hv : HasSum v A) (hm : HasSum m μ) (hα : 0 < α)
(h : ∀ (s : FinsetJ) (t : ℝ),
2*γ*t*((∑ i ∈ s, ∑ j ∈ s, v (i,j))-μ*(∑ i ∈ s, m i)) ≤
α*t^2*((∑ i ∈ s, ∑ j ∈ s, v (i,j))-(∑ i ∈ s, m i)^2)+W) :
γ^2*(A-μ^2) ≤ α*W:=by
proof · 12
lines
have hQ := hasSum_square_finset hv
havehlo : Tendsto (funs : FinsetJ=>2*γ*(γ/α)*((∑ i ∈ s, ∑ j ∈ s, v (i,j))-μ*(∑ i ∈ s, m i))) atTop
(𝓝 (2*γ*(γ/α)*(A-μ*μ))) := (hQ.sub (hm.const_mul μ)).const_mul _
havehup : Tendsto (funs : FinsetJ=>
α*(γ/α)^2*((∑ i ∈ s, ∑ j ∈ s, v (i,j))-(∑ i ∈ s, m i)^2)+W) atTop
(𝓝 (α*(γ/α)^2*(A-μ^2)+W)) := ((hQ.sub (hm.pow 2)).const_mul _).add_const _
have hh := le_of_tendsto_of_tendsto hlo hup (Filter.Eventually.of_forall fun s => h s (γ/α))
have hh' := mul_le_mul_of_nonneg_left hh hα.le
have hne := hα.ne'
field_simp at hh'
nlinarith
theoremfrequency_finite (g : A→I→ℂ) (v : I→P) (q : A→P)
(hg : ∀ a i, g a i ≠0→ v i = q a) (z : I→ℂ) (hz : z ∈ space g) :
∃s : FinsetP, ∀ i, z i ≠0→ v i ∈ s :=by
proof · 20
lines
classical
induction hz usingSubmodule.span_induction with
| mem x hx =>
obtain ⟨a, rfl⟩ := hx
exact ⟨{q a}, fun i hi =>by simpa only [Finset.mem_singleton] using hg a i hi⟩
| zero => exact ⟨∅, fun i hi => (hi rfl).elim⟩
| add x y _ _ hx hy =>
obtain ⟨s, hs⟩ := hx
obtain ⟨t, ht⟩ := hy
refine ⟨s ∪ t, fun i hi => ?_⟩
by_cases hxi : x i = 0
· havehyi : y i ≠0:=by simpa only [Pi.add_apply, hxi, zero_add] using hi
exact Finset.mem_union.mpr (Or.inr (ht i hyi))
· exact Finset.mem_union.mpr (Or.inl (hs i hxi))
| smul c x _ hx =>
obtain ⟨s, hs⟩ := hx
refine ⟨s, fun i hi => hs i ?_⟩
intro hxi
apply hi
simp [hxi]
defmultiplier (v : I→P) (w : P→ℂ) : (I→ℂ) →ₗ[ℂ] (I→ℂ) where
body · 3
lines
toFun z i := w (v i)*z i
map_add' x y :=by ext i; simp only [Pi.add_apply, mul_add]
map_smul' c x :=by ext i; simp only [Pi.smul_apply, smul_eq_mul, RingHom.id_apply]; ring
theoremmultiplier_generator (g : A→I→ℂ) (v : I→P) (q : A→P)
(hg : ∀ a i, g a i ≠0→ v i = q a) (w : P→ℂ) (a : A) :
multiplier v w (g a) = w (q a) • g a :=by
proof · 5
lines
ext i
change w (v i)*g a i=w (q a)*g a i
by_cases hi : g a i = 0
· simp [hi]
· rw [hg a i hi]
theoremmultiplier_mem (g : A→I→ℂ) (v : I→P) (q : A→P)
(hg : ∀ a i, g a i ≠0→ v i = q a) (z : I→ℂ) (hz : z ∈ space g) (w : P→ℂ) :
multiplier v w z ∈ space g :=by
proof · 8
lines
induction hz usingSubmodule.span_induction with
| mem x hx =>
obtain ⟨a, rfl⟩ := hx
rw [multiplier_generator g v q hg]
exact (space g).smul_mem _ (Submodule.subset_span ⟨a,rfl⟩)
| zero => simpa only [map_zero] using (space g).zero_mem
| add x y _ _ hx hy => simpa only [map_add] using (space g).add_mem hx hy
| smul c x _ hx => simpa only [map_smul] using (space g).smul_mem c hx
theoremmass_summable (g : A→I→ℂ) (hg : ∀ a, Summable (fun i =>Complex.normSq (g a i)))
(z : I→ℂ) (hz : z ∈ space g) : Summable (fun i =>Complex.normSq (z i)) :=by
proof · 6
lines
rw [square_summable_iff]
induction hz usingSubmodule.span_induction with
| mem x hx => obtain ⟨a,rfl⟩ := hx; exact (square_summable_iff _).mp (hg a)
| zero => exact (showMemℓp (0 : I→ℂ) 2from zero_memℓp)
| add x y _ _ hx hy => exact hx.add hy
| smul c x _ hx => exact hx.const_smul c
defentryMap (b : HilbertBasisJℂE) (w : J×J→ℝ) :
(E→L[ℂ] E) →ₗ[ℂ] (J×J→ℂ) where
body · 3
lines
toFun Z ij := (Real.sqrt (w ij) : ℂ)*BKM.entry b Z ij.1 ij.2
map_add' XY:=by ext ij; simp [BKM.entry, mul_add]
map_smul' c X:=by ext ij; simp [BKM.entry, mul_left_comm]
@[simp]theorementryMap_apply (b : HilbertBasisJℂE) (w : J×J→ℝ)
(Z : E→L[ℂ] E) (ij : J×J) :
entryMap b w Z ij = (Real.sqrt (w ij) : ℂ)*BKM.entry b Z ij.1 ij.2:= rfl
theorementryMap_injective (b : HilbertBasisJℂE) (w : J×J→ℝ) (hw : ∀ ij, 0 < w ij) :
Function.Injective (entryMap b w) :=by
proof · 14
lines
intro XY h
have hb (j : J) : X (b j)=Y (b j) :=by
apply b.repr.injective
ext i
simp only [b.repr_apply_apply]
have hh := congrFun h (i,j)
exact mul_left_cancel₀ (Complex.ofReal_ne_zero.mpr (Real.sqrt_ne_zero'.mpr (hw (i,j)))) hh
ext x
have hX := (b.hasSum_repr x).mapL Xhave hY := (b.hasSum_repr x).mapL Y
apply hX.unique
convert! hY using1
ext j
simp only [map_smul, hb]
theoremgenerator_frequency (b : HilbertBasisJℂE) (p : J→ℝ) (w : J×J→ℝ)
{P : Type*} (v : J×J→P) (q : P) (hv : ∀ j, v (j,j)=q)
(ij kl : J×J) (hz : entryMap b w (generator b p ij) kl ≠0) : v kl=v ij :=by
proof · 17
lines
classical
havehg : BKM.entry b (generator b p ij) kl.1 kl.2≠0:=by
intro hh; apply hz; simp [hh]
rw [generator_entry] at hg
by_cases hij : ij.1=ij.2
· havehkl : kl.1=kl.2:=by
by_contra hk
havehp : ¬ (kl.1=ij.1∧ kl.2=ij.2) :=fun hf => hk (hf.1.trans (hij.trans hf.2.symm))
simp [hp,hk] at hg
calc v kl=v (kl.2,kl.2) :=by congr 1; exact Prod.ext hkl rfl
_=q := hv _
_=v (ij.2,ij.2) := (hv _).symm
_=v ij :=by congr 1; exact Prod.ext hij.symm rfl
· havehkl : kl.1=ij.1∧ kl.2=ij.2:=by
by_contra hk
simp [hij,hk] at hg
exact congrArg v (Prod.ext hkl.1 hkl.2)
theoremcoordinates_eq_span (b : HilbertBasisJℂE) (p : J→ℝ) (w : J×J→ℝ) :
coordinates b p w = SpectralTests.space (fun ij => entryMap b w (generator b p ij)) :=by
theoremcoordinates_mass (b : HilbertBasisJℂE) (p : J→ℝ) (hp : ∀ j, 0 < p j)
(hs : Summable p) (h : ℝ) (hh : 0≤ h) (z : coordinates b p (fun ij => h*DiagonalForms.System.logMean (p ij.1) (p ij.2))) :
Summable (fun ij =>Complex.normSq (z.val ij)) :=by
proof · 8
lines
obtain ⟨Z, _hZ, he⟩ := z.property
rw [← he]
have hsum := (BKM.logMean_summable b p hp hs Z).mul_left h
convert! hsum using1
ext ij
simp only [entryMap_apply, Complex.normSq_mul, Complex.normSq_ofReal]
rw [Real.mul_self_sqrt (mul_nonneg hh (DiagonalForms.System.logMean_pos (hp _) (hp _)).le)]
ring
toFun Z:= weightedVector (fun a => metricCoefficient t (p a.1) (p a.2))
(fun a =>BKM.entry b Z a.1 a.2) (observable_summable b p hp hs t ht Z)
(fun a => (metricCoefficient_pos ht (hp _) (hp _)).le)
map_add' ZU:=by ext a; simp [BKM.entry, mul_add]
map_smul' c Z:=by ext a; simp [BKM.entry, mul_left_comm]
theoremidentityVector_inner (r : ℝ) (hr : 0<r) (p : J→ℝ)
(hp : ∀ j, 0<p j) (hs : HasSum p 1) :
inner ℂ (identityVector r hr p hp hs.summable) (identityVector r hr p hp hs.summable)=1:=by
proof · 11
lines
classical
have hh := hasSum_diagonal (Complex.hasSum_ofReal.mpr hs)
have ht := lp.hasSum_inner (𝕜:=ℂ) (identityVector r hr p hp hs.summable)
(identityVector r hr p hp hs.summable)
apply ht.unique
convert! hh using1
ext ij
simp only [identityVector_apply, RCLike.inner_apply]
split_ifs with he
· simp only [Complex.conj_ofReal, ←Complex.ofReal_mul, Real.mul_self_sqrt (hp _).le]
· simp
@[simp]theoremobservableMap_generator [DecidableEqJ] (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0 < p j) (hs : Summable p) (t : ℝ) (ht : 0 < t) (ij : J×J) :
observableMap b p hp hs t ht (CenteredTests.generator b p ij) =
matrixGenerator t ht p hp hs ij :=by
proof · 18
lines
classical
ext kl
simp only [observableMap_apply, CenteredTests.generator_entry, matrixGenerator,
lp.coeFn_sub, Pi.sub_apply, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul,
lp.single_apply, Pi.single_apply, identityVector_apply]
by_cases he : kl=ij
· subst kl
by_cases hd : ij.1=ij.2
· simp only [hd, metricCoefficient_self ht (hp _), ite_true, and_self,
mul_one]
ring
· simp [hd]
· havehe' : ¬ (kl.1=ij.1∧ kl.2=ij.2) :=fun hh => he (Prod.ext hh.1 hh.2)
simp only [ite_eq_right he, ite_eq_right he', mul_zero, zero_sub]
by_cases hd : kl.1=kl.2
· simp only [hd, metricCoefficient_self ht (hp _), ite_true]
ring
· simp [hd]
theoremobservable_core_dense (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1) (t : ℝ) (ht : 0 < t) :
((CenteredTests.operatorSpace b p).map
(observableMap b p hp hs.summable t ht)).topologicalClosure =
centeredSpace t ht p hp hs.summable :=by
proof · 4
lines
classical
rw [CenteredTests.operatorSpace, Submodule.map_span, ←Set.range_comp]
simpa only [Function.comp_def, observableMap_generator] using
matrixGenerator_dense t ht p hp hs
theoremfunctional_bound_of_core (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1) (t : ℝ) (ht : 0 < t)
(q : lp (fun_ : J×J=>ℂ) 2→L[ℂ] ℂ) (C : ℝ)
(hc : ∀Z, Z∈CenteredTests.operatorSpace b p →
‖q (observableMap b p hp hs.summable t ht Z)‖ ≤C*‖observableMap b p hp hs.summable t ht Z‖) :
∀ x ∈ centeredSpace t ht p hp hs.summable, ‖q x‖ ≤C*‖x‖ :=by
proof · 10
lines
havehclosed : IsClosed {x : lp (fun_ : J×J=>ℂ) 2 | ‖q x‖ ≤C*‖x‖} :=
isClosed_le q.continuous.norm (continuous_const.mul continuous_norm)
havehimage : (((CenteredTests.operatorSpace b p).map
(observableMap b p hp hs.summable t ht) : Submoduleℂ _) : Set _) ⊆
{x | ‖q x‖ ≤C*‖x‖} :=by
rintro _ ⟨Z,hZ,rfl⟩
exact hc Z hZ
have hh := closure_minimal himage hclosed
rw [←Submodule.topologicalClosure_coe, observable_core_dense b p hp hs t ht] at hh
exact hh
theoremrestricted_norm_bound_of_core (b : HilbertBasisJℂE) (p : J→ℝ)
(hp : ∀ j, 0 < p j) (hs : HasSum p 1) (t : ℝ) (ht : 0 < t)
(q : lp (fun_ : J×J=>ℂ) 2→L[ℂ] ℂ) (C : ℝ) (hC : 0≤C)
(hc : ∀Z, Z∈CenteredTests.operatorSpace b p →
‖q (observableMap b p hp hs.summable t ht Z)‖ ≤C*‖observableMap b p hp hs.summable t ht Z‖) :
‖q.comp (centeredSpace t ht p hp hs.summable).subtypeL‖ ≤C:=by
proof · 3
lines
apply ContinuousLinearMap.opNorm_le_bound _ hC
intro x
exact functional_bound_of_core b p hp hs t ht q C hc x.val x.property
theoremrealize_entries (b : HilbertBasisJℂE) (p : J→ℝ) (w : J×J→ℝ)
(hw : ∀ ij, 0 < w ij) (z : coordinates b p w) : entryMap b w (realize b p w hw z)=z.val :=by
proof · 1
line
exact LinearEquiv.ofInjective_symm_apply (h := entryMap_injective b w hw) _ _
theoremrealize_mem (b : HilbertBasisJℂE) (p : J→ℝ) (w : J×J→ℝ)
(hw : ∀ ij, 0 < w ij) (z : coordinates b p w) : realize b p w hw z ∈ operatorSpace b p :=by
proof · 4
lines
obtain ⟨Z,hZ,he⟩ := z.property
havehh : realize b p w hw z=Z:= entryMap_injective b w hw ((realize_entries b p w hw z).trans he.symm)
rw [hh]
exact hZ
sourceParam := v
targetParam := targetParam
tests := coordinates b p (fun ij => h*DiagonalForms.System.logMean (p ij.1) (p ij.2))
map :=L.comp (realize b p _ (fun ij => mul_pos hh (DiagonalForms.System.logMean_pos (hp _) (hp _))))
mass_summable z := coordinates_mass b p hp hs h hh.le z
finite_values z :=by
apply SpectralTests.frequency_finite (fun ij => entryMap b _ (generator b p ij)) v v
(generator_frequency b p _ v q hv) z.val
rw [← coordinates_eq_span]
exact z.property
multiplier_mem z w :=by
apply (SetLike.ext_iff.mp (coordinates_eq_span b p _) _).mpr
exact SpectralTests.multiplier_mem (fun ij => entryMap b _ (generator b p ij)) v v
(generator_frequency b p _ v q hv) z.val (by rw [← coordinates_eq_span]; exact z.property) w
theoremconstant_summable (c : ℝ) (Z : E→L[ℂ] E) :
Summable (fun ij => c*Complex.normSq (S.coords Z ij)) :=by
proof · 2
lines
have hh := ((BKM.logMean_summable S.basis S.p S.pos S.sum.summable Z).mul_left (h S.r)).mul_left c
simpa only [S.coords_norm, base, mul_assoc] using hh
theoremtargetMap_norm (S : Fin2→SpaceE) (w : Fin2→ℝ) (hw : ∀ i, 0≤ w i)
(L : (i : Fin2) → (E→L[ℂ] E) →ₗ[ℂ] (E→L[ℂ] E))
(Z : E→L[ℂ] E) (a : Σ i, (S i).I× (S i).I) :
Complex.normSq (targetMap S w LZ a)=w a.1*Complex.normSq ((S a.1).coords (L a.1Z) a.2) :=by
theoremdiagram_comparison (S₀ : SpaceE) (S : Fin2→SpaceE) (w : Fin2→ℝ)
(hw : ∀ i, 0≤ w i)
(L : (i : Fin2) → (E→L[ℂ] E) →ₗ[ℂ] (E→L[ℂ] E)) (X : Param→ℝ)
(hX : ∀ q, 0≤X q)
(hs : ∀ i Z, Summable (fun a =>X ((S i).pparam a)*Complex.normSq ((S i).coords Z a)))
(he : ∀Z, Z∈CenteredTests.operatorSpace S₀.basis S₀.p →∑ i, w i*(S i).pquad X (L i Z) ≤S₀.pquad XZ) :
(diagram S₀S w L).ComparisonX:=by
proof · 25
lines
intro z s
letZ:=CenteredTests.realize S₀.basis S₀.p S₀.base S₀.base_pos z
havehz : S₀.coords Z=z.val :=CenteredTests.realize_entries S₀.basis S₀.p S₀.base S₀.base_pos z
havehm : Z∈CenteredTests.operatorSpace S₀.basis S₀.p :=CenteredTests.realize_mem S₀.basis S₀.p S₀.base S₀.base_pos z
have hn (a : Σ i, (S i).I× (S i).I) : 0≤X ((S a.1).pparam a.2)*
(w a.1*Complex.normSq ((S a.1).coords (L a.1Z) a.2)) := mul_nonneg (hX _) (mul_nonneg (hw _) (Complex.normSq_nonneg _))
havehsum : Summable (funa : Σ i, (S i).I× (S i).I=>X ((S a.1).pparam a.2)*
(w a.1*Complex.normSq ((S a.1).coords (L a.1Z) a.2))) :=by
apply (summable_sigma_of_nonneg hn).mpr
refine ⟨fun i => ?_, (hasSum_fintype _).summable⟩
simpa only [mul_left_comm] using (hs i (L i Z)).mul_left (w i)
have ht :=Summable.sum_le_tsum s (fun a _ => hn a) hsum
havehv : (∑' a : Σ i, (S i).I× (S i).I, X ((S a.1).pparam a.2)*
(w a.1*Complex.normSq ((S a.1).coords (L a.1Z) a.2))) =
∑ i, w i*(S i).pquad X (L i Z) :=by
rw [hsum.tsum_sigma]
simp only [tsum_fintype, Space.pquad, mul_left_comm (X _) (w _), tsum_mul_left]
rw [hv] at ht
have hh := ht.trans (he Z hm)
change (∑ a ∈ s, X ((S a.1).pparam a.2)*Complex.normSq (targetMap S w LZ a)) ≤ _
simp only [targetMap_norm S w hw L]
convert! hh using1
simp only [sourceForm, Space.pquad, hz]
rfl
defpairingLM (u v : I→E) (hu : Summable (fun i => ‖u i‖^2))
(hv : Summable (fun i => ‖v i‖^2)) : (E→L[ℂ] E) →ₗ[ℂ] ℂwhere
body · 6
lines
toFun := pairing u v
map_add' ZT:=by
simp only [pairing, add_apply, inner_add_right]
exact (pairing_summable hu hv Z).tsum_add (pairing_summable hu hv T)
map_smul' c Z:=by
simp only [pairing, smul_apply, inner_smul_right, tsum_mul_left, smul_eq_mul, RingHom.id_apply]
theorempairing_sub_right (u v w : I→E) (hu : Summable (fun i => ‖u i‖^2))
(hv : Summable (fun i => ‖v i‖^2)) (hw : Summable (fun i => ‖w i‖^2))
(c : ℂ) (Z : E→L[ℂ] E) :
pairing u (fun i => v i-c • w i) Z=pairing u v Z-conj c*pairing u w Z:=by
proof · 2
lines
simp only [pairing, inner_sub_left, inner_smul_left]
rw [(pairing_summable hu hv Z).tsum_sub ((pairing_summable hu hw Z).mul_left (conj c)), tsum_mul_left]
theorempairing_sub_left (u v w : I→E) (hu : Summable (fun i => ‖u i‖^2))
(hv : Summable (fun i => ‖v i‖^2)) (hw : Summable (fun i => ‖w i‖^2))
(c : ℂ) (Z : E→L[ℂ] E) :
pairing (fun i => u i-c • v i) w Z=pairing u w Z-c*pairing v w Z:=by
proof · 2
lines
simp only [pairing, map_sub, map_smul, inner_sub_right, inner_smul_right]
rw [(pairing_summable hu hw Z).tsum_sub ((pairing_summable hv hw Z).mul_left c), tsum_mul_left]