One node and the three-set recursion in the Chan–He reduction #
This file proves that the reduction for three sets, reduction n U, is correct and makes
polylogarithmically many instances, following [ChanHe2020, Theorem 5.1]. A node of the recursion
tree consists of three sets and a modulus M.
- One node. The elements that are alone in their residue class modulo
Mare called light. The first two arrays hold each light element of the first two sets at the index of its remainder. The third array holds-c, for each light elementcof the third set, at the remainder of-cand once moreMcells further on. All other cells hold padding. Padding is too large to take part in a solution, anda + b + c = 0makes the remainders ofaandbadd up to that of-c, or to that plusM. So the Convolution-3SUM instance of the node has a solution iff the light elements of the three sets have a 3SUM solution (node_correct). - The recursion. A 3SUM solution consists of three light elements, or one of its elements is heavy
(
hasSol_split). The three children of a node replace one set each by its heavy elements. - The depth. A set that has been replaced
jtimes has at mostn / d_jelements, whered₀ = 1andd_{j+1} = 2 d_j²(Replaced.heavy). Sinced_j > nforj = height n(lt_dSeq_height), it is then empty (Replaced.eq_empty), so no node lies below thefuel nlevels of the tree that are built. This givesnodes_correct, by induction on the number of levels, andreduction_correct, whose hypotheses on the three sets are collected inAdmissible. - The size. A ternary tree with
fuel nlevels has at most3 ^ fuel n ≤ (2⌊log₂ n⌋ + 2)⁵nodes (length_reduction_le). The entries of the arrays are bounded inabs_arrXY_leandabs_arrZ_le, and the count for the searches of one node inscan_node_le.
Directly adapted from Recursion.lean at the pinned
anthropics/formal-math@16a5ce41304fcdaea4e0be7c132e1c361dc26da5.
Main results #
reduction_correct,length_reduction_le: correct reduction and polylogarithmic node count.
References #
- T. M. Chan and Q. He, Reducing 3SUM to Convolution-3SUM, Theorem 5.1.
Light elements and the cells of the arrays #
One node #
Correctness of one node. Its Convolution-3SUM instance, read at any length N ≥ 2M, has a
solution iff the light elements of the three sets have a 3SUM solution.
The sizes of the sets along the recursion #
The sequence d₀ = 1, d_{j+1} = 2 d_j² of [CH20], in closed form.
Instances For
height n is at least 1, so the subtraction in fuel does not truncate.
What is known about a set T that has been replaced j times by its heavy elements: its
elements have absolute value at most U, and there are at most n / d_j of them.
- bdd : Bdd U T
The elements have absolute value at most
U. There are at most
n / d_jelements.
Instances For
One more replacement: if at most |T|²/(2n) elements of T are heavy, then these are at most
n / d_{j+1}.
The recursion tree #
A solution consists of three light elements, or it contains a heavy one. The brackets are those
of the list of the children in nodes.
The hypotheses on the set Q of candidates for the two searches: primes, all at most m, and
enough of them for card_heavy_modulus_le.
The candidates are primes.
The candidates are at most
m.There are at least
√(18n) Λcandidates.
Instances For
The induction behind reduction_correct. If the i-th set has been replaced j_i times, then
f levels of the tree are enough as soon as f + j₁ + j₂ + j₃ ≥ 3 (height n) - 2.
The reduction for three sets #
The hypotheses on an input of reduction n U: each of the three sets has at most n elements,
all of absolute value at most U.
The first set has at most
nelements.The second set has at most
nelements.The third set has at most
nelements.- bdd₁ : Bdd U S₁
The elements of the first set have absolute value at most
U. - bdd₂ : Bdd U S₂
The elements of the second set have absolute value at most
U. - bdd₃ : Bdd U S₃
The elements of the third set have absolute value at most
U.
Instances For
The sets of a node satisfy the hypotheses that the sets at the root satisfy.
Correctness of the reduction for three sets. Let the three sets have at most n ≥ 1
elements each, all of absolute value at most U, and let N ≥ 2 * mPar n U ^ 2. Then 3SUM has a
solution iff the Convolution-3SUM instance of some node has one at length N.
The two searches of a node go through at most m = mPar n U primes each, and its three sets
have at most 3n elements in all. This bounds a number of pairs (candidate prime, element), not a
running time.