import OAI.Dynamics.StandardMap.EntropyEndpoint import OAI.Dynamics.StandardMap.Stable.SmoothRemainder namespace OAI section section namespace StandardMapEntropy.NonlinearStable open Filter open scoped Topology NNReal noncomputable def unitClip (x : ℝ) : ℝ := max (min x 1) (-1) lemma abs_unitClip_le (x : ℝ) : |unitClip x|≤1 := by rw [abs_le] exact ⟨le_max_right _ _,max_le (min_le_right _ _) (by norm_num)⟩ lemma unitClip_eq {x : ℝ} (hx : |x|≤1) : unitClip x=x := by rw [abs_le] at hx simp only [unitClip,min_eq_left hx.2,max_eq_left hx.1] lemma unitClip_lipschitz : LipschitzWith 1 unitClip := (LipschitzWith.id.min_const 1).max_const (-1) noncomputable def planeClip (v : Plane) : Plane := (unitClip v.1,unitClip v.2) lemma norm_planeClip_le (v : Plane) : ‖planeClip v‖≤1 := max_le (abs_unitClip_le _) (abs_unitClip_le _) lemma planeClip_eq {v : Plane} (hv : ‖v‖≤1) : planeClip v=v := by exact Prod.ext (unitClip_eq ((norm_fst_le v).trans hv)) (unitClip_eq ((norm_snd_le v).trans hv)) @[simp] lemma planeClip_zero : planeClip 0=0 := planeClip_eq (by simp) lemma planeClip_lipschitz : LipschitzWith 1 planeClip := by apply LipschitzWith.of_dist_le_mul intro v w simp only [NNReal.coe_one,one_mul,Prod.dist_eq,planeClip] have h1 := unitClip_lipschitz.dist_le_mul v.1 w.1 have h2 := unitClip_lipschitz.dist_le_mul v.2 w.2 simp only [NNReal.coe_one,one_mul] at h1 h2 exact max_le_max h1 h2 structure LocalRecurrence (ℓ δ : ℝ≥0) where a : ℕ → ℝ b : ℕ → ℝ remainder : ℕ → Plane → Plane stable_bound : ∀ n, |a n|≤ℓ inverse_bound : ∀ n, |(b n)⁻¹|≤ℓ b_ne : ∀ n, b n≠0 local_lipschitz : ∀ n v w, ‖v‖≤1 → ‖w‖≤1 → ‖remainder n v-remainder n w‖≤(δ : ℝ)*‖v-w‖ zero : ∀ n, remainder n 0=0 variable {ℓ δ : ℝ≥0} def LocalRecurrence.step (r : LocalRecurrence ℓ δ) (n : ℕ) (v : Plane) : Plane := (r.a n*v.1+(r.remainder n v).1,r.b n*v.2+(r.remainder n v).2) noncomputable def LocalRecurrence.extend (r : LocalRecurrence ℓ δ) : Recurrence ℓ δ where a := r.a b := r.b remainder n v := r.remainder n (planeClip v) stable_bound := r.stable_bound inverse_bound := r.inverse_bound b_ne := r.b_ne lipschitz n := LipschitzWith.of_dist_le_mul fun v w => by have hh := r.local_lipschitz n (planeClip v) (planeClip w) (norm_planeClip_le v) (norm_planeClip_le w) have he := planeClip_lipschitz.dist_le_mul v w simp only [dist_eq_norm,NNReal.coe_one,one_mul] at he ⊢ exact hh.trans (mul_le_mul_of_nonneg_left he δ.coe_nonneg) zero n := by rw [planeClip_zero,r.zero] lemma extend_step_eq (r : LocalRecurrence ℓ δ) (n : ℕ) {v : Plane} (hv : ‖v‖≤1) : r.extend.step n v=r.step n v := by simp only [LocalRecurrence.extend,Recurrence.step,LocalRecurrence.step,planeClip_eq hv] lemma local_solution_bound (r : LocalRecurrence ℓ δ) (h : ℓ+δ<1) {s : ℝ} (hs : |s|≤1) (n : ℕ) : ‖r.extend.solution h s n‖≤1 := ((r.extend.solution h s).norm_coe_le_norm n).trans ((solution_norm_bound _ h s).trans hs) lemma local_solution_orbit (r : LocalRecurrence ℓ δ) (h : ℓ+δ<1) {s : ℝ} (hs : |s|≤1) (n : ℕ) : r.extend.solution h s (n+1)=r.step n (r.extend.solution h s n) := by rw [solution_orbit,extend_step_eq r n (local_solution_bound r h hs n)] theorem local_stable_graph (r : LocalRecurrence ℓ δ) (h : ℓ+δ<1) : ∃ g : ℝ → ℝ, g 0=0 ∧ LipschitzWith 1 g ∧ ∀ s : ℝ, |s|≤1 → ∃ x : ℕ → Plane, x 0=(s,g s) ∧ (∀ n, x (n+1)=r.step n (x n)) ∧ (∀ n, ‖x n‖≤((ℓ+δ : ℝ≥0) : ℝ)^n*|s|) := by refine ⟨r.extend.graph h,graph_zero _ h,graph_lipschitz _ h,fun s hs => ⟨r.extend.solution h s,Prod.ext (solution_initial _ h s) rfl,local_solution_orbit r h hs,?_⟩⟩ intro n simpa [solution_zero] using solution_exponential_contraction r.extend h s 0 n end StandardMapEntropy.NonlinearStable end section namespace StandardMapEntropy open MeasureTheory Set Filter open scoped Topology NNReal ENNReal noncomputable def hyperbolicChartRate (χ : ℝ) : ℝ := Real.exp (-χ/2) noncomputable def hyperbolicChartError (χ : ℝ) : ℝ := (1-hyperbolicChartRate χ)/2 noncomputable def hyperbolicChartScale (k χ : ℝ) : ℝ := hyperbolicChartError χ/(8*(1+derivativeVariationBound k)*Real.exp χ) lemma hyperbolicChartRate_pos (χ : ℝ) : 0 rfl | succ n ih => rw [Function.iterate_succ_apply',ih,actualLocalRecurrence_lift_step k χ hχ w hw n,←hx n] theorem actual_stable_curve_of_regular (k : ℝ) (χ : ℝ) (hχ : 0<χ) (w : ℂ) (hw : ∀ n : ℕ, RegularChartPoint k χ (complexProjection ((standardLift k)^[n] w))) : ∃ γ : ℝ → ℂ, γ 0=w ∧ Continuous γ ∧ Function.Injective γ ∧ ∀ s t : ℝ, |s|≤1 → |t|≤1 → ∀ n : ℕ, ‖(standardLift k)^[n] (γ s)-(standardLift k)^[n] (γ t)‖≤ (2*hyperbolicChartScale k χ)* (hyperbolicChartRate χ+hyperbolicChartError χ)^n*|s-t| := by let r := actualLocalRecurrence k χ hχ w hw let h := chart_rates_contract hχ let g := r.extend.graph h let γ : ℝ → ℂ := fun s => w+actualChartFrame k χ (complexProjection w) (s,g s) have g0 : g 0=0 := graph_zero r.extend h have gc : Continuous g := (graph_lipschitz r.extend h).continuous have hinit (s : ℝ) : r.extend.solution h s 0=(s,g s) := Prod.ext (solution_initial _ h s) rfl have horbit (s : ℝ) (hs : |s|≤1) (n : ℕ) : (standardLift k)^[n] (γ s)=(standardLift k)^[n] w+ actualChartFrame k χ (complexProjection ((standardLift k)^[n] w)) (r.extend.solution h s n) := by have hh := actual_local_orbit_lift k χ hχ w hw (r.extend.solution h s) (local_solution_orbit r h hs) n simpa only [hinit,γ] using hh refine ⟨γ,?_,?_,?_,?_⟩ · simp only [γ,g0,Prod.mk_zero_zero,map_zero,add_zero] · exact continuous_const.add ((actualChartFrame k χ (complexProjection w)).continuous.comp (continuous_id.prodMk gc)) · intro s t he have he' : actualChartFrame k χ (complexProjection w) (s,g s)= actualChartFrame k χ (complexProjection w) (t,g t) := add_left_cancel he have hp := congrArg (actualChartInverse k χ (complexProjection w)) he' have hw0 : RegularChartPoint k χ (complexProjection w) := by simpa only [Function.iterate_zero, id_eq] using hw 0 rw [actualChartInverse_frame k hχ _ hw0.1,actualChartInverse_frame k hχ _ hw0.1] at hp exact congrArg Prod.fst hp · intro s t hs ht n rw [horbit s hs n,horbit t ht n,add_sub_add_left_eq_sub,←map_sub] have hn : ‖actualChartFrame k χ (complexProjection ((standardLift k)^[n] w))‖≤2*hyperbolicChartScale k χ := (actualChartFrame_norm_le k hχ _).trans (mul_le_mul_of_nonneg_left (chartSize_le_scale k hχ _) (by norm_num)) have hx := solution_exponential_contraction r.extend h s t n calc _ ≤ ‖actualChartFrame k χ (complexProjection ((standardLift k)^[n] w))‖* ‖r.extend.solution h s n-r.extend.solution h t n‖ := ContinuousLinearMap.le_opNorm _ _ _ ≤ (2*hyperbolicChartScale k χ)* (((chartLinearRate χ+chartErrorRate χ hχ : ℝ≥0) : ℝ)^n*|s-t|) := mul_le_mul hn hx (norm_nonneg _) (by linarith [hyperbolicChartScale_pos k hχ]) _ = _ := by change (2*hyperbolicChartScale k χ)*((hyperbolicChartRate χ+hyperbolicChartError χ)^n*|s-t|)=_ ring theorem ae_actual_stable_curve (k : ℝ) (hk : 0≤k) (χ : ℝ) (hχ : 0<χ) : ∀ᵐ z ∂area.restrict (spectralGapRegion k hk χ), ∀ w : ℂ, complexProjection w=z → ∃ γ : ℝ → ℂ, γ 0=w ∧ Continuous γ ∧ Function.Injective γ ∧ ∀ s t : ℝ, |s|≤1 → |t|≤1 → ∀ n : ℕ, ‖(standardLift k)^[n] (γ s)-(standardLift k)^[n] (γ t)‖≤ (2*hyperbolicChartScale k χ)* (hyperbolicChartRate χ+hyperbolicChartError χ)^n*|s-t| := by filter_upwards [ae_regularChartPoint_all_iterates k hk hχ] with z hz intro w hw apply actual_stable_curve_of_regular k χ hχ w intro n simpa only [complexProjection_iterate,hw] using (hz n).1 end StandardMapEntropy end section namespace StandardMapEntropy.NonlinearStable open Filter open scoped Topology NNReal variable {ℓ δ : ℝ≥0} noncomputable def sndSequence (x : Sequence) : BoundedContinuousFunction ℕ ℝ := BoundedContinuousFunction.ofNormedAddCommGroupDiscrete (fun n => (x n).2) ‖x‖ (fun n => (norm_snd_le (x n)).trans (x.norm_coe_le_norm n)) @[simp] lemma sndSequence_apply (x : Sequence) (n : ℕ) : sndSequence x n=(x n).2 := rfl lemma linearRate_lt_one (h : ℓ+δ<1) : (ℓ : ℝ)<1 := by have he : ℓ≤ℓ+δ := le_add_of_nonneg_right (show (0 : ℝ≥0)≤δ from bot_le) exact lt_of_le_of_lt he h lemma solution_snd_bound_of_forcing (r : Recurrence ℓ δ) (h : ℓ+δ<1) (s t : ℝ) {B : ℝ} (hB : 0≤B) (hr : ∀ n, ‖r.remainder n (r.solution h s n)-r.remainder n (r.solution h t n)‖≤B) : ‖sndSequence (r.solution h s)-sndSequence (r.solution h t)‖≤(ℓ : ℝ)*B/(1-(ℓ : ℝ)) := by let U := ‖sndSequence (r.solution h s)-sndSequence (r.solution h t)‖ have hU : 0≤U := norm_nonneg _ have hcon : U≤(ℓ : ℝ)*(U+B) := by apply (BoundedContinuousFunction.norm_le (mul_nonneg ℓ.coe_nonneg (add_nonneg hU hB))).mpr intro n have hs := congrArg (fun x : Sequence => (x n).2) (solution_fixed r h s) have ht := congrArg (fun x : Sequence => (x n).2) (solution_fixed r h t) change (r.b n)⁻¹*((r.solution h s (n+1)).2-(r.remainder n (r.solution h s n)).2)= (r.solution h s n).2 at hs change (r.b n)⁻¹*((r.solution h t (n+1)).2-(r.remainder n (r.solution h t n)).2)= (r.solution h t n).2 at ht change |(r.solution h s n).2-(r.solution h t n).2|≤_ rw [←hs,←ht] have hu : |(r.solution h s (n+1)).2-(r.solution h t (n+1)).2|≤U := (sndSequence (r.solution h s)-sndSequence (r.solution h t)).norm_coe_le_norm (n+1) have hb : |(r.remainder n (r.solution h s n)).2-(r.remainder n (r.solution h t n)).2|≤B := (norm_snd_le _).trans (hr n) calc _ = |(r.b n)⁻¹| * |((r.solution h s (n+1)).2-(r.solution h t (n+1)).2)- ((r.remainder n (r.solution h s n)).2-(r.remainder n (r.solution h t n)).2)| := by rw [←abs_mul]; congr 1; ring _ ≤ |(r.b n)⁻¹| * (|(r.solution h s (n+1)).2-(r.solution h t (n+1)).2|+ |(r.remainder n (r.solution h s n)).2-(r.remainder n (r.solution h t n)).2|) := mul_le_mul_of_nonneg_left (abs_sub _ _) (abs_nonneg _) _ ≤ _ := mul_le_mul (r.inverse_bound n) (add_le_add hu hb) (by positivity) ℓ.coe_nonneg apply (le_div_iff₀ (sub_pos.mpr (linearRate_lt_one h))).mpr dsimp [U] at hcon ⊢ nlinarith lemma graph_slope_bound (r : Recurrence ℓ δ) (h : ℓ+δ<1) (s t : ℝ) : |r.graph h s-r.graph h t|≤((ℓ : ℝ)*(δ : ℝ)/(1-(ℓ : ℝ)))*|s-t| := by have hforce (n : ℕ) : ‖r.remainder n (r.solution h s n)-r.remainder n (r.solution h t n)‖≤ (δ : ℝ)*|s-t| := (remainder_sub_bound r _ _ n).trans (mul_le_mul_of_nonneg_left (solution_lipschitz r h s t) δ.coe_nonneg) have hh := solution_snd_bound_of_forcing r h s t (mul_nonneg δ.coe_nonneg (abs_nonneg _)) hforce have hb := (sndSequence (r.solution h s)-sndSequence (r.solution h t)).norm_coe_le_norm 0 apply hb.trans exact hh.trans_eq (by ring) lemma graph_bound_of_forcing (r : Recurrence ℓ δ) (h : ℓ+δ<1) (s : ℝ) {B : ℝ} (hB : 0≤B) (hr : ∀ n, ‖r.remainder n (r.solution h s n)‖≤B) : |r.graph h s|≤(ℓ : ℝ)*B/(1-(ℓ : ℝ)) := by have hr' (n : ℕ) : ‖r.remainder n (r.solution h s n)-r.remainder n (r.solution h 0 n)‖≤B := by simpa [solution_zero,r.zero] using hr n have hh := solution_snd_bound_of_forcing r h s 0 hB hr' have hb := (sndSequence (r.solution h s)-sndSequence (r.solution h 0)).norm_coe_le_norm 0 have hle := hb.trans hh simpa [Recurrence.graph,solution_zero,sndSequence_apply] using hle lemma local_graph_quadratic_bound (r : LocalRecurrence ℓ δ) (h : ℓ+δ<1) {B : ℝ} (hB : 0≤B) (hr : ∀ n (v : Plane), ‖v‖≤1 → ‖r.remainder n v‖≤B*‖v‖^2) {s : ℝ} (hs : |s|≤1) : |r.extend.graph h s|≤((ℓ : ℝ)*B/(1-(ℓ : ℝ)))*|s|^2 := by have hforce (n : ℕ) : ‖r.extend.remainder n (r.extend.solution h s n)‖≤B*|s|^2 := by change ‖r.remainder n (planeClip (r.extend.solution h s n))‖≤_ rw [planeClip_eq (local_solution_bound r h hs n)] apply (hr n _ (local_solution_bound r h hs n)).trans exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (norm_nonneg _) (((r.extend.solution h s).norm_coe_le_norm n).trans (solution_norm_bound _ h s)) 2) hB exact (graph_bound_of_forcing _ h s (mul_nonneg hB (sq_nonneg _)) hforce).trans_eq (by ring) end StandardMapEntropy.NonlinearStable end end end OAI