Download data/lean/OAI/Geometry/PeriodicTiling/EuclideanBasic.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 2.97 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/EuclideanBasic.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PeriodicTiling/EuclideanBasic.lean
-
curl -L -o EuclideanBasic.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/EuclideanBasic.lean
2.97 kB
| import OAI.Geometry.PeriodicTiling.TilingBasic | |
| import Mathlib.MeasureTheory.Measure.Lebesgue.Basic | |
| import Mathlib.Algebra.Module.ZLattice.Basic | |
| namespace OAI | |
| noncomputable section | |
| namespace PeriodicTilingThree | |
| open MeasureTheory | |
| @[simp] theorem castLattice_apply {d : β} (z : Lattice d) (i : Fin d) : | |
| castLattice z i = (z i : β) := rfl | |
| theorem castLattice_injective {d : β} : | |
| Function.Injective (castLattice : Lattice d β Space d) := by | |
| intro z w h | |
| funext i | |
| exact Int.cast_injective (congrArg (fun x : Space d => x i) h) | |
| def unitVoxel {d : β} (c : Space d) : Set (Space d) := | |
| {x | x - c β unitCube d} | |
| theorem mem_unitCube {d : β} {x : Space d} : | |
| x β unitCube d β β i, 0 β€ x i β§ x i β€ 1 := by | |
| constructor | |
| Β· intro h i | |
| exact β¨h.1 i, h.2 iβ© | |
| Β· intro h | |
| exact β¨fun i => (h i).1, fun i => (h i).2β© | |
| @[simp] theorem mem_unitVoxel {d : β} {c x : Space d} : | |
| x β unitVoxel c β x - c β unitCube d := Iff.rfl | |
| theorem unitVoxel_eq_Icc {d : β} (c : Space d) : | |
| unitVoxel c = Set.Icc c (c + 1) := by | |
| ext x | |
| constructor | |
| Β· intro hx | |
| have h := mem_unitCube.mp hx | |
| constructor | |
| Β· intro i | |
| exact sub_nonneg.mp (h i).1 | |
| Β· intro i | |
| have hi := (sub_le_iff_le_add.mp (h i).2) | |
| simpa [add_comm] using hi | |
| Β· intro hx | |
| apply mem_unitCube.mpr | |
| intro i | |
| constructor | |
| Β· exact sub_nonneg.mpr (hx.1 i) | |
| Β· apply sub_le_iff_le_add.mpr | |
| simpa [add_comm] using hx.2 i | |
| @[simp] theorem mem_Thickening {d : β} {F : Finset (Lattice d)} {x : Space d} : | |
| x β Thickening F β β z β F, x - castLattice z β unitCube d := Iff.rfl | |
| theorem unitVoxel_subset_Thickening {d : β} {F : Finset (Lattice d)} | |
| {z : Lattice d} (hz : z β F) : unitVoxel (castLattice z) β Thickening F := by | |
| intro x hx | |
| exact β¨z, hz, hxβ© | |
| def TypedAETiles {d : β} (Ξ©0 Ξ©1 C C1 : Set (Space d)) : Prop := by | |
| classical | |
| exact βα΅ x βvolume, β! c : C, | |
| x - (c : Space d) β if (c : Space d) β C1 then Ξ©1 else Ξ©0 | |
| def scaledCast {d : β} (m : β) : Lattice d β+ Space d where | |
| toFun z := (m : β) β’ castLattice z | |
| map_zero' := by simp | |
| map_add' z w := by simp [smul_add] | |
| @[simp] theorem scaledCast_apply {d : β} (m : β) (z : Lattice d) : | |
| scaledCast m z = (m : β) β’ castLattice z := rfl | |
| theorem scaledCast_injective {d : β} {m : β} (hm : m β 0) : | |
| Function.Injective (scaledCast m : Lattice d β Space d) := by | |
| intro z w h | |
| funext i | |
| have hi := congrArg (fun x : Space d => x i) h | |
| change (m : β) * (z i : β) = (m : β) * (w i : β) at hi | |
| exact Int.cast_injective (mul_left_cancelβ (Nat.cast_ne_zero.mpr hm) hi) | |
| def scaledGrid (m : β) : AddSubgroup (Space 3) := | |
| (scaledCast m : Lattice 3 β+ Space 3).range | |
| theorem mem_scaledGrid {m : β} {x : Space 3} : | |
| x β scaledGrid m β β z : Lattice 3, (m : β) β’ castLattice z = x := Iff.rfl | |
| end PeriodicTilingThree | |
| end | |
| end OAI | |