An exact Gibbs criterion for two active cache exponents
ProvedThreeSumFuture.relaxed_cache_ledger_gibbs_criterion3sumalgorithmsentropy
Let have at least two labels, let be a real cost for each label, and let be the logarithmic bank cost. Fix a positive slope and a target exponent with .
There is a probability law of positive entropy and a real threshold for which both terms
are strictly below exactly when
The criterion removes the profile and threshold from the relaxed feasibility check. A complete 3SUM algorithm also has other runtime and feasibility conditions.
Preamble
import Mathlib.Algebra.BigOperators.Field import Mathlib.Analysis.SpecialFunctions.Log.NegMulLog import Mathlib.Tactic.FieldSimp import Mathlib.Tactic.Linarith import Mathlib.Tactic.Positivity import Mathlib.Tactic.Ring open Finset open scoped BigOperators set_option maxHeartbeats 1200000
Formal statement
theorem ThreeSumFuture.relaxed_cache_ledger_gibbs_criterion {Q : Type} [Fintype Q] [Nontrivial Q]
(cost : Q → ℝ) (bankLog w exponent : ℝ) (hw : 0 < w)
(hc : 0 < (1 + w) * exponent - 2) :
let c := (1 + w) * exponent - 2
let H := fun p : Q → ℝ => ∑ i, Real.negMulLog (p i)
let Z := ∑ i, Real.exp (-cost i / c)
(∃ p : Q → ℝ, (∀ i, 0 ≤ p i) ∧ (∑ i, p i) = 1 ∧ 0 < H p ∧
∃ τ : ℝ, 2 * (bankLog + τ) < exponent * H p ∧
2 * H p + (∑ i, p i * cost i) - 2 * w * τ < exponent * H p) ↔
2 * w * bankLog < c * Real.log Z := by sorrySource
Original variational reformulation of the weighted-cache exponent ledger by Jionghan Wang. Context: PROOF.md §1–2, https://github.com/Wang-jiong-han/3sum-weighted-cache/blob/e1ae71db2231f172c6541820e2ce0a54aa14fc64/PROOF.md