Buckets:
| import OAI.NumberTheory.Jacobsthal.Partitions.SourceNodeCoordinates | |
| import OAI.NumberTheory.Jacobsthal.Primes.LiteralUniformPrimeTail | |
| namespace OAI | |
| namespace Erdos970 | |
| open scoped _root_.Erdos970 | |
| section | |
| namespace NumberTheoryLean.LiteralCompactRemoval | |
| open _root_.Set _root_.Filter _root_.Finset | |
| open scoped Topology | |
| open FinitePathGeometry PrimeHistories PrimeKilledChain PrimeBinMembership | |
| open ActualPrimeHigh PrimeFamilyOccupation LiteralPrimeOccupation SourceNodeCoordinates | |
| open ContinuousCompactHighError SourceLowRemoval DerivativeWeights | |
| open ErdosPrimeInputs.PrimePrefixMass | |
| noncomputable def uncappedFamilyValue (H : Side → ℝ×ℝ → ℝ) (w ell : ℝ) (start : Node) : ℝ := | |
| (start.gap^2/weight start.side start.ratio)* | |
| (∑ ps ∈ uncappedPrefixes w ell start,prefixWeight ps*nodeReward H w start ps) | |
| theorem compact_exponential_envelope {H : Side → ℝ×ℝ → ℝ} {A K : ℝ} | |
| (hA : 0 ≤ A) (hbound : ∀ i x,|H i x| ≤ A) | |
| (hsupport : ∀ i : Side,∀ r s : ℝ,K < r → H i (r,s)=0) | |
| (w : ℝ) (start : Node) (ps : List ℕ) : | |
| |nodeReward H w start ps| ≤ ((A+1)*Real.exp K)*Real.exp (-(terminal w start ps).gap) := by | |
| by_cases hr : (terminal w start ps).gap ≤ K | |
| · have he : 1 ≤ Real.exp (K-(terminal w start ps).gap) := Real.one_le_exp_iff.mpr (by linarith) | |
| have hb := hbound (terminal w start ps).side ((terminal w start ps).gap,(terminal w start ps).ratio) | |
| change |H _ _| ≤ _ | |
| rw [mul_assoc,← Real.exp_add] | |
| have hh := mul_le_mul_of_nonneg_left he (show 0 ≤ A+1 by linarith) | |
| simp only [sub_eq_add_neg] at hh | |
| linarith | |
| · have hz := hsupport (terminal w start ps).side (terminal w start ps).gap (terminal w start ps).ratio (lt_of_not_ge hr) | |
| simp only [nodeReward,hz,abs_zero] | |
| positivity | |
| theorem weighted_sum_div (I : Finset (List ℕ)) (F : List ℕ → ℝ) (D : ℝ) : | |
| (∑ ps ∈ I,prefixWeight ps*(F ps/D)) = (∑ ps ∈ I,prefixWeight ps*F ps)/D := by | |
| rw [Finset.sum_div] | |
| apply Finset.sum_congr rfl | |
| intro ps _hp | |
| ring | |
| theorem source_compact_family_removal {H : Side → ℝ×ℝ → ℝ} | |
| (hH : ∀ i,Continuous (H i)) (hcompact : ∀ i,HasCompactSupport (H i)) | |
| {K : ℝ} (hsupport : ∀ i : Side,∀ r s : ℝ,K < r → H i (r,s)=0) : | |
| ∃ C w₀ : ℝ,0 ≤ C ∧ 1 < w₀ ∧ ∀ᶠ B : ℝ in atTop,∀ w : ℝ,w₀ ≤ w → | |
| ∀ ell : ℝ,1 ≤ ell → ell ≤ B → ∀ start : Node, | |
| start.side=.even → 199/100 ≤ start.ratio → start.ratio ≤ 23/10 → | |
| Consistent start → start.cutoff=B → | |
| |uncappedFamilyValue H w ell start-familyValue H w ell ((Real.log B)^2) start| ≤ C/B := by | |
| obtain ⟨A,hA,hbound⟩ := phase_compact_bound hH hcompact | |
| let D := (A+1)*Real.exp K | |
| have hD : 0 < D := by dsimp [D]; positivity | |
| obtain ⟨M,w₀,hM,hw₀,hremove⟩ := removed_signed_reward_every_power | |
| refine ⟨scaleConstant*M*D,w₀,by have hh := scaleConstant_pos; positivity,hw₀,?_⟩ | |
| filter_upwards [hremove 1 (by norm_num) 3,eventually_ge_atTop (Real.exp 2)] with B hrem hBexp | |
| intro w hw ell hell hellB start hi h199 h23 hcons hcut | |
| have hB : 0 < B := (Real.exp_pos 2).trans_le hBexp | |
| have hlogB : 2 ≤ Real.log B := by simpa only [Real.log_exp] using Real.log_le_log (Real.exp_pos 2) hBexp | |
| obtain ⟨hs,hr,_,_⟩ := source_node_bounds hB start hi h199 h23 hcons hcut | |
| have hsS : start.ratio ≤ (Real.log B)^2 := by nlinarith | |
| let F := nodeReward H w start | |
| have hF : ∀ ps ∈ uncappedPrefixes w ell start,|F ps/D| ≤ Real.exp (-(1:ℝ)*(terminal w start ps).gap) := by | |
| intro ps _hp | |
| rw [abs_div,abs_of_pos hD] | |
| apply (div_le_iff₀ hD).mpr | |
| have h := compact_exponential_envelope hA hbound hsupport w start ps | |
| simpa only [neg_mul,one_mul,mul_comm] using h | |
| have herror := hrem w hw ell hell hellB start hcut hr hs hcons hsS (fun ps => F ps/D) hF | |
| rw [weighted_sum_div,weighted_sum_div,← sub_div,abs_div,abs_of_pos hD] at herror | |
| have hdiff := (div_le_iff₀ hD).mp herror | |
| have hscale := node_scale_upper hB start hi h199 h23 hcons hcut | |
| have hnormal : 0 ≤ start.gap^2/weight start.side start.ratio := div_nonneg (sq_nonneg _) (weight_pos hs).le | |
| change |(start.gap^2/weight start.side start.ratio)*(∑ ps ∈ uncappedPrefixes w ell start,prefixWeight ps*F ps)- | |
| (start.gap^2/weight start.side start.ratio)*(∑ ps ∈ retainedPrefixes w ell ((Real.log B)^2) start,prefixWeight ps*F ps)| ≤ _ | |
| rw [← mul_sub,abs_mul,abs_of_nonneg hnormal] | |
| calc | |
| _ ≤ (scaleConstant*B^2)*((M*B^(-(3:ℝ)))*D) := | |
| mul_le_mul hscale hdiff (abs_nonneg _) (mul_nonneg scaleConstant_pos.le (sq_nonneg _)) | |
| _ = _ := by | |
| rw [Real.rpow_neg hB.le,Real.rpow_ofNat] | |
| field_simp | |
| end NumberTheoryLean.LiteralCompactRemoval | |
| end | |
| end Erdos970 | |
| end OAI | |
Xet Storage Details
- Size:
- 4.78 kB
- Xet hash:
- 6eb12909220c72d1d46d6f25c7c08780111f80750f66b23fb104d76e9d6e39ed
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.