Download data/lean/OAI/Probability/RadialTransition/EnvelopeSupport.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.13 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/RadialTransition/EnvelopeSupport.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Probability/RadialTransition/EnvelopeSupport.lean
-
curl -L -o EnvelopeSupport.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Probability/RadialTransition/EnvelopeSupport.lean
8.13 kB
| import OAI.Probability.RadialTransition.BoundedCore | |
| namespace OAI | |
| universe uE uX uY | |
| noncomputable section | |
| open scoped BigOperators NNReal ContDiff ENNReal | |
| open Filter MeasureTheory Set | |
| namespace RadialTransition | |
| section CompactEnvelope | |
| variable {E : Type uE} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| theorem support_norm_bound {F : E β β} {D : Set E} {x v : E} {r M : β} | |
| (hr : 0 < r) (hM : 0 β€ M) (hball : Metric.closedBall x r β D) | |
| (hbound : β y β Metric.closedBall x r, |F y| β€ M) | |
| (hv : SupportsOn F D x v) : βvβ β€ 2 * M / r := by | |
| apply norm_le_of_unit_inner_le _ (by positivity) | |
| intro z hz | |
| have hy : x + r β’ z β Metric.closedBall x r := by | |
| simp [Metric.mem_closedBall, dist_eq_norm, norm_smul, abs_of_pos hr, hz] | |
| have hx : x β Metric.closedBall x r := Metric.mem_closedBall_self hr.le | |
| have hh := hv (x + r β’ z) (hball hy) | |
| simp only [add_sub_cancel_left, real_inner_smul_right] at hh | |
| have hlo := (abs_le.mp (hbound x hx)).1 | |
| have hhi := (abs_le.mp (hbound _ hy)).2 | |
| apply (le_div_iffβ hr).mpr | |
| nlinarith | |
| theorem supportsOn_of_tendsto {F : β β E β β} {Fβ : E β β} {D : Set E} | |
| {x v : β β E} {xβ vβ : E} | |
| (hx : Tendsto x atTop (nhds xβ)) (hv : Tendsto v atTop (nhds vβ)) | |
| (hbase : Tendsto (fun n => F n (x n)) atTop (nhds (Fβ xβ))) | |
| (hpoint : β y β D, Tendsto (fun n => F n y) atTop (nhds (Fβ y))) | |
| (hs : β n, SupportsOn (F n) D (x n) (v n)) : | |
| SupportsOn Fβ D xβ vβ := by | |
| intro y hy | |
| exact le_of_tendsto_of_tendsto | |
| (hbase.add (hv.inner (tendsto_const_nhds.sub hx))) (hpoint y hy) | |
| (Eventually.of_forall fun n => hs n y hy) | |
| theorem continuousOn_tendsto_sequence {X : Type uX} {Y : Type uY} [TopologicalSpace X] | |
| [TopologicalSpace Y] {f : X β Y} {S : Set X} (hf : ContinuousOn f S) | |
| {a : X} (ha : a β S) {s : β β X} (hs : β n, s n β S) | |
| (hsa : Tendsto s atTop (nhds a)) : Tendsto (fun n => f (s n)) atTop (nhds (f a)) := by | |
| apply (hf.continuousWithinAt ha).tendsto.comp | |
| exact tendsto_nhdsWithin_iff.mpr β¨hsa, Eventually.of_forall hsβ© | |
| theorem supportSet_envelope_closedHull [FiniteDimensional β E] | |
| {F : β β E β β} {P : E β β} {D : Set E} {K : Set β} {x : E} {r : β} | |
| (hD : IsOpen D) (hK : IsCompact K) (hr : 0 < r) | |
| (hball : Metric.closedBall x (2 * r) β D) | |
| (hF : β i β K, ConvexOn β D (F i)) | |
| (hFc : ContinuousOn (fun z : β Γ E => F z.1 z.2) (K ΓΛ’ D)) | |
| (hPc : ContinuousOn P D) | |
| (hle : β i β K, β y β D, F i y β€ P y) | |
| (hactive : β y β Metric.closedBall x r, β i β K, F i y = P y) : | |
| supportSet P D x = closure (convexHull β | |
| {v | β i β K, F i x = P x β§ SupportsOn (F i) D x v}) := by | |
| classical | |
| let G : Set E := {v | β i β K, F i x = P x β§ SupportsOn (F i) D x v} | |
| have hx : x β D := hball (Metric.mem_closedBall_self (by positivity)) | |
| have hG : G β supportSet P D x := by | |
| rintro v β¨i, hi, heq, hvβ© y hy | |
| rw [β heq] | |
| exact (hv y hy).trans (hle i hi y hy) | |
| have hback : closure (convexHull β G) β supportSet P D x := | |
| closure_minimal (convexHull_min hG (convex_supportSet P D x)) | |
| (isClosed_supportSet P D x) | |
| apply Set.Subset.antisymm ?_ hback | |
| intro v hv | |
| by_contra hvout | |
| obtain β¨ell, c, hsep, hvcβ© := geometric_hahn_banach_closed_point | |
| (convex_convexHull β G).closure isClosed_closure hvout | |
| let z : E := (InnerProductSpace.toDual β E).symm ell | |
| have hell (w : E) : inner β w z = ell w := by | |
| rw [real_inner_comm] | |
| exact InnerProductSpace.toDual_symm_apply | |
| obtain β¨Mβ, hMββ© := (hK.prod (isCompact_closedBall x (2 * r))).exists_bound_of_continuousOn | |
| (hFc.mono (Set.prod_mono Subset.rfl hball)) | |
| let M := max 0 Mβ | |
| have hM : 0 β€ M := le_max_left _ _ | |
| have hbound (i : β) (hi : i β K) (y : E) (hy : y β Metric.closedBall x (2 * r)) : | |
| |F i y| β€ M := (hMβ (i, y) β¨hi, hyβ©).trans (le_max_right _ _) | |
| let s : β β β := fun n => (r / (βzβ + 1)) * (1 / ((n : β) + 1)) | |
| have hspos (n : β) : 0 < s n := by dsimp [s]; positivity | |
| have hsbound (n : β) : s n * βzβ β€ r := by | |
| have hn : 1 β€ (n : β) + 1 := by have := Nat.cast_nonneg (Ξ± := β) n; linarith | |
| have hden : 0 < βzβ + 1 := by positivity | |
| have hdiv : 1 / ((n : β) + 1) β€ 1 := (div_le_one (by positivity)).mpr hn | |
| have hq : r / (βzβ + 1) * βzβ β€ r := by | |
| rw [div_mul_eq_mul_div] | |
| exact (div_le_iffβ hden).mpr (show r * βzβ β€ r * (βzβ + 1) by nlinarith) | |
| calc | |
| s n * βzβ = (r / (βzβ + 1) * βzβ) * (1 / ((n : β) + 1)) := by dsimp [s]; ring | |
| _ β€ (r / (βzβ + 1) * βzβ) * 1 := | |
| mul_le_mul_of_nonneg_left hdiv (by positivity) | |
| _ β€ r := by simpa using hq | |
| have hs0 : Tendsto s atTop (nhds 0) := by | |
| simpa [s] using tendsto_one_div_add_atTop_nhds_zero_nat.const_mul (r / (βzβ + 1)) | |
| let y : β β E := fun n => x + s n β’ z | |
| have hymem (n : β) : y n β Metric.closedBall x r := by | |
| simpa [y, Metric.mem_closedBall, dist_eq_norm, norm_smul, abs_of_pos (hspos n)] using hsbound n | |
| have hyD (n : β) : y n β D := | |
| hball (Metric.closedBall_subset_closedBall (by linarith) (hymem n)) | |
| have hy0 : Tendsto y atTop (nhds x) := by | |
| simpa [y] using tendsto_const_nhds.add (hs0.smul (tendsto_const_nhds (x := z))) | |
| choose i hi hia using fun n => hactive (y n) (hymem n) | |
| choose w hw using fun n => supportSet_nonempty hD (hF (i n) (hi n)) (hyD n) | |
| have hwbound (n : β) : βw nβ β€ 2 * M / r := by | |
| have hb : Metric.closedBall (y n) r β Metric.closedBall x (2 * r) := by | |
| intro q hq | |
| apply (dist_triangle q (y n) x).trans | |
| have hqn := Metric.mem_closedBall.mp hq | |
| have hyn := Metric.mem_closedBall.mp (hymem n) | |
| linarith | |
| exact support_norm_bound hr hM (hb.trans hball) | |
| (fun q hq => hbound (i n) (hi n) q (hb hq)) (hw n) | |
| obtain β¨iw, hiw, Ο, hΟ, hlimβ© := | |
| (hK.prod (isCompact_closedBall (0 : E) (2 * M / r))).tendsto_subseq | |
| (x := fun n => (i n, w n)) (fun n => β¨hi n, by simpa using hwbound nβ©) | |
| have hiwK : iw.1 β K := hiw.1 | |
| have hilim : Tendsto (fun n => i (Ο n)) atTop (nhds iw.1) := | |
| continuous_fst.tendsto iw |>.comp hlim | |
| have hwlim : Tendsto (fun n => w (Ο n)) atTop (nhds iw.2) := | |
| continuous_snd.tendsto iw |>.comp hlim | |
| have hylim : Tendsto (fun n => y (Ο n)) atTop (nhds x) := hy0.comp hΟ.tendsto_atTop | |
| have hbase : Tendsto (fun n => F (i (Ο n)) (y (Ο n))) atTop (nhds (F iw.1 x)) := | |
| continuousOn_tendsto_sequence hFc (a := (iw.1, x)) β¨hiwK, hxβ© | |
| (fun n => β¨hi (Ο n), hyD (Ο n)β©) (hilim.prodMk_nhds hylim) | |
| have hPbase : Tendsto (fun n => P (y (Ο n))) atTop (nhds (P x)) := | |
| continuousOn_tendsto_sequence hPc hx (fun n => hyD (Ο n)) hylim | |
| have hia0 : F iw.1 x = P x := by | |
| apply tendsto_nhds_unique hbase | |
| simpa only [hia] using hPbase | |
| have hiws : SupportsOn (F iw.1) D x iw.2 := by | |
| apply supportsOn_of_tendsto hylim hwlim hbase ?_ (fun n => hw (Ο n)) | |
| intro q hq | |
| exact continuousOn_tendsto_sequence hFc (a := (iw.1, q)) β¨hiwK, hqβ© | |
| (fun n => β¨hi (Ο n), hqβ©) (hilim.prodMk_nhds tendsto_const_nhds) | |
| have hiwG : iw.2 β G := β¨iw.1, hiwK, hia0, hiwsβ© | |
| have hendpoint (n : β) : inner β v z β€ inner β (w n) z := by | |
| have hleft := hv (y n) (hyD n) | |
| have hright := hw n x hx | |
| have hdom := hle (i n) (hi n) x hx | |
| have hyx : y n - x = s n β’ z := by simp [y] | |
| have hxy : x - y n = -(s n β’ z) := by simp [y] | |
| rw [hyx, real_inner_smul_right] at hleft | |
| rw [hxy, inner_neg_right, real_inner_smul_right, hia n] at hright | |
| exact (mul_le_mul_iff_rightβ (hspos n)).mp (by nlinarith [hleft, hright, hdom]) | |
| have hfinal : inner β v z β€ inner β iw.2 z := | |
| le_of_tendsto_of_tendsto tendsto_const_nhds (hwlim.inner tendsto_const_nhds) | |
| (Eventually.of_forall fun n => hendpoint (Ο n)) | |
| rw [hell, hell] at hfinal | |
| have hh := hsep iw.2 (subset_closure (subset_convexHull β G hiwG)) | |
| linarith | |
| end CompactEnvelope | |
| end RadialTransition | |
| end | |
| end OAI | |