File size: 8,162 Bytes
dd14c26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.Probability.LatticeSurface.Convexity.BoundedBase
import OAI.Probability.LatticeSurface.Convexity.BrunnMinkowski
import OAI.Probability.LatticeSurface.Convexity.CubePrekopa
import OAI.Probability.LatticeSurface.Convexity.QuantileTransport
import OAI.Probability.LatticeSurface.Convexity.WeightedPrekopa
import OAI.Probability.LatticeSurface.Dynamics.DisplacementInequality
import OAI.Probability.LatticeSurface.Geometry.CapCentral
import OAI.Probability.LatticeSurface.Geometry.CapCompact
import OAI.Probability.LatticeSurface.Geometry.CapContract
import OAI.Probability.LatticeSurface.Geometry.CapCoordinates
import OAI.Probability.LatticeSurface.Geometry.CapReflection
import OAI.Probability.LatticeSurface.Geometry.CapSplit
import OAI.Probability.LatticeSurface.Geometry.CapUnpin
import OAI.Probability.LatticeSurface.Geometry.CapWeld

namespace OAI

open Set MeasureTheory Filter

open scoped Topology

noncomputable section

namespace FacetVolume

end FacetVolume

namespace ExtremalEdges

open scoped ENNReal

end ExtremalEdges

noncomputable section

open MeasureTheory Set

open scoped ENNReal

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

end ExtremalEdges

namespace ExtremalEdges

attribute [local instance] Classical.propDecidable

variable {V : Type*}

def gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V → V) :
    Set ((Free (pins ∪ (W : Set V)) → ℝ) × (W → ℝ)) :=
  {p | ∀ x y, G.Adj x y → |fromGradients pins W r p x-fromGradients pins W r p y| ≤ 1}

lemma gradientBody_preimage [Fintype V] (G : SimpleGraph V) (pins : Set V)
    (W : Finset V) (hwp : ∀ w ∈ W, w ∉ pins) (r : V → V) :
    gradientBody G pins W r = (gradientCoords pins W hwp r).symm ⁻¹'
      conditionalBody G pins (fun _ => 0) := by
  ext p
  simp only [gradientBody, conditionalBody, Set.mem_preimage, Set.mem_ofPred_eq, gradient_restore]

lemma compact_gradientBody [Fintype V] (G : SimpleGraph V) (hc : G.Connected)
    (pins : Set V) (hp : pins.Nonempty) (W : Finset V)
    (hwp : ∀ w ∈ W, w ∉ pins) (r : V → V) :
    IsCompact (gradientBody G pins W r) := by
  rw [gradientBody_preimage G pins W hwp r, ← MeasurableEquiv.image_eq_preimage_symm]
  exact (compact_zeroBody G hc pins hp).image (continuous_gradientCoords pins W hwp r)

lemma convex_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V → V) :
    Convex ℝ (gradientBody G pins W r) := by
  intro p hp q hq s t hs ht hst x y hxy
  simp only [fromGradients_comb]
  calc
    |s * fromGradients pins W r p x+t * fromGradients pins W r q x-
        (s * fromGradients pins W r p y+t * fromGradients pins W r q y)| =
      |s * (fromGradients pins W r p x-fromGradients pins W r p y)+
        t * (fromGradients pins W r q x-fromGradients pins W r q y)| := by congr 1; ring
    _ ≤ |s * (fromGradients pins W r p x-fromGradients pins W r p y)|+
        |t * (fromGradients pins W r q x-fromGradients pins W r q y)| := abs_add_le _ _
    _ ≤ s*1+t*1 := by
      rw [abs_mul, abs_mul, abs_of_nonneg hs, abs_of_nonneg ht]
      gcongr
      exacts [hp x y hxy,hq x y hxy]
    _ = 1 := by linarith

lemma neg_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V → V)
    {p : (Free (pins ∪ (W : Set V)) → ℝ) × (W → ℝ)} (hp : p ∈ gradientBody G pins W r) :
    -p ∈ gradientBody G pins W r := by
  intro x y hxy
  simpa only [fromGradients_neg, neg_sub_neg, abs_sub_comm] using hp x y hxy

lemma central_gradientBody (G : SimpleGraph V) (pins : Set V) (W : Finset V) (r : V → V) :
    productSlice (gradientBody G pins W r) 0 =
      conditionalBody (G.map (collapse W r)) (pins ∪ (W : Set V)) (fun _ => 0) := by
  ext h
  simp only [productSlice, gradientBody, conditionalBody, Set.mem_ofPred_eq,
    fromGradients_zero, graph_constraint_map]

def capsInterval (u : ℝ) : Set ℝ := Icc (-1) (u-1) ∪ Icc (1-u) 1

