File size: 12,273 Bytes
8e4d533
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.Geometry.CAT0Fillings.Reconstruction.Uniqueness
import OAI.Geometry.CAT0Fillings.Reconstruction.GraphCharts

namespace OAI

section

open Set Filter MeasureTheory
open scoped Topology NNReal ENNReal

namespace CAT0Fillings.Slicing
open Foundations MassMeasure BorelCoefficients

variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X]
  [CompactSpace X] [Nonempty X]

lemma IntegralSliceTree.isMetricCurrent {X : Type*} [MetricSpace X] [MeasurableSpace X]
    [BorelSpace X] [CompactSpace X] [Nonempty X] {k : ℕ} {T : Functional X k}
    (h : IntegralSliceTree k T) : IsMetricCurrent T := by
  cases k with
  | zero => exact h.1
  | succ k => exact h.choose

lemma ae_superlevelSlice_metric_of_bounded_weak_limit
    {k : ℕ} {Ts : ℕ → Functional X (k+1)} {T : Functional X (k+1)}
    (hTs : ∀ j, IsIntegral (k+1) (Ts j))
    (hT : IsMetricCurrent T) (hB : IsMetricCurrent (boundarySucc T))
    (M N : ℝ≥0) (hM : ∀ j, mass (Ts j) ≤ M)
    (hN : ∀ j, mass (boundarySucc (Ts j)) ≤ N)
    (hlim : ∀ b π, Tendsto (fun j => Ts j b π) atTop (𝓝 (T b π)))
    (hX : IsCAT0 X) {u : X → ℝ} {Ku : ℝ≥0} (hu : LipschitzWith Ku u) :
    ∀ᵐ t : ℝ, IsMetricCurrent (superlevelSlice hT hB u t) := by
  obtain ⟨hT',hB',hS⟩ := integral_slice_tree_of_bounded_weak_limit hTs M N hM hN hlim hX
  exact (hS u Ku hu).mono fun _ ht => ht.isMetricCurrent

theorem superlevelSlice_borel_integral_of_bounded_weak_limit
    {k : ℕ} {Ts : ℕ → Functional X (k+1)} {T : Functional X (k+1)}
    (hTs : ∀ j, IsIntegral (k+1) (Ts j))
    (hT : IsMetricCurrent T) (hB : IsMetricCurrent (boundarySucc T))
    (M N : ℝ≥0) (hM : ∀ j, mass (Ts j) ≤ M)
    (hN : ∀ j, mass (boundarySucc (Ts j)) ≤ N)
    (hlim : ∀ b π, Tendsto (fun j => Ts j b π) atTop (𝓝 (T b π)))
    (hX : IsCAT0 X) {u : X → ℝ} {Ku : ℝ≥0} (hu : LipschitzWith Ku u)
    (π : Fin k → X → ℝ) (hπ : ∀ i, ∃ K : ℝ≥0, LipschitzWith K (π i))
    {f : X → ℝ} (hf : Measurable f) (B : ℝ≥0) (hBf : ∀ x, |f x| ≤ B) :
    ActionIntegralAgreement volume T (Matrix.vecCons u π) (superlevelSlice hT hB u) π f := by
  have hρ : ∀ i, ∃ K : ℝ≥0, LipschitzWith K (Matrix.vecCons u π i) := by
    intro i
    refine Fin.cases ?_ (fun j => ?_) i
    · exact ⟨Ku,hu⟩
    · exact hπ j
  have hS := ae_superlevelSlice_metric_of_bounded_weak_limit hTs hT hB M N hM hN hlim hX hu
  obtain ⟨g,hg,hg0,hgb,_⟩ :=
    superlevelSlice_mass_bound_of_bounded_weak_limit hTs hT hB M N hM hN hlim hX hu
  refine ActionIntegralAgreement.bounded_measurable hρ hπ hS hg
    (Eventually.of_forall hg0) hgb ?_ hf B hBf
  intro b hb
  have hab : Admissible b π := ⟨hb,hπ⟩
  have ha := superlevelSlice_integral_of_bounded_weak_limit hTs hT hB M N hM hN hlim hX hu hab
  have he : (fun t : ℝ => superlevelSlice hT hB u t b π) =ᵐ[volume]
      (fun t => currentBorelAction (superlevelSlice hT hB u t) b π) :=
    hS.mono fun _ ht => (currentBorelAction_eq_action ht hab).symm
  exact ⟨ha.1.congr he, (currentBorelAction_eq_action hT ⟨hb,hρ⟩).trans
    (ha.2.trans (integral_congr_ae he))⟩

