Download data/lean/OAI/Geometry/HarmonicGrowth/Flow.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 44.6 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HarmonicGrowth/Flow.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/HarmonicGrowth/Flow.lean
-
curl -L -o Flow.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HarmonicGrowth/Flow.lean
44.6 kB
| import Mathlib | |
| namespace OAI | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| /-- The exact Peano--Baker iterates, with oriented integrals on the entire real line. -/ | |
| def term (A : β β E βL[β] E) (x : E) : β β β β E | |
| | 0, _ => x | |
| | n+1, t => β« s in (0:β)..t, A s (term A x n s) | |
| lemma term_continuous {A : β β E βL[β] E} (hA : Continuous A) (x : E) (n : β) : | |
| Continuous (term A x n) := by | |
| induction n with | |
| | zero => exact continuous_const | |
| | succ n ih => | |
| have hc := hA.clm_apply ih | |
| apply continuous_iff_continuousAt.2 | |
| intro t | |
| exact (intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 t) | |
| hc.stronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt).continuousAt | |
| lemma term_succ_hasDerivAt {A : β β E βL[β] E} (hA : Continuous A) | |
| (x : E) (n : β) (t : β) : | |
| HasDerivAt (term A x (n+1)) (A t (term A x n t)) t := by | |
| have hc := hA.clm_apply (term_continuous hA x n) | |
| exact intervalIntegral.integral_hasDerivAt_right (hc.intervalIntegrable 0 t) | |
| hc.stronglyMeasurable.stronglyMeasurableAtFilter hc.continuousAt | |
| lemma term_bound {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x : E) (n : β) (t : β) : | |
| βterm A x n tβ β€ βxβ * M^n * |t|^n / (n.factorial:β) := by | |
| induction n generalizing t with | |
| | zero => simp [term] | |
| | succ n ih => | |
| have hc := hA.clm_apply (term_continuous hA x n) | |
| have hcf (s : β) : βA s (term A x n s)β β€ | |
| (βxβ*M^(n+1)/(n.factorial:β)) * |s|^n := by | |
| calc | |
| _ β€ βA sβ * βterm A x n sβ := (A s).le_opNorm _ | |
| _ β€ M * (βxβ*M^n*|s|^n/(n.factorial:β)) := | |
| mul_le_mul (hb s) (ih s) (norm_nonneg _) hM | |
| _ = _ := by rw [pow_succ]; ring | |
| change ββ« s in (0:β)..t, A s (term A x n s)β β€ _ | |
| calc | |
| _ β€ β« s in Set.uIoc 0 t, βA s (term A x n s)β := | |
| intervalIntegral.norm_integral_le_integral_norm_uIoc | |
| _ β€ β« s in Set.uIoc 0 t, | |
| (βxβ*M^(n+1)/(n.factorial:β)) * |s|^n := by | |
| apply integral_mono_ae | |
| Β· exact (hc.intervalIntegrable 0 t).def'.norm | |
| Β· exact ((continuous_const.mul (continuous_abs.pow n)).intervalIntegrable 0 t).def' | |
| Β· exact Filter.Eventually.of_forall hcf | |
| _ = βxβ * M^(n+1) * |t|^(n+1) / ((n+1).factorial:β) := by | |
| rw [integral_const_mul] | |
| have hi := integral_pow_abs_sub_uIoc (a := (0:β)) (b := t) (n := n) | |
| simp only [sub_zero] at hi | |
| rw [hi, Nat.factorial_succ] | |
| push_cast | |
| field_simp | |
| def flow (A : β β E βL[β] E) (x : E) (t : β) : E := β' n, term A x n t | |
| lemma term_summable {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x : E) (t : β) : | |
| Summable (fun n => term A x n t) := by | |
| have hs := (Real.summable_pow_div_factorial (M*|t|)).mul_left βxβ | |
| apply hs.of_norm_bounded | |
| intro n | |
| simpa only [mul_pow, mul_div_assoc, mul_assoc] using term_bound hA hM hb x n t | |
| lemma flow_eq {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x : E) (t : β) : | |
| flow A x t = x + β' n, term A x (n+1) t := by | |
| exact (term_summable hA hM hb x t).tsum_eq_zero_add | |
| omit [CompleteSpace E] in | |
| lemma term_zero (A : β β E βL[β] E) (x : E) : | |
| β n, term A x (n+1) 0 = 0 := by intros; simp [term] | |
| omit [CompleteSpace E] in | |
| lemma flow_initial (A : β β E βL[β] E) (x : E) : flow A x 0 = x := by | |
| unfold flow | |
| rw [tsum_eq_single 0] | |
| Β· rfl | |
| Β· intro n hn | |
| cases n with | |
| | zero => contradiction | |
| | succ n => exact term_zero A x n | |
| /-- A global actual solution, before any positivity, transmission or growth estimates. -/ | |
| theorem flow_hasDerivAt {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x : E) (t : β) : | |
| HasDerivAt (flow A x) (A t (flow A x t)) t := by | |
| let R : β := |t|+1 | |
| have hR : 0 < R := by dsimp [R]; positivity | |
| have hu : Summable (fun n => (βxβ*M)*(M*R)^n/(n.factorial:β)) := by | |
| simpa only [mul_div_assoc] using | |
| (Real.summable_pow_div_factorial (M*R)).mul_left (βxβ*M) | |
| have hbound (n : β) (y : β) (hy : y β Set.Ioo (-R) R) : | |
| βA y (term A x n y)β β€ (βxβ*M)*(M*R)^n/(n.factorial:β) := by | |
| have hay : |y| β€ R := abs_le.2 β¨hy.1.le, hy.2.leβ© | |
| calc | |
| _ β€ βA yβ * βterm A x n yβ := (A y).le_opNorm _ | |
| _ β€ M * (βxβ*M^n*|y|^n/(n.factorial:β)) := | |
| mul_le_mul (hb y) (term_bound hA hM hb x n y) (norm_nonneg _) hM | |
| _ β€ M * (βxβ*M^n*R^n/(n.factorial:β)) := by | |
| gcongr | |
| _ = _ := by rw [mul_pow]; ring | |
| have hzero : Summable (fun n => term A x (n+1) 0) := by simp only [term_zero]; exact summable_zero | |
| have ht : t β Set.Ioo (-R) R := by | |
| dsimp [R] | |
| constructor <;> linarith [le_abs_self t, neg_abs_le t] | |
| have hd := hasDerivAt_tsum_of_isPreconnected hu isOpen_Ioo isPreconnected_Ioo | |
| (fun n y _ => term_succ_hasDerivAt hA x n y) hbound | |
| (show (0:β) β Set.Ioo (-R) R by constructor <;> linarith) hzero ht | |
| have hmap := (A t).map_tsum (term_summable hA hM hb x t) | |
| change A t (flow A x t) = _ at hmap | |
| rw [β hmap] at hd | |
| have he : flow A x = fun y => x + β' n, term A x (n+1) y := | |
| funext (flow_eq hA hM hb x) | |
| have hh := hd.const_add x | |
| rw [β he] at hh | |
| exact hh | |
| lemma flow_smooth {A : β β E βL[β] E} (hA : ContDiff β β A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x : E) : ContDiff β β (flow A x) := by | |
| have hd := flow_hasDerivAt hA.continuous hM hb x | |
| have hder : deriv (flow A x) = fun t => A t (flow A x t) := funext fun t => (hd t).deriv | |
| apply contDiff_infty.2 | |
| intro n | |
| induction n with | |
| | zero => exact contDiff_zero.2 (continuous_iff_continuousAt.2 fun t => (hd t).continuousAt) | |
| | succ n ih => | |
| rw [show ((n+1:β) : WithTop ββ) = (n:WithTop ββ)+1 by simp, contDiff_succ_iff_deriv] | |
| refine β¨fun t => (hd t).differentiableAt, by simp, ?_β© | |
| rw [hder] | |
| exact ((contDiff_infty.1 hA) n).clm_apply ih | |
| omit [CompleteSpace E] in | |
| lemma solution_unique {A : β β E βL[β] E} {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) {f g : β β E} {tβ : β} | |
| (hf : β t, HasDerivAt f (A t (f t)) t) | |
| (hg : β t, HasDerivAt g (A t (g t)) t) (he : f tβ = g tβ) : f = g := by | |
| apply ODE_solution_unique_univ (s := fun _ => Set.univ) (K := β¨M,hMβ©) | |
| (fun t => ((A t).lipschitzWith.weaken (hb t)).lipschitzOnWith) | |
| (fun t => β¨hf t, Set.mem_univ _β©) (fun t => β¨hg t, Set.mem_univ _β©) he | |
| lemma flow_injective {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (t : β) : | |
| Function.Injective (fun x => flow A x t) := by | |
| intro x y he | |
| have hh := solution_unique hM hb (flow_hasDerivAt hA hM hb x) | |
| (flow_hasDerivAt hA hM hb y) he | |
| have hzero := congrFun hh 0 | |
| simpa only [flow_initial] using hzero | |
| lemma flow_add {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (x y : E) (t : β) : | |
| flow A (x+y) t = flow A x t + flow A y t := by | |
| have hd (s : β) : HasDerivAt (fun s => flow A x s + flow A y s) | |
| (A s (flow A x s + flow A y s)) s := by | |
| simpa only [map_add, Pi.add_def] using (flow_hasDerivAt hA hM hb x s).add | |
| (flow_hasDerivAt hA hM hb y s) | |
| have hh := solution_unique hM hb (flow_hasDerivAt hA hM hb (x+y)) hd | |
| (tβ := 0) (by simp only [flow_initial]) | |
| exact congrFun hh t | |
| lemma flow_smul {A : β β E βL[β] E} (hA : Continuous A) {M : β} | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (c : β) (x : E) (t : β) : | |
| flow A (c β’ x) t = c β’ flow A x t := by | |
| have hd (s : β) : HasDerivAt (fun s => c β’ flow A x s) | |
| (A s (c β’ flow A x s)) s := by | |
| simpa only [map_smul, Pi.smul_def] using (flow_hasDerivAt hA hM hb x s).const_smul c | |
| have hh := solution_unique hM hb (flow_hasDerivAt hA hM hb (c β’ x)) hd | |
| (tβ := 0) (by simp only [flow_initial]) | |
| exact congrFun hh t | |
| /-- Actual initial-data linearity, later used for independence of harmonic columns. -/ | |
| def flowLinear (A : β β E βL[β] E) (hA : Continuous A) (M : β) | |
| (hM : 0 β€ M) (hb : β s, βA sβ β€ M) (t : β) : E ββ[β] E where | |
| toFun x := flow A x t | |
| map_add' x y := flow_add hA hM hb x y t | |
| map_smul' c x := flow_smul hA hM hb c x t | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| def block (A : β β E βL[β] E) (b : β β β) (t : β) : EΓE βL[β] EΓE := | |
| (ContinuousLinearMap.snd β E E).prod | |
| ((A t).comp (ContinuousLinearMap.fst β E E) - b t β’ ContinuousLinearMap.snd β E E) | |
| lemma block_apply (A : β β E βL[β] E) (b : β β β) (t : β) (v : EΓE) : | |
| block A b t v = (v.2, A t v.1 - b t β’ v.2) := rfl | |
| lemma block_eq (A : β β E βL[β] E) (b : β β β) (t : β) : | |
| block A b t = (ContinuousLinearMap.inl β E E).comp (ContinuousLinearMap.snd β E E) + | |
| (ContinuousLinearMap.inr β E E).comp | |
| ((A t).comp (ContinuousLinearMap.fst β E E) - b t β’ ContinuousLinearMap.snd β E E) := by | |
| ext v <;> simp [block] | |
| lemma block_continuous {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) : Continuous (block A b) := by | |
| simp only [funext (block_eq A b)] | |
| exact continuous_const.add (continuous_const.clm_comp | |
| ((hA.clm_comp continuous_const).sub (hb.smul continuous_const))) | |
| lemma block_smooth {A : β β E βL[β] E} {b : β β β} | |
| (hA : ContDiff β β A) (hb : ContDiff β β b) : ContDiff β β (block A b) := by | |
| simp only [funext (block_eq A b)] | |
| exact contDiff_const.add (contDiff_const.clm_comp | |
| ((hA.clm_comp contDiff_const).sub (hb.smul contDiff_const))) | |
| lemma block_bound {A : β β E βL[β] E} {b : β β β} {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hA : β t, βA tβ β€ MA) (hb : β t, |b t| β€ Mb) (t : β) : | |
| βblock A b tβ β€ 1+MA+Mb := by | |
| rw [block, ContinuousLinearMap.opNorm_prod, Prod.norm_def] | |
| apply max_le | |
| Β· exact (ContinuousLinearMap.norm_snd_le β E E).trans (by linarith) | |
| Β· calc | |
| _ β€ β(A t).comp (ContinuousLinearMap.fst β E E)β + | |
| βb t β’ ContinuousLinearMap.snd β E Eβ := norm_sub_le _ _ | |
| _ β€ βA tβ * βContinuousLinearMap.fst β E Eβ + | |
| |b t| * βContinuousLinearMap.snd β E Eβ := by | |
| rw [norm_smul, Real.norm_eq_abs] | |
| exact add_le_add (ContinuousLinearMap.opNorm_comp_le (A t) (ContinuousLinearMap.fst β E E)) le_rfl | |
| _ β€ MA*1+Mb*1 := by | |
| exact add_le_add | |
| (mul_le_mul (hA t) (ContinuousLinearMap.norm_fst_le β E E) (norm_nonneg _) hMA) | |
| (mul_le_mul (hb t) (ContinuousLinearMap.norm_snd_le β E E) (norm_nonneg _) hMb) | |
| _ β€ _ := by linarith | |
| def phase (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) (t : β) : EΓE := | |
| flow (block A b) (x,l β’ x) t | |
| def value (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) (t : β) : E := | |
| (phase A b l x t).1 | |
| def velocity (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) (t : β) : E := | |
| (phase A b l x t).2 | |
| lemma value_initial (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) : | |
| value A b l x 0 = x := by simp [value, phase, flow_initial] | |
| lemma velocity_initial (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) : | |
| velocity A b l x 0 = l β’ x := by simp [velocity, phase, flow_initial] | |
| variable [CompleteSpace E] | |
| lemma value_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (t : β) : | |
| HasDerivAt (value A b l x) (velocity A b l x t) t := by | |
| have hd := flow_hasDerivAt (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn) (x,l β’ x) t | |
| exact (ContinuousLinearMap.fst β E E).hasFDerivAt.comp_hasDerivAt t hd | |
| lemma velocity_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (t : β) : | |
| HasDerivAt (velocity A b l x) | |
| (A t (value A b l x t) - b t β’ velocity A b l x t) t := by | |
| have hd := flow_hasDerivAt (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn) (x,l β’ x) t | |
| exact (ContinuousLinearMap.snd β E E).hasFDerivAt.comp_hasDerivAt t hd | |
| lemma value_smooth {A : β β E βL[β] E} {b : β β β} | |
| (hA : ContDiff β β A) (hb : ContDiff β β b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) : | |
| ContDiff β β (value A b l x) := by | |
| exact (ContinuousLinearMap.fst β E E).contDiff.comp | |
| (flow_smooth (block_smooth hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn) (x,l β’ x)) | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] [CompleteSpace E] | |
| /-- Exact matching to the regular Euclidean solution on the entire negative | |
| logarithmic half-line, obtained by uniqueness rather than an asymptotic ansatz. -/ | |
| theorem phase_euclidean_tail {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| {l B : β} (hAi : β t β€ 0, β v, A t v = (l*(l+B)) β’ v) | |
| (hbi : β t β€ 0, b t = B) (x : E) {t : β} (ht : t β€ 0) : | |
| phase A b l x t = Real.exp (l*t) β’ (x,l β’ x) := by | |
| let f : β β EΓE := fun s => Real.exp (l*s) β’ (x,l β’ x) | |
| have hd (s : β) : HasDerivAt (phase A b l x) | |
| (block A b s (phase A b l x s)) s := | |
| flow_hasDerivAt (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn) (x,l β’ x) s | |
| have hf (s : β) : HasDerivAt f ((Real.exp (l*s)*l) β’ (x,l β’ x)) s := by | |
| change HasDerivAt (fun s => Real.exp (l*s) β’ (x,l β’ x)) _ s | |
| convert (((hasDerivAt_id s).const_mul l).exp).smul_const (x,l β’ x) using 1 <;> first | rfl | simp only [id_eq, mul_one] | |
| have hfode (s : β) (hs : s β€ 0) : HasDerivAt f (block A b s (f s)) s := by | |
| convert hf s using 1 | |
| rw [block_apply] | |
| dsimp only [f, Prod.smul_fst, Prod.smul_snd] | |
| rw [hAi s hs, hbi s hs] | |
| apply Prod.ext | |
| Β· simp only [Prod.smul_fst, smul_smul] | |
| Β· simp only [Prod.smul_snd, smul_smul] | |
| module | |
| have hunique := ODE_solution_unique_of_mem_Icc_left | |
| (s := fun _ => Set.univ) (K := β¨1+MA+Mb, by positivityβ©) | |
| (a := t) (b := 0) | |
| (fun s _ => ((block A b s).lipschitzWith.weaken (block_bound hMA hMb hAn hbn s)).lipschitzOnWith) | |
| (continuous_iff_continuousAt.2 (fun s => (hd s).continuousAt)).continuousOn | |
| (fun s _ => (hd s).hasDerivWithinAt) (fun _ _ => Set.mem_univ _) | |
| (continuous_iff_continuousAt.2 (fun s => (hf s).continuousAt)).continuousOn | |
| (fun s hs => (hfode s hs.2).hasDerivWithinAt) (fun _ _ => Set.mem_univ _) | |
| (show phase A b l x 0 = f 0 by simp [phase, f, flow_initial]) | |
| exact hunique β¨le_rfl,htβ© | |
| lemma value_euclidean_tail {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| {l B : β} (hAi : β t β€ 0, β v, A t v = (l*(l+B)) β’ v) | |
| (hbi : β t β€ 0, b t = B) (x : E) {t : β} (ht : t β€ 0) : | |
| value A b l x t = Real.exp (l*t) β’ x := by | |
| exact congrArg Prod.fst (phase_euclidean_tail hA hb hMA hMb hAn hbn hAi hbi x ht) | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| def integratingWeight (b : β β β) (t : β) : β := | |
| Real.exp (β« s in (0:β)..t, b s) | |
| lemma integratingWeight_pos (b : β β β) (t : β) : 0 < integratingWeight b t := | |
| Real.exp_pos _ | |
| lemma integratingWeight_initial (b : β β β) : integratingWeight b 0 = 1 := by | |
| simp [integratingWeight] | |
| lemma integratingWeight_deriv {b : β β β} (hb : Continuous b) (t : β) : | |
| HasDerivAt (integratingWeight b) (integratingWeight b t*b t) t := by | |
| exact (intervalIntegral.integral_hasDerivAt_right (hb.intervalIntegrable 0 t) | |
| hb.stronglyMeasurable.stronglyMeasurableAtFilter hb.continuousAt).exp | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| open scoped InnerProductSpace | |
| /-- Exact weighted energy identity; no invertibility of the value block is assumed. -/ | |
| lemma weighted_energy_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hb : Continuous b) {y z : β β E} {t : β} | |
| (hy : HasDerivAt y (z t) t) | |
| (hz : HasDerivAt z (A t (y t)-b t β’ z t) t) : | |
| HasDerivAt (fun t => integratingWeight b t * βͺy t,z tβ«_β) | |
| (integratingWeight b t*(βͺy t,A t (y t)β«_β+βz tβ^2)) t := by | |
| have hd := (integratingWeight_deriv hb t).fun_mul (hy.inner β hz) | |
| convert hd using 1; first | rfl | | |
| (simp only [inner_sub_right, inner_smul_right, real_inner_self_eq_norm_sq]; ring) | |
| lemma weighted_energy_monotone {A : β β E βL[β] E} {b : β β β} | |
| (hb : Continuous b) (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {y z : β β E} | |
| (hy : β t, HasDerivAt y (z t) t) | |
| (hz : β t, HasDerivAt z (A t (y t)-b t β’ z t) t) : | |
| Monotone (fun t => integratingWeight b t * βͺy t,z tβ«_β) := by | |
| exact monotone_of_hasDerivAt_nonneg (fun t => weighted_energy_deriv hb (hy t) (hz t)) | |
| (fun t => mul_nonneg (integratingWeight_pos b t).le (add_nonneg (hAp t _) (sq_nonneg _))) | |
| /-- Center-regular initial data have a strictly positive pairing for all tβ₯0. | |
| This rules out conjugate zeros and produces the value-block injectivity. -/ | |
| lemma regular_pairing_positive {A : β β E βL[β] E} {b : β β β} | |
| (hb : Continuous b) (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {y z : β β E} | |
| (hy : β t, HasDerivAt y (z t) t) | |
| (hz : β t, HasDerivAt z (A t (y t)-b t β’ z t) t) | |
| {l : β} (hl : 0 < l) (hinit : z 0 = l β’ y 0) (hne : y 0 β 0) | |
| {t : β} (ht : 0 β€ t) : 0 < βͺy t,z tβ«_β := by | |
| have hm := weighted_energy_monotone hb hAp hy hz ht | |
| dsimp only at hm | |
| rw [integratingWeight_initial, one_mul, hinit, inner_smul_right, | |
| real_inner_self_eq_norm_sq] at hm | |
| have hnorm : 0 < βy 0β^2 := sq_pos_of_pos (norm_pos_iff.2 hne) | |
| exact (mul_pos_iff_of_pos_left (integratingWeight_pos b t)).1 ((mul_pos hl hnorm).trans_le hm) | |
| variable [CompleteSpace E] | |
| lemma value_nonzero_of_nonnegative {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {l : β} (hl : 0 < l) | |
| {x : E} (hx : x β 0) {t : β} (ht : 0 β€ t) : value A b l x t β 0 := by | |
| have he := regular_pairing_positive hb hAp | |
| (value_deriv hA hb hMA hMb hAn hbn l x) | |
| (velocity_deriv hA hb hMA hMb hAn hbn l x) hl | |
| (by simp only [value_initial, velocity_initial]) | |
| (by simpa only [value_initial] using hx) ht | |
| intro hh | |
| rw [hh, inner_zero_left] at he | |
| exact lt_irrefl _ he | |
| lemma value_linear {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l t : β) : | |
| IsLinearMap β (fun x => value A b l x t) := by | |
| refine β¨?_, ?_β© | |
| Β· intro x y | |
| change (flow (block A b) (x+y,l β’ (x+y)) t).1 = _ | |
| rw [show (x+y,l β’ (x+y)) = (x,l β’ x)+(y,l β’ y) by simp [smul_add], | |
| flow_add (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn)] | |
| rfl | |
| Β· intro c x | |
| change (flow (block A b) (c β’ x,l β’ (c β’ x)) t).1 = _ | |
| rw [show (c β’ x,l β’ (c β’ x)) = c β’ (x,l β’ x) by simp [smul_comm l c], | |
| flow_smul (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn)] | |
| rfl | |
| lemma value_injective_of_nonnegative {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {l : β} (hl : 0 < l) | |
| {t : β} (ht : 0 β€ t) : Function.Injective (fun x => value A b l x t) := by | |
| let F : E ββ[β] E := (value_linear hA hb hMA hMb hAn hbn l t).mk' | |
| apply F.ker_eq_bot.1 | |
| rw [LinearMap.ker_eq_bot'] | |
| intro x hx | |
| by_contra hne | |
| exact value_nonzero_of_nonnegative hA hb hMA hMb hAn hbn hAp hl hne ht hx | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| open scoped InnerProductSpace | |
| /-- Symplectic flux cancellation for two actual center-regular solutions. -/ | |
| lemma weighted_wronskian_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hb : Continuous b) {u v p q : β β E} {t : β} | |
| (hA : β x y, βͺA t x,yβ«_β = βͺx,A t yβ«_β) | |
| (hu : HasDerivAt u (v t) t) (hv : HasDerivAt v (A t (u t)-b t β’ v t) t) | |
| (hp : HasDerivAt p (q t) t) (hq : HasDerivAt q (A t (p t)-b t β’ q t) t) : | |
| HasDerivAt (fun t => integratingWeight b t*(βͺu t,q tβ«_β-βͺv t,p tβ«_β)) 0 t := by | |
| have hd := (integratingWeight_deriv hb t).fun_mul ((hu.inner β hq).fun_sub (hv.inner β hp)) | |
| convert hd using 1; first | rfl | | |
| (simp only [inner_sub_right,inner_sub_left,inner_smul_right,inner_smul_left,starRingEnd_apply,star_trivial,hA]; ring) | |
| lemma weighted_wronskian_constant {A : β β E βL[β] E} {b : β β β} | |
| (hb : Continuous b) (hA : β t x y, βͺA t x,yβ«_β = βͺx,A t yβ«_β) | |
| {u v p q : β β E} | |
| (hu : β t, HasDerivAt u (v t) t) (hv : β t, HasDerivAt v (A t (u t)-b t β’ v t) t) | |
| (hp : β t, HasDerivAt p (q t) t) (hq : β t, HasDerivAt q (A t (p t)-b t β’ q t) t) | |
| {l : β} (hvi : v 0 = l β’ u 0) (hqi : q 0 = l β’ p 0) (t : β) : | |
| βͺu t,q tβ«_β = βͺv t,p tβ«_β := by | |
| have hc := is_const_of_deriv_eq_zero (fun s => | |
| (weighted_wronskian_deriv hb (hA s) (hu s) (hv s) (hp s) (hq s)).differentiableAt) | |
| (fun s => (weighted_wronskian_deriv hb (hA s) (hu s) (hv s) (hp s) (hq s)).deriv) | |
| have he := hc t 0 | |
| rw [hvi,hqi,inner_smul_right,inner_smul_left,starRingEnd_apply,star_trivial,sub_self,mul_zero] at he | |
| exact sub_eq_zero.mp ((mul_eq_zero.mp he).resolve_left (integratingWeight_pos b t).ne') | |
| variable [CompleteSpace E] | |
| lemma regular_wronskian_zero {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAs : β t x y, βͺA t x,yβ«_β = βͺx,A t yβ«_β) | |
| (l : β) (x y : E) (t : β) : | |
| βͺvalue A b l x t,velocity A b l y tβ«_β = | |
| βͺvelocity A b l x t,value A b l y tβ«_β := by | |
| exact weighted_wronskian_constant (l := l) hb hAs | |
| (value_deriv hA hb hMA hMb hAn hbn l x) (velocity_deriv hA hb hMA hMb hAn hbn l x) | |
| (value_deriv hA hb hMA hMb hAn hbn l y) (velocity_deriv hA hb hMA hMb hAn hbn l y) | |
| (by simp only [velocity_initial,value_initial]) (by simp only [velocity_initial,value_initial]) t | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] | |
| /-- Left composition lifts a bounded coefficient to the Banach space of operators. -/ | |
| def leftAction (A : β β E βL[β] E) (t : β) : (E βL[β] E) βL[β] (E βL[β] E) := | |
| ContinuousLinearMap.compL β E E E (A t) | |
| lemma leftAction_continuous {A : β β E βL[β] E} (hA : Continuous A) : Continuous (leftAction A) := | |
| (ContinuousLinearMap.compL β E E E).continuous.comp hA | |
| lemma leftAction_smooth {A : β β E βL[β] E} (hA : ContDiff β β A) : ContDiff β β (leftAction A) := | |
| (ContinuousLinearMap.compL β E E E).contDiff.comp hA | |
| lemma leftAction_norm_le (A : β β E βL[β] E) (t : β) : βleftAction A tβ β€ βA tβ := by | |
| apply le_trans ((ContinuousLinearMap.compL β E E E).le_opNorm (A t)) | |
| exact (mul_le_mul_of_nonneg_right (ContinuousLinearMap.norm_compL_le β E E E) (norm_nonneg _)).trans_eq (one_mul _) | |
| variable [CompleteSpace E] | |
| def operatorValue (A : β β E βL[β] E) (b : β β β) (l : β) (t : β) : E βL[β] E := | |
| value (leftAction A) b l (ContinuousLinearMap.id β E) t | |
| def operatorVelocity (A : β β E βL[β] E) (b : β β β) (l : β) (t : β) : E βL[β] E := | |
| velocity (leftAction A) b l (ContinuousLinearMap.id β E) t | |
| lemma operatorValue_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l t : β) : | |
| HasDerivAt (operatorValue A b l) (operatorVelocity A b l t) t := | |
| value_deriv (leftAction_continuous hA) hb hMA hMb | |
| (fun t => (leftAction_norm_le A t).trans (hAn t)) hbn l (ContinuousLinearMap.id β E) t | |
| lemma operatorVelocity_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l t : β) : | |
| HasDerivAt (operatorVelocity A b l) | |
| (A t * operatorValue A b l t - b t β’ operatorVelocity A b l t) t := | |
| velocity_deriv (leftAction_continuous hA) hb hMA hMb | |
| (fun t => (leftAction_norm_le A t).trans (hAn t)) hbn l (ContinuousLinearMap.id β E) t | |
| lemma operatorValue_smooth {A : β β E βL[β] E} {b : β β β} | |
| (hA : ContDiff β β A) (hb : ContDiff β β b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) : | |
| ContDiff β β (operatorValue A b l) := | |
| value_smooth (leftAction_smooth hA) hb hMA hMb | |
| (fun t => (leftAction_norm_le A t).trans (hAn t)) hbn l (ContinuousLinearMap.id β E) | |
| lemma operatorValue_apply_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (s : β) : | |
| HasDerivAt (fun s => operatorValue A b l s x) (operatorVelocity A b l s x) s := by | |
| simpa only [add_zero,map_zero] using | |
| (operatorValue_deriv hA hb hMA hMb hAn hbn l s).clm_apply (hasDerivAt_const s x) | |
| lemma operatorVelocity_apply_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (s : β) : | |
| HasDerivAt (fun s => operatorVelocity A b l s x) | |
| (A s (operatorValue A b l s x)-b s β’ operatorVelocity A b l s x) s := by | |
| simpa only [add_zero,map_zero,sub_apply,smul_apply,mul_apply_eq_comp] using | |
| (operatorVelocity_deriv hA hb hMA hMb hAn hbn l s).clm_apply (hasDerivAt_const s x) | |
| lemma operatorPhase_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (s : β) : | |
| HasDerivAt (fun s => (operatorValue A b l s x,operatorVelocity A b l s x)) | |
| (block A b s (operatorValue A b l s x,operatorVelocity A b l s x)) s := by | |
| exact (operatorValue_apply_deriv hA hb hMA hMb hAn hbn l x s).prodMk | |
| (operatorVelocity_apply_deriv hA hb hMA hMb hAn hbn l x s) | |
| omit [CompleteSpace E] in | |
| lemma operatorPhase_initial (A : β β E βL[β] E) (b : β β β) (l : β) (x : E) : | |
| (operatorValue A b l 0 x,operatorVelocity A b l 0 x) = (x,l β’ x) := by | |
| simp only [operatorValue,operatorVelocity,value_initial,velocity_initial, | |
| ContinuousLinearMap.id_apply,smul_apply] | |
| lemma operatorPhase_apply {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (t : β) : | |
| (operatorValue A b l t x,operatorVelocity A b l t x) = phase A b l x t := by | |
| have hh : (fun t => (operatorValue A b l t x,operatorVelocity A b l t x)) = | |
| flow (block A b) (x,l β’ x) := | |
| solution_unique (E := EΓE) (A := block A b) | |
| (f := fun t => (operatorValue A b l t x,operatorVelocity A b l t x)) | |
| (g := flow (block A b) (x,l β’ x)) (by positivity : 0 β€ 1+MA+Mb) (block_bound hMA hMb hAn hbn) | |
| (operatorPhase_deriv hA hb hMA hMb hAn hbn l x) | |
| (flow_hasDerivAt (block_continuous hA hb) (by positivity : 0 β€ 1+MA+Mb) | |
| (block_bound hMA hMb hAn hbn) (x,l β’ x)) | |
| (tβ := 0) (by rw [flow_initial]; exact operatorPhase_initial A b l x) | |
| exact congrFun hh t | |
| lemma operatorValue_apply {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (t : β) : | |
| operatorValue A b l t x = value A b l x t := | |
| congrArg Prod.fst (operatorPhase_apply hA hb hMA hMb hAn hbn l x t) | |
| lemma operatorVelocity_apply {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l : β) (x : E) (t : β) : | |
| operatorVelocity A b l t x = velocity A b l x t := | |
| congrArg Prod.snd (operatorPhase_apply hA hb hMA hMb hAn hbn l x t) | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| open scoped InnerProductSpace | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [CompleteSpace E] | |
| /-- The logarithmic derivative of the actual center-regular value operator. -/ | |
| def slope (A : β β E βL[β] E) (b : β β β) (l t : β) : E βL[β] E := | |
| operatorVelocity A b l t * Ring.inverse (operatorValue A b l t) | |
| lemma operatorValue_isUnit [FiniteDimensional β E] | |
| {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {l : β} (hl : 0 < l) | |
| {t : β} (ht : 0 β€ t) : IsUnit (operatorValue A b l t) := by | |
| have hi : Function.Injective (operatorValue A b l t) := by | |
| intro x y hxy | |
| apply value_injective_of_nonnegative hA hb hMA hMb hAn hbn hAp hl ht | |
| simpa only [operatorValue_apply hA hb hMA hMb hAn hbn] using hxy | |
| exact ContinuousLinearMap.isUnit_iff_bijective.2 | |
| β¨hi, LinearMap.surjective_of_injective hiβ© | |
| omit [CompleteSpace E] in | |
| lemma slope_value {A : β β E βL[β] E} {b : β β β} {l t : β} | |
| (hV : IsUnit (operatorValue A b l t)) (x : E) : | |
| slope A b l t (operatorValue A b l t x) = operatorVelocity A b l t x := by | |
| change ((operatorVelocity A b l t * Ring.inverse (operatorValue A b l t)) * | |
| operatorValue A b l t) x = _ | |
| rw [mul_assoc,Ring.inverse_mul_cancel _ hV,mul_one] | |
| omit [CompleteSpace E] in | |
| lemma slope_initial (A : β β E βL[β] E) (b : β β β) (l : β) : | |
| slope A b l 0 = l β’ (1 : E βL[β] E) := by | |
| simp only [slope,operatorValue,operatorVelocity,value_initial,velocity_initial] | |
| change (l β’ (1 : E βL[β] E)) * Ring.inverse 1 = _ | |
| simp | |
| lemma slope_symmetric {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAs : β t x y, βͺA t x,yβ«_β = βͺx,A t yβ«_β) (l t : β) | |
| (hV : IsUnit (operatorValue A b l t)) : (slope A b l t).IsSymmetric := by | |
| intro x y | |
| obtain β¨u,rflβ© := (ContinuousLinearMap.isUnit_iff_bijective.1 hV).2 x | |
| obtain β¨v,rflβ© := (ContinuousLinearMap.isUnit_iff_bijective.1 hV).2 y | |
| change βͺslope A b l t (operatorValue A b l t u),operatorValue A b l t vβ«_β = | |
| βͺoperatorValue A b l t u,slope A b l t (operatorValue A b l t v)β«_β | |
| rw [slope_value hV,slope_value hV] | |
| simp only [operatorValue_apply hA hb hMA hMb hAn hbn, | |
| operatorVelocity_apply hA hb hMA hMb hAn hbn] | |
| exact (regular_wronskian_zero hA hb hMA hMb hAn hbn hAs l u v t).symm | |
| lemma slope_nonnegative {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) | |
| (hAp : β t v, 0 β€ βͺv,A t vβ«_β) {l t : β} (hl : 0 < l) (ht : 0 β€ t) | |
| (hV : IsUnit (operatorValue A b l t)) (x : E) : 0 β€ βͺx,slope A b l t xβ«_β := by | |
| obtain β¨u,rflβ© := (ContinuousLinearMap.isUnit_iff_bijective.1 hV).2 x | |
| rw [slope_value hV] | |
| simp only [operatorValue_apply hA hb hMA hMb hAn hbn, | |
| operatorVelocity_apply hA hb hMA hMb hAn hbn] | |
| by_cases hu : u = 0 | |
| Β· subst u | |
| have hv := (value_linear hA hb hMA hMb hAn hbn l t).mk'.map_zero | |
| change value A b l 0 t = 0 at hv | |
| rw [hv,inner_zero_left] | |
| Β· exact (regular_pairing_positive hb hAp | |
| (value_deriv hA hb hMA hMb hAn hbn l u) | |
| (velocity_deriv hA hb hMA hMb hAn hbn l u) hl | |
| (by simp only [value_initial,velocity_initial]) | |
| (by simpa only [value_initial] using hu) ht).le | |
| lemma clm_inverse_deriv {V : β β E βL[β] E} {W : E βL[β] E} {t : β} | |
| (hV : IsUnit (V t)) (hD : HasDerivAt V W t) : | |
| HasDerivAt (fun s => Ring.inverse (V s)) | |
| (-(Ring.inverse (V t) * W * Ring.inverse (V t))) t := by | |
| obtain β¨v,hvβ© := hV | |
| have hf : HasFDerivAt Ring.inverse | |
| (-ContinuousLinearMap.mulLeftRight β (E βL[β] E) (βvβ»ΒΉ) (βvβ»ΒΉ)) (V t) := | |
| hv βΈ hasFDerivAt_ringInverse (π := β) v | |
| have hd := hf.comp_hasDerivAt t hD | |
| simpa only [Function.comp_def,neg_apply, | |
| ContinuousLinearMap.mulLeftRight_apply,β hv,Ring.inverse_unit] using hd | |
| lemma slope_deriv {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t, βA tβ β€ MA) (hbn : β t, |b t| β€ Mb) (l t : β) | |
| (hV : IsUnit (operatorValue A b l t)) : | |
| HasDerivAt (slope A b l) | |
| (A t - b t β’ slope A b l t - slope A b l t * slope A b l t) t := by | |
| have hd := (operatorVelocity_deriv hA hb hMA hMb hAn hbn l t).mul | |
| (clm_inverse_deriv hV (operatorValue_deriv hA hb hMA hMb hAn hbn l t)) | |
| have he : (A t * operatorValue A b l t - b t β’ operatorVelocity A b l t) * | |
| Ring.inverse (operatorValue A b l t) + operatorVelocity A b l t * | |
| -(Ring.inverse (operatorValue A b l t) * operatorVelocity A b l t * | |
| Ring.inverse (operatorValue A b l t)) = | |
| A t - b t β’ slope A b l t - slope A b l t * slope A b l t := by | |
| rw [sub_mul,smul_mul_assoc,mul_assoc,Ring.mul_inverse_cancel _ hV,mul_one] | |
| simp only [slope,mul_neg,mul_assoc,sub_eq_add_neg] | |
| exact he βΈ hd | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| open Set | |
| /-- A genuine integrating-factor comparison on the half-line. -/ | |
| lemma integrating_factor_nonnegative (p f f' : β β β) (hp : Continuous p) | |
| (hf : β t,HasDerivAt f (f' t) t) (h0 : 0 β€ f 0) | |
| (hineq : β t,0 β€ t β 0 β€ f' t+p t*f t) {t : β} (ht : 0 β€ t) : 0 β€ f t := by | |
| let Q := fun s => β« u in (0:β)..s,p u | |
| have hQ (s : β) : HasDerivAt Q (p s) s := | |
| intervalIntegral.integral_hasDerivAt_right (hp.intervalIntegrable 0 s) | |
| hp.stronglyMeasurable.stronglyMeasurableAtFilter hp.continuousAt | |
| have hd (s : β) : HasDerivAt (fun u => f u*Real.exp (Q u)) | |
| ((f' s+p s*f s)*Real.exp (Q s)) s := by | |
| apply ((hf s).mul (hQ s).exp).congr_deriv | |
| ring | |
| have hm : MonotoneOn (fun u => f u*Real.exp (Q u)) (Ici 0) := | |
| monotoneOn_of_hasDerivWithinAt_nonneg (convex_Ici 0) | |
| (continuous_iff_continuousAt.2 (fun s => (hd s).continuousAt)).continuousOn | |
| (fun s _ => (hd s).hasDerivWithinAt) | |
| (fun s hs => mul_nonneg (hineq s (interior_subset hs)) (Real.exp_pos _).le) | |
| have h := hm (show (0:β) β Ici 0 by simp) ht ht | |
| have hQ0 : Q 0=0 := by simp [Q] | |
| change f 0*Real.exp (Q 0) β€ f t*Real.exp (Q t) at h | |
| rw [hQ0,Real.exp_zero,mul_one] at h | |
| exact nonneg_of_mul_nonneg_left (h0.trans h) (Real.exp_pos _) | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] | |
| local notation "βͺ" x ", " y "β«" => inner β x y | |
| /-- Energy comparison proves the lower Riccati barrier directly for actual | |
| second-order solutions, without presupposing a global Riccati solution. -/ | |
| lemma solution_energy_lower (A : β β E βL[β] E) (b : β β β) | |
| (y v : β β E) (hb : Continuous b) (hy : β t,HasDerivAt y (v t) t) | |
| (hv : β t,HasDerivAt v (A t (y t)-b t β’ v t) t) (c : β) | |
| (h0 : c*βͺy 0,y 0β« β€ βͺy 0,v 0β«) | |
| (hA : β t,0 β€ t β β z, (b t*c+c^2)*βͺz,zβ« β€ βͺz,A t zβ«) | |
| {t : β} (ht : 0 β€ t) : c*βͺy t,y tβ« β€ βͺy t,v tβ« := by | |
| let F := fun s => βͺy s,v sβ«-c*βͺy s,y sβ« | |
| let F' := fun s => βͺy s,A s (y s)-b s β’ v sβ«+βͺv s,v sβ«- | |
| c*(βͺy s,v sβ«+βͺv s,y sβ«) | |
| have hd (s : β) : HasDerivAt F (F' s) s := | |
| ((hy s).inner β (hv s)).sub (((hy s).inner β (hy s)).const_mul c) | |
| have he (s : β) : F' s+b s*F s = | |
| βͺv s-c β’ y s,v s-c β’ y sβ«+βͺy s,A s (y s)β«- | |
| (b s*c+c^2)*βͺy s,y sβ« := by | |
| dsimp [F,F'] | |
| simp only [inner_sub_left,inner_sub_right,inner_smul_left,inner_smul_right, | |
| conj_trivial,real_inner_comm (v s) (y s)] | |
| ring | |
| have hp := integrating_factor_nonnegative b F F' hb hd (sub_nonneg.2 h0) | |
| (fun s hs => by rw [he]; linarith [show 0 β€ βͺv s-c β’ y s,v s-c β’ y sβ« by rw [real_inner_self_eq_norm_sq]; positivity,hA s hs (y s)]) ht | |
| exact sub_nonneg.1 hp | |
| /-- Value vectors cannot vanish: the center-regular norm is nondecreasing. -/ | |
| lemma solution_norm_lower (A : β β E βL[β] E) (b : β β β) | |
| (y v : β β E) (hb : Continuous b) (hy : β t,HasDerivAt y (v t) t) | |
| (hv : β t,HasDerivAt v (A t (y t)-b t β’ v t) t) | |
| (h0 : 0 β€ βͺy 0,v 0β«) | |
| (hA : β t,0 β€ t β β z,0 β€ βͺz,A t zβ«) | |
| {t : β} (ht : 0 β€ t) : βy 0β β€ βy tβ := by | |
| have hp (s : β) (hs : 0 β€ s) : 0 β€ βͺy s,v sβ« := by | |
| simpa using solution_energy_lower A b y v hb hy hv 0 (by simpa using h0) | |
| (by simpa using hA) hs | |
| have hd (s : β) : HasDerivAt (fun u => βͺy u,y uβ«) (2*βͺy s,v sβ«) s := by | |
| apply ((hy s).inner β (hy s)).congr_deriv | |
| rw [real_inner_comm (v s) (y s)]; ring | |
| have hm := monotoneOn_of_hasDerivWithinAt_nonneg (convex_Ici (0:β)) | |
| (continuous_iff_continuousAt.2 (fun s => (hd s).continuousAt)).continuousOn | |
| (fun s _ => (hd s).hasDerivWithinAt) | |
| (fun s hs => mul_nonneg (by norm_num) (hp s (interior_subset hs))) | |
| have h := hm (show (0:β) β Ici 0 by simp) ht ht | |
| change βͺy 0,y 0β« β€ βͺy t,y tβ« at h | |
| rw [real_inner_self_eq_norm_sq,real_inner_self_eq_norm_sq] at h | |
| nlinarith [norm_nonneg (y 0),norm_nonneg (y t)] | |
| variable [CompleteSpace E] | |
| /-- Actual center-regular value flow is norm-expanding for all nonnegative times. -/ | |
| theorem value_norm_lower {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t,βA tβ β€ MA) (hbn : β t,|b t| β€ Mb) | |
| {l : β} (hl : 0 β€ l) (hpos : β t,0 β€ t β β z,0 β€ βͺz,A t zβ«) | |
| (x : E) {t : β} (ht : 0 β€ t) : βxβ β€ βvalue A b l x tβ := by | |
| have hi : 0 β€ βͺvalue A b l x 0,velocity A b l x 0β« := by | |
| rw [value_initial,velocity_initial,inner_smul_right] | |
| rw [real_inner_self_eq_norm_sq] | |
| exact mul_nonneg hl (sq_nonneg _) | |
| simpa only [value_initial] using solution_norm_lower A b (value A b l x) (velocity A b l x) | |
| hb (value_deriv hA hb hMA hMb hAn hbn l x) | |
| (velocity_deriv hA hb hMA hMb hAn hbn l x) hi hpos ht | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| noncomputable section | |
| open Filter MeasureTheory | |
| open scoped BigOperators Topology ENNReal ContDiff | |
| open scoped Topology | |
| open scoped Topology | |
| open scoped Topology BigOperators ContDiff InnerProductSpace | |
| open Filter MeasureTheory Set | |
| namespace HarmonicCounterexample.LinearODE | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] [CompleteSpace E] | |
| open scoped RealInnerProductSpace | |
| /-- Uniform strictly positive lower barrier for the already constructed ACTUAL | |
| center-regular global Riccati slope. No Riccati existence is an assumption. -/ | |
| theorem slope_quadratic_lower {A : β β E βL[β] E} {b : β β β} | |
| (hA : Continuous A) (hb : Continuous b) {MA Mb : β} | |
| (hMA : 0 β€ MA) (hMb : 0 β€ Mb) | |
| (hAn : β t,βA tβ β€ MA) (hbn : β t,|b t| β€ Mb) | |
| {l c t : β} (hc : c β€ l) (ht : 0 β€ t) | |
| (hpos : β s,0 β€ s β β z,(b s*c+c^2)*(inner β z z) β€ (inner β z (A s z))) | |
| (hV : IsUnit (operatorValue A b l t)) (x : E) : | |
| c*βxβ^2 β€ (inner β x (slope A b l t x)) := by | |
| obtain β¨u,rflβ© := (ContinuousLinearMap.isUnit_iff_bijective.1 hV).2 x | |
| rw [slope_value hV] | |
| simp only [operatorValue_apply hA hb hMA hMb hAn hbn, | |
| operatorVelocity_apply hA hb hMA hMb hAn hbn] | |
| have hi : c*(inner β (value A b l u 0) (value A b l u 0)) β€ | |
| (inner β (value A b l u 0) (velocity A b l u 0)) := by | |
| rw [value_initial,velocity_initial,inner_smul_right,real_inner_self_eq_norm_sq] | |
| exact mul_le_mul_of_nonneg_right hc (sq_nonneg _) | |
| simpa only [real_inner_self_eq_norm_sq] using | |
| solution_energy_lower A b (value A b l u) (velocity A b l u) hb | |
| (value_deriv hA hb hMA hMb hAn hbn l u) | |
| (velocity_deriv hA hb hMA hMb hAn hbn l u) c hi hpos ht | |
| end HarmonicCounterexample.LinearODE | |
| end | |
| end OAI | |