A six-term exponent certificate for sparse targets in the ternary 3SUM cache
ProvedThreeSumFuture.sparse_target_threshold_certificateConsider the six exponents in Wang’s ternary 3SUM cache analysis, which charge the cache, requested rows, source enumeration, field, unweighted rows, and input scan. Suppose the target count is at most , with . Use the registered weights 512 and 1025. Keep Wang’s distribution and two tilts, decrease the cut slope by , and increase the complementary drop slope by . The slopes satisfy the base-layer and total-cost constraints. In the six-term exponent calculation, apply the factor to the query term and keep the four threshold-independent terms at their full-size bounds. Every term is strictly below
In particular the six terms are below for and below for . To obtain a general 3SUM time bound from this calculation one would still need to produce the sparse target list in time and bound the remaining work of the retuned program.
import Mathlib.Analysis.SpecialFunctions.Log.Deriv import Mathlib.Tactic.NormNum import Mathlib.Tactic.Linarith import Definitions.Def_Submission_Weighted_Parameters set_option autoImplicit false set_option maxHeartbeats 1500000 set_option maxRecDepth 12000
theorem ThreeSumFuture.sparse_target_threshold_certificate (δ : ℝ) (hδ : 0≤δ) (hδ1 : δ≤1) :
(0 < WeightedCacheParameters.dropSlope+33.66*δ ∧
1025*(WeightedCacheParameters.alpha1+2*WeightedCacheParameters.alpha2) <
2*(WeightedCacheParameters.cutSlope-33.66*δ) ∧
(WeightedCacheParameters.cutSlope-33.66*δ)+(WeightedCacheParameters.dropSlope+33.66*δ) =
512*WeightedCacheParameters.pi1+1025*WeightedCacheParameters.pi2) ∧
(let B := Real.log WeightedCacheParameters.bankArg -
(WeightedCacheParameters.cutSlope-33.66*δ)*Real.log WeightedCacheParameters.yRoot
let Qc := WeightedCacheParameters.pi1*Real.log WeightedCacheParameters.queryArg1 +
WeightedCacheParameters.pi2*Real.log WeightedCacheParameters.queryArg2 -
(WeightedCacheParameters.dropSlope+33.66*δ)*Real.log WeightedCacheParameters.zRoot
let h := WeightedCacheParameters.Hn
let g := WeightedCacheParameters.Gn
∀ e∈([2*B/h,((2-δ)*h-g+2*Qc)/h,2*WeightedCacheParameters.An/h,
(h+g)/h,(2*h-g)/h,1] : List ℝ),
e < max (1.92027941054-(397/1000)*δ) (7/4)) := by sorry