Download data/lean/OAI/Geometry/IsometricImmersion/Comparison/ComparisonEnergyScaling.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.31 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Comparison/ComparisonEnergyScaling.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Geometry/IsometricImmersion/Comparison/ComparisonEnergyScaling.lean
-
curl -L -o ComparisonEnergyScaling.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Geometry/IsometricImmersion/Comparison/ComparisonEnergyScaling.lean
5.31 kB
| import OAI.Geometry.IsometricImmersion.Comparison.ComparisonSourceBounds | |
| import OAI.Geometry.IsometricImmersion.Comparison.FiniteApproximationJets | |
| namespace OAI | |
| noncomputable section | |
| open Set Filter | |
| open scoped ContDiff Topology | |
| namespace SmoothLocal.Pulse | |
| open SmoothLocal.Geometry SmoothLocal.HighEquation | |
| def comparisonLowerSourceCoefficient (A Cfirst Ctest Ccompare Cres E Q a : β) | |
| (ha : 0 < a) (delta : β) : β := | |
| 2*A*(testDensityErrorCoefficient Ctest a ha delta+Ccompare*E)+Cfirst*Q+Cres | |
| theorem comparisonSourceBudget_le_leading | |
| {A Cfirst Ctest Ccompare Cres E Q a delta tau epsilon epsilonQ : β} | |
| (ha : 0 < a) (N : β) (hA : 0 β€ A) (hCf : 0 β€ Cfirst) | |
| (hCc : 0 β€ Ccompare) (hCr : 0 β€ Cres) (ht : 1 β€ tau) | |
| (he : epsilon β€ E*tau/tau^N) (heQ : epsilonQ β€ Q*tau/tau^N) | |
| (hlarge : comparisonLowerSourceCoefficient A Cfirst Ctest Ccompare Cres E Q a ha delta β€ tau) : | |
| comparisonSourceBudget A Cfirst Ctest Ccompare Cres a ha N delta tau epsilon epsilonQ β€ | |
| (2*A*pulseLeadingBound a ha+1)*tau^2/tau^N := by | |
| have ht0 : 0 < tau := zero_lt_one.trans_le ht | |
| have hp : 0 < tau^N := pow_pos ht0 N | |
| have hscale : 0 β€ tau/tau^N := div_nonneg ht0.le hp.le | |
| have hrem : qForcingRemainderBudget A Cfirst Ctest Ccompare a ha N delta tau epsilon epsilonQ β€ | |
| (2*A*(testDensityErrorCoefficient Ctest a ha delta+Ccompare*E)+Cfirst*Q)*tau/tau^N := by | |
| have hb := add_le_add | |
| (mul_le_mul_of_nonneg_left | |
| (add_le_add (le_refl (testDensityErrorCoefficient Ctest a ha delta*tau/tau^N)) | |
| (mul_le_mul_of_nonneg_left he hCc)) | |
| (mul_nonneg (by norm_num : (0 : β) β€ 2) hA)) | |
| (mul_le_mul_of_nonneg_left heQ hCf) | |
| change qForcingRemainderBudget A Cfirst Ctest Ccompare a ha N delta tau epsilon epsilonQ β€ _ at hb | |
| convert hb using 1 | |
| ring | |
| have hres : Cres/tau^N β€ Cres*tau/tau^N := by | |
| apply div_le_div_of_nonneg_right _ hp.le | |
| exact le_mul_of_one_le_right hCr ht | |
| calc | |
| _ β€ 2*A*(pulseLeadingBound a ha*tau^2/tau^N)+ | |
| (2*A*(testDensityErrorCoefficient Ctest a ha delta+Ccompare*E)+Cfirst*Q)*tau/tau^N+ | |
| Cres*tau/tau^N := add_le_add (add_le_add le_rfl hrem) hres | |
| _ = 2*A*(pulseLeadingBound a ha*tau^2/tau^N)+ | |
| comparisonLowerSourceCoefficient A Cfirst Ctest Ccompare Cres E Q a ha delta*(tau/tau^N) := by | |
| unfold comparisonLowerSourceCoefficient | |
| ring | |
| _ β€ 2*A*(pulseLeadingBound a ha*tau^2/tau^N)+tau*(tau/tau^N) := | |
| add_le_add le_rfl (mul_le_mul_of_nonneg_right hlarge hscale) | |
| _ = _ := by ring | |
| theorem approximationAccuracy_le_fixed_power {tau N : β} (ht : 1 β€ tau) (hN : N β€ tau) : | |
| metricApproximationAccuracy tau β€ 1/(tau : β)^N := by | |
| have htR : (1 : β) β€ tau := by exact_mod_cast ht | |
| unfold metricApproximationAccuracy | |
| exact one_div_le_one_div_of_le (pow_pos (zero_lt_one.trans_le htR) N) | |
| (pow_le_pow_rightβ htR hN) | |
| theorem fixed_scaled_approximation_le_source_scale {tau N : β} {E : β} | |
| (hE : 0 β€ E) (ht : 1 β€ tau) (hN : N β€ tau) : | |
| E*metricApproximationAccuracy tau β€ E*(tau : β)/(tau : β)^N := by | |
| have htR : (1 : β) β€ tau := by exact_mod_cast ht | |
| have hp : 0 < (tau : β)^N := pow_pos (zero_lt_one.trans_le htR) N | |
| calc | |
| _ β€ E*(1/(tau : β)^N) := mul_le_mul_of_nonneg_left (approximationAccuracy_le_fixed_power ht hN) hE | |
| _ = E/(tau : β)^N := by ring | |
| _ β€ _ := div_le_div_of_nonneg_right (le_mul_of_one_le_right hE htR) hp.le | |
| theorem comparison_exponential_tendsto_one (Lambda delta : β) : | |
| Tendsto (fun tau : β => Real.exp (Lambda*(2*delta/tau))) atTop (π 1) := by | |
| have hzero : Tendsto (fun tau : β => Lambda*(2*delta/tau)) atTop (π 0) := by | |
| simpa only [id_eq, mul_div_assoc] using | |
| (tendsto_id.const_div_atTop (Lambda*(2*delta))) | |
| have he : Tendsto Real.exp (π (0 : β)) (π (Real.exp 0)) := Real.continuous_exp.continuousAt.tendsto | |
| rw [Real.exp_zero] at he | |
| exact he.comp hzero | |
| theorem comparison_exponential_le_fixed {Lambda delta tau : β} | |
| (ht : 0 < tau) (hlarge : Lambda*(2*delta) β€ tau) : | |
| Real.exp (Lambda*(2*delta/tau)) β€ Real.exp 1 := by | |
| apply Real.exp_le_exp.mpr | |
| rw [β mul_div_assoc] | |
| exact (div_le_one ht).mpr hlarge | |
| def comparisonGradientConstant (s0 width A a : β) (ha : 0 < a) : β := | |
| 2*Real.exp 1*Real.sqrt (2*(1+1/s0))*Real.sqrt (2*width)*(2*A*pulseLeadingBound a ha+1) | |
| theorem comparison_gradient_scaling | |
| {s0 width A a delta tau Lambda F : β} (ha : 0 < a) (N : β) | |
| (hdelta : 0 β€ delta) (ht : 0 < tau) (hF : 0 β€ F) | |
| (hsource : F β€ (2*A*pulseLeadingBound a ha+1)*tau^2/tau^N) | |
| (hexp : Real.exp (Lambda*(2*delta/tau)) β€ Real.exp 1) : | |
| Real.sqrt (2*(1+1/s0))* | |
| (Real.exp (Lambda*(2*delta/tau))*F*Real.sqrt (2*width)*(2*delta/tau)) β€ | |
| comparisonGradientConstant s0 width A a ha*delta*tau/tau^N := by | |
| have h1 := mul_le_mul hexp hsource hF (Real.exp_pos 1).le | |
| have h2 := mul_le_mul_of_nonneg_right h1 (Real.sqrt_nonneg (2*width)) | |
| have h3 := mul_le_mul_of_nonneg_right h2 | |
| (div_nonneg (mul_nonneg (by norm_num : (0 : β) β€ 2) hdelta) ht.le) | |
| have h4 := mul_le_mul_of_nonneg_left h3 (Real.sqrt_nonneg (2*(1+1/s0))) | |
| convert h4 using 1 | |
| unfold comparisonGradientConstant | |
| field_simp [ht.ne'] | |
| end SmoothLocal.Pulse | |
| end | |
| end OAI | |