File size: 1,738 Bytes
7f37411
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib
import OAI.MeasureTheory.FalconerCompletion.Measures.PathIndex

namespace OAI

/-! Quantitative estimates for the distance-set construction. -/

section
section
namespace CurrentFalconer.TreeND
open Set Metric MeasureTheory
open scoped ENNReal
variable {d : ℕ}

noncomputable def treeCenter (p : CellPath d) : EuclideanSpace ℝ (Fin d) :=
  ambientGridCenter p.length (fun i => (pathIndex p i : ℤ))

lemma treeCenter_mem (p : CellPath d) : treeCenter p ∈ treeCell p :=
  ambientGridCenter_mem _ _

noncomputable def occupiedCenterCells (ν : Measure (EuclideanSpace ℝ (Fin d)))
    (p : ℕ) (x : EuclideanSpace ℝ (Fin d)) (r : ℝ) : Finset (CellPath d) := by
  classical
  exact (dyadicPaths p).filter fun q => 0 < ν (treeCell q) ∧ treeCenter q ∈ ball x r

lemma treeCenter_ball_card {g : ℕ} (T : Finset (CellPath d)) (hT : T ⊆ dyadicPaths g)
    (x : EuclideanSpace ℝ (Fin d)) {r : ℝ} (hr : 0 ≤ r)
    (hdist : ∀ p ∈ T, dist (treeCenter p) x ≤ r) :
    (T.card : ℝ) ≤ (2*(2:ℝ)^g*r+5)^d := by
  classical
  let f : CellPath d → (Fin d → ℤ) := fun p i => pathIndex p i
  have hf : Set.InjOn f T := by
    intro p hp q hq he
    apply pathIndex_injective (((mem_dyadicPaths _ _).mp (hT hp)).trans
      ((mem_dyadicPaths _ _).mp (hT hq)).symm)
    funext i
    have hei : (pathIndex p i : ℤ) = pathIndex q i := congrFun he i
    exact_mod_cast hei
  have hh := ambientGridCenter_ball_card g (T.image f) x hr (fun a ha => by
    obtain ⟨p,hp,rfl⟩ := Finset.mem_image.mp ha
    have he : p.length = g := (mem_dyadicPaths _ _).mp (hT hp)
    simpa only [treeCenter,he] using hdist p hp)
  rwa [Finset.card_image_of_injOn hf] at hh

end CurrentFalconer.TreeND
end
end

end OAI