File size: 3,059 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
import OAI.NumberTheory.TwoPoint.Walks.RetainedLiouvilleEdges
import OAI.NumberTheory.TwoPoint.Bounds.OverlapPrefix

namespace OAI

/-! Summing a directed edge over the finite block keeps precisely those
starting positions whose terminal endpoint remains in the block. -/

namespace TwoPointCorrelations

open Finset
open scoped Classical

lemma block_endpoint_sum (M r : β„•) (i : Fin M) (c : β„€) (F : β„€ β†’ β„‚) :
    (βˆ‘ j : Fin M, if (j.val : β„€) + c = (i.val : β„€) + c + r then F ((j.val : β„€) + c) else 0) =
      if i.val + r < M then F ((i.val : β„€) + c + r) else 0 := by
  by_cases hi : i.val + r < M
  Β· let jβ‚€ : Fin M := ⟨i.val + r, hi⟩
    have he (j : Fin M) : (j.val : β„€) + c = (i.val : β„€) + c + r ↔ j = jβ‚€ := by
      constructor
      Β· intro hj
        apply Fin.ext
        dsimp only [jβ‚€]
        omega
      Β· rintro rfl
        dsimp only [jβ‚€]
        push_cast
        ring
    simp only [he, sum_ite_eq', mem_univ, ite_true, hi]
    congr 1
    dsimp [jβ‚€]
    ring
  Β· have he (j : Fin M) : (j.val : β„€) + c β‰  (i.val : β„€) + c + r := by
      intro hj
      have hjM := j.isLt
      omega
    simp [he, hi]

lemma block_supported_edge_sum (M r : β„•) (c : β„€) (F : β„€ β†’ β„€ β†’ β„‚)
    (hsupport : βˆ€ n m : β„€, m β‰  n + r β†’ F n m = 0) (i : Fin M) :
    (βˆ‘ j : Fin M, F ((i.val : β„€) + c) ((j.val : β„€) + c)) =
      if i.val + r < M then F ((i.val : β„€) + c) ((i.val : β„€) + c + r) else 0 := by
  have he (j : Fin M) : F ((i.val : β„€) + c) ((j.val : β„€) + c) =
      if (j.val : β„€) + c = (i.val : β„€) + c + r then
        F ((i.val : β„€) + c) ((j.val : β„€) + c) else 0 := by
    split_ifs with h
    Β· rfl
    Β· exact hsupport _ _ h
  calc
    _ = βˆ‘ j : Fin M, if (j.val : β„€) + c = (i.val : β„€) + c + r then
        F ((i.val : β„€) + c) ((j.val : β„€) + c) else 0 := sum_congr rfl (fun j _ => he j)
    _ = _ := block_endpoint_sum M r i c (F ((i.val : β„€) + c))

lemma retainedLiouvilleEdge_support (Q : Finset β„•) (u : β„• β†’ ℝ) (eligible : β„• β†’ Prop)
    (g center : β„€ β†’ ℝ) (L K : ℝ) (extra keep : β„€ β†’ Prop)
    (h d q : β„•) (n m : β„€) (hm : m β‰  n + (h * q * d : β„•)) :
    retainedLiouvilleEdge Q u eligible g center L K extra keep h d q n m = 0 := by
  unfold retainedLiouvilleEdge
  split_ifs with he
  Β· exact (hm he.2.2.2.1).elim
  Β· rfl

lemma retainedLiouvilleEdge_block_sum (Q : Finset β„•) (u : β„• β†’ ℝ) (eligible : β„• β†’ Prop)
    (g center : β„€ β†’ ℝ) (L K : ℝ) (extra keep : β„€ β†’ Prop)
    (h d q M : β„•) (c : β„€) (i : Fin M) :
    (βˆ‘ j : Fin M, retainedLiouvilleEdge Q u eligible g center L K extra keep h d q
      ((i.val : β„€) + c) ((j.val : β„€) + c)) =
      if i.val + h * q * d < M then
        retainedLiouvilleEdge Q u eligible g center L K extra keep h d q
          ((i.val : β„€) + c) ((i.val : β„€) + c + (h * q * d : β„•)) else 0 :=
  block_supported_edge_sum M (h * q * d) c _
    (retainedLiouvilleEdge_support Q u eligible g center L K extra keep h d q) i

end TwoPointCorrelations

end OAI