end CAT0Fillings.Slicing
end

section

open Set Filter MeasureTheory Metric
open scoped Topology NNReal ENNReal

namespace CAT0Fillings.SliceReconstruction
open Foundations MassMeasure BorelCoefficients BorelRestriction Slicing

attribute [local instance] Classical.propDecidable
variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X]
  [CompactSpace X] [Nonempty X]

lemma integral_zero_unitRepresentation {S : Functional X 0} (hS : IsIntegral 0 S) :
    ∃ (m : ℕ) (a : Fin m → ℤ) (x : Fin m → X),
      (∀ i, a i ≠ 0) ∧ Function.Injective x ∧ UnitRepresentation S a x := by
  obtain ⟨m,a,x,ha,hx,he⟩ := integerRectifiable_zero_distinct_representation hS.1 hS.2
  refine ⟨m,a,x,ha,hx,?_⟩
  intro b hb hb1
  rw [he]
  apply Finset.sum_congr rfl
  intro i _
  rw [atomCurrent,ite_eq_left ⟨⟨⟨1,hb⟩,1,hb1⟩,fun j => Fin.elim0 j⟩]

lemma graph_atom_mem_iff {X : Type*} [MetricSpace X] [MeasurableSpace X]
    [BorelSpace X] [CompactSpace X] [Nonempty X] {D : Set ℝ} {m : ℕ}
    (γ : D → Fin m → X)
    {u : X → ℝ} (hbase : ∀ t j, u (γ t j) = t)
    (hinj : ∀ t, Function.Injective (γ t)) (t : D) (i j : Fin m) :
    γ t i ∈ Set.range (fun s => γ s j) ↔ i = j := by
  constructor
  · rintro ⟨s,he⟩
    have ht : s = t := Subtype.ext (by simpa only [hbase] using congrArg u he)
    subst s
    exact (hinj t he).symm
  · rintro rfl
    exact ⟨t,rfl⟩

lemma superlevelSlice_graph_action {T : Functional X 1}
    (hT : IsMetricCurrent T) (hB : IsMetricCurrent (boundarySucc T))
    {u : X → ℝ} (hu : Continuous u)
    (hI : ∀ᵐ t : ℝ, IsIntegral 0 (superlevelSlice hT hB u t))
    {D : Set ℝ} (hD : IsCompact D) {m : ℕ} (γ : D → Fin m → X)
    (hγ : ∀ j, Continuous (fun t => γ t j)) (a : Fin m → ℤ)
    (hbase : ∀ t j, u (γ t j) = t) (hinj : ∀ t, Function.Injective (γ t))
    (hrep : ∀ t : D, UnitRepresentation (superlevelSlice hT hB u t) a (γ t))
    {b : X → ℝ} (hb : BoundedLip b) (j : Fin m) :
    ∀ᵐ t : ℝ, currentBorelAction (superlevelSlice hT hB u t)
      ((Set.range (fun s => γ s j)).indicator b) (fun z => Fin.elim0 z) =
      if ht : t ∈ D then (a j : ℝ)*b (γ ⟨t,ht⟩ j) else 0 := by
  classical
  let : CompactSpace D := isCompact_iff_compactSpace.mp hD
  let E := Set.range (fun s => γ s j)
  have hE : MeasurableSet E := (isCompact_range (hγ j)).measurableSet
  have hf : Measurable (E.indicator b) := hb.continuous.measurable.indicator hE
  obtain ⟨B,hBb⟩ := hb.2
  let B' : ℝ≥0 := ⟨max B 0,le_max_right _ _⟩
  have hfB (x : X) : |E.indicator b x| ≤ B' := by
    by_cases hx : x ∈ E
    · rw [indicator_of_mem hx]
      exact (hBb x).trans (le_max_left _ _)
    · rw [indicator_of_notMem hx,abs_zero]
      exact B'.coe_nonneg
  filter_upwards [hI] with t htI
  by_cases ht : t ∈ D
  · rw [dite_eq_left ht,(hrep ⟨t,ht⟩).borelAction htI.1 hf hfB]
    rw [Finset.sum_eq_single j]
    · rw [indicator_of_mem (show γ ⟨t,ht⟩ j ∈ E from ⟨⟨t,ht⟩,rfl⟩)]
    · intro i _ hij
      rw [indicator_of_notMem ((graph_atom_mem_iff γ hbase hinj ⟨t,ht⟩ i j).not.mpr hij),mul_zero]
    · simp
  · rw [dite_eq_right ht]
    obtain ⟨q,c,x,hc,hx,hrep'⟩ := integral_zero_unitRepresentation htI
    apply hrep'.borelAction_zero htI.1 hf
    intro i
    apply indicator_of_notMem
    rintro ⟨s,he⟩
    have hlevel := unitRepresentation_atoms_on_level hT hB hu t hc hx hrep' i
    rw [←he,hbase] at hlevel
    exact ht (hlevel ▸ s.property)

