Offline · exact source
Exact Lean source

WeylGNSKernel

formalization/Cloning/WeylGNSKernel.lean

Source hash: db5fa1d3fdeecff4143e97ba8758d3cfc54f0b2f932be8a16c8c7f6249bf4dc4

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
1import Cloning.WeylGNSRegular
2import Cloning.WeylIdlerKernel
3import Cloning.UniversalLeastNoiseQuantumKernel
4 
5/-! The Hilbert space associated to an actual continuous positive Weyl
6characteristic function, and the isometric translation of its kernel vectors. -/
7 
8noncomputable section
9open scoped ComplexOrder InnerProductSpace Topology BigOperators
10 
11namespace Cloning.WeylGNS
12open MultimodeCoherent
13set_option backward.isDefEq.respectTransparency false
14set_option maxHeartbeats 1200000
15 
16variable {d : ℕ}
17 
18def kernel (g : (Fin d → ℂ) → ℂ) (a b : Fin d → ℂ) : ℂ :=
19  displacementPhase (-a) b * g (b - a)
20 
21theorem kernel_eq_quantumPositiveKernel (g : (Fin d → ℂ) → ℂ) :
22    kernel g = quantumPositiveKernel g 0 := by
23  funext a b
24  simp [kernel, quantumPositiveKernel]
25 
26theorem normalizedPositive_kernel {g : (Fin d → ℂ) → ℂ}
27    (hg : IsWeylCharacteristicPositive g) (hg0 : g 0 = 1) :
28    PositiveKernel.IsNormalizedPositive (kernel g) := by
29  have hp : IsQuantumPositive g 0 := by
30    intro n b c
31    simpa only [← kernel_eq_quantumPositiveKernel, kernel] using hg n b c
32  rw [kernel_eq_quantumPositiveKernel]
33  exact hp.normalizedPositiveKernel hg0
34 
35theorem continuous_kernel {g : (Fin d → ℂ) → ℂ} (hg : Continuous g) :
36    Continuous (fun p : (Fin d → ℂ) × (Fin d → ℂ) => kernel g p.1 p.2) := by
37  unfold kernel displacementPhase ComplexCoherent.displacementPhase
38  apply Continuous.mul
39  · fun_prop
40  · exact hg.comp (continuous_snd.sub continuous_fst)
41 
42theorem phase_kernel_translate (g : (Fin d → ℂ) → ℂ) (z a b : Fin d → ℂ) :
43    star (displacementPhase z a) * displacementPhase z b *
44      kernel g (z + a) (z + b) = kernel g a b := by
45  have hp : star (displacementPhase z a) * displacementPhase z b *
46      displacementPhase (-(z + a)) (z + b) = displacementPhase (-a) b := by
47    change (starRingEnd ℂ) (displacementPhase z a) * displacementPhase z b *
48      displacementPhase (-(z + a)) (z + b) = displacementPhase (-a) b
49    simp only [displacementPhase, map_prod, ← Finset.prod_mul_distrib]
50    apply Finset.prod_congr rfl
51    intro i _
52    simp only [ComplexCoherent.displacementPhase, Pi.neg_apply, Pi.add_apply,
53      ← Complex.exp_conj, ← Complex.exp_add, map_div₀, map_sub, map_add,
54      map_neg, map_mul, map_ofNat, starRingEnd_self_apply]
55    congr 1
56    ring
57  unfold kernel
58  rw [← mul_assoc, hp]
59  congr 1
60  abel
61 
62variable (g : (Fin d → ℂ) → ℂ) [Fact (PositiveKernel.IsNormalizedPositive (kernel g))]
63 
64abbrev Space := PositiveKernel.Space (kernel g)
65 
66def feature (a : Fin d → ℂ) : Space g := PositiveKernel.feature (kernel g) a
67 
68@[simp] theorem inner_feature (a b : Fin d → ℂ) :
69    ⟪feature g a, feature g b⟫_ℂ = kernel g a b :=
70  PositiveKernel.inner_feature (kernel g) a b
71 
72@[simp] theorem norm_feature (a : Fin d → ℂ) : ‖feature g a‖ = 1 :=
73  PositiveKernel.norm_feature (kernel g) a
74 
75def combination : ((Fin d → ℂ) →₀ ℂ) →ₗ[ℂ] Space g :=
76  Finsupp.linearCombination ℂ (feature g)
77 
78theorem combination_eq_coe (c : (Fin d → ℂ) →₀ ℂ) :
79    combination g c = UniformSpace.Completion.coe'
80      (show PositiveKernel.PreSpace (kernel g) from c) := by
81  classical
82  induction c using Finsupp.induction_linear with
83  | zero => exact (map_zero (combination g)).trans (UniformSpace.Completion.coe_zero).symm
84  | add c e hc he =>
85      rw [map_add, hc, he]
86      exact (UniformSpace.Completion.coe_add _ _).symm
87  | single a t =>
88      simp only [combination, Finsupp.linearCombination_single]
89      change t • UniformSpace.Completion.coe'
90        (show PositiveKernel.PreSpace (kernel g) from Finsupp.single a 1) = _
91      rw [← UniformSpace.Completion.coe_smul]
92      congr 1
93      exact Finsupp.smul_single t a (1 : ℂ) |>.trans (by simp)
94 
95theorem combination_dense : DenseRange (combination g) := by
96  have h := UniformSpace.Completion.denseRange_coe
97    (α := PositiveKernel.PreSpace (kernel g))
98  have he : (combination g : ((Fin d → ℂ) →₀ ℂ) → Space g) =
99      fun c => UniformSpace.Completion.coe'
100        (show PositiveKernel.PreSpace (kernel g) from c) := funext (combination_eq_coe g)
101  rw [he]
102  exact h
103 
104def translatedFeature (z a : Fin d → ℂ) : Space g :=
105  displacementPhase z a • feature g (z + a)
106 
107theorem inner_translatedFeature (z a b : Fin d → ℂ) :
108    ⟪translatedFeature g z a, translatedFeature g z b⟫_ℂ =
109      ⟪feature g a, feature g b⟫_ℂ := by
110  simp only [translatedFeature, inner_smul_left, inner_smul_right, inner_feature]
111  simpa only [starRingEnd_apply, mul_assoc, mul_left_comm] using phase_kernel_translate g z a b
112 
113def translatedCombination (z : Fin d → ℂ) : ((Fin d → ℂ) →₀ ℂ) →ₗ[ℂ] Space g :=
114  Finsupp.linearCombination ℂ (translatedFeature g z)
115 
116theorem inner_translatedCombination (z : Fin d → ℂ) (c e : (Fin d → ℂ) →₀ ℂ) :
117    ⟪translatedCombination g z c, translatedCombination g z e⟫_ℂ =
118      ⟪combination g c, combination g e⟫_ℂ := by
119  simp only [translatedCombination, combination, Finsupp.linearCombination_apply,
120    Finsupp.sum, inner_sum, sum_inner, inner_smul_left, inner_smul_right,
121    inner_translatedFeature]
122 
123theorem norm_translatedCombination (z : Fin d → ℂ) (c : (Fin d → ℂ) →₀ ℂ) :
124    ‖translatedCombination g z c‖ = ‖combination g c‖ := by
125  have h := congrArg Complex.re (inner_translatedCombination g z c c)
126  change (RCLike.re : ℂ → ℝ) _ = (RCLike.re : ℂ → ℝ) _ at h
127  rw [← InnerProductSpace.norm_sq_eq_re_inner (𝕜 := ℂ),
128    ← InnerProductSpace.norm_sq_eq_re_inner (𝕜 := ℂ)] at h
129  nlinarith [norm_nonneg (translatedCombination g z c), norm_nonneg (combination g c)]
130 
131end Cloning.WeylGNS