Download data/lean/OAI/Geometry/PeriodicTiling/ConstituentGeometry.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.29 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/ConstituentGeometry.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PeriodicTiling/ConstituentGeometry.lean
-
curl -L -o ConstituentGeometry.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/ConstituentGeometry.lean
5.29 kB
| import OAI.Geometry.PeriodicTiling.MarkedTile | |
| import OAI.Geometry.PeriodicTiling.VoxelMeasure | |
| import Mathlib.MeasureTheory.Group.Measure | |
| namespace OAI | |
| noncomputable section | |
| namespace PeriodicTilingThree.MarkedTile | |
| open Set MeasureTheory | |
| @[simp] theorem castLattice_scale (m : β) (u : Lattice 3) : | |
| castLattice (scale m u) = scaledCast m u := by | |
| ext i | |
| simp [scale, scaledCast, castLattice] | |
| def center (m : β) (a : Space 3) (u : Lattice 3) : Space 3 := | |
| a + scaledCast m u | |
| @[simp] theorem center_zero (m : β) (a : Space 3) : center m a 0 = a := by | |
| simp [center] | |
| def centers (m : β) (U : Finset (Lattice 3)) (A : Set (Space 3)) : Set (Space 3) := | |
| Set.range (fun q : A Γ β₯U => center m q.1 q.2) | |
| theorem mem_centers {m : β} {U : Finset (Lattice 3)} {A : Set (Space 3)} | |
| {c : Space 3} : c β centers m U A β β a β A, β u β U, center m a u = c := by | |
| constructor | |
| Β· rintro β¨β¨a, uβ©, hβ© | |
| exact β¨a, a.property, u, u.property, hβ© | |
| Β· rintro β¨a, ha, u, hu, hβ© | |
| exact β¨(β¨a, haβ©, β¨u, huβ©), hβ© | |
| theorem subset_centers {m : β} {U : Finset (Lattice 3)} (h0 : 0 β U) | |
| (A : Set (Space 3)) : A β centers m U A := by | |
| intro a ha | |
| exact mem_centers.mpr β¨a, ha, 0, h0, center_zero m aβ© | |
| namespace ResidueSection | |
| variable {m : β} [NeZero m] (s : ResidueSection m) | |
| def constituent (w u : Lattice 3) : Finset (Lattice 3) := | |
| if u = 0 then s.T1 w else s.T0 | |
| def part (w u : Lattice 3) : Finset (Lattice 3) := | |
| (s.constituent w u).image (fun t => scale m u + t) | |
| theorem mem_part {w u z : Lattice 3} : | |
| z β s.part w u β β v, s.point w u v = z := by | |
| classical | |
| by_cases hu : u = 0 | |
| Β· subst u | |
| simp [part, constituent, mem_T1] | |
| Β· simp only [part, constituent, hu, ite_false, Finset.mem_image] | |
| constructor | |
| Β· rintro β¨t, ht, heβ© | |
| obtain β¨v, rflβ© := s.mem_T0.mp ht | |
| exact β¨v, by simpa only [s.point_of_ne_zero w hu] using heβ© | |
| Β· rintro β¨v, hvβ© | |
| exact β¨s.t v, s.mem_T0.mpr β¨v, rflβ©, | |
| by simpa only [s.point_of_ne_zero w hu] using hvβ© | |
| theorem part_subset_finalTile {w : Lattice 3} {U : Finset (Lattice 3)} | |
| {u : Lattice 3} (hu : u β U) : s.part w u β s.finalTile w U := by | |
| intro z hz | |
| obtain β¨v, hvβ© := s.mem_part.mp hz | |
| exact s.mem_finalTile.mpr β¨u, hu, v, hvβ© | |
| theorem parts_disjoint {w : Lattice 3} {U : Finset (Lattice 3)} (hw : w β U) | |
| {u u' : β₯U} (hne : u β u') : Disjoint (s.part w u) (s.part w u') := by | |
| classical | |
| apply Finset.disjoint_left.mpr | |
| intro z hz hz' | |
| obtain β¨v, hvβ© := s.mem_part.mp hz | |
| obtain β¨v', hv'β© := s.mem_part.mp hz' | |
| have hp : (u, v) = (u', v') := s.point_injective hw (hv.trans hv'.symm) | |
| exact hne (congrArg Prod.fst hp) | |
| theorem mem_thickening_part {w u : Lattice 3} {x : Space 3} : | |
| x β Thickening (s.part w u) β | |
| x - scaledCast m u β Thickening (s.constituent w u) := by | |
| classical | |
| constructor | |
| Β· rintro β¨z, hz, hxβ© | |
| obtain β¨t, ht, rflβ© := Finset.mem_image.mp hz | |
| refine β¨t, ht, ?_β© | |
| simpa only [map_add, castLattice_scale, sub_add_eq_sub_sub] using hx | |
| Β· rintro β¨t, ht, hxβ© | |
| refine β¨scale m u + t, Finset.mem_image.mpr β¨t, ht, rflβ©, ?_β© | |
| simpa only [map_add, castLattice_scale, sub_add_eq_sub_sub] using hx | |
| theorem mem_translated_part {w u : Lattice 3} {a x : Space 3} : | |
| x - a β Thickening (s.part w u) β | |
| x - center m a u β Thickening (s.constituent w u) := by | |
| simpa only [center, sub_add_eq_sub_sub] using | |
| (s.mem_thickening_part (w := w) (u := u) (x := x - a)) | |
| theorem mem_thickening_finalTile {w : Lattice 3} {U : Finset (Lattice 3)} | |
| {x : Space 3} : | |
| x β Thickening (s.finalTile w U) β | |
| β u : β₯U, x β Thickening (s.part w u) := by | |
| constructor | |
| Β· rintro β¨z, hz, hxβ© | |
| obtain β¨u, hu, v, hvβ© := s.mem_finalTile.mp hz | |
| exact β¨β¨u, huβ©, z, s.mem_part.mpr β¨v, hvβ©, hxβ© | |
| Β· rintro β¨u, z, hz, hxβ© | |
| exact β¨z, s.part_subset_finalTile u.property hz, hxβ© | |
| theorem mem_translated_finalTile {w : Lattice 3} {U : Finset (Lattice 3)} | |
| {a x : Space 3} : | |
| x - a β Thickening (s.finalTile w U) β | |
| β u : β₯U, x - center m a u β Thickening (s.constituent w u) := by | |
| rw [s.mem_thickening_finalTile] | |
| exact exists_congr fun u => s.mem_translated_part | |
| theorem Tstar_subset_constituent (w u : Lattice 3) : | |
| s.Tstar β s.constituent w u := by | |
| classical | |
| intro z hz | |
| by_cases hu : u = 0 | |
| Β· simp only [constituent, hu, ite_true, s.T1_eq_insert] | |
| exact Finset.mem_insert_of_mem hz | |
| Β· simpa only [constituent, hu, ite_false] using (Finset.mem_erase.mp hz).2 | |
| theorem Tstar_nonempty (hm : 2 β€ m) : s.Tstar.Nonempty := by | |
| apply Finset.card_pos.mp | |
| rw [s.card_Tstar] | |
| have hp := Nat.pow_le_pow_left hm 3 | |
| exact Nat.sub_pos_of_lt ((by decide : 1 < 2 ^ 3).trans_le hp) | |
| theorem common_voxel_subset_constituent (w u : Lattice 3) (a : Space 3) | |
| {t : Lattice 3} (ht : t β s.Tstar) : | |
| unitVoxel (center m a u + castLattice t) β | |
| {x | x - center m a u β Thickening (s.constituent w u)} := by | |
| intro x hx | |
| refine β¨t, s.Tstar_subset_constituent w u ht, ?_β© | |
| simpa only [mem_unitVoxel, sub_add_eq_sub_sub] using hx | |
| end ResidueSection | |
| end PeriodicTilingThree.MarkedTile | |
| end | |
| end OAI | |