end CAT0Fillings.SliceReconstruction
end

section

open Set Filter MeasureTheory Metric
open scoped Topology NNReal ENNReal

namespace CAT0Fillings.SliceReconstruction
open Foundations MassMeasure BorelCoefficients BorelRestriction Slicing

attribute [local instance] Classical.propDecidable
variable {X : Type*} [MetricSpace X] [MeasurableSpace X] [BorelSpace X]
  [CompactSpace X] [Nonempty X]

lemma joint_graph_atom_mem_iff {X : Type*} [MetricSpace X] [MeasurableSpace X]
    [BorelSpace X] [CompactSpace X] [Nonempty X] {k : ℕ} {D : Set (Euc k)} {m : ℕ}
    (γ : D → Fin m → X)
    {π : Fin k → X → ℝ} (hbase : ∀ t j, coordinateMap π (γ t j) = t)
    (hinj : ∀ t, Function.Injective (γ t)) (t : D) (i j : Fin m) :
    γ t i ∈ Set.range (fun s => γ s j) ↔ i = j := by
  constructor
  · rintro ⟨s,he⟩
    have ht : s = t := Subtype.ext (by simpa only [hbase] using congrArg (coordinateMap π) he)
    subst s
    exact (hinj t he).symm
  · rintro rfl
    exact ⟨t,rfl⟩

lemma fullSlice_graph_action {k : ℕ} {T : Functional X k}
    (h : NormalApprox k T) (hX : IsCAT0 X)
    (π : Fin k → X → ℝ) (hπ : ∀ i, BoundedLip (π i))
    {D : Set (Euc k)} (hD : IsCompact D) {m : ℕ} (γ : D → Fin m → X)
    (hγ : ∀ j, Continuous (fun t => γ t j)) (a : Fin m → ℤ)
    (hbase : ∀ t j, coordinateMap π (γ t j) = t) (hinj : ∀ t, Function.Injective (γ t))
    (hrep : ∀ t : D, UnitRepresentation (fullSlice h π t) a (γ t))
    {b : X → ℝ} (hb : BoundedLip b) (j : Fin m) :
    ∀ᵐ z : Euc k, currentBorelAction (fullSlice h π z)
      ((Set.range (fun s => γ s j)).indicator b) (fun i => Fin.elim0 i) =
      if hz : z ∈ D then (a j : ℝ)*b (γ ⟨z,hz⟩ j) else 0 := by
  classical
  let : CompactSpace D := isCompact_iff_compactSpace.mp hD
  let E := Set.range (fun s => γ s j)
  have hE : MeasurableSet E := (isCompact_range (hγ j)).measurableSet
  have hf : Measurable (E.indicator b) := hb.continuous.measurable.indicator hE
  obtain ⟨B,hBb⟩ := hb.2
  let B' : ℝ≥0 := ⟨max B 0,le_max_right _ _⟩
  have hfB (x : X) : |E.indicator b x| ≤ B' := by
    by_cases hx : x ∈ E
    · rw [indicator_of_mem hx]
      exact (hBb x).trans (le_max_left _ _)
    · rw [indicator_of_notMem hx,abs_zero]
      exact B'.coe_nonneg
  have hA : Continuous (coordinateMap π) := by
    exact (parameterEquiv k).continuous.comp (continuous_pi fun i => (hπ i).continuous)
  filter_upwards [ae_fullSlice_mass_fiber h hX π hπ] with z hzM
  have hI := fullSlice_integral h π z
  by_cases hz : z ∈ D
  · rw [dite_eq_left hz,(hrep ⟨z,hz⟩).borelAction hI.1 hf hfB]
    rw [Finset.sum_eq_single j]
    · rw [indicator_of_mem (show γ ⟨z,hz⟩ j ∈ E from ⟨⟨z,hz⟩,rfl⟩)]
    · intro i _ hij
      rw [indicator_of_notMem ((joint_graph_atom_mem_iff γ hbase hinj ⟨z,hz⟩ i j).not.mpr hij),mul_zero]
    · simp
  · rw [dite_eq_right hz]
    obtain ⟨q,c,x,hc,hx,hrep'⟩ := integral_zero_unitRepresentation hI
    apply hrep'.borelAction_zero hI.1 hf
    intro i
    apply indicator_of_notMem
    rintro ⟨s,he⟩
    have hlevel := hrep'.atom_in_carrier hI.1 hc hx
      (measurableSet_eq_fun hA.measurable measurable_const) hzM i
    change coordinateMap π (x i) = z at hlevel
    rw [←he,hbase] at hlevel
    exact hz (hlevel ▸ s.property)

