File size: 3,722 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
import Mathlib

namespace OAI

open scoped BigOperators ContDiff

namespace BoxTransport.Routing

abbrev Space := Fin 3 β†’ ℝ
abbrev RationalSpace := Fin 3 β†’ β„š
abbrev SpaceTime := ℝ Γ— Space
abbrev RationalSpaceTime := β„š Γ— RationalSpace
abbrev Field := SpaceTime β†’ Space

abbrev Axis := Option (Fin 3)

def coordinateVector (j : Fin 3) : Space := Pi.single j 1

def coordinateDirection : Axis β†’ SpaceTime
  | none => (1, 0)
  | some j => (0, coordinateVector j)

def realPoint (q : RationalSpace) : Space := fun j => (q j : ℝ)

def realSpaceTime (q : RationalSpaceTime) : SpaceTime := (q.1, realPoint q.2)

def realBox (c r : Space) : Set Space :=
  {x | βˆ€ j, |x j - c j| ≀ r j}

def solidBox (a h : RationalSpace) : Set Space :=
  realBox (realPoint a) (realPoint h)

def prescribedAffine (a b h k : RationalSpace) (x : Space) : Space :=
  fun j => (b j : ℝ) + ((k j / h j : β„š) : ℝ) * (x j - (a j : ℝ))

noncomputable def mixedDerivative : List Axis β†’ Field β†’ Field
  | [], U => U
  | j :: js, U => fun p => fderiv ℝ (mixedDerivative js U) p (coordinateDirection j)

abbrev RationalCode := β„• Γ— β„• Γ— β„•

def rationalValue (q : RationalCode) : β„š := ((q.1 : β„š) - q.2.1) / (q.2.2 + 1)

abbrev RationalPointCode := RationalCode Γ— RationalCode Γ— RationalCode Γ— RationalCode

def codeSpaceTime (q : RationalPointCode) : SpaceTime :=
  ((rationalValue q.1 : ℝ), ![(rationalValue q.2.1 : ℝ),
    (rationalValue q.2.2.1 : ℝ), (rationalValue q.2.2.2 : ℝ)])

abbrev EvaluationRequest := List Axis Γ— RationalPointCode Γ— β„• Γ— Fin 3

def Effective (U : Field) : Prop :=
  βˆƒ eval : EvaluationRequest β†’ RationalCode,
    βˆƒ modulus : List Axis Γ— β„• β†’ β„•,
      βˆƒ bound : List Axis β†’ β„•,
        Computable eval ∧ Computable modulus ∧ Computable bound ∧
        (βˆ€ (ds : List Axis) (q : RationalPointCode) (n : β„•) (p : SpaceTime),
          β€–p - codeSpaceTime qβ€– ≀ ((modulus (ds, n) : ℝ) + 1)⁻¹ β†’
          βˆ€ j : Fin 3,
            |mixedDerivative ds U p j - (rationalValue (eval (ds, q, n, j)) : ℝ)| ≀
              ((n : ℝ) + 1)⁻¹) ∧
        (βˆ€ (ds : List Axis) (p : SpaceTime) (j : Fin 3),
          |mixedDerivative ds U p j| ≀ (bound ds : ℝ))

noncomputable def spatialDivergence (U : Field) (t : ℝ) (x : Space) : ℝ :=
  βˆ‘ j : Fin 3, (fderiv ℝ (fun y => U (t, y)) x (coordinateVector j)) j

def AdmissibleField (U : Field) : Prop :=
  ContDiff ℝ ∞ U ∧ HasCompactSupport U ∧ Effective U ∧
    (βˆ€ t x, spatialDivergence U t x = 0) ∧
    (βˆ€ (t : ℝ) (x : Space), t βˆ‰ Set.Icc (1 / 4 : ℝ) (3 / 4 : ℝ) β†’ U (t, x) = 0)

def IsGlobalFlow (U : Field) (Ξ¦ : ℝ β†’ Space β†’ Space) : Prop :=
  (βˆ€ x, Ξ¦ 0 x = x) ∧
    (βˆ€ t x, HasDerivAt (fun s => Ξ¦ s x) (U (t, Ξ¦ t x)) t) ∧
    (βˆ€ (x : Space) (Ξ³ : ℝ β†’ Space), Ξ³ 0 = x β†’
      (βˆ€ t, HasDerivAt Ξ³ (U (t, Ξ³ t)) t) β†’ βˆ€ t, Ξ³ t = Ξ¦ t x)

def Delivers {n : β„•} (a b h k : Fin n β†’ RationalSpace)
    (Ξ¦ : ℝ β†’ Space β†’ Space) : Prop :=
  βˆ€ i, βˆƒ O : Set Space, IsOpen O ∧ solidBox (a i) (h i) βŠ† O ∧
    βˆ€ x ∈ O, Ξ¦ 1 x = prescribedAffine (a i) (b i) (h i) (k i) x

theorem balanced_box_routing
    (n : β„•) (a b h k : Fin n β†’ RationalSpace)
    (hh : βˆ€ i j, 0 < h i j) (hk : βˆ€ i j, 0 < k i j)
    (ha : Pairwise fun i j => Disjoint (solidBox (a i) (h i)) (solidBox (a j) (h j)))
    (hb : Pairwise fun i j => Disjoint (solidBox (b i) (k i)) (solidBox (b j) (k j)))
    (hvol : βˆ€ i, ∏ j : Fin 3, k i j / h i j = 1) :
    βˆƒ U : Field, βˆƒ Ξ¦ : ℝ β†’ Space β†’ Space,
      AdmissibleField U ∧ IsGlobalFlow U Φ ∧ Delivers a b h k Φ := by
  sorry

end BoxTransport.Routing

end OAI