lemma measurable_capsInterval (u : ℝ) : MeasurableSet (capsInterval u) :=
  measurableSet_Icc.union measurableSet_Icc

lemma mem_capsInterval {u t : ℝ} (hl : 1-u ≤ |t|) (hh : |t| ≤ 1) : t ∈ capsInterval u := by
  rcases le_total 0 t with ht | ht
  · right
    rw [abs_of_nonneg ht] at hl hh
    exact ⟨hl,hh⟩
  · left
    rw [abs_of_nonpos ht] at hl hh
    constructor <;> linarith

lemma volume_capsInterval (u : ℝ) (hu : 0 ≤ u) :
    volume (capsInterval u) ≤ ENNReal.ofReal (2*u) := by
  calc
    volume (capsInterval u) ≤ volume (Icc (-1:ℝ) (u-1))+volume (Icc (1-u) 1) := measure_union_le _ _
    _ = ENNReal.ofReal u+ENNReal.ofReal u := by simp [Real.volume_Icc]
    _ = ENNReal.ofReal (2*u) := by rw [← ENNReal.ofReal_add hu hu]; congr 1; ring

theorem star_cap_volume [Fintype V] (G : SimpleGraph V) [DecidableRel G.Adj]
    (hc : G.Connected) (pins : Set V) (hp : pins.Nonempty)
    (W : Finset V) (r : V → V) (D : ℕ)
    (hwp : ∀ w ∈ W, w ∉ pins) (hr : ∀ w ∈ W, r w ∉ W)
    (hd : ∀ w ∈ W, G.degree w ≤ D) (he : ∀ w ∈ W, G.Adj w (r w))
    (u : ℝ) (hu : 0 ≤ u) :
    volume {h : Free pins → ℝ | h ∈ conditionalBody G pins (fun _ => 0) ∧
      ∀ w ∈ W, 1-u ≤ |restore pins (fun _ => 0) h w-restore pins (fun _ => 0) h (r w)|} ≤
      (ENNReal.ofReal (2*u))^W.card * (2^D)^W.card *
        volume (conditionalBody G pins (fun _ => 0)) := by
  let S : Set (W → ℝ) := Set.pi Set.univ (fun _ => capsInterval u)
  have hS : MeasurableSet S := MeasurableSet.pi (Set.to_countable _) (fun _ _ => measurable_capsInterval u)
  have hvolS : volume S ≤ (ENNReal.ofReal (2*u))^W.card := by
    rw [show volume S = ∏ _ : W, volume (capsInterval u) from volume_pi_pi _]
    calc
      (∏ _ : W, volume (capsInterval u)) ≤ ∏ _ : W, ENNReal.ofReal (2*u) :=
        Finset.prod_le_prod (fun _ _ => volume_capsInterval u hu)
      _ = _ := by simp
  let K := gradientBody G pins W r
  have hk : IsCompact K := compact_gradientBody G hc pins hp W hwp r
  have hb := product_small_set_bound hk (convex_gradientBody G pins W r)
    (fun _ h => neg_gradientBody G pins W r h) S hS
  have hsub : {h : Free pins → ℝ | h ∈ conditionalBody G pins (fun _ => 0) ∧
      ∀ w ∈ W, 1-u ≤ |restore pins (fun _ => 0) h w-restore pins (fun _ => 0) h (r w)|} ⊆
        (gradientCoords pins W hwp r) ⁻¹' (K ∩ Prod.snd ⁻¹' S) := by
    intro h hh
    constructor
    · change (gradientCoords pins W hwp r) h ∈ gradientBody G pins W r
      rw [gradientBody_preimage G pins W hwp r]
      simpa using hh.1
    · intro w hw
      rw [gradientCoords_difference pins W hwp r hr h w]
      exact mem_capsInterval (hh.2 w w.2) (hh.1 w (r w) (he w w.2))
  calc
    _ ≤ volume ((gradientCoords pins W hwp r) ⁻¹' (K ∩ Prod.snd ⁻¹' S)) := measure_mono hsub
    _ = volume (K ∩ Prod.snd ⁻¹' S) := (preserving_gradientCoords pins W hwp r).measure_preimage
      (hk.measurableSet.inter (hS.preimage measurable_snd)).nullMeasurableSet
    _ ≤ volume S * volume (productSlice K 0) := hb
    _ ≤ (ENNReal.ofReal (2*u))^W.card * ((2^D)^W.card *
        volume (conditionalBody G pins (fun _ => 0))) := by
      apply mul_le_mul' hvolS
      rw [show productSlice K 0 = _ from central_gradientBody G pins W r]
      exact volume_collapsed_body_le G pins W r D hwp hr hd
    _ = _ := by ring

end ExtremalEdges

end
end

end OAI