Download data/lean/OAI/Geometry/IsometricImmersion/Assembly/AccumulatingDisks.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 10 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Assembly/AccumulatingDisks.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Assembly/AccumulatingDisks.lean
-
curl -L -o AccumulatingDisks.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Assembly/AccumulatingDisks.lean
10 kB
| import OAI.Geometry.IsometricImmersion.Coordinates.RoundDisk | |
| import Mathlib.Analysis.SpecificLimits.Basic | |
| import Mathlib.Topology.LocallyFinite | |
| namespace OAI | |
| noncomputable section | |
| open scoped ContDiff Topology BigOperators Matrix | |
| open Filter Set Metric | |
| namespace SmoothLocal.Geometry | |
| def accumulatingScale (n : β) : β := (1 / 2 : β) ^ (n + 1) | |
| def accumulatingCenter (n : β) : Coord := ![accumulatingScale n, 0] | |
| def accumulatingRadius (n : β) : β := accumulatingScale n / 8 | |
| def accumulatingDisk (n : β) : Set Coord := | |
| roundClosedDisk (accumulatingCenter n) (accumulatingRadius n) | |
| def enlargedAccumulatingDisk (n : β) : Set Coord := | |
| roundClosedDisk (accumulatingCenter n) (2 * accumulatingRadius n) | |
| theorem accumulatingScale_pos (n : β) : 0 < accumulatingScale n := by | |
| exact pow_pos (by norm_num) _ | |
| theorem accumulatingScale_le_half (n : β) : accumulatingScale n β€ (1 / 2 : β) := by | |
| exact pow_le_of_le_one (by norm_num) (by norm_num) (Nat.succ_ne_zero n) | |
| theorem accumulatingScale_succ (n : β) : | |
| accumulatingScale (n + 1) = accumulatingScale n / 2 := by | |
| simp only [accumulatingScale, pow_succ] | |
| ring | |
| theorem accumulatingScale_antitone : Antitone accumulatingScale := by | |
| intro m n hmn | |
| exact pow_le_pow_of_le_one (by norm_num) (by norm_num) (Nat.add_le_add_right hmn 1) | |
| theorem accumulatingScale_le_half_of_lt {m n : β} (hmn : m < n) : | |
| accumulatingScale n β€ accumulatingScale m / 2 := by | |
| rw [β accumulatingScale_succ] | |
| exact accumulatingScale_antitone (Nat.succ_le_of_lt hmn) | |
| theorem accumulatingRadius_pos (n : β) : 0 < accumulatingRadius n := | |
| div_pos (accumulatingScale_pos n) (by norm_num) | |
| theorem roundClosedDisk_coord_abs_le (c : Coord) {r : β} (hr : 0 β€ r) | |
| {p : Coord} (hp : p β roundClosedDisk c r) (i : Fin 2) : |p i - c i| β€ r := by | |
| have hsq : (p i - c i) ^ 2 β€ r ^ 2 := by | |
| change (p 0 - c 0) ^ 2 + (p 1 - c 1) ^ 2 β€ r ^ 2 at hp | |
| fin_cases i <;> simp only [Fin.mk_zero, Fin.mk_one] | |
| Β· nlinarith [sq_nonneg (p 1 - c 1)] | |
| Β· nlinarith [sq_nonneg (p 0 - c 0)] | |
| apply (sq_le_sqβ (abs_nonneg _) hr).mp | |
| simpa only [sq_abs] using hsq | |
| theorem accumulatingDisk_subset_enlarged (n : β) : | |
| accumulatingDisk n β enlargedAccumulatingDisk n := by | |
| intro p hp | |
| change roundRadiusSq (accumulatingCenter n) p β€ (accumulatingRadius n) ^ 2 at hp | |
| change roundRadiusSq (accumulatingCenter n) p β€ (2 * accumulatingRadius n) ^ 2 | |
| nlinarith [sq_nonneg (accumulatingRadius n)] | |
| theorem accumulatingDisk_subset_enlarged_open (n : β) : | |
| accumulatingDisk n β roundOpenDisk (accumulatingCenter n) (2 * accumulatingRadius n) := by | |
| intro p hp | |
| change roundRadiusSq (accumulatingCenter n) p β€ (accumulatingRadius n) ^ 2 at hp | |
| change roundRadiusSq (accumulatingCenter n) p < (2 * accumulatingRadius n) ^ 2 | |
| nlinarith [sq_pos_of_pos (accumulatingRadius_pos n)] | |
| theorem enlargedAccumulatingDisk_bounds (n : β) {p : Coord} | |
| (hp : p β enlargedAccumulatingDisk n) : | |
| (3 / 4 : β) * accumulatingScale n β€ p 0 β§ | |
| p 0 β€ (5 / 4 : β) * accumulatingScale n β§ | |
| |p 1| β€ accumulatingScale n / 4 := by | |
| have hr : 0 β€ 2 * accumulatingRadius n := | |
| (mul_pos (by norm_num) (accumulatingRadius_pos n)).le | |
| have hx := roundClosedDisk_coord_abs_le (accumulatingCenter n) hr hp 0 | |
| have hy := roundClosedDisk_coord_abs_le (accumulatingCenter n) hr hp 1 | |
| simp only [accumulatingCenter, Matrix.cons_val_zero, Matrix.cons_val_one, | |
| sub_zero, accumulatingRadius] at hx hy | |
| obtain β¨hxlo, hxhiβ© := abs_le.mp hx | |
| refine β¨?_, ?_, ?_β© <;> linarith | |
| theorem enlargedAccumulatingDisk_disjoint_of_lt {m n : β} (hmn : m < n) : | |
| Disjoint (enlargedAccumulatingDisk m) (enlargedAccumulatingDisk n) := by | |
| apply Set.disjoint_left.mpr | |
| intro p hpm hpn | |
| have hm := enlargedAccumulatingDisk_bounds m hpm | |
| have hn := enlargedAccumulatingDisk_bounds n hpn | |
| have hscale := accumulatingScale_le_half_of_lt hmn | |
| have hpos := accumulatingScale_pos m | |
| linarith | |
| theorem enlargedAccumulatingDisks_pairwise_disjoint : | |
| Pairwise (fun m n => Disjoint (enlargedAccumulatingDisk m) (enlargedAccumulatingDisk n)) := by | |
| intro m n hmn | |
| rcases lt_or_gt_of_ne hmn with hlt | hgt | |
| Β· exact enlargedAccumulatingDisk_disjoint_of_lt hlt | |
| Β· exact (enlargedAccumulatingDisk_disjoint_of_lt hgt).symm | |
| theorem accumulatingDisks_pairwise_disjoint : | |
| Pairwise (fun m n => Disjoint (accumulatingDisk m) (accumulatingDisk n)) := by | |
| intro m n hmn | |
| exact (enlargedAccumulatingDisks_pairwise_disjoint hmn).mono | |
| (accumulatingDisk_subset_enlarged m) (accumulatingDisk_subset_enlarged n) | |
| theorem enlargedAccumulatingDisk_subset_square (n : β) : enlargedAccumulatingDisk n β square := by | |
| intro p hp i | |
| have hb := enlargedAccumulatingDisk_bounds n hp | |
| have hpos := accumulatingScale_pos n | |
| have hhalf := accumulatingScale_le_half n | |
| fin_cases i | |
| Β· change -1 < p 0 β§ p 0 < 1 | |
| constructor <;> linarith | |
| Β· change -1 < p 1 β§ p 1 < 1 | |
| obtain β¨hylo, hyhiβ© := abs_le.mp hb.2.2 | |
| constructor <;> linarith | |
| theorem accumulatingDisk_subset_square (n : β) : accumulatingDisk n β square := | |
| (accumulatingDisk_subset_enlarged n).trans (enlargedAccumulatingDisk_subset_square n) | |
| theorem zero_not_mem_enlargedAccumulatingDisk (n : β) : | |
| (0 : Coord) β enlargedAccumulatingDisk n := by | |
| intro h0 | |
| have hb := (enlargedAccumulatingDisk_bounds n h0).1 | |
| have hpos := accumulatingScale_pos n | |
| change (3 / 4 : β) * accumulatingScale n β€ 0 at hb | |
| linarith | |
| theorem zero_not_mem_accumulatingDisk (n : β) : (0 : Coord) β accumulatingDisk n := | |
| fun h => zero_not_mem_enlargedAccumulatingDisk n (accumulatingDisk_subset_enlarged n h) | |
| theorem accumulatingDisk_isCompact (n : β) : IsCompact (accumulatingDisk n) := | |
| isCompact_roundClosedDisk (accumulatingCenter n) (accumulatingRadius_pos n) | |
| theorem enlargedAccumulatingDisk_isCompact (n : β) : IsCompact (enlargedAccumulatingDisk n) := | |
| isCompact_roundClosedDisk (accumulatingCenter n) (mul_pos (by norm_num) (accumulatingRadius_pos n)) | |
| theorem accumulatingDisk_interior_nonempty (n : β) : (interior (accumulatingDisk n)).Nonempty := | |
| interior_roundClosedDisk_nonempty (accumulatingCenter n) (accumulatingRadius_pos n) | |
| theorem tendsto_accumulatingScale : Tendsto accumulatingScale atTop (π 0) := by | |
| have hpow := tendsto_pow_atTop_nhds_zero_of_lt_one | |
| (show (0 : β) β€ 1 / 2 by norm_num) (show (1 / 2 : β) < 1 by norm_num) | |
| convert hpow.mul (tendsto_const_nhds (x := (1 / 2 : β))) using 1 <;> | |
| first | rfl | simp only [zero_mul] | |
| theorem tendsto_accumulatingCenter : Tendsto accumulatingCenter atTop (π (0 : Coord)) := by | |
| apply tendsto_pi_nhds.mpr | |
| intro i | |
| fin_cases i | |
| Β· change Tendsto accumulatingScale atTop (π (0 : β)) | |
| exact tendsto_accumulatingScale | |
| Β· change Tendsto (fun _ : β => (0 : β)) atTop (π 0) | |
| exact tendsto_const_nhds | |
| theorem enlargedAccumulatingDisk_norm_le (n : β) {p : Coord} | |
| (hp : p β enlargedAccumulatingDisk n) : βpβ β€ (5 / 4 : β) * accumulatingScale n := by | |
| have hb := enlargedAccumulatingDisk_bounds n hp | |
| have hpos := accumulatingScale_pos n | |
| apply (pi_norm_le_iff_of_nonneg (by positivity)).mpr | |
| intro i | |
| fin_cases i | |
| Β· change |p 0| β€ (5 / 4 : β) * accumulatingScale n | |
| rw [abs_of_nonneg (by linarith : 0 β€ p 0)] | |
| exact hb.2.1 | |
| Β· change |p 1| β€ (5 / 4 : β) * accumulatingScale n | |
| linarith [hb.2.2] | |
| theorem eventually_enlargedAccumulatingDisk_subset {V : Set Coord} (hV : V β π (0 : Coord)) : | |
| βαΆ n in atTop, enlargedAccumulatingDisk n β V := by | |
| obtain β¨Ξ΅, hΞ΅, hballβ© := Metric.mem_nhds_iff.mp hV | |
| have ht : Tendsto (fun n => (5 / 4 : β) * accumulatingScale n) atTop (π 0) := by | |
| simpa only [mul_zero] using | |
| (tendsto_const_nhds (x := (5 / 4 : β))).mul tendsto_accumulatingScale | |
| filter_upwards [ht.eventually (Iio_mem_nhds hΞ΅)] with n hn | |
| intro p hp | |
| apply hball | |
| change dist p (0 : Coord) < Ξ΅ | |
| simpa only [dist_zero_right] using lt_of_le_of_lt (enlargedAccumulatingDisk_norm_le n hp) hn | |
| theorem eventually_accumulatingDisk_subset {V : Set Coord} (hV : V β π (0 : Coord)) : | |
| βαΆ n in atTop, accumulatingDisk n β V := | |
| (eventually_enlargedAccumulatingDisk_subset hV).mono | |
| (fun n hn => (accumulatingDisk_subset_enlarged n).trans hn) | |
| theorem eventually_all_accumulatingDisks_in_open {V : Set Coord} | |
| (hV : IsOpen V) (h0 : (0 : Coord) β V) : | |
| β N : β, β n β₯ N, accumulatingDisk n β V := | |
| eventually_atTop.mp (eventually_accumulatingDisk_subset (hV.mem_nhds h0)) | |
| theorem enlargedAccumulatingDisks_locallyFinite_away_zero {p : Coord} (hp : p β 0) : | |
| β W : Set Coord, IsOpen W β§ p β W β§ | |
| {n : β | (enlargedAccumulatingDisk n β© W).Nonempty}.Finite := by | |
| obtain β¨W, V, hWo, hVo, hpW, h0V, hdisjβ© := t2_separation hp | |
| obtain β¨N, hNβ© := eventually_atTop.mp | |
| (eventually_enlargedAccumulatingDisk_subset (hVo.mem_nhds h0V)) | |
| refine β¨W, hWo, hpW, (Finset.range N).finite_toSet.subset ?_β© | |
| intro n hn | |
| change n β Finset.range N | |
| rw [Finset.mem_range] | |
| by_contra hlt | |
| obtain β¨q, hqD, hqWβ© := hn | |
| exact (Set.disjoint_left.mp hdisj) hqW (hN n (Nat.le_of_not_gt hlt) hqD) | |
| theorem enlargedAccumulatingDisks_locallyFinite_punctured : | |
| LocallyFinite (fun n : β => | |
| {p : {p : Coord // p β 0} | p.val β enlargedAccumulatingDisk n}) := by | |
| intro p | |
| obtain β¨W, hWo, hpW, hfinβ© := enlargedAccumulatingDisks_locallyFinite_away_zero p.property | |
| refine β¨Subtype.val β»ΒΉ' W, | |
| (hWo.preimage continuous_subtype_val).mem_nhds hpW, hfin.subset ?_β© | |
| intro n hn | |
| obtain β¨q, hqD, hqWβ© := hn | |
| exact β¨q.val, hqD, hqWβ© | |
| theorem accumulatingDisks_locallyFinite_punctured : | |
| LocallyFinite (fun n : β => | |
| {p : {p : Coord // p β 0} | p.val β accumulatingDisk n}) := | |
| enlargedAccumulatingDisks_locallyFinite_punctured.subset | |
| (fun index _ hp => accumulatingDisk_subset_enlarged index hp) | |
| end SmoothLocal.Geometry | |
| end | |
| end OAI | |