Download data/lean/OAI/Geometry/Immersion/ClosedSurface/GridPartition.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 9.39 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/Immersion/ClosedSurface/GridPartition.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/Immersion/ClosedSurface/GridPartition.lean
-
curl -L -o GridPartition.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/Immersion/ClosedSurface/GridPartition.lean
9.39 kB
| import OAI.Geometry.Immersion.ClosedSurface.MeanSupport | |
| import OAI.Geometry.Immersion.ClosedSurface.GridCover | |
| namespace OAI | |
| noncomputable section | |
| open Set Complex Bundle Manifold | |
| open scoped ContDiff Matrix Topology Manifold BigOperators | |
| namespace ClosedSurfaceR4.PhaseGrid | |
| open Set Function WeightedEstimates | |
| attribute [local instance] Classical.propDecidable | |
| lemma cutoff_weighted_bounds : β C : β β β, (β m, 1 β€ C m) β§ | |
| β (h : β), 0 < h β β (a : Index) (m : β), | |
| WeightedBound univ h m (C m) (cutoff h a) := by | |
| obtain β¨c,hc,hboundβ© := cutoff_derivative_bounds | |
| let C (m : β) := 1 + β j β Finset.range (m+1), c j | |
| have hC (m : β) : 1 β€ C m := by | |
| have hs : 0 β€ β j β Finset.range (m+1), c j := Finset.sum_nonneg (fun j _ => hc j) | |
| dsimp [C]; linarith | |
| refine β¨C,hC,fun h hh a m j hj x _ => ?_β© | |
| rw [iteratedFDerivWithin_univ] | |
| have hmul := mul_le_mul_of_nonneg_left (hbound h hh a j x) (pow_nonneg hh.le j) | |
| have hle : c j β€ C m := by | |
| have hs := Finset.single_le_sum (fun i (_ : i β Finset.range (m+1)) => hc i) | |
| (show j β Finset.range (m+1) by simp; omega) | |
| dsimp [C]; linarith | |
| apply le_trans _ hle | |
| convert hmul using 1 | |
| field_simp | |
| lemma weighted_sum_bounded_overlap {h C : β} (hh : 0 < h) (hC : 0 β€ C) | |
| {m : β} (s : Finset Index) (f : Index β Base β β) | |
| (hf : β a β s, ContDiff β β (f a)) | |
| (hsupp : β a β s, tsupport (f a) β tsupport (cutoff h a)) | |
| (hb : β a β s, WeightedBound univ h m C (f a)) : | |
| WeightedBound univ h m (36*C) (fun x => β a β s, f a x) := by | |
| intro j hj x _ | |
| rw [iteratedFDerivWithin_univ, iteratedFDeriv_sum (fun a ha => | |
| (hf a ha).of_le (by exact_mod_cast (le_top : (j : ββ) β€ β€)))] | |
| let t := s.filter (fun a => x β tsupport (cutoff h a)) | |
| have ht : t β s := Finset.filter_subset _ _ | |
| have hz (a : Index) (ha : a β s) (hat : a β t) : | |
| iteratedFDeriv β j (f a) x = 0 := by | |
| apply notMem_support.mp | |
| intro hmem | |
| have hx := hsupp a ha (support_iteratedFDeriv_subset j hmem) | |
| exact hat (Finset.mem_filter.mpr β¨ha,hxβ©) | |
| have he : (β a β t, iteratedFDeriv β j (f a) x) = | |
| β a β s, iteratedFDeriv β j (f a) x := | |
| Finset.sum_subset ht (fun a ha hat => hz a ha hat) | |
| simp only [Finset.sum_apply] | |
| rw [β he] | |
| calc | |
| _ β€ h^j * β a β t, βiteratedFDeriv β j (f a) xβ := by | |
| gcongr; exact norm_sum_le _ _ | |
| _ = β a β t, h^j * βiteratedFDeriv β j (f a) xβ := Finset.mul_sum _ _ _ | |
| _ β€ β _a β t, C := Finset.sum_le_sum (fun a ha => by | |
| simpa only [iteratedFDerivWithin_univ] using hb a (ht ha) j hj x (mem_univ x)) | |
| _ = (t.card : β)*C := by simp | |
| _ β€ 36*C := by | |
| apply mul_le_mul_of_nonneg_right _ hC | |
| exact_mod_cast active_cutoff_count hh s x | |
| def squareSum (s : Finset Index) (h : β) (x : Base) : β := | |
| β a β s, (cutoff h a x)^2 | |
| def normalizedCutoff (s : Finset Index) (h : β) (a : Index) (x : Base) : β := | |
| cutoff h a x / Real.sqrt (squareSum s h x) | |
| lemma squareSum_smooth (s : Finset Index) (h : β) : ContDiff β β (squareSum s h) := | |
| ContDiff.sum (fun a _ => (cutoff_smooth h a).pow 2) | |
| lemma squareSum_nonneg (s : Finset Index) (h : β) (x : Base) : 0 β€ squareSum s h x := | |
| Finset.sum_nonneg (fun _ _ => sq_nonneg _) | |
| lemma squareSum_ge_one {s : Finset Index} {h : β} (hh : 0 < h) {x : Base} | |
| (hcover : β a β s, x β cell h 1 a) : 1 β€ squareSum s h x := by | |
| obtain β¨a,ha,haxβ© := hcover | |
| have hb := Finset.single_le_sum (fun b (_ : b β s) => sq_nonneg (cutoff h b x)) ha | |
| simpa [squareSum,cutoff_one_on_cell hh a hax] using hb | |
| lemma normalizedCutoff_tsupport (s : Finset Index) (h : β) (a : Index) : | |
| tsupport (normalizedCutoff s h a) β tsupport (cutoff h a) := by | |
| apply closure_mono | |
| intro x hx | |
| exact fun hz => hx (by simp [normalizedCutoff,hz]) | |
| lemma normalizedCutoff_squares {s : Finset Index} {h : β} {x : Base} | |
| (hp : 0 < squareSum s h x) : β a β s, (normalizedCutoff s h a x)^2 = 1 := by | |
| calc | |
| _ = squareSum s h x / (Real.sqrt (squareSum s h x))^2 := by | |
| simp only [normalizedCutoff,div_pow,Finset.sum_div,squareSum] | |
| _ = 1 := by rw [Real.sq_sqrt hp.le,div_self hp.ne'] | |
| lemma squareSum_weighted_bounds : β D : β β β, (β m, 1 β€ D m) β§ | |
| β (h : β), 0 < h β β (s : Finset Index) (m : β), | |
| WeightedBound univ h m (D m) (squareSum s h) := by | |
| obtain β¨C,hC,hboundβ© := cutoff_weighted_bounds | |
| let D (m : β) := 1 + 36 * (2^m * C m * C m) | |
| have hD (m : β) : 1 β€ D m := by | |
| have hc0 : 0 β€ C m := zero_le_one.trans (hC m) | |
| have hp : 0 β€ 36 * (2^m * C m * C m) := by positivity | |
| dsimp [D]; linarith | |
| refine β¨D,hD,fun h hh s m => ?_β© | |
| have hc0 : 0 β€ C m := zero_le_one.trans (hC m) | |
| have hb : WeightedBound univ h m (36 * (2^m * C m * C m)) | |
| (fun x => β a β s, cutoff h a x * cutoff h a x) := | |
| weighted_sum_bounded_overlap hh (by positivity) s _ | |
| (fun a _ => (cutoff_smooth h a).mul (cutoff_smooth h a)) | |
| (fun a _ => tsupport_mul_subset_left) | |
| (fun a _ => (hbound h hh a m).real_mul uniqueDiffOn_univ hh.le hc0 hc0 | |
| (cutoff_smooth h a).contDiffOn (cutoff_smooth h a).contDiffOn (hbound h hh a m)) | |
| exact (hb.mono_const (by dsimp [D]; linarith)).congr (fun x _ => by simp [squareSum,pow_two]) | |
| end ClosedSurfaceR4.PhaseGrid | |
| namespace ClosedSurfaceR4.PhaseGrid | |
| open Set Function WeightedEstimates | |
| lemma inverse_sqrt_smooth : ContDiffOn β β (fun r : β => (Real.sqrt r)β»ΒΉ) (Ioi 0) := by | |
| apply (contDiffOn_id.sqrt (fun r hr => ne_of_gt hr)).inv | |
| intro r hr | |
| exact (Real.sqrt_pos.2 hr).ne' | |
| lemma normalizedCutoff_smooth {U : Set Base} {s : Finset Index} {h : β} | |
| (hh : 0 < h) (hcover : β x β U, β a β s, x β cell h 1 a) (a : Index) : | |
| ContDiffOn β β (normalizedCutoff s h a) U := by | |
| have hm : MapsTo (squareSum s h) U (Ioi 0) := | |
| fun x hx => zero_lt_one.trans_le (squareSum_ge_one hh (hcover x hx)) | |
| have hi := inverse_sqrt_smooth.comp (squareSum_smooth s h).contDiffOn hm | |
| change ContDiffOn β β (fun x => cutoff h a x / Real.sqrt (squareSum s h x)) U | |
| simpa only [div_eq_mul_inv,Function.comp_apply] using (cutoff_smooth h a).contDiffOn.mul hi | |
| theorem normalizedCutoff_weighted_bounds : β C : β β β, (β m, 1 β€ C m) β§ | |
| β (h : β), 0 < h β β (s : Finset Index) (U : Set Base), IsOpen U β | |
| (β x β U, β a β s, x β cell h 1 a) β β (a : Index) (m : β), | |
| WeightedBound U h m (C m) (normalizedCutoff s h a) := by | |
| obtain β¨c,hc,hcbβ© := cutoff_weighted_bounds | |
| obtain β¨d,hd,hdbβ© := squareSum_weighted_bounds | |
| have hcoeff (m : β) : β e : β, 1 β€ e β§ β j β€ m, β r β Icc (1:β) (d m), | |
| βiteratedFDerivWithin β j (fun r : β => (Real.sqrt r)β»ΒΉ) (Ioi 0) rβ β€ e := | |
| compact_coefficient_bound isOpen_Ioi.uniqueDiffOn isCompact_Icc | |
| (fun r hr => zero_lt_one.trans_le hr.1) inverse_sqrt_smooth m | |
| choose e he heb using hcoeff | |
| let C (m : β) := 1 + 2^m * c m * ((m.factorial : β) * e m * (d m)^m) | |
| have hc0 (m : β) : 0 β€ c m := zero_le_one.trans (hc m) | |
| have hd0 (m : β) : 0 β€ d m := zero_le_one.trans (hd m) | |
| have he0 (m : β) : 0 β€ e m := zero_le_one.trans (he m) | |
| have hC (m : β) : 1 β€ C m := by | |
| have hcm := hc0 m | |
| have hdm := hd0 m | |
| have hem := he0 m | |
| have hnonneg : 0 β€ 2^m * c m * ((m.factorial : β) * e m * (d m)^m) := by positivity | |
| dsimp [C]; linarith | |
| refine β¨C,hC,fun h hh s U hU hcover a m => ?_β© | |
| have hb := (hdb h hh s m).restrict_open hU | |
| have hmap : MapsTo (squareSum s h) U (Icc 1 (d m)) := by | |
| intro x hx | |
| refine β¨squareSum_ge_one hh (hcover x hx),?_β© | |
| exact (le_abs_self _).trans (by simpa only [Real.norm_eq_abs] using hb.norm_le hx) | |
| have hpos : MapsTo (squareSum s h) U (Ioi 0) := fun x hx => | |
| zero_lt_one.trans_le (hmap hx).1 | |
| have hs : ContDiffOn β β (squareSum s h) U := (squareSum_smooth s h).contDiffOn | |
| have hi : ContDiffOn β β (fun x => (Real.sqrt (squareSum s h x))β»ΒΉ) U := | |
| inverse_sqrt_smooth.comp hs hpos | |
| have hbi := hb.comp hU.uniqueDiffOn isOpen_Ioi.uniqueDiffOn hh (hd m) (he0 m) | |
| hs inverse_sqrt_smooth hpos (fun j hj x hx => heb m j hj _ (hmap hx)) | |
| have hcm := hc0 m | |
| have hdm := hd0 m | |
| have hem := he0 m | |
| have hp := ((hcb h hh a m).restrict_open hU).real_mul hU.uniqueDiffOn hh.le | |
| (hc0 m) (by positivity) (cutoff_smooth h a).contDiffOn hi hbi | |
| have hp' := hp.mono_const (show 2^m*c m*((m.factorial:β)*e m*(d m)^m) β€ C m by | |
| dsimp [C]; linarith) | |
| exact hp'.congr (fun x _ => by simp only [normalizedCutoff,div_eq_mul_inv]) | |
| theorem normalizedCutoff_polynomial_derivatives : β C : β β β, (β j, 1 β€ C j) β§ | |
| β (z : β), 0 < z β β (s : Finset Index) (U : Set Base), IsOpen U β | |
| (β x β U, β a β s, x β cell (z^6) 1 a) β β (a : Index) (j : β) (x : Base), | |
| x β U β βiteratedFDeriv β j (normalizedCutoff s (z^6) a) xβ β€ C j / z^(6*j) := by | |
| obtain β¨C,hC,hbβ© := normalizedCutoff_weighted_bounds | |
| refine β¨C,hC,fun z hz s U hU hcover a j x hx => ?_β© | |
| have hp := (hb (z^6) (pow_pos hz _) s U hU hcover a j).deriv_le (pow_pos hz _) le_rfl hx | |
| simpa only [iteratedFDerivWithin_of_isOpen j hU hx,β pow_mul] using hp | |
| end ClosedSurfaceR4.PhaseGrid | |
| end | |
| end OAI | |