File size: 5,058 Bytes
9eeb9c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.Analysis.HardSphere.Conditioning.SlotMultiplicity
import OAI.Analysis.HardSphere.Allocation.PhysicalRouteGeometry
import OAI.Analysis.HardSphere.Allocation.RouteCenters

namespace OAI

section

noncomputable section
open MeasureTheory ProbabilityTheory Set
open scoped ENNReal NNReal
namespace HardSphere.Groups
open Wiener Bridge Sampling Comparison GaussianPacking PathCutoff CellOrbital HardSphere.Lattice
attribute [local instance] Classical.propDecidable
variable {K : ℕ} [NeZero K] {x y : DiscreteTorus K} {J : Type*}

def simpleRouteVertices (p : SimplePath x y) (n : ℕ) : Fin (n+2)→Fin 3→Fin K :=
  fun i ↦ siteIndex (p.val.getVert i.val)

lemma simpleRouteVertices_zero (p : SimplePath x y) (n : ℕ) :
    simpleRouteVertices p n 0=siteIndex x := by simp [simpleRouteVertices]
lemma simpleRouteVertices_last (p : SimplePath x y) (n : ℕ) (hn : n+1=p.val.length) :
    simpleRouteVertices p n (Fin.last (n+1))=siteIndex y := by
  simp only [simpleRouteVertices,Fin.val_last,hn,SimpleGraph.Walk.getVert_length]

omit [NeZero K] in
lemma simpleRouteVertices_adjacent (p : SimplePath x y) (n : ℕ) (hn : n+1=p.val.length)
    (i : Fin (n+1)) :
    (torusNearestGraph K).Adj (p.val.getVert i.castSucc.val) (p.val.getVert i.succ.val) :=
  p.val.adj_getVert_succ (by simpa only [Fin.val_castSucc, ←hn] using i.isLt)

lemma simpleRouteVertices_distance {L : Length} (hL : L.val=(K:ℝ))
    (p : SimplePath x y) (n : ℕ) (hn : n+1=p.val.length) :
    ∀i:Fin (n+1),torusDistance L (gridCenter L (simpleRouteVertices p n i.castSucc))
      (gridCenter L (simpleRouteVertices p n i.succ))≤1 :=
  fun i ↦ adjacent_center_distance hL (simpleRouteVertices_adjacent p n hn i)

def simpleRouteSteps {L : Length} (hL : L.val=(K:ℝ))
    (p : SimplePath x y) (n : ℕ) (hn : n+1=p.val.length) : Fin (n+1)→Fin 7 :=
  fun i ↦ (adjacent_routeCellPeriod hL (simpleRouteVertices_adjacent p n hn i)).choose

lemma simpleRouteSteps_period {L : Length} (hL : L.val=(K:ℝ))
    (p : SimplePath x y) (n : ℕ) (hn : n+1=p.val.length) :
    ∀ i : Fin (n+1), projectPoint L (routeCellPeriod (simpleRouteVertices p n i.succ)
      (simpleRouteVertices p n i.castSucc) (simpleRouteSteps hL p n hn i))=0 :=
  fun i ↦ (adjacent_routeCellPeriod hL (simpleRouteVertices_adjacent p n hn i)).choose_spec

lemma gridSite_slotCenter {home : J→Fin 3→Fin K} (w : DiscreteTorus K) :
    (fun i ↦ gridSite (slotCenter home (siteIndex w) i))=
      extendedAnchor (fun j ↦ gridSite (home j)) w := by
  funext i
  cases i with
  | none => exact indexSite_siteIndex w
  | some j => rfl

lemma routeSlots_reparam {d e : ℕ} (f : Fin d↪J) (h : e=d) :
    routeSlots ((finCongr h).toEmbedding.trans f)=routeSlots f := by
  subst e
  rfl

lemma simpleRouteSlots {n : ℕ} (p : SimplePath x y) (hn : n+1=p.val.length)
    (home : J→Fin 3→Fin K) (f : Fin (n+1)↪J)
    (hf : ∀i,home (f i)=simpleRouteVertices p n i.castSucc) :
    ∃ pick : Fin p.val.length→J, ∃ H : ∀i,gridSite (home (pick i))=pathVertexEmbedding p i.castSucc,
      routeSlots f=routeSlots (departureEmbedding p (fun j ↦ gridSite (home j)) pick H) := by
  let pick : Fin p.val.length→J := fun i ↦ f (Fin.cast hn.symm i)
  have hp : ∀i,gridSite (home (pick i))=pathVertexEmbedding p i.castSucc := by
    intro i
    dsimp only [pick]
    rw [hf]
    exact indexSite_siteIndex _
  refine ⟨pick,hp,?_⟩
  have he : departureEmbedding p (fun j ↦ gridSite (home j)) pick hp=
      (finCongr hn.symm).toEmbedding.trans f := by ext i; rfl
  rw [he,routeSlots_reparam]

lemma simpleRoute_near_first {n l : ℕ} (p q : SimplePath x y)
    (hn : n+1=p.val.length) (hl : l+1=q.val.length)
    (home : J→Fin 3→Fin K) (f : Fin (n+1)↪J) (g : Fin (l+1)↪J)
    (hf : ∀i,home (f i)=simpleRouteVertices p n i.castSucc)
    (hg : ∀i,home (g i)=simpleRouteVertices q l i.castSucc) (R : ℕ) :
    (nearSlots (torusNear K R) (fun i ↦ gridSite (slotCenter home (siteIndex y) i))
      (routeSlots f) (routeSlots g)).card≤ simpleEncounter R p q := by
  obtain ⟨pick,hpick,hp⟩ := simpleRouteSlots p hn home f hf
  obtain ⟨choose,hchoose,hq⟩ := simpleRouteSlots q hl home g hg
  rw [gridSite_slotCenter,hp,hq]
  exact simple_nearSlots_bound R p q _ pick choose hpick hchoose

lemma simpleRoute_near_second {n l : ℕ} (p q : SimplePath x y)
    (hn : n+1=p.val.length) (hl : l+1=q.val.length)
    (home : J→Fin 3→Fin K) (f : Fin (n+1)↪J) (g : Fin (l+1)↪J)
    (hf : ∀i,home (f i)=simpleRouteVertices p n i.castSucc)
    (hg : ∀i,home (g i)=simpleRouteVertices q l i.castSucc) (R : ℕ) :
    (nearSlots (torusNear K R) (fun i ↦ gridSite (slotCenter home (siteIndex x) i))
      (routeSlots f) (routeSlots g)).card≤2*simpleEncounter R p q := by
  obtain ⟨pick,hpick,hp⟩ := simpleRouteSlots p hn home f hf
  obtain ⟨choose,hchoose,hq⟩ := simpleRouteSlots q hl home g hg
  rw [gridSite_slotCenter,hp,hq]
  exact second_primary_nearSlots_bound R p q _ pick choose hpick hchoose

end HardSphere.Groups
end
end

end OAI