File size: 4,624 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib

namespace OAI

open Set MeasureTheory intervalIntegral

universe u v

namespace FeasibleShift

variable {V : Type u} [Fintype V] [DecidableEq V]

noncomputable def component (G : SimpleGraph V) (x : V) : Finset V := by
  classical
  exact Finset.univ.filter (G.Reachable x)

noncomputable def contactGraph (G : SimpleGraph V) (h : V β†’ ℝ) (s : ℝ) : SimpleGraph V where
  Adj x y := G.Adj x y ∧ 1 - |h x - h y| ≀ s
  symm := ⟨by intro x y hxy; simpa only [abs_sub_comm] using And.intro hxy.1.symm hxy.2⟩
  loopless := ⟨by intro x hx; exact G.irrefl hx.1⟩

noncomputable def prescription (G : SimpleGraph V) (ground : Finset V)
    (f : V β†’ ℝ) (x : V) : ℝ :=
  if Disjoint (component G x) ground then
    (βˆ‘ y ∈ component G x, f y) / (component G x).card else 0

noncomputable def averagedShift (G : SimpleGraph V) (ground : Finset V)
    (f h : V β†’ ℝ) (sβ‚€ s₁ : ℝ) (x : V) : ℝ :=
  (s₁ - sβ‚€)⁻¹ * ∫ s in sβ‚€..s₁, prescription (contactGraph G h s) ground f x

abbrev FreeSites (pins : Finset V) := {x : V // x βˆ‰ pins}

noncomputable def extendHeight (pins : Finset V) (Ξ² : V β†’ ℝ)
    (h : FreeSites pins β†’ ℝ) (x : V) : ℝ :=
  if hx : x ∈ pins then β x else h ⟨x, hx⟩

noncomputable def freeShift (G : SimpleGraph V) (ground pins : Finset V)
    (Ξ² f : V β†’ ℝ) (sβ‚€ s₁ : ℝ) (h : FreeSites pins β†’ ℝ) (x : FreeSites pins) : ℝ :=
  averagedShift G ground f (extendHeight pins Ξ² h) sβ‚€ s₁ x

noncomputable def heightPolytope (G : SimpleGraph V) (pins walls : Finset V)
    (Ξ² : V β†’ ℝ) (I : V β†’ Set ℝ) : Set (FreeSites pins β†’ ℝ) :=
  {h | (βˆ€ x y, G.Adj x y β†’ |extendHeight pins Ξ² h x - extendHeight pins Ξ² h y| ≀ 1) ∧
    βˆ€ x ∈ walls, extendHeight pins Ξ² h x ∈ I x}

noncomputable def neighbors (G : SimpleGraph V) (x : V) : Finset V := by
  classical
  exact Finset.univ.filter (G.Adj x)

noncomputable def shiftGraph (G : SimpleGraph V) (ground : Finset V) : SimpleGraph V where
  Adj x y := G.Adj x y ∧ ¬ (x ∈ ground ∧ y ∈ ground)
  symm := ⟨by intro x y h; exact ⟨h.1.symm, fun hh => h.2 ⟨hh.2, hh.1⟩⟩⟩
  loopless := ⟨fun x h => G.irrefl h.1⟩

noncomputable def localSites (G : SimpleGraph V) (ground : Finset V) : Finset V := by
  classical
  exact Finset.univ.filter fun x => x βˆ‰ ground ∨ βˆƒ y, y βˆ‰ ground ∧ G.Adj x y

structure ShiftData (W : Type v) [Fintype W] [DecidableEq W]
    (n D Db B : β„•) (ρ : ENNReal) (sstar L M N : ℝ) where
  graph : SimpleGraph V
  ground : Finset V
  pins : Finset V
  walls : Finset V
  pins_ground : pins βŠ† ground
  walls_ground : walls βŠ† ground
  boundary : V β†’ ℝ
  intervals : V β†’ Set ℝ
  prescribed : V β†’ ℝ
  prescribed_ground : βˆ€ x ∈ ground, prescribed x = 0
  prescribed_bound : βˆ€ x, |prescribed x| ≀ M
  prescribed_gradient : βˆ€ x y, graph.Adj x y β†’ |prescribed x - prescribed y| ≀ L / n
  vertex_count : ((localSites graph ground).card : ℝ) ≀ N * (n : ℝ)^2
  degree : βˆ€ x, (neighbors graph x).card ≀ D
  polytope_measurable : MeasurableSet (heightPolytope graph pins walls boundary intervals)
  polytope_positive : volume (heightPolytope graph pins walls boundary intervals) β‰  0
  polytope_finite : volume (heightPolytope graph pins walls boundary intervals) β‰  ⊀
  boxGraph : SimpleGraph W
  box_degree : βˆ€ w, (neighbors boxGraph w).card ≀ Db
  boxMap : V β†’ W
  box_fiber : βˆ€ w, (Finset.univ.filter fun x => boxMap x = w).card ≀ B
  box_adjacent : βˆ€ x y, graph.Adj x y β†’ boxMap x = boxMap y ∨ boxGraph.Adj (boxMap x) (boxMap y)
  badBoxes : (FreeSites pins β†’ ℝ) β†’ Set W
  contact_bad : βˆ€ h x y, (contactGraph (shiftGraph graph ground)
    (extendHeight pins boundary h) sstar).Adj x y β†’ boxMap x ∈ badBoxes h ∧ boxMap y ∈ badBoxes h
  sparse : βˆ€ A : Finset W, (ProbabilityTheory.cond volume
    (heightPolytope graph pins walls boundary intervals)) {h | βˆ€ w ∈ A, w ∈ badBoxes h} ≀ ρ^A.card

namespace ShiftData

variable {W : Type v} [Fintype W] [DecidableEq W]

variable {n D Db B : β„•} {ρ : ENNReal} {sstar L M N : ℝ}

variable (S : ShiftData (V := V) W n D Db B ρ sstar L M N)

noncomputable def polytope := heightPolytope S.graph S.pins S.walls S.boundary S.intervals

noncomputable def law := ProbabilityTheory.cond volume S.polytope

noncomputable def shift (sβ‚€ s₁ : ℝ) :=
  freeShift (shiftGraph S.graph S.ground) S.ground S.pins S.boundary S.prescribed sβ‚€ s₁

noncomputable def map (sβ‚€ s₁ : ℝ) (h : FreeSites S.pins β†’ ℝ) := h + S.shift sβ‚€ s₁ h

end ShiftData

end FeasibleShift

end OAI