lemma full_graph_restriction_base_action {k : ℕ} {T : Functional X k}
    (h : NormalApprox k T) (hX : IsCAT0 X)
    (π : Fin k → X → ℝ) (hπ : ∀ i, BoundedLip (π i))
    {D : Set (Euc k)} (hD : IsCompact D) {m : ℕ} (γ : D → Fin m → X)
    (hγ : ∀ j, ∃ L U : ℝ≥0, LipschitzWith L (fun t => γ t j) ∧
      AntilipschitzWith U (fun t => γ t j)) (a : Fin m → ℤ)
    (hbase : ∀ t j, coordinateMap π (γ t j) = t) (hinj : ∀ t, Function.Injective (γ t))
    (hrep : ∀ t : D, UnitRepresentation (fullSlice h π t) a (γ t))
    (j : Fin m) {b : X → ℝ} (hb : BoundedLip b) :
    restrictCurrent h.metric (Set.range (fun t => γ t j)) b π =
      (jointGraphChart hD (fun t => γ t j) (hγ j) (a j)).action b π := by
  classical
  let : CompactSpace D := isCompact_iff_compactSpace.mp hD
  let E := Set.range (fun t => γ t j)
  have hγc (i : Fin m) : Continuous (fun t => γ t i) := (hγ i).choose_spec.choose_spec.1.continuous
  have hE : MeasurableSet E := (isCompact_range (hγc j)).measurableSet
  let f := E.indicator b
  have hf : Measurable f := hb.continuous.measurable.indicator hE
  obtain ⟨B,hBb⟩ := hb.2
  let B' : ℝ≥0 := ⟨max B 0,le_max_right _ _⟩
  have hfB (x : X) : |f x| ≤ B' := by
    by_cases hx : x ∈ E
    · exact (by simpa only [f,indicator_of_mem hx] using (show |b x| ≤ B' from (hBb x).trans (le_max_left B 0)))
    · simp only [f,indicator_of_notMem hx,abs_zero]
      exact B'.coe_nonneg
  have ha := fullSlice_borel_integral h hX π hπ hf B' hfB
  have hs := fullSlice_graph_action h hX π hπ hD γ hγc a hbase hinj hrep hb j
  rw [restrictCurrent_apply h.metric E ⟨hb,fun i => (hπ i).1⟩,
    ←currentBorelAction_eq h.metric f π,ha.2]
  rw [jointGraphChart_base_action hD _ (hγ j) (a j) π (fun i => (hπ i).1) (by
    intro t i
    exact congrArg (fun z : Euc k => z i) (hbase t j)) hb]
  rw [←integral_indicator hD.measurableSet]
  apply integral_congr_ae
  filter_upwards [hs] with z hz
  rw [hz]
  by_cases hzD : z ∈ D
  · simp only [dite_eq_left hzD,indicator_of_mem hzD,jointGraphFunction]
  · simp only [dite_eq_right hzD,indicator_of_notMem hzD]

end CAT0Fillings.SliceReconstruction
end

end OAI