File size: 11,121 Bytes
9655094
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
import OAI.Analysis.C0Absorption.Core
import Mathlib

namespace OAI

namespace C0Absorption

open scoped BigOperators NNReal ENNReal
noncomputable section
open Finset

section Molecules

variable (S : Type*)

def MoleculeSpace : Submodule ℝ (S →₀ ℝ) :=
  (Finsupp.linearCombination ℝ (fun _ : S => (1 : ℝ))).ker

abbrev Molecule := MoleculeSpace S

noncomputable def pairing (f : S → ℝ) : Molecule S →ₗ[ℝ] ℝ :=
  (Finsupp.linearCombination ℝ f).comp (MoleculeSpace S).subtype

variable {S}

noncomputable def molecule (s t : S) : Molecule S :=
  ⟨Finsupp.single s 1 - Finsupp.single t 1, by
    simp [MoleculeSpace, LinearMap.mem_ker]⟩

@[simp] theorem pairing_molecule (f : S → ℝ) (s t : S) :
    pairing S f (molecule s t) = f s - f t := by
  simp [pairing, molecule]

@[simp] theorem pairing_const (c : ℝ) (m : Molecule S) :
    pairing S (fun _ => c) m = 0 := by
  have hm := m.property
  change (Finsupp.linearCombination ℝ (fun _ : S => (1 : ℝ))) m.val = 0 at hm
  simp only [Finsupp.linearCombination_apply, smul_eq_mul, mul_one] at hm
  simp only [pairing, LinearMap.comp_apply, Submodule.subtype_apply,
    Finsupp.linearCombination_apply, smul_eq_mul]
  rw [← Finsupp.sum_mul, hm, zero_mul]

theorem molecule_decomposition (m : Molecule S) (o : S) :
    m = ∑ s ∈ m.val.support, m.val s • molecule s o := by
  classical
  have hm := m.property
  change (Finsupp.linearCombination ℝ (fun _ : S => (1 : ℝ))) m.val = 0 at hm
  simp only [Finsupp.linearCombination_apply, smul_eq_mul, mul_one,
    Finsupp.sum] at hm
  apply Subtype.ext
  simp only [Submodule.coe_sum, Submodule.coe_smul, molecule, smul_sub]
  rw [Finset.sum_sub_distrib, ← Finset.sum_smul, hm, zero_smul, sub_zero]
  simpa only [Finsupp.smul_single, smul_eq_mul, mul_one, Finsupp.sum] using (Finsupp.sum_single m.val).symm

@[simp] theorem molecule_self (s : S) : molecule s s = 0 := by
  apply Subtype.ext
  simp [molecule]

theorem molecule_sub_molecule (s t o : S) : molecule s o - molecule t o = molecule s t := by
  apply Subtype.ext
  change (Finsupp.single s 1 - Finsupp.single o 1) -
    (Finsupp.single t 1 - Finsupp.single o 1) = Finsupp.single s 1 - Finsupp.single t 1
  abel

end Molecules

section TestLists

variable {S : Type*} [MetricSpace S]

structure AdmissibleList (L : Set (S → ℝ)) (C : ℝ≥0) where
  length : ℕ
  test : Fin length → S → ℝ
  mem : ∀ i, test i ∈ L
  signed_lipschitz : ∀ ε : Fin length → ℝ, (∀ i, |ε i| = 1) →
    LipschitzWith C (fun s => ∑ i, ε i * test i s)

def AdmissibleList.empty (L : Set (S → ℝ)) (C : ℝ≥0) : AdmissibleList L C where
  length := 0
  test := Fin.elim0
  mem i := Fin.elim0 i
  signed_lipschitz ε hε := by
    apply LipschitzWith.of_dist_le_mul
    intro s t
    simp only [Fin.sum_univ_zero, dist_self]
    positivity

instance (L : Set (S → ℝ)) (C : ℝ≥0) : Nonempty (AdmissibleList L C) :=
  ⟨AdmissibleList.empty L C⟩

