Buckets:
| import OAI.NumberTheory.DirichletL.Parameters | |
| import Mathlib.Algebra.BigOperators.Fin | |
| import Mathlib.Algebra.BigOperators.Field | |
| namespace OAI | |
| noncomputable section | |
| open scoped BigOperators | |
| namespace SevenEighths.Parameters | |
| theorem exists_distinct_slot_lengths (L : ℝ) (hL : 0<L) : | |
| ∃N : ℕ,0<N ∧ ∃ell : Fin N→ℝ,Function.Injective ell ∧ | |
| (∀j,0<ell j ∧ ell j<L) ∧ (∑j,ell j)=1/6 := by | |
| obtain ⟨N,hN⟩ := exists_nat_gt (max 1 (1/(3*L))) | |
| have hN1 : (1:ℝ)<N := (le_max_left _ _).trans_lt hN | |
| have hNp : 0<(N:ℝ) := by linarith | |
| have hNnat : 0<N := by exact_mod_cast hNp | |
| have hNL : 1/(3*L)<(N:ℝ) := (le_max_right _ _).trans_lt hN | |
| have hsmall : 1/(3*(N:ℝ))<L := by | |
| have hh := (div_lt_iff₀ (show 0<3*L by positivity)).mp hNL | |
| apply (div_lt_iff₀ (show 0<3*(N:ℝ) by positivity)).mpr | |
| nlinarith | |
| let w : Fin N→ℝ := fun j=>1+(j.val:ℝ)/(N:ℝ) | |
| let A : ℝ := ∑j,w j | |
| have hw (j : Fin N) : 1≤w j ∧ w j<2 := by | |
| have hj : (j.val:ℝ)<N := by exact_mod_cast j.isLt | |
| have hdiv : (j.val:ℝ)/(N:ℝ)<1 := (div_lt_one hNp).mpr hj | |
| dsimp only [w] | |
| constructor | |
| · linarith [div_nonneg (Nat.cast_nonneg j.val) hNp.le] | |
| · linarith | |
| have hA : (N:ℝ)≤A := by | |
| calc | |
| _ = ∑_j : Fin N,(1:ℝ) := by simp | |
| _ ≤ _ := Finset.sum_le_sum fun j _=>(hw j).1 | |
| have hAp : 0<A := hNp.trans_le hA | |
| let ell : Fin N→ℝ := fun j=>w j/(6*A) | |
| refine ⟨N,hNnat,ell,?_,?_,?_⟩ | |
| · intro j k he | |
| have hden : 6*A≠0 := by positivity | |
| have hwjk : w j=w k := (div_left_inj' hden).mp he | |
| have hjk : (j.val:ℝ)/(N:ℝ)=(k.val:ℝ)/(N:ℝ) := by dsimp [w] at hwjk;linarith | |
| have he' : (j.val:ℝ)=(k.val:ℝ) := (div_left_inj' hNp.ne').mp hjk | |
| apply Fin.ext | |
| exact_mod_cast he' | |
| · intro j | |
| constructor | |
| · exact div_pos (by linarith [(hw j).1]) (by positivity) | |
| · calc | |
| ell j < 2/(6*A) := (div_lt_div_iff_of_pos_right (by positivity)).mpr (hw j).2 | |
| _ ≤ 2/(6*(N:ℝ)) := div_le_div_of_nonneg_left (by norm_num) (by positivity) (by linarith) | |
| _ = 1/(3*(N:ℝ)) := by ring | |
| _ < L := hsmall | |
| · dsimp only [ell] | |
| rw [←Finset.sum_div] | |
| change A/(6*A)=1/6 | |
| field_simp | |
| theorem exists_physical_slot_lengths (dmin dmax mesh R : ℝ) | |
| (hdmin : 0<dmin) (hd : dmin≤dmax) (hm : 0<mesh) (hR : 0<R) : | |
| ∃N : ℕ,0<N ∧ ∃ell : Fin N→ℝ,∃rmin : ℝ,0<rmin ∧ | |
| Function.Injective ell ∧ (∑j,ell j)=1/6 ∧ | |
| (∀j,0<ell j ∧ dmax*rmin≤ell j ∧ ell j≤dmin*mesh ∧ ell j≤dmin*R) ∧ | |
| (∀d : ℝ,dmin≤d → d≤dmax → ∀j,rmin≤ell j/d ∧ ell j/d≤mesh ∧ ell j/d≤R) := by | |
| obtain ⟨N,hN,ell,hi,he,hS⟩ := exists_distinct_slot_lengths (dmin*min mesh R) | |
| (mul_pos hdmin (lt_min hm hR)) | |
| have hne : (Finset.univ : Finset (Fin N)).Nonempty := ⟨⟨0,hN⟩,Finset.mem_univ _⟩ | |
| obtain ⟨j,hj,hjmin⟩ := Finset.exists_min_image Finset.univ ell hne | |
| have hmax : 0<dmax := hdmin.trans_le hd | |
| let rmin := ell j/(2*dmax) | |
| have hr : 0<rmin := div_pos (he j).1 (by positivity) | |
| have hlo (k : Fin N) : dmax*rmin≤ell k := by | |
| have hk := hjmin k (Finset.mem_univ k) | |
| have hiden : dmax*rmin=ell j/2 := by dsimp [rmin]; field_simp | |
| rw [hiden] | |
| linarith [(he j).1] | |
| have hup (k : Fin N) : ell k≤dmin*mesh ∧ ell k≤dmin*R := by | |
| constructor | |
| · exact (he k).2.le.trans (mul_le_mul_of_nonneg_left (min_le_left _ _) hdmin.le) | |
| · exact (he k).2.le.trans (mul_le_mul_of_nonneg_left (min_le_right _ _) hdmin.le) | |
| refine ⟨N,hN,ell,rmin,hr,hi,hS,fun k=>⟨(he k).1,hlo k,(hup k).1,(hup k).2⟩,?_⟩ | |
| intro d hd' hd'' k | |
| have hd0 : 0<d := hdmin.trans_le hd' | |
| refine ⟨(le_div_iff₀ hd0).mpr ?_,(div_le_iff₀ hd0).mpr ?_,(div_le_iff₀ hd0).mpr ?_⟩ | |
| · exact (by nlinarith : rmin*d≤dmax*rmin).trans (hlo k) | |
| · exact (hup k).1.trans (by nlinarith) | |
| · exact (hup k).2.trans (by nlinarith) | |
| end SevenEighths.Parameters | |
| end | |
| end OAI | |
Xet Storage Details
- Size:
- 3.96 kB
- Xet hash:
- 7345969b8b80673b3f25ac8531522307ae203996f9fb44f7420f1d2c281e353c
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.