File size: 3,743 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | import Mathlib
namespace OAI
section
section
noncomputable section
open scoped BigOperators
open MeasureTheory ProbabilityTheory Filter Set
namespace SK.Analytic
open scoped Topology
def coverageAngle (L : β β β) (M : β) (n : β) : β := Real.sqrt (M*L n/(n:β))
theorem coverageAngle_tendsto (L : β β β) (M : β)
(hsub : Tendsto (fun n => L n/(n:β)) atTop (π 0)) :
Tendsto (coverageAngle L M) atTop (π 0) := by
have H := (hsub.const_mul M).sqrt
change Tendsto (fun n => Real.sqrt (M*L n/(n:β))) atTop (π 0)
simpa only [β mul_div_assoc,mul_zero,Real.sqrt_zero] using H
theorem coverageAngle_pos {L : β β β} {M : β} (hM : 0 < M) {n : β}
(hn : 0 < n) (hL : 0 < L n) : 0 < coverageAngle L M n := by
unfold coverageAngle
have hn' : (0:β) < n := by exact_mod_cast hn
positivity
theorem sin_eq_sinc_mul (x : β) : Real.sin x = Real.sinc x*x := by
by_cases hx : x = 0
Β· simp [hx]
Β· rw [Real.sinc_of_ne_zero hx,div_mul_cancelβ _ hx]
theorem coverageAngle_variance_tendsto (L : β β β) {M Ξ² : β} (hM : 0 < M)
(hL : Tendsto L atTop atTop)
(hsub : Tendsto (fun n => L n/(n:β)) atTop (π 0)) :
Tendsto (fun n => (Ξ²*Real.sin (coverageAngle L M n))^2*(n:β)/L n)
atTop (π (Ξ²^2*M)) := by
have hsinc : Tendsto (fun n => Real.sinc (coverageAngle L M n)) atTop (π (1:β)) := by
simpa only [Function.comp_def,Real.sinc_zero] using
Real.continuous_sinc.continuousAt.tendsto.comp (coverageAngle_tendsto L M hsub)
have H := (hsinc.pow 2).const_mul (Ξ²^2*M)
simp only [one_pow,mul_one] at H
apply H.congr'
filter_upwards [hL.eventually (eventually_gt_atTop (0:β)),eventually_gt_atTop (0:β)] with n hLn hn
have hn' : (0:β) < n := by exact_mod_cast hn
have hΞΈ : coverageAngle L M n^2 = M*L n/(n:β) :=
Real.sq_sqrt (by positivity)
rw [sin_eq_sinc_mul,mul_pow,mul_pow,hΞΈ]
field_simp
theorem coverageAngle_loss_tendsto (L : β β β) {M Ξ² e : β} (hM : 0 < M)
(hL : Tendsto L atTop atTop)
(hsub : Tendsto (fun n => L n/(n:β)) atTop (π 0)) :
Tendsto (fun n => Ξ²*(Real.cos (coverageAngle L M n)-1)*(n:β)*e/L n)
atTop (π (-Ξ²*M*e/2)) := by
have hΞΈ := coverageAngle_tendsto L M hsub
have hsinc : Tendsto (fun n => Real.sinc (coverageAngle L M n)) atTop (π (1:β)) := by
simpa only [Function.comp_def,Real.sinc_zero] using Real.continuous_sinc.continuousAt.tendsto.comp hΞΈ
have hcos : Tendsto (fun n => Real.cos (coverageAngle L M n)) atTop (π (1:β)) := by
simpa only [Function.comp_def,Real.cos_zero] using Real.continuous_cos.continuousAt.tendsto.comp hΞΈ
have H := ((hsinc.pow 2).const_mul (-Ξ²*M*e)).div (tendsto_const_nhds.add hcos)
(by norm_num : (1:β)+1 β 0)
norm_num only [one_pow,mul_one,one_add_one_eq_two] at H
apply H.congr'
filter_upwards [hL.eventually (eventually_gt_atTop (0:β)),eventually_gt_atTop (0:β),
hcos.eventually (eventually_gt_nhds (by norm_num : (0:β)<1))] with n hLn hn hc
have hn' : (0:β) < n := by exact_mod_cast hn
have hΞΈsq : coverageAngle L M n^2 = M*L n/(n:β) := Real.sq_sqrt (by positivity)
have htrig := Real.sin_sq_add_cos_sq (coverageAngle L M n)
rw [sin_eq_sinc_mul,mul_pow,hΞΈsq] at htrig
have hden : 1+Real.cos (coverageAngle L M n) β 0 := by positivity
have hcosEq : Real.cos (coverageAngle L M n)-1 =
-(Real.sinc (coverageAngle L M n)^2*(M*L n/(n:β)))/(1+Real.cos (coverageAngle L M n)) := by
apply (eq_div_iff hden).mpr
nlinarith
change -Ξ²*M*e*Real.sinc (coverageAngle L M n)^2/(1+Real.cos (coverageAngle L M n)) =
Ξ²*(Real.cos (coverageAngle L M n)-1)*(n:β)*e/L n
rw [hcosEq]
field_simp
end SK.Analytic
end
end
end
end OAI
|