File size: 1,910 Bytes
2fca478
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import OAI.Geometry.PeriodicTiling.SeparatedCenters
import Mathlib.Algebra.Order.Floor.Ring
import Mathlib.Data.Set.Countable

namespace OAI

noncomputable section

namespace PeriodicTilingThree

open Set MeasureTheory

theorem AETiles.eq_of_voxel_close {d : ℕ} {F : Finset (Lattice d)}
    {A : Set (Space d)} (h : AETiles (Thickening F) A)
    {z : Lattice d} (hz : z ∈ F) {a b : A}
    (hc : ∀ i, |(b : Space d) i - (a : Space d) i| < 1) : a = b := by
  by_contra hne
  have hpos := unitVoxel_inter_volume_pos
    ((a : Space d) + castLattice z) ((b : Space d) + castLattice z) (by
      intro i
      simpa only [Pi.add_apply, add_sub_add_right_eq_sub] using hc i)
  have hsub : ∀ c : A, unitVoxel ((c : Space d) + castLattice z) ⊆
      {x | x - (c : Space d) ∈ Thickening F} := by
    intro c x hx
    refine ⟨z, hz, ?_⟩
    simpa only [mem_unitVoxel, sub_add_eq_sub_sub] using hx
  have hnull := (h.aedisjoint hne).mono (hsub a) (hsub b)
  exact (ne_of_gt hpos) hnull

theorem AETiles.floor_injective {d : ℕ} {F : Finset (Lattice d)}
    {A : Set (Space d)} (h : AETiles (Thickening F) A) (hF : F.Nonempty) :
    Function.Injective (fun a : A => (fun i => ⌊(a : Space d) i⌋ : Lattice d)) := by
  obtain ⟨z, hz⟩ := hF
  intro a b he
  apply h.eq_of_voxel_close hz
  intro i
  have hi : ⌊(a : Space d) i⌋ = ⌊(b : Space d) i⌋ := congrFun he i
  have ha := Int.floor_le ((a : Space d) i)
  have ha' := Int.lt_floor_add_one ((a : Space d) i)
  have hb := Int.floor_le ((b : Space d) i)
  have hb' := Int.lt_floor_add_one ((b : Space d) i)
  rw [hi] at ha ha'
  apply abs_lt.mpr
  constructor <;> linarith

theorem AETiles.countable_of_thickening {d : ℕ} {F : Finset (Lattice d)}
    {A : Set (Space d)} (h : AETiles (Thickening F) A) (hF : F.Nonempty) :
    A.Countable :=
  Set.countable_coe_iff.mp (h.floor_injective hF).countable

end PeriodicTilingThree

end

end OAI