theorem AdmissibleList.sum_abs_sub_le {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (s t : S) :
    ∑ i, |l.test i s - l.test i t| ≤ C * dist s t := by
  classical
  let ε : Fin l.length → ℝ := fun i => if 0 ≤ l.test i s - l.test i t then 1 else -1
  have hε : ∀ i, |ε i| = 1 := by
    intro i
    dsimp [ε]
    split <;> norm_num
  have heq : ∀ i, ε i * (l.test i s - l.test i t) =
      |l.test i s - l.test i t| := by
    intro i
    dsimp [ε]
    split
    · simp [abs_of_nonneg, *]
    · simp [abs_of_neg (lt_of_not_ge ‹¬ 0 ≤ l.test i s - l.test i t›)]
  have h := (l.signed_lipschitz ε hε).dist_le_mul s t
  rw [Real.dist_eq, ← Finset.sum_sub_distrib] at h
  simp_rw [← mul_sub, heq] at h
  rwa [abs_of_nonneg (Finset.sum_nonneg fun _ _ => abs_nonneg _)] at h

theorem finite_lp_norm_le_sum {ι : Type*} [Fintype ι] (p : ℝ≥0∞) [Fact (1 ≤ p)]
    (f : PiLp p (fun _ : ι => ℝ)) : ‖f‖ ≤ ∑ i, |f i| := by
  classical
  have heq : f = ∑ i, PiLp.single p (β := fun _ : ι => ℝ) i (f i) := by
    apply PiLp.ext
    intro j
    simp [← WithLp.toLp_sum, PiLp.single, Function.update, Pi.single]
  calc
    ‖f‖ = ‖∑ i, PiLp.single p (β := fun _ : ι => ℝ) i (f i)‖ := congrArg norm heq
    _ ≤ ∑ i, ‖PiLp.single p (β := fun _ : ι => ℝ) i (f i)‖ := norm_sum_le _ _
    _ = ∑ i, |f i| := by simp [PiLp.norm_single, Real.norm_eq_abs]

def AdmissibleList.eval {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) :
    Molecule S →ₗ[ℝ] PiLp p (fun _ : Fin l.length => ℝ) :=
  (WithLp.linearEquiv p ℝ _).symm.toLinearMap.comp
    (LinearMap.pi fun i => pairing S (l.test i))

@[simp] theorem AdmissibleList.eval_apply {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) (m : Molecule S) (i : Fin l.length) :
    (l.eval p m) i = pairing S (l.test i) m := rfl

def AdmissibleList.seminorm {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) [Fact (1 ≤ p)] : Seminorm ℝ (Molecule S) :=
  (normSeminorm ℝ (PiLp p (fun _ : Fin l.length => ℝ))).comp (l.eval p)

@[simp] theorem AdmissibleList.seminorm_apply {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) [Fact (1 ≤ p)] (m : Molecule S) :
    l.seminorm p m = ‖l.eval p m‖ := rfl

theorem AdmissibleList.seminorm_molecule_le {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) [Fact (1 ≤ p)] (s t : S) :
    l.seminorm p (molecule s t) ≤ C * dist s t := by
  calc
    l.seminorm p (molecule s t) ≤ ∑ i, |(l.eval p (molecule s t)) i| :=
      finite_lp_norm_le_sum p _
    _ = ∑ i, |l.test i s - l.test i t| := by simp
    _ ≤ C * dist s t := l.sum_abs_sub_le s t

theorem AdmissibleList.seminorm_le {L : Set (S → ℝ)} {C : ℝ≥0}
    (l : AdmissibleList L C) (p : ℝ≥0∞) [Fact (1 ≤ p)] (o : S) (m : Molecule S) :
    l.seminorm p m ≤ C * ∑ s ∈ m.val.support, |m.val s| * dist s o := by
  classical
  conv_lhs => rw [molecule_decomposition m o]
  simp only [AdmissibleList.seminorm_apply, map_sum, map_smul]
  calc
    ‖∑ s ∈ m.val.support, m.val s • l.eval p (molecule s o)‖
        ≤ ∑ s ∈ m.val.support, |m.val s| * ‖l.eval p (molecule s o)‖ := by
      simpa only [norm_smul, Real.norm_eq_abs] using
        norm_sum_le m.val.support (fun s => m.val s • l.eval p (molecule s o))
    _ ≤ ∑ s ∈ m.val.support, |m.val s| * (C * dist s o) := by
      apply Finset.sum_le_sum
      intro s hs
      exact mul_le_mul_of_nonneg_left (l.seminorm_molecule_le p s o) (abs_nonneg _)
    _ = C * ∑ s ∈ m.val.support, |m.val s| * dist s o := by
      rw [Finset.mul_sum]
      apply Finset.sum_congr rfl
      intro s hs
      ring

def sigma (L : Set (S → ℝ)) (C : ℝ≥0) (p : ℝ≥0∞) [Fact (1 ≤ p)] :
    Seminorm ℝ (Molecule S) :=
  ⨆ l : AdmissibleList L C, l.seminorm p

theorem list_seminorms_bddAbove (L : Set (S → ℝ)) (C : ℝ≥0)
    (p : ℝ≥0∞) [Fact (1 ≤ p)] (o : S) :
    BddAbove (Set.range fun l : AdmissibleList L C => l.seminorm p) := by
  rw [Seminorm.bddAbove_range_iff]
  intro m
  refine ⟨C * ∑ s ∈ m.val.support, |m.val s| * dist s o, ?_⟩
  rintro _ ⟨l, rfl⟩
  exact l.seminorm_le p o m

theorem sigma_apply (L : Set (S → ℝ)) (C : ℝ≥0)
    (p : ℝ≥0∞) [Fact (1 ≤ p)] (o : S) (m : Molecule S) :
    sigma L C p m = ⨆ l : AdmissibleList L C, ‖l.eval p m‖ := by
  exact Seminorm.iSup_apply (list_seminorms_bddAbove L C p o)

theorem sigma_molecule_le (L : Set (S → ℝ)) (C : ℝ≥0)
    (p : ℝ≥0∞) [Fact (1 ≤ p)] (s t : S) :
    sigma L C p (molecule s t) ≤ C * dist s t := by
  rw [sigma_apply L C p s]
  exact ciSup_le fun l => l.seminorm_molecule_le p s t

theorem list_le_sigma (L : Set (S → ℝ)) (C : ℝ≥0)
    (p : ℝ≥0∞) [Fact (1 ≤ p)] (o : S) (l : AdmissibleList L C) :
    l.seminorm p ≤ sigma L C p :=
  le_ciSup (list_seminorms_bddAbove L C p o) l

theorem sigma_le (L : Set (S → ℝ)) (C : ℝ≥0)
    (p : ℝ≥0∞) [Fact (1 ≤ p)] (o : S) (m : Molecule S) :
    sigma L C p m ≤ C * ∑ s ∈ m.val.support, |m.val s| * dist s o := by
  rw [sigma_apply L C p o]
  exact ciSup_le fun l => l.seminorm_le p o m

end TestLists

section SquareSum

variable {M : Type*} [AddCommGroup M] [Module ℝ M]
variable (q : ℕ → Seminorm ℝ M)
variable (hq : ∀ x, Summable (fun n => (q n x) ^ 2))

def squareVector (x : M) : lp (fun _ : ℕ => ℝ) 2 :=
  ⟨fun n => q n x, memℓp_gen (by
    simpa only [ENNReal.toReal_ofNat, Real.rpow_two, Real.norm_eq_abs, sq_abs]
      using hq x)⟩

@[simp] theorem squareVector_apply (x : M) (n : ℕ) :
    squareVector q hq x n = q n x := rfl

def squareSeminorm : Seminorm ℝ M :=
  Seminorm.of (fun x => ‖squareVector q hq x‖)
    (by
      intro x y
      calc
        ‖squareVector q hq (x + y)‖ ≤ ‖squareVector q hq x + squareVector q hq y‖ := by
          apply lp.norm_mono (by norm_num : (2 : ℝ≥0∞) ≠ 0)
          intro n
          change ‖q n (x + y)‖ ≤ ‖q n x + q n y‖
          rw [Real.norm_of_nonneg (apply_nonneg _ _),
            Real.norm_of_nonneg (add_nonneg (apply_nonneg _ _) (apply_nonneg _ _))]
          exact map_add_le_add _ _ _
        _ ≤ ‖squareVector q hq x‖ + ‖squareVector q hq y‖ := norm_add_le _ _)
    (by
      intro a x
      have h : squareVector q hq (a • x) = ‖a‖ • squareVector q hq x := by
        apply lp.ext
        funext n
        change q n (a • x) = ‖a‖ * q n x
        exact map_smul_eq_mul _ _ _
      rw [h, norm_smul, norm_norm])

@[simp] theorem squareSeminorm_apply (x : M) :
    squareSeminorm q hq x = ‖squareVector q hq x‖ := rfl

theorem squareSeminorm_sq (x : M) :
    (squareSeminorm q hq x) ^ 2 = ∑' n, (q n x) ^ 2 := by
  simpa only [squareSeminorm_apply, ENNReal.toReal_ofNat, Real.rpow_two,
    Real.norm_eq_abs, sq_abs, squareVector_apply] using
    lp.norm_rpow_eq_tsum (by norm_num : 0 < (2 : ℝ≥0∞).toReal) (squareVector q hq x)

theorem coordinate_le_squareSeminorm (n : ℕ) (x : M) :
    q n x ≤ squareSeminorm q hq x := by
  simpa only [squareSeminorm_apply, squareVector_apply,
    Real.norm_of_nonneg (apply_nonneg _ _)] using
    lp.norm_apply_le_norm (by norm_num : (2 : ℝ≥0∞) ≠ 0) (squareVector q hq x) n

theorem seminorm_abs_sub_le (r : Seminorm ℝ M) (x y : M) :
    |r x - r y| ≤ r (x - y) := by
  have hxy := map_add_le_add r (x - y) y
  have hyx := map_add_le_add r (y - x) x
  rw [sub_add_cancel] at hxy hyx
  have hn : r (y - x) = r (x - y) := by rw [← neg_sub x y, map_neg_eq_map]
  rw [hn] at hyx
  apply abs_le.mpr
  constructor <;> linarith

theorem squareVector_sub_norm_le (x y : M) :
    ‖squareVector q hq x - squareVector q hq y‖ ≤ squareSeminorm q hq (x - y) := by
  apply lp.norm_mono (by norm_num : (2 : ℝ≥0∞) ≠ 0)
  intro n
  change ‖q n x - q n y‖ ≤ ‖q n (x - y)‖
  rw [Real.norm_eq_abs, Real.norm_of_nonneg (apply_nonneg _ _)]
  exact seminorm_abs_sub_le _ _ _

end SquareSum

end
end C0Absorption

end OAI