Download data/lean/OAI/Geometry/HarmonicGrowth/AngularStream.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 21.7 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HarmonicGrowth/AngularStream.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/HarmonicGrowth/AngularStream.lean
-
curl -L -o AngularStream.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/HarmonicGrowth/AngularStream.lean
21.7 kB
| import OAI.Geometry.HarmonicGrowth.InsertedWord | |
| import OAI.Geometry.HarmonicGrowth.Profiles | |
| namespace OAI | |
| noncomputable section | |
| namespace HarmonicCounterexample.CausalConstruction | |
| open Filter Set | |
| open scoped Topology ContDiff | |
| variable {P E : Type*} | |
| /-- Prefixes contain genuine future zero controls, rather than the base point | |
| of an endpoint chart (whose control word need not vanish). -/ | |
| def prefixes (zero : P) (choose : β β (β β P) β P) : β β β β P | |
| | 0 => fun _ => zero | |
| | n+1 => Function.update (prefixes zero choose n) n (choose n (prefixes zero choose n)) | |
| def limitChoice (zero : P) (choose : β β (β β P) β P) (j : β) : P := | |
| choose j (prefixes zero choose j) | |
| lemma prefixes_zero {zero : P} {choose : β β (β β P) β P} {n j : β} (h : n β€ j) : | |
| prefixes zero choose n j=zero := by | |
| induction n with | |
| | zero => rfl | |
| | succ n ih => | |
| rw [prefixes,Function.update_of_ne (by omega : j β n)] | |
| exact ih (by omega) | |
| lemma prefixes_stable {zero : P} {choose : β β (β β P) β P} {n j : β} (h : j < n) : | |
| prefixes zero choose n j=limitChoice zero choose j := by | |
| induction n with | |
| | zero => omega | |
| | succ n ih => | |
| by_cases hj : j=n | |
| Β· subst j; simp [prefixes,limitChoice] | |
| Β· rw [prefixes,Function.update_of_ne hj] | |
| exact ih (by omega) | |
| /-- Pure dependent choice in chronological order. The predicate may depend on | |
| all past controls, but never on a fictitious future control. -/ | |
| theorem causal_choice (zero : P) (admissible : Set P) | |
| (good : β β (β β P) β P β Prop) | |
| (produce : β j s,(β i < j,s i β admissible) β (β i,j β€ i β s i=zero) β | |
| β x β admissible,good j s x) : | |
| β s : β β P,(β j,s j β admissible) β§ | |
| β j,good j (fun i => if i < j then s i else zero) (s j) := by | |
| classical | |
| let choose (j : β) (s : β β P) : P := | |
| if h : (β i < j,s i β admissible) β§ (β i,j β€ i β s i=zero) | |
| then (produce j s h.1 h.2).choose else zero | |
| have hg : β j,limitChoice zero choose j β admissible β§ | |
| good j (prefixes zero choose j) (limitChoice zero choose j) := by | |
| intro j | |
| induction j using Nat.strong_induction_on with | |
| | h j ih => | |
| have hp : β i < j,prefixes zero choose j i β admissible := by | |
| intro i hi | |
| rw [prefixes_stable hi] | |
| exact (ih i hi).1 | |
| have hz : β i,j β€ i β prefixes zero choose j i=zero := fun i hi => prefixes_zero hi | |
| have he : limitChoice zero choose j=(produce j (prefixes zero choose j) hp hz).choose := by | |
| change (if h : (β i < j,prefixes zero choose j i β admissible) β§ | |
| (β i,j β€ i β prefixes zero choose j i=zero) | |
| then (produce j (prefixes zero choose j) h.1 h.2).choose else zero)=_ | |
| rw [dite_eq_left β¨hp,hzβ©] | |
| rw [he] | |
| exact (produce j (prefixes zero choose j) hp hz).choose_spec | |
| refine β¨limitChoice zero choose,fun j => (hg j).1,?_β© | |
| intro j | |
| have he : prefixes zero choose j=(fun i => if i < j then limitChoice zero choose i else zero) := by | |
| funext i | |
| split_ifs with hi | |
| Β· exact prefixes_stable hi | |
| Β· exact prefixes_zero (by omega) | |
| rw [β he] | |
| exact (hg j).2 | |
| variable [NormedAddCommGroup E] [NormedSpace β E] | |
| open Schedule | |
| /-- Vector-valued local finiteness for the fixed polynomial schedule. -/ | |
| theorem smooth_escaping_sum {f : β β β β E} (hf : β j,ContDiff β β (f j)) | |
| (hz : β j t,t β€ time j β f j t=0) : | |
| ContDiff β β (fun t => β' j,f j t) := by | |
| apply contDiff_iff_contDiffAt.2 | |
| intro t | |
| obtain β¨N,hNβ© := eventually_atTop.1 (time_atTop.eventually_gt_atTop (t+1)) | |
| apply (ContDiffAt.sum (s:=Finset.range N) (fun j _ => (hf j).contDiffAt)).congr_of_eventuallyEq | |
| filter_upwards [eventually_lt_nhds (show t<t+1 by linarith)] with u hu | |
| apply tsum_eq_sum | |
| intro j hj | |
| have hj' : N β€ j := by simpa only [Finset.mem_range,not_lt] using hj | |
| exact hz j u (by linarith [hN j hj']) | |
| omit [NormedSpace β E] in | |
| /-- At every actual time in a period there is exactly one possible increment. | |
| Both endpoints have zero increments, so this holds on closed periods. -/ | |
| lemma sum_period {f : β β β β E} | |
| (hz0 : β j t,t β€ time j β f j t=0) | |
| (hz1 : β j t,time (j+1) β€ t β f j t=0) | |
| {j : β} {t : β} (hlo : time j β€ t) (hhi : t β€ time (j+1)) : | |
| (β' i,f i t)=f j t := by | |
| apply tsum_eq_single j | |
| intro i hi | |
| rcases lt_or_gt_of_ne hi with hij | hij | |
| Β· exact hz1 i t ((time_strictMono.monotone hij).trans hlo) | |
| Β· exact hz0 i t (hhi.trans (time_strictMono.monotone hij)) | |
| omit [NormedSpace β E] in | |
| lemma sum_initial {f : β β β β E} | |
| (hz0 : β j t,t β€ time j β f j t=0) {t : β} (ht : t β€ time 0) : | |
| (β' i,f i t)=0 := by | |
| have he : (fun i => f i t)=(fun _ => (0:E)) := by | |
| funext j | |
| exact hz0 j t (ht.trans (time_strictMono.monotone (Nat.zero_le j))) | |
| rw [he,tsum_zero] | |
| omit [NormedSpace β E] in | |
| /-- A future insertion cannot change a previous time, regardless of the | |
| infinite tail of controls. This is the causality needed by regular ODEs. -/ | |
| lemma sum_causal {f g : β β β β E} {j : β} | |
| (hf : β i t,t β€ time i β f i t=0) | |
| (hg : β i t,t β€ time i β g i t=0) | |
| (he : β i < j,f i=g i) {t : β} (ht : t β€ time j) : | |
| (β' i,f i t)=(β' i,g i t) := by | |
| apply tsum_congr | |
| intro i | |
| by_cases hi : i<j | |
| Β· rw [he i hi] | |
| Β· have hti : t β€ time i := ht.trans (time_strictMono.monotone (by omega)) | |
| rw [hf i t hti,hg i t hti] | |
| end HarmonicCounterexample.CausalConstruction | |
| end | |
| noncomputable section | |
| namespace HarmonicCounterexample.AngularStream | |
| open Set Schedule Pulses FiniteControl.SmoothWord | |
| open scoped ContDiff Topology | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] {n : β} | |
| /-- The fixed diagonal leg; initially and during every pulse it is round. -/ | |
| def base (qstar : β) (j0 : β) : β β β := Pulses.profile (fun _ _ => 0) qstar j0 | |
| lemma base_smooth (qstar : β) (j0 : β) : ContDiff β β (base qstar j0) := | |
| Pulses.profile_smooth (fun _ => contDiff_const) (by simp) qstar j0 | |
| lemma base_initial {qstar t : β} {j0 : β} (ht : t β€ time j0) : base qstar j0 t=1 := | |
| Pulses.profile_initial (by simp) ht | |
| lemma base_pulse {qstar t : β} {j0 j : β} (hj : j0 β€ j) | |
| (hlo : time j β€ t) (hhi : t β€ time j+pulse j) : base qstar j0 t=1 := by | |
| have h := Pulses.profile_pulse (z:=fun _ _ => 0) (qstar:=qstar) (by simp) (by simp) hj hlo hhi | |
| simpa [base] using h | |
| lemma base_range {qstar : β} (hq : 1 β€ qstar) (j0 : β) (t : β) : | |
| base qstar j0 t β Icc 1 qstar := by | |
| by_cases ht : t β€ time j0 | |
| Β· rw [base_initial ht];exact β¨le_rfl,hqβ© | |
| Β· obtain β¨j,hj,hlo,hhiβ© := GlobalGrowth.grid_bracket time_atTop j0 (le_of_not_ge ht) | |
| have h := Pulses.profile_bounds_on_period (z:=fun _ _ => 0) (M:=0) (by simp) (by simp) | |
| (by simp) hq hj hlo hhi | |
| simpa [base] using h | |
| /-- Actual angular increment of a period, zero on both open round collars. -/ | |
| def increment (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) (j : β) (t : β) : E := | |
| nonlinearBergerWord r b D (s j) (pulse j) ((t-time j)/pulse j)-b | |
| lemma increment_before (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {j : β} {t : β} (ht : t β€ time j) : increment r b D s j t=0 := by | |
| have hu : (t-time j)/pulse j β€ 0 := div_nonpos_of_nonpos_of_nonneg (sub_nonpos.2 ht) (pulse_pos j).le | |
| rw [increment,nonlinearBergerWord_round_before r b D (s j) (pulse j) _ | |
| (lt_of_le_of_lt (mul_nonpos_of_nonneg_of_nonpos (duration_pos n).le hu) (by norm_num)),sub_self] | |
| lemma increment_after (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {j : β} {t : β} (ht : time j+pulse j β€ t) : increment r b D s j t=0 := by | |
| have hu : 1 β€ (t-time j)/pulse j := (le_div_iffβ (pulse_pos j)).2 (by linarith) | |
| have hu' : duration n β€ duration n*((t-time j)/pulse j) := by | |
| simpa using mul_le_mul_of_nonneg_left hu (duration_pos n).le | |
| rw [increment,nonlinearBergerWord_round_after r b D (s j) (pulse j) _ | |
| (lt_of_lt_of_le (by simp [duration]) hu'),sub_self] | |
| lemma increment_zero (r : β) (b : E) (D : Fin n β E) {s : β β Fin n β β} | |
| {j : β} (hj : s j=0) (t : β) : increment r b D s j t=0 := by | |
| have he : packetStretch (s j) (pulse j) ((t-time j)/pulse j)=(fun _ => 1) := by | |
| funext i;simp [packetStretch,hj] | |
| simp only [increment,nonlinearBergerWord,he,nonlinearPacket_round,sub_self] | |
| def activeIncrement (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) (j0 j : β) : β β E := | |
| if j0 β€ j then increment r b D s j else 0 | |
| lemma active_before (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) (j0 j : β) | |
| (t : β) (ht : t β€ time j) : activeIncrement r b D s j0 j t=0 := by | |
| dsimp [activeIncrement];split_ifs | |
| Β· exact increment_before r b D s ht | |
| Β· rfl | |
| lemma active_after (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) (j0 j : β) | |
| (t : β) (ht : time (j+1) β€ t) : activeIncrement r b D s j0 j t=0 := by | |
| dsimp [activeIncrement];split_ifs | |
| Β· apply increment_after r b D s | |
| rw [time_succ] at ht | |
| linarith [pulse_pos j,dwell_pos j] | |
| Β· rfl | |
| /-- Simultaneously smooth infinite angular coefficient. No angular selector is | |
| used in its definition, so discontinuous labels cannot spoil regularity. -/ | |
| def angular (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| (qstar : β) (j0 : β) (t : β) : E := | |
| PulseTaylor.angular r b D0 (base qstar j0 t)+β' j,activeIncrement r b D s j0 j t | |
| lemma angular_smooth (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {qstar : β} (hq : 1 β€ qstar) (j0 : β) | |
| (hpos : β j,j0 β€ j β β t i,packetStretch (s j) (pulse j) t i β 0) : | |
| ContDiff β β (angular r b D0 D s qstar j0) := by | |
| have hb : ContDiff β β (fun t => PulseTaylor.angular r b D0 (base qstar j0 t)) := by | |
| have h1 := (base_smooth qstar j0).rpow_const_of_ne (p:=r) (fun t => | |
| (ne_of_gt (lt_of_lt_of_le zero_lt_one (base_range hq j0 t).1))) | |
| have h2 := (base_smooth qstar j0).rpow_const_of_ne (p:=r-1) (fun t => | |
| (ne_of_gt (lt_of_lt_of_le zero_lt_one (base_range hq j0 t).1))) | |
| exact (h1.smul contDiff_const).add ((h1.sub h2).smul contDiff_const) | |
| apply hb.add (CausalConstruction.smooth_escaping_sum ?_ (active_before r b D s j0)) | |
| intro j | |
| dsimp [activeIncrement] | |
| split_ifs with hj | |
| Β· exact ((nonlinearBergerWord_smooth r b D (s j) (pulse j) (fun i t => hpos j hj t i)).comp | |
| ((contDiff_id.sub contDiff_const).div_const _)).sub contDiff_const | |
| Β· exact contDiff_const | |
| lemma angular_initial (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {qstar t : β} {j0 : β} (ht : t β€ time j0) : angular r b D0 D s qstar j0 t=b := by | |
| have he : (fun j => activeIncrement r b D s j0 j t)=(fun _ => (0:E)) := by | |
| funext j | |
| dsimp [activeIncrement] | |
| split_ifs with hj | |
| Β· exact increment_before r b D s (ht.trans (time_strictMono.monotone hj)) | |
| Β· rfl | |
| simp only [angular,base_initial ht,PulseTaylor.angular_one,he,tsum_zero,add_zero] | |
| lemma angular_period (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {qstar t : β} {j0 j : β} (hj : j0 β€ j) (hlo : time j β€ t) (hhi : t β€ time (j+1)) : | |
| angular r b D0 D s qstar j0 t= | |
| PulseTaylor.angular r b D0 (base qstar j0 t)+increment r b D s j t := by | |
| rw [angular,CausalConstruction.sum_period (active_before r b D s j0) | |
| (active_after r b D s j0) hlo hhi] | |
| simp only [activeIncrement,ite_eq_left hj] | |
| lemma angular_pulse (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {qstar t : β} {j0 j : β} (hj : j0 β€ j) (hlo : time j β€ t) (hhi : t β€ time j+pulse j) : | |
| angular r b D0 D s qstar j0 t=nonlinearBergerWord r b D (s j) (pulse j) ((t-time j)/pulse j) := by | |
| rw [angular_period r b D0 D s hj hlo (by rw [time_succ];linarith [pulse_pos j,dwell_pos j]), | |
| base_pulse hj hlo hhi,PulseTaylor.angular_one,increment] | |
| abel | |
| lemma angular_leg (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| {qstar t : β} {j0 j : β} (hj : j0 β€ j) (hlo : time j+pulse j β€ t) (hhi : t β€ time (j+1)) : | |
| angular r b D0 D s qstar j0 t=PulseTaylor.angular r b D0 (base qstar j0 t) := by | |
| rw [angular_period r b D0 D s hj (by linarith [pulse_pos j]) hhi, | |
| increment_after r b D s hlo,add_zero] | |
| lemma angular_causal (r : β) (b D0 : E) (D : Fin n β E) {s s' : β β Fin n β β} | |
| (qstar : β) (j0 : β) {j : β} (he : β i < j,s i=s' i) {t : β} (ht : t β€ time j) : | |
| angular r b D0 D s qstar j0 t=angular r b D0 D s' qstar j0 t := by | |
| unfold angular | |
| congr 1 | |
| apply CausalConstruction.sum_causal (active_before r b D s j0) (active_before r b D s' j0) ?_ ht | |
| intro i hi | |
| funext u | |
| dsimp [activeIncrement] | |
| split_ifs <;> simp [increment,he i hi] | |
| end HarmonicCounterexample.AngularStream | |
| end | |
| noncomputable section | |
| namespace HarmonicCounterexample.AngularStream | |
| open Set Filter Schedule Pulses FiniteControl.SmoothWord | |
| open scoped ContDiff Topology BigOperators | |
| variable {E : Type*} [NormedAddCommGroup E] [NormedSpace β E] {n : β} | |
| lemma active_summable (r : β) (b : E) (D : Fin n β E) (s : β β Fin n β β) | |
| (j0 : β) (t : β) : Summable (fun j => activeIncrement r b D s j0 j t) := by | |
| obtain β¨N,hNβ© := eventually_atTop.1 (time_atTop.eventually_ge_atTop t) | |
| apply summable_of_ne_finset_zero (s:=Finset.range N) | |
| intro j hj | |
| apply active_before r b D s j0 j t | |
| exact hN j (by simpa only [Finset.mem_range,not_lt] using hj) | |
| /-- Updating a previously zero pulse is exactly the actual smooth insertion, | |
| not merely equality of an ideal packet. -/ | |
| lemma angular_update (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| (x : Fin n β β) (qstar : β) {j0 j : β} (hj : j0 β€ j) (hz : s j=0) (t : β) : | |
| angular r b D0 D (Function.update s j x) qstar j0 t= | |
| angular r b D0 D s qstar j0 t+ | |
| (nonlinearBergerWord r b D x (pulse j) ((t-time j)/pulse j)-b) := by | |
| classical | |
| have he : (fun i => if i=j then 0 else activeIncrement r b D (Function.update s j x) j0 i t)= | |
| (fun i => if i=j then 0 else activeIncrement r b D s j0 i t) := by | |
| funext i | |
| split_ifs with hi | |
| Β· rfl | |
| Β· dsimp [activeIncrement];split_ifs <;> simp [increment,Function.update_of_ne hi] | |
| have hz' : activeIncrement r b D s j0 j t=0 := by | |
| dsimp [activeIncrement];rw [ite_eq_left hj];exact increment_zero r b D hz t | |
| rw [angular,angular,(active_summable r b D (Function.update s j x) j0 t).tsum_eq_add_tsum_ite j, | |
| (active_summable r b D s j0 t).tsum_eq_add_tsum_ite j,he,hz',zero_add] | |
| simp only [activeIncrement,ite_eq_left hj,increment,Function.update_self] | |
| abel | |
| lemma coefficient_update (r : β) (b D0 : E) (D : Fin n β E) (s : β β Fin n β β) | |
| (x : Fin n β β) (qstar : β) (Ξ± : β β β) {j0 j : β} (hj : j0 β€ j) (hz : s j=0) : | |
| (fun t => Ξ± t β’ angular r b D0 D (Function.update s j x) qstar j0 t)= | |
| insertWord (fun t => Ξ± t β’ angular r b D0 D s qstar j0 t) Ξ± r b D x (time j) (pulse j) := by | |
| funext t | |
| rw [angular_update r b D0 D s x qstar hj hz t,smul_add] | |
| rfl | |
| def direction (D0 : E) (D : Fin n β E) : Option (Fin n) β E | |
| | none => D0 | |
| | some i => D i | |
| lemma angular_representation [NeZero n] (r : β) (b D0 : E) (D : Fin n β E) | |
| (s : β β Fin n β β) {qstar : β} (hq : 1 β€ qstar) (j0 : β) | |
| (hpos : β j,j0 β€ j β β t i,packetStretch (s j) (pulse j) t i β Icc (1/2:β) (3/2)) | |
| (t : β) : β (d : Option (Fin n)), β q β Icc (1/2:β) (qstar+1/2), | |
| angular r b D0 D s qstar j0 t=PulseTaylor.angular r b (direction D0 D d) q := by | |
| by_cases ht : t β€ time j0 | |
| Β· refine β¨none,1,β¨by norm_num,by linarithβ©,?_β© | |
| rw [angular_initial r b D0 D s ht,PulseTaylor.angular_one] | |
| Β· obtain β¨j,hj,hlo,hhiβ© := GlobalGrowth.grid_bracket time_atTop j0 (le_of_not_ge ht) | |
| by_cases htp : t β€ time j+pulse j | |
| Β· obtain β¨d,hd,_β© := exists_unit_round_gap_selector n | |
| let u := (t-time j)/pulse j | |
| refine β¨some (d u),packetStretch (s j) (pulse j) u (d u),?_,?_β© | |
| Β· have hh := hpos j hj u (d u) | |
| exact β¨hh.1,hh.2.trans (by linarith)β© | |
| Β· rw [angular_pulse r b D0 D s hj hlo htp, | |
| nonlinearBergerWord_selected r b D (s j) (pulse j) u (d u) (fun i hi => (hd u i hi).1), | |
| packetStretch_selected (s j) (pulse j) u (d u) (fun i hi => (hd u i hi).1)] | |
| rfl | |
| Β· refine β¨none,base qstar j0 t,?_,?_β© | |
| Β· have hh := base_range hq j0 t | |
| exact β¨(by norm_num : (1/2:β) β€ 1).trans hh.1,hh.2.trans (by linarith)β© | |
| Β· exact angular_leg r b D0 D s hj (le_of_not_ge htp) hhi | |
| /-- An actual all-time coefficient bound chosen before the entire sequence of | |
| controls and the starting index. Uniformity is compactness of one fixed angular | |
| family, not a bound on a posteriori chosen histories. -/ | |
| theorem angular_uniform_bound [NeZero n] (r : β) (b D0 : E) (D : Fin n β E) | |
| {qstar : β} (hq : 1 β€ qstar) : | |
| β C : β,0 β€ C β§ β (s : β β Fin n β β) (j0 : β), | |
| (β j,j0 β€ j β β t i,packetStretch (s j) (pulse j) t i β Icc (1/2:β) (3/2)) β | |
| β t,βangular r b D0 D s qstar j0 tβ β€ C := by | |
| classical | |
| have hc (d : Option (Fin n)) : ContinuousOn (PulseTaylor.angular r b (direction D0 D d)) | |
| (Icc (1/2:β) (qstar+1/2)) := by | |
| apply ContinuousOn.add | |
| Β· exact (continuousOn_id.rpow_const (fun t ht => Or.inl (by change t β 0;linarith [ht.1]))).smul continuousOn_const | |
| Β· exact ((continuousOn_id.rpow_const (fun t ht => Or.inl (by change t β 0;linarith [ht.1]))).sub | |
| (continuousOn_id.rpow_const (fun t ht => Or.inl (by change t β 0;linarith [ht.1])))).smul continuousOn_const | |
| choose C hC using fun d => isCompact_Icc.exists_bound_of_continuousOn (hc d) | |
| let M := β d : Option (Fin n),max (C d) 0 | |
| have hM : 0 β€ M := Finset.sum_nonneg (fun d _ => le_max_right _ _) | |
| refine β¨M,hM,fun s j0 hpos t => ?_β© | |
| obtain β¨d,q,hq',heβ© := angular_representation r b D0 D s hq j0 hpos t | |
| rw [he] | |
| exact (hC d q hq').trans ((le_max_left _ _).trans | |
| (Finset.single_le_sum (fun i _ => le_max_right (C i) 0) (Finset.mem_univ d))) | |
| end HarmonicCounterexample.AngularStream | |
| end | |
| noncomputable section | |
| namespace HarmonicCounterexample.AngularStream | |
| open Set Schedule Pulses FiniteControl.SmoothWord | |
| open scoped ContDiff InnerProductSpace | |
| variable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace β E] {n : β} [NeZero n] | |
| local instance : NormedAddCommGroup (E βL[β] E) := ContinuousLinearMap.toNormedAddCommGroup | |
| local instance : NormedSpace β (E βL[β] E) := ContinuousLinearMap.toNormedSpace | |
| lemma angular_nonnegative (r B : β) (D0 : E βL[β] E) (D : Fin n β E βL[β] E) | |
| (s : β β Fin n β β) {qstar : β} (hq : 1 β€ qstar) (j0 : β) | |
| (hpos : β j,j0 β€ j β β t i,packetStretch (s j) (pulse j) t i β Icc (1/2:β) (3/2)) | |
| (hD : β d x,inner β x (direction D0 D d x) β€ 0) | |
| (hBD : β d x,-(B*βxβ^2) β€ inner β x (direction D0 D d x)) | |
| (t : β) (x : E) : | |
| 0 β€ inner β x (angular r (B β’ (1:E βL[β] E)) D0 D s qstar j0 t x) := by | |
| obtain β¨d,q,hq',heβ© := angular_representation r (B β’ (1:E βL[β] E)) D0 D s hq j0 hpos t | |
| rw [he] | |
| exact berger_angular_nonneg r B q (direction D0 D d) (by linarith [hq'.1]) (hD d) (hBD d) x | |
| lemma angular_symmetric (r B : β) (D0 : E βL[β] E) (D : Fin n β E βL[β] E) | |
| (s : β β Fin n β β) {qstar : β} (hq : 1 β€ qstar) (j0 : β) | |
| (hpos : β j,j0 β€ j β β t i,packetStretch (s j) (pulse j) t i β Icc (1/2:β) (3/2)) | |
| (hD : β d x y,inner β (direction D0 D d x) y=inner β x (direction D0 D d y)) | |
| (t : β) (x y : E) : | |
| inner β (angular r (B β’ (1:E βL[β] E)) D0 D s qstar j0 t x) y= | |
| inner β x (angular r (B β’ (1:E βL[β] E)) D0 D s qstar j0 t y) := by | |
| obtain β¨d,q,_,heβ© := angular_representation r (B β’ (1:E βL[β] E)) D0 D s hq j0 hpos t | |
| rw [he] | |
| simp only [PulseTaylor.angular,add_apply,smul_apply, | |
| one_apply_eq_self,inner_add_left,inner_add_right,real_inner_smul_left, | |
| inner_smul_right,hD d x y] | |
| omit [NeZero n] in | |
| lemma angular_zero_pulse (r : β) (b D0 : E βL[β] E) (D : Fin n β E βL[β] E) | |
| (s : β β Fin n β β) {qstar t : β} {j0 j : β} (hj : j0 β€ j) (hz : s j=0) | |
| (hlo : time j β€ t) (hhi : t β€ time j+pulse j) : angular r b D0 D s qstar j0 t=b := by | |
| rw [angular_period r b D0 D s hj hlo (by rw [time_succ];linarith [pulse_pos j,dwell_pos j]), | |
| base_pulse hj hlo hhi,PulseTaylor.angular_one,increment_zero r b D hz t,add_zero] | |
| omit [NeZero n] in | |
| /-- The preceding round rest is round even for the first active period, whose | |
| entire previous history is round. This uniformity is essential for recursion. -/ | |
| lemma angular_rest (r : β) (b D0 : E βL[β] E) (D : Fin n β E βL[β] E) | |
| (s : β β Fin n β β) {qstar t : β} {j0 j : β} | |
| (hlo : time j+3*pulse j+dwell j β€ t) (hhi : t β€ time (j+1)) : | |
| angular r b D0 D s qstar j0 t=b := by | |
| by_cases hj : j0 β€ j | |
| Β· rw [angular_leg r b D0 D s hj (by linarith [pulse_pos j,dwell_pos j]) hhi] | |
| have hb : base qstar j0 t=1 := Pulses.profile_rest (by simp) (by simp) hj hlo hhi | |
| rw [hb,PulseTaylor.angular_one] | |
| Β· apply angular_initial r b D0 D s | |
| exact hhi.trans (time_strictMono.monotone (by omega)) | |
| end HarmonicCounterexample.AngularStream | |
| end | |
| end OAI | |