cfahlgren1/math / lean /OAI /NumberTheory /Jacobsthal /Partitions /StrongReferenceTransport.lean
cfahlgren1's picture
download
raw
5.06 kB
import OAI.NumberTheory.Jacobsthal.Partitions.CrossingBandGeometry
import OAI.NumberTheory.Jacobsthal.Paths.ReferenceHistoryAdmission
namespace OAI
namespace Erdos970
open scoped _root_.Erdos970
section
namespace NumberTheoryLean.StrongReferenceTransport
open FinitePathGeometry PrimeHistories PrimeTiltGeometry PrimeBinMembership ActualPrimeHigh
open ReferenceAdmission ReferenceHistoryAdmission LogarithmicBinPartition
open ErdosPrimeInputs.HarmonicPrimeMeasure
attribute [local instance] Classical.propDecidable
def StrongState (z : Node) : Prop := 2 ≤ z.gap ∧ (z.side=.even → z.cutoff+2 ≤ z.gap)
theorem strong_child_uncapped {w ell : ℝ} (hw : 1 < w) (hell : 0 ≤ ell) {z : Node}
(hs : Valid z.side z.ratio) (hz : Consistent z) (p : ℕ) (hp : p.Prime)
(hx : ell < primeExponent w p) (hcap : capGuard z.closed z.cutoff (primeExponent w p))
(ha : childAdmitted z.side z.gap (primeExponent w p)) : p ∈ uncappedChildren w ell z := by
have hx0 : 0 < primeExponent w p := hell.trans_lt hx
have hxp : primeExponent w p ≤ z.cutoff := by
cases hcl : z.closed with
| false => have hh : primeExponent w p < z.cutoff := by simpa [capGuard,hcl] using hcap
exact hh.le
| true => simpa [capGuard,hcl] using hcap
have hp0 : (0:ℝ) < p := by exact_mod_cast hp.pos
have hpLe := (exponent_le_iff hw hp0).mp hxp
have hprime := Nat.mem_primesLE.mpr ⟨(Nat.le_floor_iff
(Real.rpow_pos_of_pos (zero_lt_one.trans hw) z.cutoff).le).mpr hpLe,hp⟩
apply Finset.mem_filter.mpr
refine ⟨hprime,hx,hcap,?_⟩
have hlo := cap_lower_ratio hs hz hx0 hcap
cases hi : z.side with
| even => exact hlo
| odd =>
rw [hi] at ha
apply max_le
· have h2 := (le_max_left (2*primeExponent w p) (primeExponent w p+2)).trans ha
have hd : 3 ≤ z.gap/primeExponent w p := (le_div_iff₀ hx0).mpr (by linarith)
unfold childRatio
linarith
· exact hlo
theorem strong_child_state {w : ℝ} {z : Node} {p : ℕ} (hg : StrongState z)
(hx : 0 < primeExponent w p) (hcap : capGuard z.closed z.cutoff (primeExponent w p))
(ha : childAdmitted z.side z.gap (primeExponent w p)) : StrongState (step w z p) := by
have hxp : primeExponent w p ≤ z.cutoff := by
cases hcl : z.closed with
| false => have hh : primeExponent w p < z.cutoff := by simpa [capGuard,hcl] using hcap
exact hh.le
| true => simpa [capGuard,hcl] using hcap
cases hi : z.side with
| even =>
have hh := hg.2 hi
constructor
· change 2 ≤ z.gap-primeExponent w p
linarith
· simp [step,hi,Side.flip]
| odd =>
rw [hi] at ha
have hh := (le_max_right (2*primeExponent w p) (primeExponent w p+2)).trans ha
constructor
· change 2 ≤ z.gap-primeExponent w p
linarith
· intro _hside
exact hh
theorem strong_history_transport {w ell : ℝ} (hw : 1 < w) (hell : 0 ≤ ell)
(z : Node) (ps : List ℕ) (hs : Valid z.side z.ratio) (hz : Consistent z) (hg : StrongState z)
(hD : ps.Pairwise (· > ·))
(hP : ∀ p ∈ ps,p.Prime ∧ ell < primeExponent w p ∧ capGuard z.closed z.cutoff (primeExponent w p))
(ha : admitted w z.side z.gap ps) : uncappedAllowed w ell z ps ∧ StrongState (terminal w z ps) := by
induction ps generalizing z with
| nil => exact ⟨trivial,hg⟩
| cons p ps ih =>
have hp := hP p (by simp)
have hc := strong_child_uncapped hw hell hs hz p hp.1 hp.2.1 hp.2.2 ha.1
have hone : uncappedAllowed w ell z [p] := ⟨hc,trivial⟩
obtain ⟨U,_hU,hU⟩ := (uncapped_iff_exists_ceiling w ell z [p]).mp hone
have hchild := ((allowed_cons w ell U z p []).mp hU).1
have hr : 0 < z.gap := by linarith [hg.1]
have hvalid := child_valid hs hchild
have hcons := step_consistent hell hr hs hchild
have hstrong := strong_child_state hg (hell.trans_lt hp.2.1) hp.2.2 ha.1
have htailP : ∀ q ∈ ps,q.Prime ∧ ell < primeExponent w q ∧
capGuard (step w z p).closed (step w z p).cutoff (primeExponent w q) := by
intro q hq
have hh := hP q (by simp [hq])
refine ⟨hh.1,hh.2.1,?_⟩
have hqp : q < p := (List.pairwise_cons.mp hD).1 q hq
have hq0 : (0:ℝ)<q := by exact_mod_cast hh.1.pos
have hqp' : (q:ℝ)<p := by exact_mod_cast hqp
have hlog := Real.log_lt_log hq0 hqp'
change primeExponent w q < primeExponent w p
exact div_lt_div_of_pos_right hlog (Real.log_pos hw)
have ht := ih (step w z p) hvalid hcons hstrong (List.pairwise_cons.mp hD).2 htailP ha.2
exact ⟨⟨hc,ht.1⟩,ht.2⟩
theorem source_strong_state {B : ℝ} (hB : 3 ≤ B) (z : Node) (_hi : z.side=.even)
(h199 : 199/100 ≤ z.ratio) (hz : Consistent z) (hcut : z.cutoff=B) : StrongState z := by
have hr : 0 < z.ratio := by linarith
have he := (eq_div_iff hr.ne').mp hz
rw [hcut] at he
have hm := mul_le_mul_of_nonneg_left h199 (show 0 ≤ B by linarith)
constructor
· nlinarith
· intro _
rw [hcut]
nlinarith
end NumberTheoryLean.StrongReferenceTransport
end
end Erdos970
end OAI

Xet Storage Details

Size:
5.06 kB
·
Xet hash:
b05d0ec64ff37014222ee12a3fe454ef0fb64c10963d1eaada58d3d480d1fe88

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