Nine rational theta translates and interpolation tables
DefinitionMasulloRH_NineShiftWindowsanalytic-number-theoryriemann-hypothesistheta-functions
The weights are (9,58,223,441,447,229,61,8,1)/1024 at shifts -1,-1/2,0,1/2,1,3/2,2,5/2,3. The signed integer rows store endpoint values and affine interpolation error radii in units of 10^-8 on mesh 1/16. The definitions include exact rational tests for curvature, truncation and weights.
Definition code
import Definitions.Def_MasulloRH_InteriorEvaluator
import Definitions.Def_MasulloRH_FixedGaussianTest
namespace MasulloRH.NineShift
open CentralInterval InteriorEvaluator GaussianApproximation
structure Row where
l : ℤ
r : ℤ
e : ℤ
deriving DecidableEq, Repr, Inhabited
def value (n : ℤ) : ℚ := n / 100000000
def grid (j : ℤ) : ℚ := j / 16
def cellB (j : ℤ) : Box := (grid j,grid (j+1))
def refl (j : ℤ) : Bool := decide (j < -12)
def unitFactor : Box := (56418958354/100000000000,56418958356/100000000000)
def uv (z : Box) := mulB unitFactor (expB (negB (sqB z)))
def ud (z : Box) := mulB (subB (mulB (point 4) (sqB z)) (point 2)) (uv z)
def deviation (v : Box) (k : ℤ) : ℚ := mag (subB v (point (value k)))
def thetaCheck (j : ℤ) (row : Row) : Bool :=
let b := refl j
let d := params b (cellB j)
let f := fun i : ℤ => thetaV (params b (point (grid i)))
decide (0 < tailDen d ∧
max (deviation (f j) row.l) (deviation (f (j+1)) row.r) +
mag (thetaD b d)/2048 + tailU d ≤ value row.e)
def pulseCheck (j : ℤ) (row : Row) : Bool :=
let f := fun i : ℤ => uv (point (grid i))
decide (max (deviation (f j) row.l) (deviation (f (j+1)) row.r) +
mag (ud (cellB j))/2048 ≤ value row.e)
noncomputable def line (p : Row) (s : ℝ) : ℝ := (1-s)*(value p.l : ℝ)+s*(value p.r : ℝ)
def Approx (f : ℝ → ℂ) (j : ℤ) (p : Row) : Prop :=
∀ s : ℝ, 0 ≤ s → s ≤ 1 → ‖f ((grid j : ℝ)+s/16) - (line p s : ℂ)‖ ≤ (value p.e : ℝ)
def numerator (i : Fin 9) : ℤ := ![9,58,223,441,447,229,61,8,1] i
def coeff (i : Fin 9) : ℚ := numerator i / 1024
def offset (i : Fin 9) : ℤ := 8*(i.val : ℤ)-16
def shift (i : Fin 9) : ℚ := grid (offset i)
noncomputable def err := residual 0 (fun i => (coeff i : ℂ)) (fun i => (shift i : ℝ))
-- Numerical rows are in units of 1/100000000. A row bounds the error
-- of linear interpolation between its two signed endpoint values.
def thetaData : Array Row := #[
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,2,3⟩,
⟨2,20,16⟩,
⟨20,150,87⟩,
⟨150,881,390⟩,
⟨881,4169,1407⟩,
⟨4169,16323,4193⟩,
⟨16323,54043,10533⟩,
⟨54043,154305,22725⟩,
⟨154305,386628,42811⟩,
⟨386628,863265,71436⟩,
⟨863265,1741062,106873⟩,
⟨1741062,3209927,144823⟩,
⟨3209927,5467231,179210⟩,
⟨5467231,8683023,203725⟩,
⟨8683023,12964734,213498⟩,
⟨12964734,18330152,206290⟩,
⟨18330152,24693992,182843⟩,
⟨24693992,31868326,146361⟩,
⟨31868326,39573256,101392⟩,
⟨39573256,47453503,56202⟩,
⟨47453503,55098861,131793⟩,
⟨55098861,62069556,211110⟩,
⟨62069556,67928624,286685⟩,
⟨67928624,72281453,349831⟩,
⟨72281453,74818662,392453⟩,
⟨74818662,75354934,411562⟩,
⟨75354934,73855288,440929⟩,
⟨73855288,70442047,407892⟩,
⟨70442047,65379975,352437⟩,
⟨65379975,59042101,280364⟩,
⟨59042101,51863140,201622⟩,
⟨51863140,44289763,123360⟩,
⟨44289763,36736660,100237⟩,
⟨36736660,29554636,126980⟩,
⟨29554636,23012892,147558⟩,
⟨23012892,17293724,161202⟩,
⟨17293724,12495680,167114⟩,
⟨12495680,8641389,164692⟩,
⟨8641389,5688124,153976⟩,
⟨5688124,3541043,136011⟩,
⟨3541043,2069537,112902⟩,
⟨2069537,1126039,87508⟩,
⟨1126039,564988,62855⟩,
⟨564988,258610,41472⟩,
⟨258610,106675,24882⟩,
⟨106675,39108,13416⟩,
⟨39108,12545,6414⟩,
⟨12545,3459,2678⟩,
⟨3459,803,960⟩,
⟨803,154,290⟩,
⟨154,24,73⟩,
⟨24,3,15⟩,
⟨3,0,3⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩]
def pulseData : Array Row := #[
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,1,1⟩,
⟨1,1,1⟩,
⟨1,2,1⟩,
⟨2,4,1⟩,
⟨4,6,1⟩,
⟨6,10,1⟩,
⟨10,17,1⟩,
⟨17,27,2⟩,
⟨27,44,2⟩,
⟨44,70,3⟩,
⟨70,111,4⟩,
⟨111,174,5⟩,
⟨174,270,7⟩,
⟨270,417,11⟩,
⟨417,638,15⟩,
⟨638,968,22⟩,
⟨968,1459,31⟩,
⟨1459,2182,44⟩,
⟨2182,3238,62⟩,
⟨3238,4767,87⟩,
⟨4767,6963,122⟩,
⟨6963,10091,168⟩,
⟨10091,14511,231⟩,
⟨14511,20706,315⟩,
⟨20706,29314,425⟩,
⟨29314,41178,569⟩,
⟨41178,57394,754⟩,
⟨57394,79373,992⟩,
⟨79373,108914,1291⟩,
⟨108914,148288,1666⟩,
⟨148288,200324,2130⟩,
⟨200324,268514,2697⟩,
⟨268514,357116,3382⟩,
⟨357116,471257,4200⟩,
⟨471257,617041,5165⟩,
⟨617041,801636,6288⟩,
⟨801636,1033349,7577⟩,
⟨1033349,1321674,9036⟩,
⟨1321674,1677291,10661⟩,
⟨1677291,2112029,12441⟩,
⟨2112029,2638750,14355⟩,
⟨2638750,3271174,16373⟩,
⟨3271174,4023613,18450⟩,
⟨4023613,4910614,20531⟩,
⟨4910614,5946514,22549⟩,
⟨5946514,7144901,24422⟩,
⟨7144901,8517989,26061⟩,
⟨8517989,10075926,27368⟩,
⟨10075926,11826056,28241⟩,
⟨11826056,13772158,28581⟩,
⟨13772158,15913698,28290⟩,
⟨15913698,18245145,27284⟩,
⟨18245145,20755375,25495⟩,
⟨20755375,23427229,22879⟩,
⟨23427229,26237252,19418⟩,
⟨26237252,29155658,15127⟩,
⟨29155658,32146553,10057⟩,
⟨32146553,35168437,4294⟩,
⟨35168437,38174977,8156⟩,
⟨38174977,41116068,14744⟩,
⟨41116068,43939129,21455⟩,
⟨43939129,46590609,28082⟩,
⟨46590609,49017640,34407⟩,
⟨49017640,51169773,40212⟩,
⟨51169773,53000706,45290⟩,
⟨53000706,54469940,49454⟩,
⟨54469940,55544263,52548⟩,
⟨55544263,56199002,54454⟩,
⟨56199002,56418958,55097⟩,
⟨56418958,56199002,55097⟩,
⟨56199002,55544263,54454⟩,
⟨55544263,54469940,52548⟩,
⟨54469940,53000706,49454⟩,
⟨53000706,51169773,45290⟩,
⟨51169773,49017640,40212⟩,
⟨49017640,46590609,34407⟩,
⟨46590609,43939129,28082⟩,
⟨43939129,41116068,21455⟩,
⟨41116068,38174977,14744⟩,
⟨38174977,35168437,8156⟩,
⟨35168437,32146553,4294⟩,
⟨32146553,29155658,10057⟩,
⟨29155658,26237252,15127⟩,
⟨26237252,23427229,19418⟩,
⟨23427229,20755375,22879⟩,
⟨20755375,18245145,25495⟩,
⟨18245145,15913698,27284⟩,
⟨15913698,13772158,28290⟩,
⟨13772158,11826056,28581⟩,
⟨11826056,10075926,28241⟩,
⟨10075926,8517989,27368⟩,
⟨8517989,7144901,26061⟩,
⟨7144901,5946514,24422⟩,
⟨5946514,4910614,22549⟩,
⟨4910614,4023613,20531⟩,
⟨4023613,3271174,18450⟩,
⟨3271174,2638750,16373⟩,
⟨2638750,2112029,14355⟩,
⟨2112029,1677291,12441⟩,
⟨1677291,1321674,10661⟩,
⟨1321674,1033349,9036⟩,
⟨1033349,801636,7577⟩,
⟨801636,617041,6288⟩,
⟨617041,471257,5165⟩,
⟨471257,357116,4200⟩,
⟨357116,268514,3382⟩,
⟨268514,200324,2697⟩,
⟨200324,148288,2130⟩,
⟨148288,108914,1666⟩,
⟨108914,79373,1291⟩,
⟨79373,57394,992⟩,
⟨57394,41178,754⟩,
⟨41178,29314,569⟩,
⟨29314,20706,425⟩,
⟨20706,14511,315⟩,
⟨14511,10091,231⟩,
⟨10091,6963,168⟩,
⟨6963,4767,122⟩,
⟨4767,3238,87⟩,
⟨3238,2182,62⟩,
⟨2182,1459,44⟩,
⟨1459,968,31⟩,
⟨968,638,22⟩,
⟨638,417,15⟩,
⟨417,270,11⟩,
⟨270,174,7⟩,
⟨174,111,5⟩,
⟨111,70,4⟩,
⟨70,44,3⟩,
⟨44,27,2⟩,
⟨27,17,2⟩,
⟨17,10,1⟩,
⟨10,6,1⟩,
⟨6,4,1⟩,
⟨4,2,1⟩,
⟨2,1,1⟩,
⟨1,1,1⟩,
⟨1,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩,
⟨0,0,1⟩]
def weightData : Array ℕ := #[
2639,2809,2990,3183,3389,3607,3840,4087,4351,4631,4930,5248,
5586,5947,6330,6738,7173,7636,8128,8652,9210,9804,10436,11109,
11826,12589,13401,14265,15185,16164,17206,18316,19497,20755,22093,23518,
25035,26650,28368,30198,32145,34219,36425,38775,41275,43937,46771,49788,
52999,56417,60055,63928,68051,72440,77112,82085,87380,93015,99014,105400,
112197,119433,127136,135336,144064,153355,163246,173774,184982,196912,209612,223131,
237521,252840,269147,286505,304983,324653,345591,367880,391606,416863,443748,472367,
502832,535262,569783,606531,645649,687290,731616,778801,829030,882497,939414,1000001,
1133149,1284026,1454992,1648722,1868246,2117001,2398876,2718282,3080217,3490343,3955077,4481690,
5078420,5754603,6520820,7389057,8372898,9487736,10751014,12182494,13804575,15642632,17725425,20085537,
22759896,25790340,29224284,33115452,37524724,42521083,48182699,54598151,61867810,70105413,79439840,90017132,
102002774,115584285,130974154,148413160,168174142,190566269,215939873,244691933,277272285,314190661,356024661,403428794,
457144714,518012825,586985431,665141634,753704213,854058763,967775366,1096633159,1242648168,1408104849,1595591831,1808042415,
2048780466,2321572415,2630686191,2980957988,3377867932,3827625822,4337268279,4914768841,5569162709,6310688109,7150946468,8103083928,
9181997018,10404565717,11789917547,13359726830,15138553791,17154228810,19438287839,22026465795,24959255643,28282541921,32048318627,36315502675,
41150855678,46630028454,52838744609,59874141716,67846291064,76879919766,87116362154,98715771012,111859623215,126753559007,143630599309,162754791421]
def thetaRow (j : ℤ) : Row :=
if -48 ≤ j ∧ j < 24 then thetaData[(j+48).toNat]! else ⟨0,0,1⟩
def pulseRow (j : ℤ) : Row := pulseData[(j+96).toNat]!
def weightQ (j : ℤ) : ℚ := (weightData[(j+96).toNat]! : ℚ)/1000000
def weightCheck (j : ℤ) : Bool :=
let u := grid (j+1)
decide ((expPoint (max u (2*u))).2 ≤ weightQ j)
def net (j : ℤ) (v : Row → ℤ) : ℚ :=
value (v (pulseRow j)) - ∑ i : Fin 9, coeff i * value (v (thetaRow (j-offset i)))
def rad (j : ℤ) : ℚ :=
value (pulseRow j).e + ∑ i : Fin 9, coeff i * value (thetaRow (j-offset i)).e
def capQ (j : ℤ) : ℚ := max |net j Row.l| |net j Row.r| + rad j
def cellCost (j : ℤ) : ℚ := weightQ j*(capQ j)^2/16
end MasulloRH.NineShift
Source
Masullo fixed-Gaussian approximation route. The witness uses the mission theta function, rational interval arithmetic and the published finite theta truncation. The energy estimate is unconditional. https://prove2.me/definitions/56288084-20c7-4a74-8ace-7f6e0e9ebe9f https://prove2.me/definitions/301c9181-2bf8-5b2d-8998-b54d3a671ea6