Buckets:
| import OAI.Analysis.LienardCycles.PolynomialModel | |
| namespace OAI | |
| open Set Filter MeasureTheory | |
| open Set Filter Metric | |
| open scoped Topology NNReal ContDiff Manifold | |
| open Filter Set | |
| open Set Filter Metric MeasureTheory | |
| open scoped Topology NNReal ContDiff | |
| open Set Filter | |
| open scoped Topology ContDiff | |
| open Set Filter | |
| open scoped Topology ContDiff | |
| namespace QuinticLienard.ArchVariation | |
| open PartialCalculus | |
| lemma fixed_profile_variation {w : ℝ × ℝ → ℝ} {φ : ℝ → ℝ} {t y : ℝ} | |
| (hw : ContDiffAt ℝ ω w (t,y)) (hφ : DifferentiableAt ℝ φ (w (t,y))) | |
| (he : ∀ᶠ q in 𝓝 (t,y), HasDerivAt (fun s => w (q.1,s)) (φ (w q)-q.2) q.2) : | |
| HasDerivAt (fun s => first w (t,s)) (deriv φ (w (t,y))*first w (t,y)) y := by | |
| let Φ : ℝ × ℝ → ℝ := fun q => φ q.2 | |
| have hd : DifferentiableAt ℝ Φ (t,w (t,y)) := hφ.comp (t,w (t,y)) differentiableAt_snd | |
| have h₁ : first Φ (t,w (t,y)) = 0 := | |
| (first_hasDerivAt hd).unique (hasDerivAt_const t (φ (w (t,y)))) | |
| have h₂ : second Φ (t,w (t,y)) = deriv φ (w (t,y)) := | |
| (second_hasDerivAt hd).unique hφ.hasDerivAt | |
| simpa only [h₁,h₂,zero_add] using scalar_ode_variation hw hd he | |
| lemma moving_peak_variation {w : ℝ × ℝ → ℝ} {φ : ℝ → ℝ} {t : ℝ} | |
| (hw : ContDiffAt ℝ ω w (t,φ t)) (hφ : DifferentiableAt ℝ φ t) | |
| (hp : ∀ᶠ s in 𝓝 t, w (s,φ s) = s) | |
| (he : HasDerivAt (fun y => w (t,y)) 0 (φ t)) : first w (t,φ t) = 1 := by | |
| have hs : second w (t,φ t) = 0 := | |
| (second_hasDerivAt (hw.differentiableAt (by simp))).unique he | |
| have hd := (hw.differentiableAt (by simp)).hasFDerivAt.comp_hasDerivAt t | |
| ((hasDerivAt_id t).prodMk hφ.hasDerivAt) | |
| have heq := hd.unique ((hasDerivAt_id t).congr_of_eventuallyEq hp) | |
| simpa only [fderiv_pair,hs,mul_zero,one_mul,add_zero] using heq | |
| theorem positive_homogeneous {f a : ℝ → ℝ} {l r c : ℝ} | |
| (ha : Continuous a) (hf : ContinuousOn f (Icc l r)) | |
| (hd : ∀ y ∈ Icc l r, HasDerivAt f (a y*f y) y) | |
| (hc : c ∈ Icc l r) (hinit : f c = 1) : | |
| ∀ y ∈ Icc l r, f y = Real.exp (∫ s in c..y, a s) := by | |
| let g : ℝ → ℝ := fun y => Real.exp (-(∫ s in c..y, a s))*f y | |
| have hg (y : ℝ) (hy : y ∈ Icc l r) : HasDerivAt g 0 y := by | |
| have hh := ((ha.integral_hasStrictDerivAt c y).hasDerivAt.neg.exp).mul (hd y hy) | |
| convert hh using 1; (first | rfl | (dsimp; ring)) | |
| have hgc : ContinuousOn g (Icc l r) := | |
| ((continuous_iff_continuousAt.mpr (fun y => | |
| ((ha.integral_hasStrictDerivAt c y).hasDerivAt.neg.exp).continuousAt)).continuousOn).mul hf | |
| have heq := eq_of_hasDerivAt_eq_on_Icc hgc continuousOn_const hg | |
| (fun y _ => hasDerivAt_const y (1:ℝ)) hc (by simp [g,hinit]) | |
| intro y hy | |
| have h := heq hy | |
| change Real.exp (-(∫ s in c..y, a s))*f y=1 at h | |
| have he : Real.exp (∫ s in c..y, a s)*Real.exp (-(∫ s in c..y, a s))=1 := by | |
| rw [←Real.exp_add,add_neg_cancel,Real.exp_zero] | |
| calc | |
| f y = (Real.exp (∫ s in c..y, a s)*Real.exp (-(∫ s in c..y, a s)))*f y := by rw [he,one_mul] | |
| _ = Real.exp (∫ s in c..y, a s) := by rw [mul_assoc,h,mul_one] | |
| lemma hit_variation {w : ℝ × ℝ → ℝ} {Y h : ℝ → ℝ} {t d : ℝ} | |
| (hw : DifferentiableAt ℝ w (t,Y t)) (hY : DifferentiableAt ℝ Y t) | |
| (hh : HasDerivAt h d t) (he : ∀ᶠ s in 𝓝 t, w (s,Y s) = h s) : | |
| first w (t,Y t) + deriv Y t*second w (t,Y t) = d := by | |
| have hd := hw.hasFDerivAt.comp_hasDerivAt t ((hasDerivAt_id t).prodMk hY.hasDerivAt) | |
| have hq := hd.unique (hh.congr_of_eventuallyEq he) | |
| simpa only [fderiv_pair,one_mul] using hq | |
| theorem peak_derivative_positive {w : ℝ × ℝ → ℝ} {φ : ℝ → ℝ} | |
| {t a b : ℝ} (hφ : ContDiff ℝ 1 φ) | |
| (hwc : Continuous (fun y => w (t,y))) | |
| (hw : ∀ y ∈ Icc a b, ContDiffAt ℝ ω w (t,y)) | |
| (he : ∀ y ∈ Icc a b, ∀ᶠ q in 𝓝 (t,y), | |
| HasDerivAt (fun s => w (q.1,s)) (φ (w q)-q.2) q.2) | |
| (hp : ∀ᶠ s in 𝓝 t, w (s,φ s) = s) | |
| (hc : φ t ∈ Icc a b) : ∀ y ∈ Icc a b, 0 < first w (t,y) := by | |
| have hφd := hφ.differentiable (by norm_num) | |
| have init : first w (t,φ t) = 1 := by | |
| apply moving_peak_variation (hw _ hc) (hφd t) hp | |
| have hd := (he _ hc).self_of_nhds | |
| simpa only [hp.self_of_nhds,sub_self] using hd | |
| have hcoeff : Continuous (fun y => deriv φ (w (t,y))) := | |
| (hφ.continuous_deriv (by norm_num)).comp hwc | |
| have hfirst : ContinuousOn (fun y => first w (t,y)) (Icc a b) := by | |
| intro y hy | |
| exact (((first_contDiffAt (hw y hy)).continuousAt).comp | |
| (continuousAt_const.prodMk continuousAt_id)).continuousWithinAt | |
| have hd := positive_homogeneous hcoeff hfirst | |
| (fun y hy => fixed_profile_variation (hw y hy) (hφd _) (he y hy)) hc init | |
| intro y hy | |
| rw [hd y hy] | |
| exact Real.exp_pos _ | |
| theorem endpoint_peak_signs {w : ℝ × ℝ → ℝ} {φ : ℝ → ℝ} | |
| {l r : ℝ → ℝ} {t h : ℝ} | |
| (hl : DifferentiableAt ℝ l t) (hr : DifferentiableAt ℝ r t) | |
| (hwl : DifferentiableAt ℝ w (t,l t)) (hwr : DifferentiableAt ℝ w (t,r t)) | |
| (hel : ∀ᶠ s in 𝓝 t, w (s,l s) = h) (her : ∀ᶠ s in 𝓝 t, w (s,r s) = h) | |
| (hdl : HasDerivAt (fun y => w (t,y)) (φ h-l t) (l t)) | |
| (hdr : HasDerivAt (fun y => w (t,y)) (φ h-r t) (r t)) | |
| (hxl : 0 < first w (t,l t)) (hxr : 0 < first w (t,r t)) | |
| (hlt : l t < φ h) (htr : φ h < r t) : deriv l t < 0 ∧ 0 < deriv r t := by | |
| have hlv := hit_variation hwl hl (hasDerivAt_const t h) hel | |
| have hrv := hit_variation hwr hr (hasDerivAt_const t h) her | |
| rw [(second_hasDerivAt hwl).unique hdl] at hlv | |
| rw [(second_hasDerivAt hwr).unique hdr] at hrv | |
| constructor | |
| · by_contra hn | |
| have hnon := mul_nonneg (le_of_not_gt hn) (sub_nonneg.mpr hlt.le) | |
| linarith | |
| · by_contra hn | |
| have hnon := mul_nonneg_of_nonpos_of_nonpos (le_of_not_gt hn) (sub_nonpos.mpr htr.le) | |
| linarith | |
| lemma width_midpoint_peak_bounds {l r : ℝ → ℝ} {t : ℝ} | |
| (hl : DifferentiableAt ℝ l t) (hr : DifferentiableAt ℝ r t) | |
| (hlneg : deriv l t < 0) (hrpos : 0 < deriv r t) : | |
| 0 < deriv (fun s => (r s-l s)/2) t ∧ | |
| |deriv (fun s => (r s+l s)/2) t / deriv (fun s => (r s-l s)/2) t| < 1 := by | |
| have hd₁ : HasDerivAt (fun s => (r s-l s)/2) ((deriv r t-deriv l t)/2) t := | |
| (hr.hasDerivAt.sub hl.hasDerivAt).div_const 2 | |
| have hd₂ : HasDerivAt (fun s => (r s+l s)/2) ((deriv r t+deriv l t)/2) t := | |
| (hr.hasDerivAt.add hl.hasDerivAt).div_const 2 | |
| rw [hd₁.deriv,hd₂.deriv] | |
| have hd : 0 < (deriv r t-deriv l t)/2 := by linarith | |
| refine ⟨hd,?_⟩ | |
| rw [abs_lt] | |
| constructor | |
| · rw [lt_div_iff₀ hd]; linarith | |
| · rw [div_lt_iff₀ hd]; linarith | |
| end QuinticLienard.ArchVariation | |
| end OAI | |
Xet Storage Details
- Size:
- 6.64 kB
- Xet hash:
- 1ba13b135a2860da7fc692ea5bbd291d67abcbc905438136d1b2dea18ac83661
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.