Download data/lean/OAI/Geometry/PeriodicTiling/DirectionalSlices.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.32 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/DirectionalSlices.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/PeriodicTiling/DirectionalSlices.lean
-
curl -L -o DirectionalSlices.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/PeriodicTiling/DirectionalSlices.lean
5.32 kB
| import OAI.Geometry.PeriodicTiling.ConfigurationDifferenceReduction | |
| import OAI.Geometry.PeriodicTiling.ForwardDifference | |
| import OAI.Geometry.PeriodicTiling.FiniteMasks | |
| import OAI.Geometry.PeriodicTiling.PlaneLattices | |
| import Mathlib.Topology.Instances.AddCircle.Defs | |
| import Mathlib.Tactic.Choose | |
| import Mathlib.Tactic.Linarith | |
| namespace OAI | |
| universe uB | |
| namespace PeriodicTilingThree | |
| theorem forwardDiff_slice {B : Type uB} [AddCommGroup B] | |
| (f : Plane β B) (x e : Plane) : | |
| forwardDiff (fun n : β€ => f (x + n β’ e)) = | |
| fun n => configDiff e f (x + n β’ e) := by | |
| ext n | |
| simp only [forwardDiff_apply, configDiff_apply, add_zsmul, one_zsmul, add_assoc] | |
| theorem forwardDiff_iterate_slice {B : Type uB} [AddCommGroup B] | |
| (k : β) (f : Plane β B) (x e : Plane) : | |
| (forwardDiff^[k]) (fun n : β€ => f (x + n β’ e)) = | |
| fun n => ((configDiff e)^[k] f) (x + n β’ e) := by | |
| induction k generalizing f with | |
| | zero => rfl | |
| | succ k ih => | |
| rw [Function.iterate_succ_apply, forwardDiff_slice, ih, | |
| Function.iterate_succ_apply] | |
| theorem circle_sum_of_indicator_decomposition {m : β} (A : Set Plane) | |
| (Ο : Fin m β Plane β β) | |
| (hsum : β x, tileIndicator β A x + β j, Ο j x = 1) : | |
| (β j, (fun x => (Ο j x : AddCircle (1 : β)))) = fun _ => 0 := by | |
| classical | |
| ext x | |
| simp only [Finset.sum_apply] | |
| change (β j, (Ο j x : AddCircle (1 : β))) = 0 | |
| have hcast : (β j, (Ο j x : AddCircle (1 : β))) = | |
| ((β j, Ο j x : β) : AddCircle (1 : β)) := by | |
| exact (map_sum (QuotientAddGroup.mk' (AddSubgroup.zmultiples (1 : β))) | |
| (fun j => Ο j x) Finset.univ).symm | |
| rw [hcast, show (β j, Ο j x) = 1 - tileIndicator β A x by linarith [hsum x]] | |
| by_cases hx : x β A <;> simp [tileIndicator, hx, AddCircle.coe_period] | |
| theorem directional_circle_slice_polynomial {m : β} (hm : 0 < m) | |
| (A : Set Plane) (v : Fin m β Plane) (Ο : Fin m β Plane β β) | |
| (e : Plane) | |
| (hspan : β i j, i β j β β a b : β€, e = a β’ v i + b β’ v j) | |
| (hp : β j, Function.Periodic (Ο j) (v j)) | |
| (hsum : β x, tileIndicator β A x + β j, Ο j x = 1) | |
| (j : Fin m) (x : Plane) : | |
| (forwardDiff^[m]) (fun n : β€ => | |
| (Ο j (x + n β’ e) : AddCircle (1 : β))) = 0 := by | |
| classical | |
| let Ο : Fin m β Plane β AddCircle (1 : β) := fun i y => (Ο i y : AddCircle (1 : β)) | |
| have hΟ : β i, Function.Periodic (Ο i) (v i) := by | |
| intro i y | |
| change (Ο i (y + v i) : AddCircle (1 : β)) = (Ο i y : AddCircle (1 : β)) | |
| rw [hp i y] | |
| have hrep : β i : Fin m, β a b : β€, i = j β¨ e = a β’ v i + b β’ v j := by | |
| intro i | |
| by_cases hij : i = j | |
| Β· exact β¨0, 0, Or.inl hijβ© | |
| Β· obtain β¨a, b, habβ© := hspan i j hij | |
| exact β¨a, b, Or.inr habβ© | |
| choose Ξ± Ξ² hrep using hrep | |
| let u : Fin m β Plane := fun i => if i = j then e else Ξ± i β’ v i | |
| let vs : List Plane := Finset.univ.toList.map u | |
| have hlen : vs.length = m := by simp [vs] | |
| have hne : vs β [] := by | |
| intro h | |
| have hz : m = 0 := by simpa only [h, List.length_nil] using hlen.symm | |
| exact (Nat.ne_of_gt hm) hz | |
| have hkill : β i, i β j β β w β vs, Function.Periodic (Ο i) w := by | |
| intro i hij | |
| refine β¨u i, ?_, ?_β© | |
| Β· exact List.mem_map.mpr β¨i, by simp, rflβ© | |
| Β· simpa only [u, ite_eq_right hij] using (hΟ i).zsmul (Ξ± i) | |
| have hz : configDiffs vs (Ο j) = 0 := | |
| configDiffs_component_zero j vs hne Ο 0 | |
| (circle_sum_of_indicator_decomposition A Ο hsum) hkill | |
| have hreplace : β w β vs, β k : β€, w = e + k β’ v j := by | |
| intro w hw | |
| obtain β¨i, _hi, rflβ© := List.mem_map.mp hw | |
| by_cases hij : i = j | |
| Β· refine β¨0, ?_β© | |
| simp [u, hij] | |
| Β· refine β¨-Ξ² i, ?_β© | |
| have he := (hrep i).resolve_left hij | |
| simp only [u, ite_eq_right hij, he, neg_smul] | |
| abel | |
| rw [configDiffs_eq_iterate_of_period vs e (v j) (Ο j) (hΟ j) hreplace, | |
| hlen] at hz | |
| change (forwardDiff^[m]) (fun n : β€ => Ο j (x + n β’ e)) = 0 | |
| rw [forwardDiff_iterate_slice, hz] | |
| rfl | |
| theorem directional_slice_pair_bound {m : β} (A : Set Plane) | |
| (v : Fin m β Plane) (Ο : Fin m β Plane β β) (e : Plane) | |
| (hspan : β i j, i β j β β a b : β€, e = a β’ v i + b β’ v j) | |
| (hΟ : β j x, 0 β€ Ο j x) | |
| (hp : β j, Function.Periodic (Ο j) (v j)) | |
| (hsum : β x, tileIndicator β A x + β j, Ο j x = 1) | |
| (x : Plane) (i j : Fin m) (hij : i β j) (n r : β€) : | |
| Ο i (x + n β’ e) + Ο j (x + r β’ e) β€ 1 := by | |
| classical | |
| obtain β¨a, b, heβ© := hspan i j hij | |
| let y : Plane := x + n β’ e + ((r - n) * a) β’ v i | |
| have hy : y = x + r β’ e + ((n - r) * b) β’ v j := by | |
| dsimp [y] | |
| rw [he] | |
| simp only [smul_add, mul_smul, sub_smul] | |
| abel | |
| have hi : Ο i y = Ο i (x + n β’ e) := | |
| (hp i).zsmul ((r - n) * a) _ | |
| have hj : Ο j y = Ο j (x + r β’ e) := by | |
| rw [hy] | |
| exact (hp j).zsmul ((n - r) * b) _ | |
| have hle : Ο i y + Ο j y β€ β k, Ο k y := by | |
| have h := Finset.sum_le_sum_of_subset_of_nonneg | |
| (Finset.subset_univ ({i, j} : Finset (Fin m))) | |
| (fun k _hk _hnot => hΟ k y) | |
| simpa [hij] using h | |
| have htotal := hsum y | |
| have ha := tileIndicator_nonneg A y | |
| rw [hi, hj] at hle | |
| linarith | |
| end PeriodicTilingThree | |
| end OAI | |