cfahlgren1/math / lean /OAI /NumberTheory /Jacobsthal /Partitions /SourceNodeCoordinates.lean
cfahlgren1's picture
download
raw
2.64 kB
import OAI.NumberTheory.Jacobsthal.Estimates.ScaledOriginalTail
import OAI.NumberTheory.Jacobsthal.Estimates.SourceLowRemoval
namespace OAI
namespace Erdos970
open scoped _root_.Erdos970
section
namespace NumberTheoryLean.SourceNodeCoordinates
open FinitePathGeometry FinitePathMeasures PrimeHistories PrimeBinMembership
open RegeneratingInverseBands ArrivalKernelGeometry SourceLowRemoval SourceSuccessfulTail
open InvariantInverseWeights DerivativeWeights
theorem node_gap_eq {B : ℝ} {start : Node} (hs : Valid start.side start.ratio)
(hcons : Consistent start) (hcut : start.cutoff=B) : start.gap=B*start.ratio := by
have he : start.cutoff=start.gap/start.ratio := hcons
rw [hcut] at he
exact ((eq_div_iff (valid_pos hs).ne').mp he).symm
theorem source_node_bounds {B : ℝ} (hB : 0 < B) (start : Node)
(hi : start.side=.even) (h199 : 199/100 ≤ start.ratio) (h23 : start.ratio ≤ 23/10)
(hcons : Consistent start) (hcut : start.cutoff=B) :
Valid start.side start.ratio ∧ 0 < start.gap ∧ B ≤ start.gap ∧ start.gap ≤ (23/10:ℝ)*B := by
have hs : Valid start.side start.ratio := by rw [hi]; change 198/100 ≤ start.ratio; linarith
have he := node_gap_eq hs hcons hcut
refine ⟨hs,?_,?_,?_⟩
· rw [he]; exact mul_pos hB (valid_pos hs)
· nlinarith
· nlinarith
theorem source_currentExponent {start : Node} (hr : 0 < start.gap)
(hs : Valid start.side start.ratio) (hcons : Consistent start) :
currentExponent (Real.log start.gap) (FlaggedSourceStart.sourceCostState hs)=start.cutoff := by
unfold currentExponent
rw [FlaggedSourceStart.source_gap hr hs]
change start.gap/stateRatio (FlaggedSourceStart.typedState start.side start.ratio hs)=start.cutoff
rw [FlaggedSourceStart.typedState_ratio]
exact hcons.symm
theorem node_scale_upper {B : ℝ} (hB : 0 < B) (start : Node)
(hi : start.side=.even) (h199 : 199/100 ≤ start.ratio) (h23 : start.ratio ≤ 23/10)
(hcons : Consistent start) (hcut : start.cutoff=B) :
start.gap^2/weight start.side start.ratio ≤ scaleConstant*B^2 := by
obtain ⟨hs,hr,_,_⟩ := source_node_bounds hB start hi h199 h23 hcons hcut
obtain ⟨s,hsv,hcost⟩ := even_source_cost_state hs hi
have hcurrent := source_currentExponent hr hs hcons
rw [hcost,hcut] at hcurrent
have h := (source_scale_upper hB s (by simpa only [hsv] using h23) hcurrent).1
have hweight : stateWeight (.inl s)=weight start.side start.ratio := by
rw [hi]
change phiEven s.1=phiEven start.ratio
rw [hsv]
rw [Real.exp_log hr,hweight] at h
exact h
end NumberTheoryLean.SourceNodeCoordinates
end
end Erdos970
end OAI

Xet Storage Details

Size:
2.64 kB
·
Xet hash:
96d73b70e2ef0d4023ddbc8883d1ca6b084206605b6b81870ef4d3d4ea161522

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.