Download data/lean/OAI/Dynamics/TriangleBilliards/HilbertFlow.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 11.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/TriangleBilliards/HilbertFlow.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Dynamics/TriangleBilliards/HilbertFlow.lean
-
curl -L -o HilbertFlow.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Dynamics/TriangleBilliards/HilbertFlow.lean
11.7 kB
| import OAI.Dynamics.TriangleBilliards.Koopman | |
| namespace OAI | |
| universe uH | |
| open MeasureTheory Set | |
| open scoped ENNReal symmDiff | |
| noncomputable section | |
| open MeasureTheory Set Filter Function Metric | |
| open scoped Topology Convolution ContDiff | |
| noncomputable section | |
| open MeasureTheory Set | |
| open scoped ENNReal | |
| noncomputable section | |
| open MeasureTheory Set Filter BoundedContinuousFunction | |
| open scoped ENNReal Topology ComplexConjugate | |
| noncomputable section | |
| /-! Strongly continuous unitary dynamics and the closed generator graph. | |
| All hypotheses here are structural flow properties; the billiard instance | |
| is constructed from its geometric flow, not postulated. -/ | |
| open MeasureTheory Set Filter | |
| open scoped Topology ComplexConjugate | |
| noncomputable section | |
| namespace TriangularBilliards.Analysis | |
| variable (H : Type uH) [NormedAddCommGroup H] [InnerProductSpace β H] | |
| structure HilbertFlow where | |
| act : β β H ββα΅’[β] H | |
| zero : β u, act 0 u = u | |
| add : β s t u, act (s + t) u = act s (act t u) | |
| continuous : β u, Continuous (fun t => act t u) | |
| namespace HilbertFlow | |
| variable {H} (W : HilbertFlow H) | |
| @[simp] lemma act_zero (u : H) : W.act 0 u = u := W.zero u | |
| lemma act_neg (t : β) (u : H) : W.act (-t) (W.act t u) = u := by | |
| rw [β W.add, neg_add_cancel, W.zero] | |
| lemma inner_act (t : β) (u v : H) : inner β (W.act t u) (W.act t v) = inner β u v := | |
| (W.act t).inner_map_map u v | |
| lemma continuous_joint : Continuous (fun tu : β Γ H => W.act tu.1 tu.2) := by | |
| have h : Continuous (fun ut : H Γ β => W.act ut.2 ut.1) := | |
| continuous_prod_of_continuous_lipschitzWith _ 1 W.continuous | |
| (fun t => (W.act t).isometry.lipschitzWith) | |
| exact h.comp continuous_swap | |
| /-- Conjugating by a second genuine unitary flow preserves all structural | |
| properties. For billiards the second flow is angular rotation. -/ | |
| def conjugate (V : HilbertFlow H) (ΞΈ : β) : HilbertFlow H where | |
| act t := (V.act ΞΈ).comp ((W.act t).comp (V.act (-ΞΈ))) | |
| zero u := by | |
| change V.act ΞΈ (W.act 0 (V.act (-ΞΈ) u)) = u | |
| rw [W.zero, β V.add, add_neg_cancel, V.zero] | |
| add s t u := by | |
| change V.act ΞΈ (W.act (s + t) (V.act (-ΞΈ) u)) = | |
| V.act ΞΈ (W.act s (V.act (-ΞΈ) (V.act ΞΈ (W.act t (V.act (-ΞΈ) u))))) | |
| rw [β V.add, neg_add_cancel, V.zero, W.add] | |
| continuous u := (V.act ΞΈ).continuous.comp (W.continuous (V.act (-ΞΈ) u)) | |
| lemma conjugate_joint (V : HilbertFlow H) : | |
| Continuous (fun p : β Γ β Γ H => (W.conjugate V p.1).act p.2.1 p.2.2) := by | |
| change Continuous (fun p : β Γ β Γ H => V.act p.1 (W.act p.2.1 (V.act (-p.1) p.2.2))) | |
| exact V.continuous_joint.comp (continuous_fst.prodMk | |
| (W.continuous_joint.comp (continuous_snd.fst.prodMk | |
| (V.continuous_joint.comp (continuous_fst.neg.prodMk continuous_snd.snd))))) | |
| variable [CompleteSpace H] | |
| omit [CompleteSpace H] in | |
| lemma intervalIntegrable (u : H) (a b : β) : | |
| IntervalIntegrable (fun t => W.act t u) volume a b := | |
| (W.continuous u).intervalIntegrable _ _ | |
| /-- Integration in time, as a genuine bounded linear operator. No | |
| operator-norm continuity of the unitary group is presupposed. -/ | |
| def timeIntegral (a b : β) : H βL[β] H := | |
| LinearMap.mkContinuous | |
| { toFun := fun u => β« t in a..b, W.act t u | |
| map_add' := fun u v => by | |
| simp only [map_add] | |
| exact intervalIntegral.integral_add (W.intervalIntegrable u a b) (W.intervalIntegrable v a b) | |
| map_smul' := fun r u => by | |
| simp only [map_smul, RingHom.id_apply] | |
| exact intervalIntegral.integral_smul r (fun t => W.act t u) } | |
| |b - a| | |
| (fun u => by | |
| calc | |
| ββ« t in a..b, W.act t uβ β€ βuβ * |b - a| := | |
| intervalIntegral.norm_integral_le_of_norm_le_const (fun t _ => (W.act t).norm_map u |>.le) | |
| _ = |b - a| * βuβ := mul_comm _ _) | |
| omit [CompleteSpace H] in | |
| @[simp] lemma timeIntegral_apply (a b : β) (u : H) : | |
| W.timeIntegral a b u = β« t in a..b, W.act t u := rfl | |
| /-- The generator domain encoded by the exact orbit integral identity. | |
| This formulation makes weak closedness an immediate linear-test fact. -/ | |
| def HasGenerator (u v : H) : Prop := | |
| β t : β, W.act t u - u = W.timeIntegral 0 t v | |
| lemma HasGenerator.hasDerivAt {u v : H} (h : W.HasGenerator u v) (t : β) : | |
| HasDerivAt (fun s => W.act s u) (W.act t v) t := by | |
| have hi := W.intervalIntegrable v 0 t | |
| have hd := intervalIntegral.integral_hasDerivAt_right hi | |
| (W.continuous v).stronglyMeasurable.stronglyMeasurableAtFilter (W.continuous v).continuousAt | |
| have he : (fun s => W.act s u) = (fun s => u + β« r in 0..s, W.act r v) := by | |
| funext s | |
| have hh := h s | |
| change W.act s u - u = β« r in 0..s, W.act r v at hh | |
| exact eq_add_of_sub_eq' hh | |
| rw [he] | |
| exact hd.const_add u | |
| lemma hasGenerator_of_hasDerivAt {u v : H} | |
| (h : β t, HasDerivAt (fun s => W.act s u) (W.act t v) t) : W.HasGenerator u v := by | |
| intro t | |
| rw [timeIntegral_apply, intervalIntegral.integral_eq_sub_of_hasDerivAt | |
| (fun s _ => h s) (W.intervalIntegrable v 0 t), W.zero] | |
| lemma generator_unique {u v v' : H} (h : W.HasGenerator u v) (h' : W.HasGenerator u v') : | |
| v = v' := by | |
| have he := (HasGenerator.hasDerivAt W h 0).unique (HasGenerator.hasDerivAt W h' 0) | |
| simpa only [W.zero] using he | |
| lemma generator_skew {u v a b : H} (hu : W.HasGenerator u a) (hv : W.HasGenerator v b) : | |
| inner β u b + inner β a v = 0 := by | |
| have hd := (HasGenerator.hasDerivAt W hu 0).inner β (HasGenerator.hasDerivAt W hv 0) | |
| have heq : (fun t => inner β (W.act t u) (W.act t v)) = (fun _ : β => inner β u v) := | |
| funext fun t => W.inner_act t u v | |
| rw [heq] at hd | |
| simpa only [W.zero] using hd.unique (hasDerivAt_const 0 (inner β u v)) | |
| omit [CompleteSpace H] in | |
| lemma generatorGraph_closed : IsClosed {p : H Γ H | W.HasGenerator p.1 p.2} := by | |
| have he : {p : H Γ H | W.HasGenerator p.1 p.2} = | |
| β t : β, {p : H Γ H | W.act t p.1 - p.1 = W.timeIntegral 0 t p.2} := by | |
| ext p | |
| simp only [HasGenerator, mem_ofPred_eq, mem_iInter] | |
| rw [he] | |
| exact isClosed_iInter fun t => isClosed_eq | |
| (((W.act t).continuous.comp continuous_fst).sub continuous_fst) | |
| ((W.timeIntegral 0 t).continuous.comp continuous_snd) | |
| omit [CompleteSpace H] in | |
| lemma generatorGraph_convex : Convex β {p : H Γ H | W.HasGenerator p.1 p.2} := by | |
| intro p hp q hq a b _ _ _ t | |
| simp only [Prod.fst_add, Prod.snd_add, Prod.smul_fst, Prod.smul_snd, | |
| map_add] | |
| change ((W.act t).toLinearMap (a β’ p.1) + (W.act t).toLinearMap (b β’ q.1)) - | |
| (a β’ p.1 + b β’ q.1) = W.timeIntegral 0 t (a β’ p.2) + W.timeIntegral 0 t (b β’ q.2) | |
| rw [LinearMap.map_smul_of_tower, LinearMap.map_smul_of_tower, | |
| ContinuousLinearMap.map_smul_of_tower, ContinuousLinearMap.map_smul_of_tower] | |
| rw [add_sub_add_comm, β smul_sub, β smul_sub] | |
| change a β’ (W.act t p.1 - p.1) + b β’ (W.act t q.1 - q.1) = _ | |
| rw [hp t, hq t] | |
| lemma timeIntegral_translate (a b Ο : β) (u : H) : | |
| W.act Ο (W.timeIntegral a b u) = W.timeIntegral (Ο + a) (Ο + b) u := by | |
| simp only [timeIntegral_apply] | |
| rw [β (W.act Ο).intervalIntegral_comp_comm] | |
| have he : (fun t => W.act Ο (W.act t u)) = (fun t => W.act (Ο + t) u) := | |
| funext fun t => (W.add Ο t u).symm | |
| rw [he] | |
| exact intervalIntegral.integral_comp_add_left (fun t => W.act t u) Ο | |
| /-- The finite negative-time average. -/ | |
| def negativeAverage (T : β) : H βL[β] H := (Tβ»ΒΉ : β) β’ W.timeIntegral (-T) 0 | |
| omit [CompleteSpace H] in | |
| lemma negativeAverage_eq (T : β) (u : H) : | |
| W.negativeAverage T u = (Tβ»ΒΉ : β) β’ β« t in 0..T, W.act (-t) u := by | |
| change (Tβ»ΒΉ : β) β’ (β« t in -T..0, W.act t u) = | |
| (Tβ»ΒΉ : β) β’ β« t in 0..T, W.act (-t) u | |
| rw [intervalIntegral.integral_comp_neg (fun t => W.act t u)] | |
| simp only [neg_zero] | |
| omit [CompleteSpace H] in | |
| lemma negativeAverage_norm_le {T : β} (hT : 0 < T) (u : H) : | |
| βW.negativeAverage T uβ β€ βuβ := by | |
| rw [negativeAverage_eq, norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hT)] | |
| calc | |
| Tβ»ΒΉ * ββ« t in 0..T, W.act (-t) uβ β€ Tβ»ΒΉ * (βuβ * T) := by | |
| gcongr | |
| simpa only [sub_zero, abs_of_pos hT] using | |
| intervalIntegral.norm_integral_le_of_norm_le_const | |
| (f := fun t => W.act (-t) u) (a := 0) (b := T) | |
| (fun t _ => (W.act (-t)).norm_map u |>.le) | |
| _ = βuβ := by field_simp | |
| lemma timeIntegral_hasDerivAt_right (u : H) (a t : β) : | |
| HasDerivAt (fun s => W.timeIntegral a s u) (W.act t u) t := by | |
| exact intervalIntegral.integral_hasDerivAt_right (W.intervalIntegrable u a t) | |
| (W.continuous u).stronglyMeasurable.stronglyMeasurableAtFilter (W.continuous u).continuousAt | |
| lemma timeIntegral_hasDerivAt_translate (u : H) (a b t : β) : | |
| HasDerivAt (fun s => W.timeIntegral (s + a) (s + b) u) | |
| (W.act (t + b) u - W.act (t + a) u) t := by | |
| have hb := (W.timeIntegral_hasDerivAt_right u 0 (t + b)).scomp t | |
| ((hasDerivAt_id t).add_const b) | |
| have ha := (W.timeIntegral_hasDerivAt_right u 0 (t + a)).scomp t | |
| ((hasDerivAt_id t).add_const a) | |
| have he : (fun s => W.timeIntegral (s + a) (s + b) u) = | |
| (fun s => W.timeIntegral 0 (s + b) u - W.timeIntegral 0 (s + a) u) := by | |
| funext s | |
| exact (intervalIntegral.integral_interval_sub_left | |
| (W.intervalIntegrable u 0 (s + b)) (W.intervalIntegrable u 0 (s + a))).symm | |
| rw [he] | |
| convert hb.sub ha using 1 <;> simp only [Function.comp_def, one_smul, id_eq, Pi.sub_def] | |
| lemma negativeAverage_generator (T : β) (u : H) : | |
| W.HasGenerator (W.negativeAverage T u) ((Tβ»ΒΉ : β) β’ (u - W.act (-T) u)) := by | |
| apply W.hasGenerator_of_hasDerivAt | |
| intro t | |
| have he : (fun s => W.act s (W.negativeAverage T u)) = | |
| (fun s => (Tβ»ΒΉ : β) β’ W.timeIntegral (s + -T) (s + 0) u) := by | |
| funext s | |
| change (W.act s).toLinearMap ((Tβ»ΒΉ : β) β’ W.timeIntegral (-T) 0 u) = _ | |
| rw [LinearMap.map_smul_of_tower] | |
| change (Tβ»ΒΉ : β) β’ W.act s (W.timeIntegral (-T) 0 u) = _ | |
| rw [W.timeIntegral_translate] | |
| rw [he] | |
| have hd := (W.timeIntegral_hasDerivAt_translate u (-T) 0 t).const_smul (Tβ»ΒΉ : β) | |
| have hv : W.act t ((Tβ»ΒΉ : β) β’ (u - W.act (-T) u)) = | |
| (Tβ»ΒΉ : β) β’ (W.act (t + 0) u - W.act (t + -T) u) := by | |
| change (W.act t).toLinearMap ((Tβ»ΒΉ : β) β’ (u - W.act (-T) u)) = _ | |
| rw [LinearMap.map_smul_of_tower] | |
| change (Tβ»ΒΉ : β) β’ W.act t (u - W.act (-T) u) = _ | |
| rw [map_sub, β W.add, add_zero] | |
| rw [hv] | |
| exact hd | |
| omit [CompleteSpace H] in | |
| lemma negativeAverage_generator_norm {T : β} (hT : 0 < T) (u : H) : | |
| β(Tβ»ΒΉ : β) β’ (u - W.act (-T) u)β β€ 2 * βuβ / T := by | |
| rw [norm_smul, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hT)] | |
| calc | |
| Tβ»ΒΉ * βu - W.act (-T) uβ β€ Tβ»ΒΉ * (βuβ + βW.act (-T) uβ) := by | |
| gcongr | |
| exact norm_sub_le _ _ | |
| _ = 2 * βuβ / T := by rw [(W.act (-T)).norm_map]; ring | |
| lemma negativeAverage_invariant {u : H} (hu : β t, W.act t u = u) {T : β} (hT : T β 0) : | |
| W.negativeAverage T u = u := by | |
| change (Tβ»ΒΉ : β) β’ (β« t in -T..0, W.act t u) = u | |
| simp_rw [hu] | |
| rw [intervalIntegral.integral_const, β smul_assoc] | |
| simp only [sub_neg_eq_add, zero_add, smul_eq_mul, inv_mul_cancelβ hT, one_smul] | |
| lemma negativeAverage_dist_invariant {u : H} (hu : β t, W.act t u = u) | |
| {T : β} (hT : 0 < T) (a : H) : | |
| βW.negativeAverage T a - uβ β€ βa - uβ := by | |
| calc | |
| βW.negativeAverage T a - uβ = βW.negativeAverage T (a - u)β := by | |
| rw [map_sub, W.negativeAverage_invariant hu hT.ne'] | |
| _ β€ βa - uβ := by | |
| exact W.negativeAverage_norm_le hT (a - u) | |
| end HilbertFlow | |
| end TriangularBilliards.Analysis | |
| end | |
| end | |
| end | |
| end | |
| end | |
| end OAI | |