Download lean/OAI/Analysis/IrrationalRotation/Sampling/OrthogonalPrefixLimit.lean from roseking/openAI-math-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.9 kB
-
https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/IrrationalRotation/Sampling/OrthogonalPrefixLimit.lean
- Command line
-
hf download hf://datasets/roseking/openAI-math-dataset/lean/OAI/Analysis/IrrationalRotation/Sampling/OrthogonalPrefixLimit.lean
-
curl -L -o OrthogonalPrefixLimit.lean https://huggingface.co/datasets/roseking/openAI-math-dataset/resolve/main/lean/OAI/Analysis/IrrationalRotation/Sampling/OrthogonalPrefixLimit.lean
1.9 kB
| import Mathlib.Analysis.InnerProductSpace.Basic | |
| import Mathlib.Topology.Instances.Real.Lemmas | |
| import Mathlib.Topology.MetricSpace.Cauchy | |
| namespace OAI | |
| open Filter | |
| open scoped Topology | |
| namespace Invariant233.ProductDensity | |
| theorem cauchySeq_of_prefix_inner | |
| {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] | |
| (f : ℕ → E) | |
| (hinner : ∀ n m, n ≤ m → inner ℝ (f n) (f m) = ‖f n‖ ^ 2) | |
| (hbound : BddAbove (Set.range fun n => ‖f n‖ ^ 2)) : CauchySeq f := by | |
| have hdist : ∀ n m, n ≤ m → dist (f n) (f m) ^ 2 = ‖f m‖ ^ 2 - ‖f n‖ ^ 2 := by | |
| intro n m hnm | |
| rw [dist_eq_norm, norm_sub_sq_real, hinner n m hnm] | |
| ring | |
| have hmono : Monotone (fun n => ‖f n‖ ^ 2) := by | |
| intro n m hnm | |
| have := sq_nonneg (dist (f n) (f m)) | |
| rw [hdist n m hnm] at this | |
| linarith | |
| have hc : CauchySeq (fun n => ‖f n‖ ^ 2) := | |
| (tendsto_atTop_ciSup hmono hbound).cauchySeq | |
| apply Metric.cauchySeq_iff.2 | |
| intro ε hε | |
| obtain ⟨N, hN⟩ := Metric.cauchySeq_iff.1 hc (ε ^ 2) (sq_pos_of_pos hε) | |
| refine ⟨N, fun n hn m hm => ?_⟩ | |
| have hreal := hN n hn m hm | |
| rw [Real.dist_eq] at hreal | |
| rcases le_total n m with hnm | hmn | |
| · have hs := hdist n m hnm | |
| have hl := (abs_lt.mp hreal).1 | |
| nlinarith [dist_nonneg (x := f n) (y := f m)] | |
| · have hs := hdist m n hmn | |
| have hl := (abs_lt.mp hreal).2 | |
| rw [dist_comm (f m) (f n)] at hs | |
| nlinarith [dist_nonneg (x := f n) (y := f m)] | |
| theorem exists_limit_of_prefix_inner | |
| {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E] | |
| (f : ℕ → E) | |
| (hinner : ∀ n m, n ≤ m → inner ℝ (f n) (f m) = ‖f n‖ ^ 2) | |
| (hbound : BddAbove (Set.range fun n => ‖f n‖ ^ 2)) : | |
| ∃ g : E, Tendsto f atTop (𝓝 g) := | |
| cauchySeq_tendsto_of_complete (cauchySeq_of_prefix_inner f hinner hbound) | |
| end Invariant233.ProductDensity | |
| end OAI | |