Introduction
Shift Equivalence Testing (SET) asks the following seemingly simple question: Given two polynomials f , g ∈ Q [ x 1 , … , x n ] f,g \in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] , decide whether there is a vector a = ( a 1 , … , a n ) ∈ Q n \mathbf{a}=(a_1,\ldots,a_n) \in\mathbb{Q}^n a = ( a 1 , … , a n ) ∈ Q n such that
f ( x + a ) ≡ g ( x ) , f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}), f ( x + a ) ≡ g ( x ) ,
and output such a vector if it exists. The symbol ≡ \equiv ≡ emphasizes that the equality is an identity of formal polynomials, not merely an equality of functions. Over Q \mathbb{Q} Q these two notions coincide. The same is true, and the Taylor expansions used below remain valid, over any field of characteristic zero or characteristic larger than the degree under consideration. Note that shift equivalence is indeed an equivalence relation. It is reflexive, since f f f can be transformed into itself by the zero shift. When f ( x + a ) = g ( x ) f(\mathbf{x}+\mathbf{a})=g(\mathbf{x}) f ( x + a ) = g ( x ) , then also f ( x ) = g ( x − a ) f(\mathbf{x})=g(\mathbf{x}-\mathbf{a}) f ( x ) = g ( x − a ) , so it is symmetric. And if shifting by a transforms f f f into g g g and shifting by b \mathbf{b} b transforms g g g into h h h , then a + b \mathbf{a}+\mathbf{b} a + b transforms f f f into h h h , giving transitivity.
The algorithmic problem of Shift Equivalence Testing first appeared in computer algebra and symbolic computation. Grigoriev [26 ] designed the first polynomial-time algorithms for this problem. He assumes that the polynomials are given in dense representation, as a list of all coefficients including those that are zero. For an n n n -variate polynomial of total degree at most d d d , this list contains ( n + d d ) \binom{n+d}{d} ( d n + d ) coefficients. His deterministic characteristic-zero algorithm takes n O ( d ) n^{O(d)} n O ( d ) time, so zero-padding a sparse input does not give a running time polynomial in the sparse parameters. Grigoriev also gives a randomized algorithm for large enough finite characteristic and a quantum algorithm for characteristic two.
For polynomials with few nonzero coefficients, a running time polynomial in the dense input size may be far larger than polynomial in the sparse input length. Dvir, Oliveira, and Shpilka [16 ] studied SET for polynomials represented compactly by arithmetic circuits. For instance, the determinant of an n × n n \times n n × n matrix has n ! n! n ! nonzero monomials and an arithmetic circuit of polynomial size. Dvir et al. give a randomized algorithm for SET with running time polynomial in the circuit size and the total degree d d d . Their algorithm also works with black-box access to f f f and g g g and bounds on their degree and circuit size. It proceeds by a reduction to polynomial identity testing.
The polynomial identity testing problem (PIT) is a famous problem in complexity theory. Given a polynomial f ∈ Q [ x ] f \in\mathbb{Q}[x] f ∈ Q [ x ] as an arithmetic circuit C C C , is f f f identically zero? There is a simple randomized polynomial-time algorithm for the problem based on the so-called Schwartz–Zippel lemma [38 Zip79] , which essentially inserts a random point from a large enough set and checks whether it evaluates to zero. Derandomizing PIT is a big open problem in complexity theory. In particular, it implies non-uniform circuit lower bounds [31 ] , another major open problem in the field. Note that the algorithm by Dvir et al. shows that SET reduces to PIT under Turing reductions. But also the converse is true. The polynomial f f f is identically zero iff it is shift-equivalent to the zero polynomial. Therefore, a full derandomization of SET is out of reach of current methods.
Since finding a deterministic algorithm for general PIT is a hard problem, researchers have developed deterministic identity tests for restricted circuit classes; see, e.g., [15 ] . For read-once oblivious algebraic branching programs (ROABPs), white-box PIT is deterministic polynomial time [37 ] , while deterministic black-box PIT is known in quasipolynomial time [18 , 19 ] . The framework of Dvir, Oliveira, and Shpilka [16 ] therefore gives the corresponding white-box and black-box SET algorithms for ROABPs.
Their deterministic reduction requires closure properties. Sparse polynomials are not closed under shifts, so it does not apply directly and DOS’14 states no deterministic sparse-class algorithm. Indirectly, however, representing both explicit sparse inputs as ROABPs in one common variable order and using white-box ROABP PIT gives deterministic SET with poly ( n , s , t , d ) \operatorname{poly}(n,s,t,d) poly ( n , s , t , d ) arithmetic complexity. This is not polynomial in the binary sparse input size when d d d is exponential.
Our contribution is a deterministic algorithm polynomial in the length of explicit sparse input over Q \mathbb{Q} Q . We now specify this input model. Each polynomial is given as an explicit list of nonzero terms
c x 1 α 1 ⋯ x n α n , c ∈ Q , c x_1^{\alpha_1} \cdots x_n^{\alpha_n}, \qquad c \in\mathbb{Q}, c x 1 α 1 ⋯ x n α n , c ∈ Q ,
where the coefficient is given explicitly in binary representation. Furthermore, the exponents are also encoded in binary. We call this an explicit sparse representation . Thus, the natural input parameters are the number of variables n n n , the sparsities s = sp ( f ) s=\operatorname{sp}(f) s = sp ( f ) and t = sp ( g ) t=\operatorname{sp}(g) t = sp ( g ) , the height, equivalently bit-size, of the coefficients of f , g f,g f , g , and log d \log d log d , where d d d bounds the total degrees of f f f and g g g . (Sometimes, the maximum bit-size of the coefficients is called logarithmic height, but we use the term height for brevity.) While low degree is conventional in algebraic complexity, high degree is natural for sparse or lacunary polynomials: an exponent bounded by d d d uses only O ( log d ) O(\log d) O ( log d ) bits. Classical sparse interpolation likewise targets this regime: Ben-Or–Tiwari has algebraic-RAM complexity polynomial in log d \log d log d [10 ] , and Garg–Schost obtains such dependence under straight-line-program access [27 ] . The indirect deterministic ROABP algorithm described above has polynomial dependence on d d d , so it does not give polynomial time in the binary sparse input length.2 Our algorithm reduces the degree dependence to poly ( log d ) \operatorname{poly}(\log d) poly ( log d ) for explicit sparse inputs and also provides polynomial bit complexity over Q \mathbb{Q} Q .
More formally, let Sparse SET denote the following problem: given two polynomials f , g ∈ Q [ x 1 , … , x n ] f,g \in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] in sparse representation, decide whether there exists a shift a ∈ Q n \mathbf{a} \in\mathbb{Q}^n a ∈ Q n such that
f ( x + a ) ≡ g ( x ) . f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}). f ( x + a ) ≡ g ( x ) .
As mentioned above, PIT for sparse polynomials is trivial in the sparse representation: one simply compares the monomial list with the zero list. The issue is now that the sparsity is not preserved under shifts. A single monomial can become very large: if we define supp ( a ) : = { i : a i ≠ 0 } \operatorname{supp}(\mathbf{a}) := \{i : a_i \ne0\} supp ( a ) := { i : a i = 0 } , then
( x + a ) γ = ∏ i = 1 n ( x i + a i ) γ i (\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}} = \prod_{i=1}^{n}(x_i+a_i)^{\gamma_i} ( x + a ) γ = i = 1 ∏ n ( x i + a i ) γ i
has exactly
∏ i ∈ supp ( a ) ( γ i + 1 ) \prod_{i\in\operatorname{supp}(\mathbf{a})}(\gamma_i+1) i ∈ supp ( a ) ∏ ( γ i + 1 )
nonzero monomials. This number can be exponential in the sparse input length, already for a single monomial and even when the exponents are given in unary. Thus, even if f f f is sparse, the shifted polynomial f ( x + a ) f(\mathbf{x}+\mathbf{a}) f ( x + a ) may be dense. Dvir, Oliveira, and Shpilka [16 Section 6] pointed out precisely this obstruction: their methods “almost” give a quasipolynomial-time algorithm for shift equivalence of sparse polynomials, but the direct argument breaks down because sparse polynomials are not closed under shifts. For explicit sparse inputs, the indirect ROABP approach described above gives a deterministic algorithm using poly ( n , s , t , d ) \operatorname{poly}(n,s,t,d) poly ( n , s , t , d ) arithmetic operations, which is not polynomial in the sparse input length when d d d is exponential. This leads to the central question addressed in this paper.
Problem 1.1. Can Sparse SET over Q \mathbb{Q} Q be solved using poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) arithmetic operations and bit complexity poly ( n , s , t , log d , τ ) \operatorname{poly}(n,s,t,\log d,\tau) poly ( n , s , t , log d , τ ) ?
In this paper, we answer the question affirmatively. The first key ingredient is a new structural lemma showing that, in yes instances, the witnessing shift is very special, which forces the relevant intermediate polynomials to remain sparse. This addresses the problem that sparse polynomials are not closed under shifts.
The second problem stems from the fact that the algorithm in [16 ] has running time polynomial in d d d , so there is no easy way of adapting this algorithm to a running time of poly ( log d ) \operatorname{poly}(\log d) poly ( log d ) . The algorithm of [16 ] iteratively solves a system of equations yielding certain intermediate polynomials. We modify this approach in a nontrivial manner by showing that it is enough to store and compare all intermediate polynomials in the sparse representation without expanding arbitrary shifts.
There are also further obstacles. Even in yes instances over Q \mathbb{Q} Q , one must first show that there exists a witnessing shift a \mathbf{a} a in Q n \mathbb{Q}^n Q n , rather than only over an algebraic extension3 . One must then prove that such a shift has polynomially bounded bit complexity in the input size, and for the search version, compute and output it within the same bounds.
Our results
Our main theorem is a deterministic algorithm for shift equivalence of explicitly given sparse multivariate polynomials over the rationals, with running time polynomial in the sparse input parameters. We also prove polynomial bit complexity and output a shift of polynomial bit-size.
For an extension field K ⊇ Q \mathbb{K} \supseteq\mathbb{Q} K ⊇ Q , define
S f , g ( K ) : = { a ∈ K n : f ( x + a ) ≡ g ( x ) } . S_{f,g}(\mathbb{K}) := \{ \mathbf{a} \in\mathbb{K}^{n} : f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}) \}. S f , g ( K ) := { a ∈ K n : f ( x + a ) ≡ g ( x )} .
In particular, S f , g ( Q ‾ ) S_{f,g}(\overline{\mathbb{Q}}) S f , g ( Q ) denotes the set of shifts over the algebraic closure. The rationality result below shows that if S f , g ( Q ‾ ) S_{f,g}(\overline{\mathbb{Q}}) S f , g ( Q ) is nonempty, then it contains a rational point. Thus, for the rational decision problem, we may write
S f , g : = S f , g ( Q ) S_{f,g} := S_{f,g}(\mathbb{Q}) S f , g := S f , g ( Q )
without changing the decision problem.
We state the main results over Q \mathbb{Q} Q to keep the notation simple. The structural statements and arithmetic algorithms are purely algebraic and remain valid over any field K \mathbb{K} K of characteristic zero or characteristic larger than d d d , after replacing Q \mathbb{Q} Q by K \mathbb{K} K and omitting the height and bit-complexity assertions.
Theorem 1.2 (Main theorem). Let f , g ∈ Q [ x 1 , … , x n ] f,g \in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] be given in explicit sparse representation, with sparsities s s s and t t t and degree at most d d d . There is a deterministic algorithm using poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) arithmetic operations that decides whether S f , g S_{f,g} S f , g is nonempty. If S f , g ≠ ∅ S_{f,g} \ne\varnothing S f , g = ∅ , the algorithm outputs a shift a ∈ S f , g \mathbf{a} \in S_{f,g} a ∈ S f , g .
If the input coefficients have height at most τ \tau τ , then one can choose the output shift to have height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) , and the algorithm can be implemented using poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations.
The arithmetic algorithm is proved in Theorem 4.3 . The bit-complexity analysis over Q \mathbb{Q} Q is given in proposition 4.4, and the polynomial-height output guarantee uses the small rational witness theorem, Theorem 1.5. This exponentially improves on the indirect ROABP consequence of the DOS’14 framework described above, whose running time has polynomial dependence on d d d , rather than on log d \log d log d . In addition, that framework does not by itself address the existence of a rational shift of polynomial bit-size. Thus both the poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) arithmetic bound and the bit-complexity guarantee require additional ideas.
Black-box access. Over Q \mathbb{Q} Q , given separate evaluation oracles for f , g f,g f , g promised to be sparse, Ben-Or–Tiwari interpolation [10 ] recovers their explicit representations using poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) queries and algebraic-RAM operations. This model permits unit-cost integer remainder operations in addition to arithmetic, and oracle calls are counted at unit cost. Applying Theorem 1.2 to the reconstructed representations gives the same bound in this model. This does not imply the same bit bound: evaluating x d x^d x d at 2 2 2 already returns a ( d + 1 ) (d+1) ( d + 1 ) -bit integer. For integer coefficients of magnitude at most H H H , the modular oracle of Bläser–Jindal [BJ14] yields deterministic poly ( n , s , t , log d , log H ) \operatorname{poly}(n,s,t,\log d,\log H) poly ( n , s , t , log d , log H ) bit-complexity interpolation. Division-free integer circuits simulate this oracle by evaluating each gate modulo the queried modulus; the cost of this simulation also depends on the circuit description size.
The first key technical ingredient is the following sparsity bound. It rules out the possibility that, in a yes instance, the sparse output is obtained only by cancellations among large shifted monomial expansions.
Theorem 1.3 (Structural sparsity bound). Let f , g ∈ Q [ x 1 , … , x n ] f,g \in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] have sparsities s s s and t t t , respectively, and degree at most d d d . If a ∈ S f , g \mathbf{a} \in S_{f,g} a ∈ S f , g , then for every monomial x γ \mathbf{x}^{\gamma} x γ appearing in f f f or in g g g ,
∏ i ∈ supp ( a ) ( γ i + 1 ) ≤ s t . \prod_{i \in\operatorname{supp}(\mathbf{a})}(\gamma_i+1) \le st. i ∈ supp ( a ) ∏ ( γ i + 1 ) ≤ s t .
In fact, the theorem we prove is much stronger than the statement above. It applies already when g ( x ) g(\mathbf{x}) g ( x ) and f ( x + a ) f(\mathbf{x}+\mathbf{a}) f ( x + a ) agree only in degrees at least some threshold r r r . In that case, for every monomial of f f f of degree at least r r r , the part of its shifted expansion that can contribute to degrees at least r r r has sparsity at most s t st s t . This truncated form is what is used during the degree-by-degree descent in the proof of Theorem 1.2 ; see Lemma 3.2 . The stronger version is needed for our analysis to work.
Remark 1.4. The inequality in Theorem 1.3 does not bound the total degree of f f f or g g g . It only bounds the exponents in the coordinates in which the shift is nonzero. This is the relevant restriction for sparse representation: variables outside supp ( a ) \operatorname{supp}(\mathbf{a}) supp ( a ) do not create binomial expansions, while a monomial x γ \mathbf{x}^{\boldsymbol{\gamma}} x γ expands into
∏ i ∈ supp ( a ) ( γ i + 1 ) \prod_{i\in\operatorname{supp}(\mathbf{a})}(\gamma_i+1) i ∈ supp ( a ) ∏ ( γ i + 1 )
terms in the shifted coordinates. Thus, the theorem does not say anything about how large the exponents in variables outside the support of the shift could be; it rules out a large binomial expansion in the shifted coordinates.
The second ingredient, needed for bit complexity over Q \mathbb{Q} Q , is that a small rational witness always exists. This is not automatic from the existence of an arbitrary shift: a priori, the solution set could contain only shifts over an algebraic extension, or contain rational shifts only with very large coordinates. We prove that neither obstruction occurs for sparse SET.
Theorem 1.5 (Small rational witness). Let f , g ∈ Q [ x 1 , … , x n ] f,g\in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] have sparsities s s s and t t t , degree at most d d d , and coefficient height at most τ \tau τ . If S f , g ( Q ) ≠ ∅ S_{f,g}(\mathbb{Q})\ne\varnothing S f , g ( Q ) = ∅ , then S f , g ( Q ) S_{f,g}(\mathbb{Q}) S f , g ( Q ) contains a shift whose coordinates have height
poly ( n , s , t , τ , log d ) . \operatorname{poly}(n,s,t,\tau,\log d). poly ( n , s , t , τ , log d ) . Moreover, the polynomial bound is explicit.
The proof of Theorem 1.5 is deferred to Appendix § 7 . It uses the structural sparsity bound again. Once a shift exists, the structural theorem restricts the derivatives of f f f in the shifted coordinates to a polynomial-dimensional space. Inside this space, the translation from f f f to g g g can be represented by a rational differential operator of polynomial height. Taking a finite logarithm of this operator and solving one linear system gives a rational shift of polynomial bit-size.
As a further corollary of the structural bound, we obtain a sparse-time white-box PIT algorithm for shifted-sparse expressions. Here the shifts are given explicitly.
Corollary 1.6 (White-box PIT for shifted-sparse polynomials). Let f , g ∈ Q [ x 1 , … , x n ] f,g\in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] be sparse polynomials of sparsities s s s and t t t and degree at most d d d , and let a , b ∈ Q n \mathbf{a},\mathbf{b}\in\mathbb{Q}^n a , b ∈ Q n be given. There is a deterministic algorithm using poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) arithmetic operations that decides whether
f ( x + a ) ≡ g ( x + b ) . f(\mathbf{x}+\mathbf{a})\equiv g(\mathbf{x}+\mathbf{b}). f ( x + a ) ≡ g ( x + b ) . Further, if the input coefficients as well as the vectors a , b \mathbf{a},\mathbf{b} a , b have height at most τ \tau τ , then the algorithm can be implemented using poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations.
The proof is given after Lemma 3.2 in § 3.2 .
Remark 1.7. Without the structural theorem, the immediate deterministic approach gives only a bound that depends polynomially on d d d . Indeed, f ( x + a ) − g ( x + b ) f(\mathbf{x}+\mathbf{a})-g(\mathbf{x}+\mathbf{b}) f ( x + a ) − g ( x + b ) can be represented as a sum of products of univariate polynomials, and hence as a read-once oblivious algebraic branching program. Applying the white-box PIT algorithm of Raz and Shpilka [37 ] gives a deterministic verification algorithm using poly ( n , s , t , d ) \operatorname{poly}(n,s,t,d) poly ( n , s , t , d ) arithmetic operations. The corollary above improves this to poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) by using the structural bound to keep the computation in sparse representation.
Proof Overview
We describe the main ideas behind the algorithm and the analysis. The algorithm is based on the homogeneous descent of [16 ] . Their framework gives efficient algorithms for low-degree arithmetic circuits, and in particular, its running time is polynomial in the degree bound. For sparse polynomials, however, the degree can be exponentially larger than its binary encoding, so polynomial dependence on d d d is not sufficient.
Two additional issues have to be handled in the sparse setting. First, a sparse polynomial need not remain sparse after a shift: even ( x + a ) d (x+a)^d ( x + a ) d has d + 1 d+1 d + 1 monomials, which is exponential in log d \log d log d . In several variables the blow-up can be ( d + 1 ) n (d+1)^n ( d + 1 ) n . Thus we cannot simply expand shifted monomials during the descent. Second, over Q \mathbb{Q} Q , an arithmetic algorithm is not enough : one must prove that a polynomial-height rational shift exists and that the algorithm can output such a small witness.
The [16 ] descent. Write f i : = H i ( f ) f_i:=H^i(f) f i := H i ( f ) and g i : = H i ( g ) g_i:=H^i(g) g i := H i ( g ) for the homogeneous components of degree i i i . For a vector v ∈ Q n \mathbf{v}\in\mathbb{Q}^n v ∈ Q n , let
D v : = ∑ ℓ = 1 n v ℓ ∂ ∂ x ℓ , f i ( r ) ( v , x ) : = D v r f i ( x ) . D_{\mathbf{v}}:=\sum_{\ell=1}^{n}v_\ell\frac{\partial}{\partial x_\ell},\qquad f_i^{(r)}(\mathbf{v},\mathbf{x}):=D_{\mathbf{v}}^r f_i(\mathbf{x}). D v := ℓ = 1 ∑ n v ℓ ∂ x ℓ ∂ , f i ( r ) ( v , x ) := D v r f i ( x ) .
So, D v D_{\mathbf{v}} D v denotes the directional derivative in direction v \mathbf{v} v . Moreover, f i ( 1 ) ( v , x ) f_i^{(1)}(\mathbf{v},\mathbf{x}) f i ( 1 ) ( v , x ) is the first-order contribution of the degree-i i i part of f f f under a shift in direction v \mathbf{v} v , while f i ( r ) ( v , x ) f_i^{(r)}(\mathbf{v},\mathbf{x}) f i ( r ) ( v , x ) is the corresponding r r r th-order contribution. Suppose first that g ( x ) = f ( x + c ) g(\mathbf{x})=f(\mathbf{x}+\mathbf{c}) g ( x ) = f ( x + c ) for some shift c \mathbf{c} c . The homogeneous Taylor expansion is triangular with respect to degree: the degree-i i i part of g g g receives contributions only from the degree-i i i and higher homogeneous parts of f f f . More explicitly,
g i = f i + f i + 1 ( 1 ) ( c , x ) + ∑ j = i + 2 d 1 ( j − i ) ! f j ( j − i ) ( c , x ) . g_i=f_i+f_{i+1}^{(1)}(\mathbf{c},\mathbf{x})+\sum_{j=i+2}^{d}\frac{1}{(j-i)!}f_j^{(j-i)}(\mathbf{c},\mathbf{x}). g i = f i + f i + 1 ( 1 ) ( c , x ) + j = i + 2 ∑ d ( j − i )! 1 f j ( j − i ) ( c , x ) .
The term f i f_i f i is known, and the term f i + 1 ( 1 ) ( c , x ) f_{i+1}^{(1)}(\mathbf{c},\mathbf{x}) f i + 1 ( 1 ) ( c , x ) is linear in the unknown shift c \mathbf{c} c . The remaining sum is a higher-order tail coming from degrees strictly larger than i + 1 i+1 i + 1 . This suggests a top-down descent . At degree d − 1 d-1 d − 1 , there is no tail, so
g d − 1 = f d − 1 + f d ( 1 ) ( c , x ) g_{d-1}=f_{d-1}+f_d^{(1)}(\mathbf{c},\mathbf{x}) g d − 1 = f d − 1 + f d ( 1 ) ( c , x )
is just a linear system in the coordinates of c \mathbf{c} c . At degree d − 2 d-2 d − 2 , the equation contains the extra term 1 2 f d ( 2 ) ( c , x ) \frac{1}{2}f_d^{(2)}(\mathbf{c},\mathbf{x}) 2 1 f d ( 2 ) ( c , x ) , which looks quadratic in c \mathbf{c} c . The key observation of [16 ] is that this term is already determined once the first derivative of f d f_d f d has been matched. Indeed, if two directions a \mathbf{a} a and c \mathbf{c} c satisfy
f d ( 1 ) ( a , x ) = f d ( 1 ) ( c , x ) , f_d^{(1)}(\mathbf{a},\mathbf{x})=f_d^{(1)}(\mathbf{c},\mathbf{x}), f d ( 1 ) ( a , x ) = f d ( 1 ) ( c , x ) ,
then D a − c f d = 0 D_{\mathbf{a}-\mathbf{c}}f_d=0 D a − c f d = 0 . Since constant-coefficient differential operators commute, this implies that all higher directional derivatives of f d f_d f d in the directions a \mathbf{a} a and c \mathbf{c} c also agree. Thus the degree-( d − 2 ) (d-2) ( d − 2 ) equation again has only one new unknown contribution, namely f d − 1 ( 1 ) ( c , x ) f_{d-1}^{(1)}(\mathbf{c},\mathbf{x}) f d − 1 ( 1 ) ( c , x ) , which is linear in c \mathbf{c} c . More generally, at every stage of the descent, all higher-order terms coming from previously processed homogeneous components are already fixed, and the only new condition to impose is a linear equation for the first derivative of the next homogeneous component.
Modification in the sparse setting. We apply this descent only at degrees where a new first-order term can appear. Let
d = δ 1 > δ 2 > ⋯ > δ m > 0 (1) d=\delta_1>\delta_2>\cdots>\delta_m>0 \tag*{(1)} d = δ 1 > δ 2 > ⋯ > δ m > 0 (1)
be the nonzero positive homogeneous degrees of f f f . Since f f f has sparsity s s s , we have m ≤ s m \le s m ≤ s . At stage q q q , the algorithm has already processed δ 1 , … , δ q − 1 \delta_1,\ldots,\delta_{q-1} δ 1 , … , δ q − 1 and has a candidate shift a q − 1 \mathbf{a}_{q-1} a q − 1 satisfying
f δ p ( 1 ) ( a q − 1 , x ) = f δ p ( 1 ) ( c , x ) for all p < q . f_{\delta_p}^{(1)}(\mathbf{a}_{q-1},\mathbf{x})=f_{\delta_p}^{(1)}(\mathbf{c},\mathbf{x}) \qquad\text{for all }p<q. f δ p ( 1 ) ( a q − 1 , x ) = f δ p ( 1 ) ( c , x ) for all p < q .
By the derivative observation above, the higher-order contributions of these already processed components are the same for a q − 1 \mathbf{a}_{q-1} a q − 1 and for the true shift c \mathbf{c} c . Therefore the tail
P q ( x ) : = H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + a q − 1 ) ) P_q(\mathbf{x}) := H^{\delta_{q-1}}\left(H^{\geq\delta_{q+1}}(f)(\mathbf{x}+\mathbf{a}_{q-1})\right) P q ( x ) := H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + a q − 1 ) )
is equal to the tail one would obtain from c \mathbf{c} c :
P q ( x ) = H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + c ) ) . P_q(\mathbf{x}) = H^{\delta_{q-1}}\left(H^{\geq\delta_{q+1}}(f)(\mathbf{x}+\mathbf{c})\right). P q ( x ) = H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + c ) ) .
After subtracting this tail, the next condition is again linear:
g δ q − 1 = f δ q − 1 + f δ q ( 1 ) ( b , x ) + P q ( x ) . g_{\delta_{q-1}}=f_{\delta_{q-1}}+f_{\delta_q}^{(1)}(\mathbf{b},\mathbf{x})+P_q(\mathbf{x}). g δ q − 1 = f δ q − 1 + f δ q ( 1 ) ( b , x ) + P q ( x ) .
The algorithm adds this linear constraint to the previous ones and chooses a solution a q \mathbf{a}_q a q . Thus the nonlinear shift-equivalence problem is reduced, one homogeneous degree at a time, to simple linear algebra.
Why this is not yet an efficient algorithm. The discussion above explains why the shift problem can be reduced to a sequence of linear systems. It does not yet explain why these systems can be constructed and eventually solved from the sparse input in polynomial time. The difficulty lies in the computation of the tail P q P_q P q . A single monomial x γ \mathbf{x}^{\gamma} x γ , after the shift x ↦ x + a \mathbf{x}\mapsto\mathbf{x}+\mathbf{a} x ↦ x + a , produces ∏ i ∈ supp ( a ) ( γ i + 1 ) \prod_{i\in\operatorname{supp}(\mathbf{a})}(\gamma_i+1) ∏ i ∈ supp ( a ) ( γ i + 1 ) many monomials, which may be exponential in the sparse input length. Thus, explicitly forming shifted monomials is too expensive.
One could keep shifted monomials in a circuit representation, but then the algorithm has left the sparse representation. The linear systems in the descent would have entries represented by circuits (of high degree), and constructing or comparing those entries would require PIT for a larger circuit class. The general framework of [16 ] then gives dependence polynomial in the degree d d d , or in the relevant circuit/PIT parameters, rather than a polynomial in log d \log d log d .
There is a second issue over Q \mathbb{Q} Q . A naive bit-complexity analysis would bound the tail P q P_q P q in terms of the height of the current candidate a q − 1 \mathbf{a}_{q-1} a q − 1 , since P q P_q P q is computed using a q − 1 \mathbf{a}_{q-1} a q − 1 . The right-hand side of the next linear system would then have height depending on Ht ( a q − 1 ) \operatorname{Ht}(\mathbf{a}_{q-1}) Ht ( a q − 1 ) , and standard bounds for basic rational solutions (defined in Appendix § 7 , Definition A.4 ) would give a recursive estimate for Ht ( a q ) \operatorname{Ht}(\mathbf{a}_q) Ht ( a q ) in terms of Ht ( a q − 1 ) \operatorname{Ht}(\mathbf{a}_{q-1}) Ht ( a q − 1 ) . Iterating such an estimate over up to s s s stages need not yield the desired polynomial bound in the sparse input parameters. Thus, the tails must be bounded globally, using a fixed small witnessing shift, rather than recursively through the candidates produced by the algorithm.
The structural lemma and proof sketch of Theorem 1.3 . The main new structural input is that the bad shifted expansions cannot occur along a yes instance. The truncated form of the lemma says the following. Suppose
H ≥ r ( g ) = H ≥ r ( f ( x + a ) ) . H^{\geq r}(g)=H^{\geq r}(f(\mathbf{x}+\mathbf{a})). H ≥ r ( g ) = H ≥ r ( f ( x + a )) .
Then for every monomial x γ \mathbf{x}^{\gamma} x γ of H ≥ r ( f ) H^{\geq r}(f) H ≥ r ( f ) ,
sp ( H ≥ r ( ( x + a ) γ ) ) ≤ s t . \operatorname{sp}\left(H^{\geq r}\left((\mathbf{x}+\mathbf{a})^{\gamma}\right)\right)\leq st. sp ( H ≥ r ( ( x + a ) γ ) ) ≤ s t .
Thus, once the shifted polynomial agrees with g g g in degrees at least r r r , every shifted monomial that contributes to those degrees is itself sparse after truncation . In particular, large shifted expansions cannot be hidden by cancellations in the final sparse polynomial.
The proof isolates one shifted monomial from the identity g ( x ) = f ( x + a ) g(\mathbf{x}) = f(\mathbf{x}+\mathbf{a}) g ( x ) = f ( x + a ) . Let f ( x ) = ∑ j = 1 s c j x α j f(\mathbf{x}) = \sum_{j=1}^{s} c_j\mathbf{x}^{\boldsymbol{\alpha}_j} f ( x ) = ∑ j = 1 s c j x α j , and relabel the target monomial so that γ = α 1 \boldsymbol{\gamma} = \boldsymbol{\alpha}_1 γ = α 1 . We use Euler-type differential operators, defined as follows:
E i = ( x i + a i ) ∂ x i . E_i = (x_i+a_i)\partial_{x_i}. E i = ( x i + a i ) ∂ x i .
These operators are diagonal on the shifted monomial basis: E i ( x + a ) e = e i ( x + a ) e E_i(\mathbf{x}+\mathbf{a})^{\mathbf{e}} = e_i(\mathbf{x}+\mathbf{a})^{\mathbf{e}} E i ( x + a ) e = e i ( x + a ) e . Hence, for a multi-index v \mathbf{v} v , the following holds: E v ( x + a ) α j = α j v ( x + a ) α j \mathbf{E}^{\mathbf{v}}(\mathbf{x}+\mathbf{a})^{\boldsymbol{\alpha}_j} = \boldsymbol{\alpha}_j^{\mathbf{v}}(\mathbf{x}+\mathbf{a})^{\boldsymbol{\alpha}_j} E v ( x + a ) α j = α j v ( x + a ) α j . Thus the operators E v \mathbf{E}^{\mathbf{v}} E v act on shifted monomials exactly as evaluation functions on the exponent vectors α j \boldsymbol{\alpha}_j α j .
Using interpolation on the finite set of exponent vectors { α 1 , … , α s } \{\boldsymbol{\alpha}_1,\ldots,\boldsymbol{\alpha}_s\} { α 1 , … , α s } , we choose a set T T T of s s s multi-indices with the following cone-closed property: if v ∈ T \mathbf{v}\in T v ∈ T and u ⪯ v \mathbf{u}\preceq\mathbf{v} u ⪯ v coordinatewise, then u ∈ T \mathbf{u}\in T u ∈ T . The concept of a cone-closed basis was introduced in [17 ] . We also choose coefficients r v r_{\mathbf{v}} r v such that
∑ v ∈ T r v α j v = { 1 j = 1 , 0 j ≠ 1. \sum_{\mathbf{v}\in T}r_{\mathbf{v}}\boldsymbol{\alpha}_j^{\mathbf{v}} =
\begin{cases}
1 & j=1,\\
0 & j\ne1.
\end{cases} v ∈ T ∑ r v α j v = { 1 0 j = 1 , j = 1.
Now define the isolating operator
I γ : = ∑ v ∈ T r v E v . \mathcal{I}_{\boldsymbol{\gamma}} := \sum_{\mathbf{v}\in T}r_{\mathbf{v}}\mathbf{E}^{\mathbf{v}}. I γ := v ∈ T ∑ r v E v .
By construction, I γ \mathcal{I}_{\boldsymbol{\gamma}} I γ kills all shifted monomials except the one with exponent γ \boldsymbol{\gamma} γ . Therefore I γ ( g ) = c 1 ( x + a ) γ \mathcal{I}_{\boldsymbol{\gamma}}(g) = c_1(\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}} I γ ( g ) = c 1 ( x + a ) γ . The same operator I γ \mathcal{I}_{\boldsymbol{\gamma}} I γ can also be viewed as acting on the ordinary sparse expansion of g g g . This is exactly where sparsity enters . Since E i = x i ∂ x i + a i ∂ x i E_i=x_i\partial_{x_i}+a_i\partial_{x_i} E i = x i ∂ x i + a i ∂ x i , each application of E i E_i E i to an ordinary monomial either preserves its exponent or decreases it by one in coordinate i i i . More generally, applying E v \mathbf{E}^{\mathbf{v}} E v to a monomial x β \mathbf{x}^{\boldsymbol{\beta}} x β can only produce monomials of the form x β − u \mathbf{x}^{\boldsymbol{\beta}-\mathbf{u}} x β − u with u ⪯ v \mathbf{u}\preceq\mathbf{v} u ⪯ v .
Because T T T is cone-closed, every such possible exponent drop u \mathbf{u} u is again contained in T T T . Hence, if g ( x ) = ∑ k = 1 t d k x β k g(\mathbf{x})=\sum_{k=1}^{t}d_k\mathbf{x}^{\boldsymbol{\beta}_k} g ( x ) = ∑ k = 1 t d k x β k , then the support of I γ ( g ) \mathcal{I}_{\boldsymbol{\gamma}}(g) I γ ( g ) is contained in { β k − u : k ∈ [ t ] , u ∈ T } \{\boldsymbol{\beta}_k-\mathbf{u}: k\in[t],\ \mathbf{u}\in T\} { β k − u : k ∈ [ t ] , u ∈ T } . This set has size at most t ∣ T ∣ = s t t|T|=st t ∣ T ∣ = s t . Since I γ ( g ) \mathcal{I}_{\boldsymbol{\gamma}}(g) I γ ( g ) is a nonzero scalar multiple of ( x + a ) γ (\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}} ( x + a ) γ , the shifted monomial ( x + a ) γ (\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}} ( x + a ) γ itself has support at most s t st s t .
The truncated version needed by the algorithm follows from the same argument. Indeed, the operators E i E_i E i never increase total degree, so the isolation argument can be applied directly to the high-degree identity
H ≥ r ( g ) = H ≥ r ( f ( x + a ) ) . H^{\ge r}(g)=H^{\ge r}(f(\mathbf{x}+\mathbf{a})). H ≥ r ( g ) = H ≥ r ( f ( x + a )) .
This gives the same support bound for the truncated shifted monomials H ≥ r ( ( x + a ) γ ) H^{\ge r}((\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}}) H ≥ r (( x + a ) γ ) .
This is the point where our proof differs from the general framework of [16 ] . Sparse polynomials are not closed under arbitrary shifts. The structural lemma saves us here: although an arbitrary shift of a sparse polynomial may be dense, the shifted pieces that arise along a yes instance of the descent are forced to remain sparse. For details, see Lemma 3.2 .
Computing the tails without full expansion. At the beginning of stage q q q , the maintained invariant gives
H ≥ δ q ( f ( x + a q − 1 ) ) = H ≥ δ q ( g ) . H^{\ge\delta_q}(f(\mathbf{x}+\mathbf{a}_{q-1}))=H^{\ge\delta_q}(g). H ≥ δ q ( f ( x + a q − 1 )) = H ≥ δ q ( g ) .
Therefore the structural lemma applies with r = δ q r=\delta_q r = δ q and a = a q − 1 \mathbf{a}=\mathbf{a}_{q-1} a = a q − 1 . Thus, in particular, for every monomial c γ x γ c_{\boldsymbol{\gamma}}\mathbf{x}^{\boldsymbol{\gamma}} c γ x γ in H ≥ δ q ( f ) H^{\ge\delta_q}(f) H ≥ δ q ( f ) , the high-degree truncation
H ≥ δ q ( c γ ( x + a q − 1 ) γ ) H^{\ge\delta_q}\left(c_{\boldsymbol{\gamma}}(\mathbf{x}+\mathbf{a}_{q-1})^{\boldsymbol{\gamma}}\right) H ≥ δ q ( c γ ( x + a q − 1 ) γ )
has at most s t st s t monomials in a yes instance.
The obvious way to use this statement would be to expand c γ ( x + a q − 1 ) γ c_{\boldsymbol{\gamma}}(\mathbf{x}+\mathbf{a}_{q-1})^{\boldsymbol{\gamma}} c γ ( x + a q − 1 ) γ and then keep only the terms of degree at least δ q \delta_q δ q . Unfortunately, this is not efficient : the shifted monomial may be dense as a whole, even though its high-degree truncation is sparse. Nor can one simply invoke sparse interpolation as a black box, since the polynomial naturally available for evaluation is the entire shifted monomial, whose lower-degree part may be dense. The sparse object guaranteed by the structural lemma is only the high-degree truncation.
Instead, the algorithm enumerates only the exact degree-δ q \delta_q δ q layer, which is part of the structurally bounded high-degree truncation. Using a truncated dynamic-programming enumeration, the algorithm either lists all drops that produce degree δ q \delta_q δ q , if there are at most s t st s t , or detects that there are more than s t st s t and rejects. Thus it never enumerates the potentially dense lower-degree part; for details see Lemma 4.1 .
The desired tail P q P_q P q , however, lies one degree lower, in degree δ q − 1 \delta_q-1 δ q − 1 . The algorithm does not enumerate this lower layer directly. Let j = ∣ γ ∣ j = |\gamma| j = ∣ γ ∣ and let
C γ ( x ) : = H δ q ( c γ ( x + a q − 1 ) γ ) . C_\gamma(\mathbf{x}) := H^{\delta_q}(c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma). C γ ( x ) := H δ q ( c γ ( x + a q − 1 ) γ ) .
Then the degree-( δ q − 1 ) (\delta_q-1) ( δ q − 1 ) contribution of c γ ( x + a q − 1 ) γ c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma c γ ( x + a q − 1 ) γ is obtained from the controlled degree δ q \delta_q δ q part by
H δ q − 1 ( c γ ( x + a q − 1 ) γ ) = 1 j − δ q + 1 D a q − 1 C γ ( x ) . H^{\delta_q-1}(c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma) = \frac{1}{j-\delta_q+1}D_{\mathbf{a}_{q-1}}C_\gamma(\mathbf{x}). H δ q − 1 ( c γ ( x + a q − 1 ) γ ) = j − δ q + 1 1 D a q − 1 C γ ( x ) .
Thus the algorithm enumerates only this structurally bounded layer and then obtains the one lower layer needed for the descent by a single directional derivative. Summing these contributions over the monomials of H > δ q ( f ) H^{>\delta_q}(f) H > δ q ( f ) and collecting like terms gives P q P_q P q in sparse representation.
Bit complexity assuming a small rational shift. We first explain the bit-complexity analysis under the following assumption: there is a true shift c ∈ S f , g \mathbf{c} \in S_{f,g} c ∈ S f , g whose height is polynomially bounded in the input parameters. Later, we will explain why such a shift always exists over Q \mathbb{Q} Q whenever S f , g S_{f,g} S f , g is nonempty.
Under this assumption, the key point is that the tails are not recursively bounded. As mentioned before, if one does it recursively, then iterating over the stages of the descent would give an exponential bound on the output height. The way around this is to prove that the tails are controlled by a single global witness. Although P q P_q P q is computed syntactically using a q − 1 \mathbf{a}_{q-1} a q − 1 , the descent invariant gives
P q ( x ) = H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + c ) ) . P_q(\mathbf{x}) = H^{\delta_q-1}\left(H^{\geq\delta_q+1}(f)(\mathbf{x}+\mathbf{c})\right). P q ( x ) = H δ q − 1 ( H ≥ δ q + 1 ( f ) ( x + c ) ) .
for one fixed true shift c \mathbf{c} c . Hence, after collecting terms, the height of P q P_q P q is controlled in terms of the input and the height of this same c \mathbf{c} c , not in terms of a sequence of previously computed candidates. Once the tails have polynomial height, the linear systems have polynomial-height coefficients, and choosing basic rational solutions gives polynomial-height candidates; the definition and the height bound are in Appendix § 7 , Definition A.4 and Lemma A.5 . The algorithm also imposes global support checks and coefficient-height checks on the computed tails throughout the descent. These checks are harmless in a yes instance, by the structural lemma and the small-witness bound. On a no instance, the algorithm may reject because one of these checks fails or because one of the linear systems is infeasible. If neither happens, the algorithm obtains a candidate shift a \mathbf{a} a . It then performs a final verification of the identity f ( x + a ) ≡ g ( x ) f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}) f ( x + a ) ≡ g ( x ) .
This final check can again be done very efficiently: by the structural lemma, if the identity holds, then every shifted monomial of f ( x + a ) f(\mathbf{x}+\mathbf{a}) f ( x + a ) has support at most s t st s t after truncation with r = 0 r=0 r = 0 , and hence the whole expansion has support at most s 2 t s^2t s 2 t . The algorithm expands these bounded pieces, collects like terms, and compares the resulting sparse polynomial with g g g . Thus, the algorithm never accepts a false candidate. For the detailed analysis, we refer to proposition 4.4.
Existence of a small rational shift. It remains to justify that a small rational shift exists whenever any shift exists. First, if a shift exists over an algebraic extension, then a rational shift exists over Q \mathbb{Q} Q : the complex shift set S f , g ( C ) = { a ∈ C n : f ( x + a ) = g ( x ) } S_{f,g}(\mathbb{C}) = \{\mathbf{a} \in\mathbb{C}^n : f(\mathbf{x}+\mathbf{a}) = g(\mathbf{x})\} S f , g ( C ) = { a ∈ C n : f ( x + a ) = g ( x )} is an affine subspace, and averaging an algebraic point over its Galois conjugates gives a rational point in the same affine subspace.
The height bound uses the structural lemma once more. Let c \mathbf{c} c be any rational shift and let S = supp ( c ) S = \operatorname{supp}(\mathbf{c}) S = supp ( c ) . Then every monomial x γ \mathbf{x}^{\gamma} x γ of f f f satisfies ∏ i ∈ S ( γ i + 1 ) ≤ s t \prod_{i \in S}(\gamma_i + 1) \le st ∏ i ∈ S ( γ i + 1 ) ≤ s t . Consequently, the derivatives of f f f in the variables of S S S span only a polynomial-dimensional space. Inside this space, the translation f ( x ) ↦ f ( x + c ) = g ( x ) f(\mathbf{x}) \mapsto f(\mathbf{x} + \mathbf{c}) = g(\mathbf{x}) f ( x ) ↦ f ( x + c ) = g ( x ) can be represented by a rational differential operator of polynomial height; see the proof of Theorem 1.5 in Appendix § 7 , in particular (A.1). This operator is unipotent on the relevant derivative space, so its logarithm is a finite sum. The logarithm recovers the first-order translation direction on f f f , namely a polynomial of the form D c f D_{\mathbf{c}}f D c f .
Solving the linear system D b f = D c f D_{\mathbf{b}}f = D_{\mathbf{c}}f D b f = D c f and taking a basic rational solution using Lemma A.5 in Appendix § 7 gives a vector b \mathbf{b} b of polynomial height. By the derivative characterization of shifts from [16 ] , this b \mathbf{b} b is again a shift from f f f to g g g . Thus, whenever Sparse SET is a yes instance over Q \mathbb{Q} Q , there is a witness of polynomial bit-size, and the algorithm outputs one. For details, refer to Theorem 1.5 ; its proof is deferred to Appendix § 7 .
Related work
Algorithms related to sparse polynomials. Several basic algorithmic problems have been studied for sparse polynomials, including identity testing, interpolation, factorization, and changes of origin. Sparse identity testing and interpolation go back to the works of Zippel and Ben-Or–Tiwari, and have been followed by several deterministic and randomized algorithms for sparse polynomials and straight-line programs [Zip79,BOT88,KS01,BHLV09,GS09,AGR13]. Sparse factorization has also been extensively studied, beginning with algorithms for bounded-degree factors of sparse polynomials and followed by more recent structural and algorithmic results for factors of sparse polynomials [34 AKS06, 11 , 13 , 9 ] . For a survey-style introduction to the algorithmic landscape for sparse polynomials, including arithmetic, interpolation, and factorization, see Roche [36 ] .
Sparse shifts and sparsification. The algorithmic study of shifts of sparse polynomials goes back to Grigoriev and Karpinski, Lakshman and Saunders, and Grigoriev and Lakshman [21 , 35 , 24 ] . Their work considered questions such as identity testing, interpolation, and finding changes of origin under which a polynomial has a smaller sparsity. Subsequent work studied algorithms for computing sparsest shifted representations and for interpolation in shifted-sparse models [22 , 25 ] .
Target-free sparse shifts and sparsification. A related but different problem is the target-free sparse-shift problem: given a polynomial f f f , decide whether there exists a shift a \mathbf{a} a such that sp ( f ( x + a ) ) \operatorname{sp}(f(\mathbf{x} + \mathbf{a})) sp ( f ( x + a )) is small, or smaller than sp ( f ) \operatorname{sp}(f) sp ( f ) . Recent work shows that this sparsification problem is computationally hard [CGS23,BDI26]. This should be contrasted with Sparse SET: here both endpoints f f f and g g g are part of the input, and the question is whether g ( x ) = f ( x + a ) g(\mathbf{x}) = f(\mathbf{x} + \mathbf{a}) g ( x ) = f ( x + a ) for some shift a \mathbf{a} a . Thus, our problem is target-given rather than target-free.
Polynomial equivalence and orbit testing. There is also a broader polynomial-equivalence literature in which one allows general linear or affine changes of variables. In this setting one asks whether there are A ∈ GL n ( Q ) A \in\operatorname{GL}_n(\mathbb{Q}) A ∈ GL n ( Q ) and b ∈ Q n \mathbf{b} \in\mathbb{Q}^n b ∈ Q n such that f ( A x + b ) ≡ g ( x ) f(A\mathbf{x} + \mathbf{b}) \equiv g(\mathbf{x}) f ( A x + b ) ≡ g ( x ) , or whether the orbit of a given polynomial intersects a prescribed structured class. Polynomial equivalence is often viewed as an algebraic analogue of graph isomorphism: already, the equivalence of homogeneous cubic forms captures graph isomorphism [3 , 29 ] . Kayal studied efficient algorithms for special cases of polynomial equivalence and later affine projections of polynomials [29 Kay12] .
More recently, there has been work on equivalence testing for structured polynomial families, including read-once arithmetic formulas, design polynomials, and the Hamiltonian cycle polynomial [GST’23, BDS24, Dew26]. Baraskar, Dewan, Saha, and Sinha also proved NP-hardness of testing equivalence to sparse polynomials and to constant-support polynomials under affine transformations [6 ] . Sparse SET is the translation-only, target-given special case, namely the case A = I A = I A = I with both sparse endpoints f f f and g g g given as input.
Shift equivalence testing. Grigoriev studied SET itself as a decision and search problem for densely represented polynomials and gave deterministic, randomized, and quantum algorithms in different characteristics [26 ] . In characteristic zero, the deterministic algorithm runs in time polynomial in the dense representation. For n n n -variate polynomials of total degree at most d d d , the dense representation has size ( n + d d ) \binom{n+d}{d} ( d n + d ) and the running time is n O ( d ) n^{O(d)} n O ( d ) . Padding a sparse input with zero coefficients therefore does not give an efficient algorithm when the exponents are encoded in binary.
The result of [16 ] and its implication for sparse SET. Dvir, Oliveira, and Shpilka [16 ] studied SET for arithmetic circuits, in both the white-box and black-box models [16 ] . They gave a randomized algorithm running in time polynomial in the circuit size, the number of variables, and the degree, and showed that the randomness in their algorithm is used only for polynomial identity testing. Consequently, derandomizing PIT would derandomize SET in their framework. They also obtained a general deterministic reduction for restricted circuit classes. In one form, their result applies to classes M 1 , M 2 \mathcal{M}_1,\mathcal{M}_2 M 1 , M 2 such that M 1 \mathcal{M}_1 M 1 is closed under taking homogeneous components and first-order directional derivatives, while M 2 \mathcal{M}_2 M 2 is closed under shifts. The number of arithmetic operations is polynomial in n n n , d d d , and in the size of a hitting set, or of a white-box PIT algorithm, for the class of differences M 1 − M 2 \mathcal{M}_1 - \mathcal{M}_2 M 1 − M 2 . They also pointed out an analogy with algorithms for black-box groups, such as Sims’ algorithm: their procedure can be viewed as finding the affine space of all shifts from f f f to g g g , rather than merely deciding whether this space is empty [39 ] .
Although Section 6 of [16 ] observes that the sparse class is not closed under shifts and gives no direct sparse-class algorithm, a low-degree bound follows indirectly via ROABPs. A sparse polynomial
f ( x ) = ∑ i = 1 s c i ∏ j = 1 n x j α i , j f(\mathbf{x}) = \sum_{i=1}^{s} c_i \prod_{j=1}^{n} x_j^{\alpha_{i,j}} f ( x ) = i = 1 ∑ s c i j = 1 ∏ n x j α i , j
is a sum of products of univariate polynomials, and hence has a read-once oblivious algebraic branching program of width at most s s s in any variable order. Choose the same variable order for both inputs. After a shift,
f ( x + a ) = ∑ i = 1 s c i ∏ j = 1 n ( x j + a j ) α i , j f(\mathbf{x}+\mathbf{a}) = \sum_{i=1}^{s} c_i \prod_{j=1}^{n} (x_j+a_j)^{\alpha_{i,j}} f ( x + a ) = i = 1 ∑ s c i j = 1 ∏ n ( x j + a j ) α i , j
it still has such a representation of size poly ( n , s , d ) \operatorname{poly}(n,s,d) poly ( n , s , d ) . Therefore, the general white-box theorem of [16 ] , together with white-box ROABP PIT [37 ] , yields a deterministic algorithm for explicit sparse inputs using poly ( n , s , t , d ) \operatorname{poly}(n,s,t,d) poly ( n , s , t , d ) arithmetic operations. This is an indirect consequence rather than a sparse-case result stated in DOS’14. It is efficient in the ordinary low-degree regime, but it is not efficient in the high-degree sparsity setting: the dependence is polynomial in d d d , whereas the sparse input length is polynomial in log d \log d log d . Moreover, this framework does not by itself address bit complexity over Q \mathbb{Q} Q , the existence of a rational shift of polynomial height, or the problem of outputting such a small witness.
Preliminaries
Notation.
Monomials. For vectors z = ( z 1 , … , z n ) \mathbf{z} = (z_1, \ldots, z_n) z = ( z 1 , … , z n ) and v ∈ N n \mathbf{v} \in\mathbb{N}^n v ∈ N n , we write
z v = z 1 v 1 ⋯ z n v n . \mathbf{z}^{\mathbf{v}} = z_1^{v_1} \cdots z_n^{v_n}. z v = z 1 v 1 ⋯ z n v n .
When z \mathbf{z} z is a vector of variables, then z v \mathbf{z}^{\mathbf{v}} z v is the monomial with exponent vector given by v \mathbf{v} v . When z \mathbf{z} z is a vector of field elements, then it is the monomial evaluated at the given point.
Degree and derivatives. Throughout the paper, degree means total degree. We define ∣ v ∣ : = v 1 + ⋯ + v n |\mathbf{v}| := v_1 + \cdots+ v_n ∣ v ∣ := v 1 + ⋯ + v n , v ! : = v 1 ! ⋯ v n ! \mathbf{v}! := v_1! \cdots v_n! v ! := v 1 ! ⋯ v n ! , and ∂ v = ∂ x 1 v 1 ⋯ ∂ x n v n \partial^{\mathbf{v}} = \partial_{x_1}^{v_1} \cdots\partial_{x_n}^{v_n} ∂ v = ∂ x 1 v 1 ⋯ ∂ x n v n , where ∂ x i \partial_{x_i} ∂ x i is the partial derivative taken with respect to the variable x i x_i x i .
Partial order. We use the coordinate-wise partial order ⪯ \preceq ⪯ on N n \mathbb{N}^n N n : for v , u ∈ N n \mathbf{v}, \mathbf{u} \in\mathbb{N}^n v , u ∈ N n , we write v ⪯ u \mathbf{v} \preceq\mathbf{u} v ⪯ u if and only if v i ≤ u i v_i \leq u_i v i ≤ u i for every i ∈ [ n ] i \in[n] i ∈ [ n ] . A set T ⊆ N n T \subseteq\mathbb{N}^n T ⊆ N n is called cone-closed if, whenever u ∈ T \mathbf{u} \in T u ∈ T and v ⪯ u \mathbf{v} \preceq\mathbf{u} v ⪯ u , we also have v ∈ T \mathbf{v} \in T v ∈ T .
Polynomial notation. For a polynomial f f f , H ℓ ( f ) H^\ell(f) H ℓ ( f ) denotes the homogeneous part of degree ℓ \ell ℓ of f f f , that is, the sum of all monomials of f f f that have degree ℓ \ell ℓ . For two polynomials f , g ∈ K [ x ] f,g \in\mathbb{K}[\mathbf{x}] f , g ∈ K [ x ] , S f , g ( K ) S_{f,g}(\mathbb{K}) S f , g ( K ) denotes the set of all shift vectors a ∈ K n \mathbf{a} \in\mathbb{K}^n a ∈ K n such that f ( x + a ) = g ( x ) f(\mathbf{x}+\mathbf{a}) = g(\mathbf{x}) f ( x + a ) = g ( x ) . The set of all shifts a ∈ K n \mathbf{a} \in\mathbb{K}^n a ∈ K n that leave f f f invariant, that is, f ( x + a ) = f ( x ) f(\mathbf{x}+\mathbf{a}) = f(\mathbf{x}) f ( x + a ) = f ( x ) , is denoted by S f ( K ) S_f(\mathbb{K}) S f ( K ) . Over Q \mathbb{Q} Q , we write S f , g S_{f,g} S f , g for S f , g ( Q ) S_{f,g}(\mathbb{Q}) S f , g ( Q ) . For a polynomial f ( x ) f(\mathbf{x}) f ( x ) , sp ( f ) \operatorname{sp}(f) sp ( f ) denotes the sparsity of f f f , that is, the number of nonzero monomials in f f f . For a polynomial p p p , we also write
H ≥ r ( p ) : = ∑ ℓ ≥ r H ℓ ( p ) . H^{\geq r}(p) := \sum_{\ell\geq r} H^\ell(p). H ≥ r ( p ) := ℓ ≥ r ∑ H ℓ ( p ) .
Height. A rational number r r r is said to have height at most τ \tau τ if it can be written as r = p / q r = p/q r = p / q , where p , q ∈ Z p,q \in\mathbb{Z} p , q ∈ Z , q ≠ 0 q \neq0 q = 0 , and ∣ p ∣ , ∣ q ∣ ≤ 2 τ |p|, |q| \leq2^\tau ∣ p ∣ , ∣ q ∣ ≤ 2 τ . This is denoted by Ht ( r ) ≤ τ \operatorname{Ht}(r) \leq\tau Ht ( r ) ≤ τ . The height of a sparse polynomial, vector, or matrix is the maximum height of its coefficients or entries, and is denoted by Ht ( ⋅ ) \operatorname{Ht}(\cdot) Ht ( ⋅ ) .
Remark 2.1. In parts of the literature, this quantity is called logarithmic height. In this paper we simply call it height. Up to constant factors it is the bit-size of the numerators and denominators, so we use height and bit-size interchangeably in polynomial bounds.
Definition 2.2 (Directional derivative). For r ≥ 1 r \geq1 r ≥ 1 , the order-r r r directional derivative of f ( x ) ∈ Q [ x ] f(\mathbf{x}) \in\mathbb{Q}[\mathbf{x}] f ( x ) ∈ Q [ x ] in direction a ∈ Q n \mathbf{a} \in\mathbb{Q}^n a ∈ Q n is
f ( r ) ( a , x ) = ∑ e ∈ [ n ] r ( ∏ i = 1 r a e i ) ∂ r f ∂ x e 1 ⋯ ∂ x e r . f^{(r)}(\mathbf{a},\mathbf{x}) = \sum_{\mathbf{e} \in[n]^r} \left(\prod_{i=1}^{r} a_{e_i}\right) \frac{\partial^r f}{\partial x_{e_1} \cdots\partial x_{e_r}}. f ( r ) ( a , x ) = e ∈ [ n ] r ∑ ( i = 1 ∏ r a e i ) ∂ x e 1 ⋯ ∂ x e r ∂ r f . We also define f ( 0 ) ( a , x ) = f ( x ) f^{(0)}(\mathbf{a},\mathbf{x}) = f(\mathbf{x}) f ( 0 ) ( a , x ) = f ( x ) . For each homogeneous component H ℓ ( f ) H^\ell(f) H ℓ ( f ) of f f f , define
f ℓ ( r ) ( a , x ) = ∑ e ∈ [ n ] r ( ∏ i = 1 r a e i ) ∂ r H ℓ ( f ) ∂ x e 1 ⋯ ∂ x e r . f_\ell^{(r)}(\mathbf{a},\mathbf{x}) = \sum_{\mathbf{e} \in[n]^r} \left(\prod_{i=1}^{r} a_{e_i}\right) \frac{\partial^r H^\ell(f)}{\partial x_{e_1} \cdots\partial x_{e_r}}. f ℓ ( r ) ( a , x ) = e ∈ [ n ] r ∑ ( i = 1 ∏ r a e i ) ∂ x e 1 ⋯ ∂ x e r ∂ r H ℓ ( f ) .
The following lemma, due to Dvir, Oliveira and Shpilka [16 ] , states that if the first directional derivatives are identical for two directions a \mathbf{a} a and b \mathbf{b} b , then all higher order directional derivatives are identical, too.
Lemma 2.3 (Derivative equality under shifts, [16 ] ). Let f ∈ Q [ x ] f \in\mathbb{Q}[\mathbf{x}] f ∈ Q [ x ] and a , b ∈ Q n \mathbf{a}, \mathbf{b} \in\mathbb{Q}^n a , b ∈ Q n . If f ( 1 ) ( a , x ) = f ( 1 ) ( b , x ) f^{(1)}(\mathbf{a},\mathbf{x}) = f^{(1)}(\mathbf{b},\mathbf{x}) f ( 1 ) ( a , x ) = f ( 1 ) ( b , x ) , then f ( r ) ( a , x ) = f ( r ) ( b , x ) f^{(r)}(\mathbf{a},\mathbf{x}) = f^{(r)}(\mathbf{b},\mathbf{x}) f ( r ) ( a , x ) = f ( r ) ( b , x ) for all r ≥ 1 r \geq1 r ≥ 1 .
The next lemma allows us to write the homogeneous parts of a shifted polynomial in terms of their directional derivatives.
Lemma 2.4 (Homogeneous Taylor expansion, [16 ] ). Let a ∈ Q n \mathbf{a} \in\mathbb{Q}^{n} a ∈ Q n and let f ∈ Q [ x ] f \in\mathbb{Q}[\mathbf{x}] f ∈ Q [ x ] have degree d d d . Then for 0 ≤ i ≤ d 0 \leq i \leq d 0 ≤ i ≤ d ,
H i ( f ( x + a ) ) = ∑ j = i d 1 ( j − i ) ! f j ( j − i ) ( a , x ) . H^{i}(f(\mathbf{x}+\mathbf{a})) = \sum_{j=i}^{d} \frac{1}{(j-i)!}f_{j}^{(j-i)}(\mathbf{a},\mathbf{x}). H i ( f ( x + a )) = j = i ∑ d ( j − i )! 1 f j ( j − i ) ( a , x ) . Finally, if a \mathbf{a} a is a shift that transforms f f f into g g g , then b \mathbf{b} b transforms f f f into g g g , too, if and only if the first directional derivatives are identical.
Lemma 2.5 (Shift space via first derivatives, [16 ] ). Let f , g ∈ Q [ x ] f,g \in\mathbb{Q}[\mathbf{x}] f , g ∈ Q [ x ] and a , b ∈ Q n \mathbf{a},\mathbf{b} \in\mathbb{Q}^{n} a , b ∈ Q n . If a ∈ S f , g \mathbf{a} \in S_{f,g} a ∈ S f , g , then b ∈ S f , g \mathbf{b} \in S_{f,g} b ∈ S f , g if and only if f i ( 1 ) ( b , x ) = f i ( 1 ) ( a , x ) f_{i}^{(1)}(\mathbf{b},\mathbf{x}) = f_{i}^{(1)}(\mathbf{a},\mathbf{x}) f i ( 1 ) ( b , x ) = f i ( 1 ) ( a , x ) for 0 ≤ i ≤ d 0 \leq i \leq d 0 ≤ i ≤ d .
For a polynomial f ( x ) f(\mathbf{x}) f ( x ) of degree d d d , a shift a ∈ Q n \mathbf{a} \in\mathbb{Q}^{n} a ∈ Q n , and 0 ≤ i ≤ d 0 \leq i \leq d 0 ≤ i ≤ d , we define:
P i , a ( f ) : = H i ( H ≥ i + 2 ( f ) ( x + a ) ) . P_{i,\mathbf{a}}(f) := H^{i}\left(H^{\geq i+2}(f)(\mathbf{x}+\mathbf{a})\right). P i , a ( f ) := H i ( H ≥ i + 2 ( f ) ( x + a ) ) .
Lemma 2.6. For any polynomial f ∈ Q [ x ] f \in\mathbb{Q}[\mathbf{x}] f ∈ Q [ x ] , we have
P i , a ( f ) = H i ( H ≥ i + 2 ( f ) ( x + a ) ) = ∑ j = i + 2 d 1 ( j − i ) ! f j ( j − i ) ( a , x ) . P_{i,\mathbf{a}}(f) = H^{i}\left(H^{\geq i+2}(f)(\mathbf{x}+\mathbf{a})\right) = \sum_{j=i+2}^{d} \frac{1}{(j-i)!}f_{j}^{(j-i)}(\mathbf{a},\mathbf{x}). P i , a ( f ) = H i ( H ≥ i + 2 ( f ) ( x + a ) ) = j = i + 2 ∑ d ( j − i )! 1 f j ( j − i ) ( a , x ) . Proof. We have
H i ( H ≥ i + 2 ( f ) ( x + a ) ) = H i ( ∑ j = i + 2 d H j ( f ) ( x + a ) ) H^{i}\left(H^{\geq i+2}(f)(\mathbf{x}+\mathbf{a})\right) = H^{i}\left(\sum_{j=i+2}^{d} H^{j}(f)(\mathbf{x}+\mathbf{a})\right) H i ( H ≥ i + 2 ( f ) ( x + a ) ) = H i ( j = i + 2 ∑ d H j ( f ) ( x + a ) ) = ∑ j = i + 2 d H i ( H j ( f ) ( x + a ) ) . = \sum_{j=i+2}^{d} H^{i}\left(H^{j}(f)(\mathbf{x}+\mathbf{a})\right). = j = i + 2 ∑ d H i ( H j ( f ) ( x + a ) ) . Applying Lemma 2.4 to each H j ( f ) H^{j}(f) H j ( f ) gives an expansion of H i ( H j ( f ) ( x + a ) ) H^{i}\left(H^{j}(f)(\mathbf{x}+\mathbf{a})\right) H i ( H j ( f ) ( x + a ) ) in terms of the directional derivatives of the homogeneous components of H j ( f ) H^{j}(f) H j ( f ) . Since H j ( f ) = f j H^{j}(f) = f_{j} H j ( f ) = f j has only one homogeneous component, we get a single term in the expansion:
H i ( H j ( f ) ( x + a ) ) = 1 ( j − i ) ! f j ( j − i ) ( a , x ) . H^{i}\left(H^{j}(f)(\mathbf{x}+\mathbf{a})\right) = \frac{1}{(j-i)!}f_{j}^{(j-i)}(\mathbf{a},\mathbf{x}). H i ( H j ( f ) ( x + a ) ) = ( j − i )! 1 f j ( j − i ) ( a , x ) . Plugging this into the previous equation proves the lemma.
Properties of S f , g S_{f,g} S f , g
Recall that for f , g ∈ Q [ x ] f,g \in\mathbb{Q}[\mathbf{x}] f , g ∈ Q [ x ] ,
S f , g ( C ) = { a ∈ C n : f ( x + a ) = g ( x ) } . S_{f,g}(\mathbb{C}) = \{\mathbf{a} \in\mathbb{C}^{n} : f(\mathbf{x}+\mathbf{a}) = g(\mathbf{x})\}. S f , g ( C ) = { a ∈ C n : f ( x + a ) = g ( x )} .
where the equality is understood as an identity in C [ x ] \mathbb{C}[\mathbf{x}] C [ x ] . We first write two elementary facts about this shift set and then use them for the rational bit-complexity analysis.
Lemma 2.7 ([16 ] , Observation 4.2, Lemma 4.5). Let f ∈ C [ x ] f \in\mathbb{C}[\mathbf{x}] f ∈ C [ x ] , and define
S f ( C ) : = { u ∈ C n : f ( x + u ) = f ( x ) } . S_{f}(\mathbb{C}) := \{\mathbf{u} \in\mathbb{C}^{n} : f(\mathbf{x}+\mathbf{u}) = f(\mathbf{x})\}. S f ( C ) := { u ∈ C n : f ( x + u ) = f ( x )} . Then S f ( C ) S_{f}(\mathbb{C}) S f ( C ) is a linear subspace of C n \mathbb{C}^{n} C n , given by S f ( C ) = { a ∈ C n ∣ ∑ i = 1 n a i ∂ f ∂ x i = 0 } S_{f}(\mathbb{C}) = \{\mathbf{a} \in\mathbb{C}^{n} \mid\sum_{i=1}^{n} a_{i}\frac{\partial f}{\partial x_{i}} = 0\} S f ( C ) = { a ∈ C n ∣ ∑ i = 1 n a i ∂ x i ∂ f = 0 } .
Lemma 2.8 ([16 Lemma 4.4] ). For f , g ∈ C [ x ] f,g \in\mathbb{C}[x] f , g ∈ C [ x ] , the set S f , g ( C ) S_{f,g}(\mathbb{C}) S f , g ( C ) is either empty or an affine subspace of C n \mathbb{C}^{n} C n . More precisely, if a 0 ∈ S f , g ( C ) \mathbf{a}_0 \in S_{f,g}(\mathbb{C}) a 0 ∈ S f , g ( C ) , then
S f , g ( C ) = a 0 + S f ( C ) . S_{f,g}(\mathbb{C}) = \mathbf{a}_0 + S_f(\mathbb{C}). S f , g ( C ) = a 0 + S f ( C ) .
Proposition 2.9 (Existence of a shift in Q n \mathbb{Q}^{n} Q n ). Let f , g ∈ Q [ x ] f,g \in\mathbb{Q}[x] f , g ∈ Q [ x ] . If
S f , g ( C ) : = { a ∈ C n : f ( x + a ) = g ( x ) } S_{f,g}(\mathbb{C}) := \{\mathbf{a} \in\mathbb{C}^{n} : f(\mathbf{x}+\mathbf{a}) = g(\mathbf{x})\} S f , g ( C ) := { a ∈ C n : f ( x + a ) = g ( x )}
is nonempty, then S f , g ( Q ) S_{f,g}(\mathbb{Q}) S f , g ( Q ) contains a rational point. Equivalently, there exists q ∈ Q n \mathbf{q} \in\mathbb{Q}^{n} q ∈ Q n such that
f ( x + q ) = g ( x ) . f(\mathbf{x}+\mathbf{q}) = g(\mathbf{x}). f ( x + q ) = g ( x ) .
The proof is deferred to Appendix § 7 .
Structural Sparsity Bounds
We first prove the structural statement that drives the algorithm. The proof needs to isolate one chosen shifted monomial from g ( x ) = f ( x + a ) g(\mathbf{x}) = f(\mathbf{x}+\mathbf{a}) g ( x ) = f ( x + a ) while keeping control over what happens when the same operator is applied to the sparse monomial expansion of g g g . The next lemma provides exactly the indexing set needed for this. It gives an interpolation basis for the exponent vectors of the monomials of f f f , but with the additional cone-closed property: if a multi-index is selected, then every smaller multi-index is selected as well. This closure is what later prevents the differential operator from creating too many possible output monomials.
Cone-closed basis
Lemma 3.1 (Cone-closed interpolation basis). Let
B = { b 1 , … , b s } ⊆ N n B = \{\mathbf{b}_1,\ldots,\mathbf{b}_s\} \subseteq\mathbb{N}^{n} B = { b 1 , … , b s } ⊆ N n be a finite set of exponent vectors. Assume that the elements of B B B remain distinct as points of Q n \mathbb{Q}^{n} Q n . For every v ∈ N n \mathbf{v} \in\mathbb{N}^{n} v ∈ N n , define M v ∈ Q s M_{\mathbf{v}} \in\mathbb{Q}^{s} M v ∈ Q s by
( M v ) j : = b j v ( j ∈ [ s ] ) . (M_{\mathbf{v}})_j := \mathbf{b}_j^{\mathbf{v}} \qquad(j \in[s]). ( M v ) j := b j v ( j ∈ [ s ]) . Then there is a cone-closed set T ⊆ N n T \subseteq\mathbb{N}^{n} T ⊆ N n such that { M v : v ∈ T } \{M_{\mathbf{v}} : \mathbf{v} \in T\} { M v : v ∈ T } is a basis of Q s \mathbb{Q}^{s} Q s . In particular, ∣ T ∣ = s |T| = s ∣ T ∣ = s .
Proof. Let ev B : Q [ z 1 , … , z n ] → Q s \operatorname{ev}_{B} : \mathbb{Q}[z_1,\ldots,z_n] \to\mathbb{Q}^{s} ev B : Q [ z 1 , … , z n ] → Q s be the evaluation map
P ↦ ( P ( b 1 ) , … , P ( b s ) ) . P \mapsto(P(\mathbf{b}_1),\ldots,P(\mathbf{b}_s)). P ↦ ( P ( b 1 ) , … , P ( b s )) . We first check that this map is surjective. For each m ∈ [ s ] m \in[s] m ∈ [ s ] , let
m m = ( z 1 − b m , 1 , … , z n − b m , n ) \mathfrak{m}_m = (z_1-b_{m,1},\ldots,z_n-b_{m,n}) m m = ( z 1 − b m , 1 , … , z n − b m , n ) be the ideal of polynomials vanishing at b m \mathbf{b}_m b m . Note that reducing a polynomial P P P modulo m m \mathfrak{m}_m m m is nothing but evaluating P P P at the point b m \mathbf{b}_m b m . The ideals m m \mathfrak{m}_m m m are maximal, that is, they are not contained in any other proper ideal. Since the points b 1 , … , b s \mathbf{b}_1,\ldots,\mathbf{b}_s b 1 , … , b s are pairwise distinct, the ideals are pairwise coprime. By the Chinese remainder theorem, the quotient map
Q [ z 1 , … , z n ] ⟶ ∏ m = 1 s Q [ z 1 , … , z n ] / m m ≅ Q s \mathbb{Q}[z_1,\ldots,z_n] \longrightarrow\prod_{m=1}^{s} \mathbb{Q}[z_1,\ldots,z_n]/\mathfrak{m}_m \cong\mathbb{Q}^{s} Q [ z 1 , … , z n ] ⟶ m = 1 ∏ s Q [ z 1 , … , z n ] / m m ≅ Q s
is surjective, and this quotient map is exactly ev B \operatorname{ev}_{B} ev B . The image of the monomial z v \mathbf{z}^{\mathbf{v}} z v under this map is exactly M v M_{\mathbf{v}} M v , so the family { M v : v ∈ N n } \{M_{\mathbf{v}} : \mathbf{v} \in\mathbb{N}^{n}\} { M v : v ∈ N n } spans Q s \mathbb{Q}^{s} Q s .
Now fix the graded lexicographic order ≤ g r l e x \leq_{\mathrm{grlex}} ≤ grlex on N n \mathbb{N}^{n} N n : vectors are ordered first by total degree ∣ v ∣ |\mathbf{v}| ∣ v ∣ and then ties are broken lexicographically. This order is a well-order and refines ⪯ \preceq ⪯ , meaning that v ⪯ u \mathbf{v} \preceq\mathbf{u} v ⪯ u implies v ≤ g r l e x u \mathbf{v} \leq_{\mathrm{grlex}} \mathbf{u} v ≤ grlex u . Moreover, it is compatible with addition: if v < g r l e x u \mathbf{v} <_{\mathrm{grlex}} \mathbf{u} v < grlex u , then v + w < g r l e x u + w \mathbf{v}+\mathbf{w} <_{\mathrm{grlex}} \mathbf{u}+\mathbf{w} v + w < grlex u + w for every w ∈ N n \mathbf{w} \in\mathbb{N}^{n} w ∈ N n .
We construct T T T by choosing only dimension-increasing vectors. Start with T 0 = ∅ T_{0} = \varnothing T 0 = ∅ . If the current span is not all of Q s \mathbb{Q}^{s} Q s , then choose u m + 1 \mathbf{u}_{m+1} u m + 1 to be the least vector, in graded lexicographic order, such that
M u m + 1 ∉ span { M v : v ∈ T m } , M_{\mathbf{u}_{m+1}} \notin\operatorname{span}\{M_{\mathbf{v}} : \mathbf{v} \in T_{m}\}, M u m + 1 ∈ / span { M v : v ∈ T m } ,
and set T m + 1 = T m ∪ { u m + 1 } T_{m+1} = T_{m} \cup\{\mathbf{u}_{m+1}\} T m + 1 = T m ∪ { u m + 1 } . Such a vector exists whenever the current span is not all of Q s \mathbb{Q}^{s} Q s , because the full family { M v : v ∈ N n } \{M_{\mathbf{v}} : \mathbf{v} \in\mathbb{N}^{n}\} { M v : v ∈ N n } spans Q s \mathbb{Q}^{s} Q s . Each step increases the dimension of the span by one, so after exactly s s s steps the chosen vectors form a basis of Q s \mathbb{Q}^{s} Q s . Let T = T s T = T_{s} T = T s .
When u m + 1 \mathbf{u}_{m+1} u m + 1 is chosen, minimality implies that every M q M_{\mathbf{q}} M q with q < g r l e x u m + 1 \mathbf{q} <_{\mathrm{grlex}} \mathbf{u}_{m+1} q < grlex u m + 1 already lies in span { M v : v ∈ T m } \operatorname{span}\{M_{\mathbf{v}} : \mathbf{v} \in T_{m}\} span { M v : v ∈ T m } . After adding u m + 1 \mathbf{u}_{m+1} u m + 1 , the current span therefore contains every M q M_{\mathbf{q}} M q with q ≤ g r l e x u m + 1 \mathbf{q} \leq_{\mathrm{grlex}} \mathbf{u}_{m+1} q ≤ grlex u m + 1 . In particular, no smaller vector can become rank-increasing later, so the selected vectors are increasing in graded lexicographic order.
We now show that T T T is cone-closed. Suppose u ∈ T \mathbf{u} \in T u ∈ T , v ⪯ u \mathbf{v} \preceq\mathbf{u} v ⪯ u , and v ∉ T \mathbf{v} \notin T v ∈ / T . Since grlex refines ⪯ \preceq ⪯ , we have v < g r l e x u \mathbf{v} <_{\mathrm{grlex}} \mathbf{u} v < grlex u . Write u = u m + 1 \mathbf{u} = \mathbf{u}_{m+1} u = u m + 1 (so u \mathbf{u} u is chosen at step m + 1 m+1 m + 1 ). Because v \mathbf{v} v occurs earlier in the grlex order and was not chosen when it was encountered, we have a dependence
M v = ∑ w ∈ T m , w < g r l e x v λ w M w . M_{\mathbf{v}} =
\sum_{\substack{\mathbf{w}\in T_m,\ \mathbf{w}<_{\mathrm{grlex}}\mathbf{v}}}
\lambda_{\mathbf{w}}M_{\mathbf{w}}. M v = w ∈ T m , w < grlex v ∑ λ w M w .
Since M r ⊙ M q = M r + q M_{\mathbf{r}} \mathbin{\odot} M_{\mathbf{q}} = M_{\mathbf{r}+\mathbf{q}} M r ⊙ M q = M r + q for the Hadamard product ⊙ \mathbin{\odot} ⊙ , which is defined as the pointwise product of the vectors, taking the Hadamard product with M u − v M_{\mathbf{u}-\mathbf{v}} M u − v gives
M u = M u − v ⊙ M v = ∑ w ∈ T m , w < g r l e x v λ w M w + u − v . M_{\mathbf{u}} = M_{\mathbf{u}-\mathbf{v}} \mathbin{\odot} M_{\mathbf{v}} =
\sum_{\substack{\mathbf{w}\in T_m,\ \mathbf{w}<_{\mathrm{grlex}}\mathbf{v}}}
\lambda_{\mathbf{w}}M_{\mathbf{w}+\mathbf{u}-\mathbf{v}}. M u = M u − v ⊙ M v = w ∈ T m , w < grlex v ∑ λ w M w + u − v .
Because graded lexicographic order is compatible with addition and w < g r l e x v \mathbf{w} <_{\mathrm{grlex}} \mathbf{v} w < grlex v , each index w + u − v \mathbf{w}+\mathbf{u}-\mathbf{v} w + u − v satisfies w + u − v < g r l e x u \mathbf{w}+\mathbf{u}-\mathbf{v} <_{\mathrm{grlex}} \mathbf{u} w + u − v < grlex u . By minimality of u m + 1 \mathbf{u}_{m+1} u m + 1 , every such M w + u − v M_{\mathbf{w}+\mathbf{u}-\mathbf{v}} M w + u − v already lies in span { M q : q ∈ T m } \operatorname{span}\{M_{\mathbf{q}} : \mathbf{q} \in T_m\} span { M q : q ∈ T m } . Hence M u ∈ span { M q : q ∈ T m } M_{\mathbf{u}} \in\operatorname{span}\{M_{\mathbf{q}} : \mathbf{q} \in T_m\} M u ∈ span { M q : q ∈ T m } , contradicting the choice of u m + 1 \mathbf{u}_{m+1} u m + 1 as rank-increasing. Therefore no such v \mathbf{v} v exists, and T T T is cone-closed. □ \square □
Structural lemma
Lemma 3.2. Let f , g ∈ Q [ x ] f, g \in\mathbb{Q}[\mathbf{x}] f , g ∈ Q [ x ] be polynomials of degree d d d with sparsities s s s and t t t , respectively. Let a ∈ Q n \mathbf{a} \in\mathbb{Q}^{n} a ∈ Q n , and suppose that
H ≥ r ( g ( x ) ) = H ≥ r ( f ( x + a ) ) . H^{\geq r}(g(\mathbf{x})) = H^{\geq r}(f(\mathbf{x}+\mathbf{a})). H ≥ r ( g ( x )) = H ≥ r ( f ( x + a )) . Then, for every monomial x γ \mathbf{x}^{\boldsymbol{\gamma}} x γ appearing in H ≥ r ( f ) H^{\geq r}(f) H ≥ r ( f ) ,
sp ( H ≥ r ( ( x + a ) γ ) ) ≤ s t . \operatorname{sp}\left(H^{\geq r}\left((\mathbf{x}+\mathbf{a})^{\boldsymbol{\gamma}}\right)\right) \leq st. sp ( H ≥ r ( ( x + a ) γ ) ) ≤ s t .
Proof. Write
f ( x ) = ∑ j = 1 s d j x α j and g ( x ) = ∑ k = 1 t c k x β k , f(\mathbf{x}) = \sum_{j=1}^{s} d_{j}\mathbf{x}^{\boldsymbol{\alpha}_{j}}
\qquad\text{and}\qquad
g(\mathbf{x}) = \sum_{k=1}^{t} c_{k}\mathbf{x}^{\boldsymbol{\beta}_{k}}, f ( x ) = j = 1 ∑ s d j x α j and g ( x ) = k = 1 ∑ t c k x β k ,
where all displayed coefficients are nonzero. Fix a monomial x γ \mathbf{x}^{\boldsymbol{\gamma}} x γ appearing in H ≥ r ( f ) H^{\geq r}(f) H ≥ r ( f ) , and relabel the monomials of f f f so that α 1 = γ \boldsymbol{\alpha}_{1} = \boldsymbol{\gamma} α 1 = γ . Since the exponent vectors are distinct integer vectors, the exponent vectors of the monomials of f f f remain distinct as points of Q n \mathbb{Q}^n Q n . Apply Lemma 3.1 to these exponent vectors. We get a cone-closed set T ⊆ N n T \subseteq\mathbb{N}^n T ⊆ N n with ∣ T ∣ = s |T|=s ∣ T ∣ = s such that the vectors M v M_{\mathbf{v}} M v , v ∈ T \mathbf{v}\in T v ∈ T , defined by
( M v ) j = α j v ( j ∈ [ s ] , v ∈ T ) (M_{\mathbf{v}})_j=\alpha_j^{\mathbf{v}}\qquad(j\in[s],\ \mathbf{v}\in T) ( M v ) j = α j v ( j ∈ [ s ] , v ∈ T )
form a basis of Q s \mathbb{Q}^s Q s . Hence there are coefficients r v r_{\mathbf{v}} r v , v ∈ T \mathbf{v}\in T v ∈ T , isolating the first coordinate:
∑ v ∈ T r v α j v = { 1 if j = 1 , 0 otherwise. (2) \sum_{\mathbf{v}\in T}r_{\mathbf{v}}\alpha_j^{\mathbf{v}}=
\begin{cases}
1 & \text{if }j=1,\\
0 & \text{otherwise.}
\end{cases} \tag*{(2)} v ∈ T ∑ r v α j v = { 1 0 if j = 1 , otherwise. (2)
Define the operators
E i = ( x i + a i ) ∂ ∂ x i and E v = ∏ i ∈ [ n ] E i v i . E_i=(x_i+a_i)\frac{\partial}{\partial x_i}
\qquad\text{and}\qquad
\mathbf{E}^{\mathbf{v}}=\prod_{i\in[n]}E_i^{v_i}. E i = ( x i + a i ) ∂ x i ∂ and E v = i ∈ [ n ] ∏ E i v i .
Since E i ( x + a ) e = e i ( x + a ) e E_i(\mathbf{x}+\mathbf{a})^{\mathbf{e}}=e_i(\mathbf{x}+\mathbf{a})^{\mathbf{e}} E i ( x + a ) e = e i ( x + a ) e , we have
E v ( x + a ) e = e v ( x + a ) e . \mathbf{E}^{\mathbf{v}}(\mathbf{x}+\mathbf{a})^{\mathbf{e}}=\mathbf{e}^{\mathbf{v}}(\mathbf{x}+\mathbf{a})^{\mathbf{e}}. E v ( x + a ) e = e v ( x + a ) e .
Define
I γ = ∑ v ∈ T r v E v . \mathcal{I}_{\gamma}=\sum_{\mathbf{v}\in T}r_{\mathbf{v}}\mathbf{E}^{\mathbf{v}}. I γ = v ∈ T ∑ r v E v .
The operator I γ \mathcal{I}_{\gamma} I γ never increases total degree: each E i = x i ∂ x i + a i ∂ x i E_i=x_i\partial_{x_i}+a_i\partial_{x_i} E i = x i ∂ x i + a i ∂ x i preserves the degree or decreases it by one. Thus, for every polynomial h h h ,
H ≥ r ( I γ ( h ) ) = H ≥ r ( I γ ( H ≥ r ( h ) ) ) . H^{\ge r}(\mathcal{I}_{\gamma}(h))=H^{\ge r}(\mathcal{I}_{\gamma}(H^{\ge r}(h))). H ≥ r ( I γ ( h )) = H ≥ r ( I γ ( H ≥ r ( h ))) .
Using the assumed equality H ≥ r ( g ) = H ≥ r ( f ( x + a ) ) H^{\ge r}(g)=H^{\ge r}(f(\mathbf{x}+\mathbf{a})) H ≥ r ( g ) = H ≥ r ( f ( x + a )) , we get
H ≥ r ( I γ ( g ) ) = H ≥ r ( I γ ( f ( x + a ) ) ) . H^{\ge r}(\mathcal{I}_{\gamma}(g))=H^{\ge r}(\mathcal{I}_{\gamma}(f(\mathbf{x}+\mathbf{a}))). H ≥ r ( I γ ( g )) = H ≥ r ( I γ ( f ( x + a ))) .
On shifted monomials, I γ \mathcal{I}_{\gamma} I γ acts diagonally. Indeed, f ( x + a ) = ∑ j = 1 s d j ( x + a ) α j f(\mathbf{x}+\mathbf{a})=\sum_{j=1}^{s}d_j(\mathbf{x}+\mathbf{a})^{\boldsymbol{\alpha}_j} f ( x + a ) = ∑ j = 1 s d j ( x + a ) α j , so
I γ ( f ( x + a ) ) = ∑ j = 1 s d j ( ∑ v ∈ T r v α j v ) ( x + a ) α j = d 1 ( x + a ) γ , \begin{aligned}
\mathcal{I}_{\gamma}(f(\mathbf{x}+\mathbf{a}))
&=\sum_{j=1}^{s}d_j\left(\sum_{\mathbf{v}\in T}r_{\mathbf{v}}\alpha_j^{\mathbf{v}}\right)(\mathbf{x}+\mathbf{a})^{\boldsymbol{\alpha}_j}\\
&=d_1(\mathbf{x}+\mathbf{a})^{\gamma},
\end{aligned} I γ ( f ( x + a )) = j = 1 ∑ s d j ( v ∈ T ∑ r v α j v ) ( x + a ) α j = d 1 ( x + a ) γ ,
where the last equality follows from (3.1). Since d 1 ≠ 0 d_1\ne0 d 1 = 0 , multiplication by d 1 d_1 d 1 does not change sparsity. Therefore,
sp ( H ≥ r ( I γ ( g ) ) ) = sp ( H ≥ r ( ( x + a ) γ ) ) . \operatorname{sp}\left(H^{\ge r}(\mathcal{I}_{\gamma}(g))\right)
=\operatorname{sp}\left(H^{\ge r}((\mathbf{x}+\mathbf{a})^{\gamma})\right). sp ( H ≥ r ( I γ ( g )) ) = sp ( H ≥ r (( x + a ) γ ) ) .
It remains to bound sp ( H ≥ r ( I γ ( g ) ) ) \operatorname{sp}(H^{\ge r}(\mathcal{I}_{\gamma}(g))) sp ( H ≥ r ( I γ ( g ))) . For v ∈ T \mathbf{v}\in T v ∈ T and a monomial x β k \mathbf{x}^{\boldsymbol{\beta}_k} x β k of g g g , applying E v \mathbf{E}^{\mathbf{v}} E v can only change the exponent to β k − u \boldsymbol{\beta}_k-\mathbf{u} β k − u for some u ⪯ v \mathbf{u}\preceq\mathbf{v} u ⪯ v , so its support is contained in monomials of the form
x β k − u with u ⪯ v , u ⪯ β k . \mathbf{x}^{\boldsymbol{\beta}_k-\mathbf{u}}
\qquad\text{with}\qquad
\mathbf{u}\preceq\mathbf{v},\ \mathbf{u}\preceq\boldsymbol{\beta}_k. x β k − u with u ⪯ v , u ⪯ β k .
Because T T T is cone-closed, every such u \mathbf{u} u lies in T T T . Hence H ≥ r ( I γ ( g ) ) H^{\ge r}(\mathcal{I}_{\gamma}(g)) H ≥ r ( I γ ( g )) is supported on monomials of the form
x β k − u where k ∈ [ t ] , u ∈ T . \mathbf{x}^{\boldsymbol{\beta}_k-\mathbf{u}}
\qquad\text{where}\qquad
k\in[t],\ \mathbf{u}\in T. x β k − u where k ∈ [ t ] , u ∈ T .
There are at most t ∣ T ∣ = s t t|T|=st t ∣ T ∣ = s t such monomials. Therefore
sp ( H ≥ r ( ( x + a ) γ ) ) ≤ s t . \operatorname{sp}\left(H^{\ge r}((\mathbf{x}+\mathbf{a})^{\gamma})\right)\le st. sp ( H ≥ r (( x + a ) γ ) ) ≤ s t .
Taking r = 0 r = 0 r = 0 in Lemma 3.2 proves the f f f -monomial part of Theorem 1.3 . The same statement for monomials of g g g follows by applying the lemma to the identity f ( x ) = g ( x − a ) f(\mathbf{x}) = g(\mathbf{x} - \mathbf{a}) f ( x ) = g ( x − a ) .
Proof of the shifted-sparse PIT corollary, Corollary 1.6. The identity
f ( x + a ) ≡ g ( x + b ) f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}+\mathbf{b}) f ( x + a ) ≡ g ( x + b )
is equivalent, after the change of variables y = x + b \mathbf{y} = \mathbf{x} + \mathbf{b} y = x + b , to
f ( y + c ) ≡ g ( y ) , where c = a − b . f(\mathbf{y}+\mathbf{c}) \equiv g(\mathbf{y}), \qquad\text{where } \mathbf{c} = \mathbf{a} - \mathbf{b}. f ( y + c ) ≡ g ( y ) , where c = a − b .
It is therefore enough to verify identities of the form f ( x + c ) ≡ g ( x ) f(\mathbf{x}+\mathbf{c}) \equiv g(\mathbf{x}) f ( x + c ) ≡ g ( x ) .
For each monomial c γ x γ c_\gamma\mathbf{x}^{\gamma} c γ x γ of f f f , compute
N γ = ∏ i ∈ supp ( c ) ( γ i + 1 ) . N_\gamma= \prod_{i \in\operatorname{supp}(\mathbf{c})}(\gamma_i+1). N γ = i ∈ supp ( c ) ∏ ( γ i + 1 ) .
but stop the multiplication once the value exceeds s t st s t . If N γ > s t N_\gamma> st N γ > s t for some monomial, reject. This is sound: if the identity were true, then Theorem 1.3 would imply N γ ≤ s t N_\gamma\le st N γ ≤ s t for every monomial of f f f .
Otherwise every shifted monomial has at most s t st s t terms. Enumerate all vectors v ⪯ γ \mathbf{v} \preceq\gamma v ⪯ γ with supp ( v ) ⊆ supp ( c ) \operatorname{supp}(\mathbf{v}) \subseteq\operatorname{supp}(\mathbf{c}) supp ( v ) ⊆ supp ( c ) , form the terms
c γ ∏ i = 1 n ( γ i v i ) ( c i ) v i x γ − v , c_\gamma\prod_{i=1}^{n} \binom{\gamma_i}{v_i} (c_i)^{v_i}\mathbf{x}^{\gamma-\mathbf{v}}, c γ i = 1 ∏ n ( v i γ i ) ( c i ) v i x γ − v ,
collect like terms over all monomials of f f f , and compare the resulting sparse polynomial with the sparse representation of g g g . The enumeration size is at most s ⋅ s t s \cdot st s ⋅ s t , and all exponent arithmetic uses numbers of bit-length O ( log d ) O(\log d) O ( log d ) , so the arithmetic operation count is poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) . Over Q \mathbb{Q} Q , if the input coefficients and the shift coordinates have polynomial bit-size, the same computation has polynomial bit complexity, since every nonzero enumerated term has ∣ v ∣ ≤ s t − 1 |\mathbf{v}| \le st - 1 ∣ v ∣ ≤ s t − 1 .
Height bound for computations in the algorithm
We now fix the single height cap used by the sparse tail computation and by the main algorithm. In the height and bit-complexity statements below, every polynomial bound denoted by poly ( ⋅ ) \operatorname{poly}(\cdot) poly ( ⋅ ) is effective. Whenever the algorithm uses such a bound as a height cap, one can replace the notation by a fixed explicit polynomial in the displayed parameters, chosen large enough to dominate the determinant bounds and sparse-expansion bounds proved below. Fix once and for all a sufficiently large absolute constant C C C and set
B g l o b = ( n s t ( τ + 1 ) log ( d + 2 ) ) C . B_{\mathrm{glob}} = \left(nst(\tau+1)\log(d+2)\right)^C. B glob = ( n s t ( τ + 1 ) log ( d + 2 ) ) C .
We choose C C C large enough so that this single cap dominates all height bounds used below, including the sparse-expansion bounds for the intermediate tails and the determinant bounds for the basic rational solutions in the yes-instance analysis. Thus every explicit height check in the algorithm can be implemented by comparing against B g l o b B_{\mathrm{glob}} B glob .
Proposition 3.3. With C C C chosen sufficiently large in the definition of B g l o b B_{\mathrm{glob}} B glob , the following holds. Suppose f , g ∈ Q [ x ] f,g \in\mathbb{Q}[\mathbf{x}] f , g ∈ Q [ x ] are polynomials of degree d d d with Ht ( f ) , Ht ( g ) ≤ τ \operatorname{Ht}(f), \operatorname{Ht}(g) \le\tau Ht ( f ) , Ht ( g ) ≤ τ and sp ( f ) = s \operatorname{sp}(f) = s sp ( f ) = s , sp ( g ) = t \operatorname{sp}(g) = t sp ( g ) = t . Suppose g ( x ) = f ( x + c ) g(\mathbf{x}) = f(\mathbf{x}+\mathbf{c}) g ( x ) = f ( x + c ) for a shift c ∈ Q n \mathbf{c} \in\mathbb{Q}^{n} c ∈ Q n whose coordinates satisfy the polynomial height bound from Theorem 1.5 . Then, for every 0 ≤ i ≤ d − 1 0 \le i \le d-1 0 ≤ i ≤ d − 1 ,
sp ( P i , c ( f ) ) ≤ s 2 t , (3) \operatorname{sp}(P_{i,\mathbf{c}}(f)) \le s^{2}t, \tag*{(3)} sp ( P i , c ( f )) ≤ s 2 t , (3) Ht ( P i , c ( f ) ) ≤ B g l o b . (4) \operatorname{Ht}(P_{i,\mathbf{c}}(f)) \le B_{\mathrm{glob}}. \tag*{(4)} Ht ( P i , c ( f )) ≤ B glob . (4)
Proof. Write
f ( x ) = ∑ ℓ = 1 s λ ℓ x γ ℓ , λ ℓ ≠ 0. f(\mathbf{x})=\sum_{\ell=1}^{s}\lambda_\ell\mathbf{x}^{\gamma_\ell},\qquad\lambda_\ell\ne0. f ( x ) = ℓ = 1 ∑ s λ ℓ x γ ℓ , λ ℓ = 0.
By Lemma 2.6,
P i , c ( f ) = H i ( H ≥ i + 2 ( f ) ( x + c ) ) = H i ( ∑ ℓ ∈ [ s ] ∣ γ ℓ ∣ ≥ i + 2 λ ℓ ( x + c ) γ ℓ ) . P_{i,c}(f)=H^i\left(H^{\ge i+2}(f)(\mathbf{x}+\mathbf{c})\right)=H^i\left(\sum_{\substack{\ell\in[s]\\|\gamma_\ell|\ge i+2}}\lambda_\ell(\mathbf{x}+\mathbf{c})^{\gamma_\ell}\right). P i , c ( f ) = H i ( H ≥ i + 2 ( f ) ( x + c ) ) = H i ℓ ∈ [ s ] ∣ γ ℓ ∣ ≥ i + 2 ∑ λ ℓ ( x + c ) γ ℓ .
Since g ( x ) = f ( x + c ) g(\mathbf{x})=f(\mathbf{x}+\mathbf{c}) g ( x ) = f ( x + c ) , Lemma 3.2 with r = 0 r=0 r = 0 and a = c \mathbf{a}=\mathbf{c} a = c implies that
sp ( ( x + c ) γ ℓ ) ≤ s t for every ℓ ∈ [ s ] . \operatorname{sp}\left((\mathbf{x}+\mathbf{c})^{\gamma_\ell}\right)\le st\qquad\text{for every }\ell\in[s]. sp ( ( x + c ) γ ℓ ) ≤ s t for every ℓ ∈ [ s ] .
Taking a homogeneous part cannot increase support. Therefore each input monomial contributes at most s t st s t monomials to P i , c P_{i,c} P i , c , and after collecting like terms
sp ( P i , c ( f ) ) ≤ s ⋅ s t = s 2 t . \operatorname{sp}(P_{i,c}(f))\le s\cdot st=s^2t. sp ( P i , c ( f )) ≤ s ⋅ s t = s 2 t .
It remains to bound coefficient heights. A nonzero term of ( x + c ) γ ℓ (\mathbf{x}+\mathbf{c})^{\gamma_\ell} ( x + c ) γ ℓ is indexed by a vector v ⪯ γ ℓ \mathbf{v}\preceq\gamma_\ell v ⪯ γ ℓ : it is obtained by replacing v r v_r v r copies of x r x_r x r by c r c_r c r for each r ∈ [ n ] r\in[n] r ∈ [ n ] , and has coefficient
λ ℓ ∏ r = 1 n ( γ ℓ , r v r ) c r v r . \lambda_\ell\prod_{r=1}^{n}\binom{\gamma_{\ell,r}}{v_r}c_r^{v_r}. λ ℓ r = 1 ∏ n ( v r γ ℓ , r ) c r v r .
If this term is nonzero, then supp ( v ) ⊆ supp ( c ) \operatorname{supp}(\mathbf{v})\subseteq\operatorname{supp}(\mathbf{c}) supp ( v ) ⊆ supp ( c ) . For every u ⪯ v \mathbf{u}\preceq\mathbf{v} u ⪯ v along a chain from 0 \mathbf{0} 0 to v \mathbf{v} v , the corresponding term in ( x + c ) γ ℓ (\mathbf{x}+\mathbf{c})^{\gamma_\ell} ( x + c ) γ ℓ is also nonzero and distinct. Hence the full expansion has at least ∣ v ∣ + 1 |\mathbf{v}|+1 ∣ v ∣ + 1 nonzero terms. Since its sparsity is at most s t st s t as noted above, we get
∣ v ∣ ≤ s t − 1. |\mathbf{v}|\le st-1. ∣ v ∣ ≤ s t − 1.
Thus only binomial coefficients ( γ ℓ , r v r ) \binom{\gamma_{\ell,r}}{v_r} ( v r γ ℓ , r ) with ∣ v ∣ ≤ s t − 1 |\mathbf{v}|\le st-1 ∣ v ∣ ≤ s t − 1 can occur in a nonzero term contributing to P i , c ( f ) P_{i,c}(f) P i , c ( f ) . Their product has height O ( s t log d ) O(st\log d) O ( s t log d ) , and ∏ r c r v r \prod_r c_r^{v_r} ∏ r c r v r has polynomial height by Theorem 1.5 . Multiplying by the input coefficient λ ℓ \lambda_\ell λ ℓ gives height
poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d )
for each generated term. A coefficient of P i , c ( f ) P_{i,c}(f) P i , c ( f ) is a sum of at most s s s such rational numbers, so its height is at most poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) . We can choose C C C large enough so that this height is bounded by B g l o b \mathcal{B}_{\mathrm{glob}} B glob . □
Main Algorithm and Proof of Correctness
Before running the descent, handle the trivial cases as follows. If both polynomials are constant, return 0 0 0 when they are equal and return FAIL otherwise. If exactly one polynomial is constant, or if the two nonconstant polynomials have different total degrees, return FAIL, because translations preserve total degree.
The pseudocode below describes the rational bit-complexity version. For the arithmetic version over a field K K K of characteristic zero or larger than d d d , use the same descent, omit the global height cap and all height checks, and choose any solution of each linear system over K K K .
Algorithm 1 Main Algorithm for Sparse Shift Equivalence
Require: Sparse representations of nonconstant polynomials f , g ∈ Q [ x 1 , … , x n ] f,g \in\mathbb{Q}[x_1,\ldots,x_n] f , g ∈ Q [ x 1 , … , x n ] with deg ( f ) = deg ( g ) = d \deg(f)=\deg(g)=d deg ( f ) = deg ( g ) = d , sp ( f ) = s \operatorname{sp}(f)=s sp ( f ) = s , sp ( g ) = t \operatorname{sp}(g)=t sp ( g ) = t , and height at most τ \tau τ .
Ensure: A shift in S f , g S_{f,g} S f , g , if one exists; otherwise FAIL
Set the global height cap B g l o b = ( n s t ( τ + 1 ) log ( d + 2 ) ) C B_{\mathrm{glob}}=(nst(\tau+1)\log(d+2))^C B glob = ( n s t ( τ + 1 ) log ( d + 2 ) ) C , for the fixed constant C C C chosen in § 3.3 .
Let H δ 1 ( f ) , … , H δ m ( f ) H^{\delta_1}(f),\ldots,H^{\delta_m}(f) H δ 1 ( f ) , … , H δ m ( f ) be the nonzero homogeneous components of f f f of positive degree, where d = δ 1 > ⋯ > δ m > 0 d=\delta_1>\cdots>\delta_m>0 d = δ 1 > ⋯ > δ m > 0 . The degree-zero component, if present, is not included.
Set a 0 ← 0 \mathbf{a}_0 \leftarrow\mathbf{0} a 0 ← 0 .
Set L 0 \mathcal{L}_0 L 0 to be the empty linear system in the variables b = ( b 1 , … , b n ) \mathbf{b}=(b_1,\ldots,b_n) b = ( b 1 , … , b n ) .
for q = 1 , … , m q=1,\ldots,m q = 1 , … , m do
Compute the following polynomial using Lemma 4.1 and the global cap B g l o b B_{\mathrm{glob}} B glob ; if the procedure returns FAIL, return FAIL:
P q ( x ) ← P δ q − 1 , a q − 1 ( f ) ( x ) = ∑ j = δ q + 1 d 1 ( j − δ q + 1 ) ! f j ( j − δ q + 1 ) ( a q − 1 , x ) . P_q(\mathbf{x}) \leftarrow P_{\delta_q-1,\mathbf{a}_{q-1}}(f)(\mathbf{x})=\sum_{j=\delta_q+1}^{d}\frac{1}{(j-\delta_q+1)!}f_j^{(j-\delta_q+1)}(\mathbf{a}_{q-1},\mathbf{x}). P q ( x ) ← P δ q − 1 , a q − 1 ( f ) ( x ) = j = δ q + 1 ∑ d ( j − δ q + 1 )! 1 f j ( j − δ q + 1 ) ( a q − 1 , x ) .
The subroutine returns FAIL if the collected P q P_q P q has more than s 2 t s^2t s 2 t monomials or a coefficient of height larger than B g l o b B_{\mathrm{glob}} B glob .
Let L q \mathcal{L}_q L q be L q − 1 \mathcal{L}_{q-1} L q − 1 together with the coefficient equations of
H δ q − 1 ( g ( x ) ) = H δ q − 1 ( f ( x ) ) + f δ q ( 1 ) ( b , x ) + P q ( x ) . H^{\delta_q-1}(g(\mathbf{x}))=H^{\delta_q-1}(f(\mathbf{x}))+f_{\delta_q}^{(1)}(\mathbf{b},\mathbf{x})+P_q(\mathbf{x}). H δ q − 1 ( g ( x )) = H δ q − 1 ( f ( x )) + f δ q ( 1 ) ( b , x ) + P q ( x ) .
Solve the linear system L q \mathcal{L}_q L q for b \mathbf{b} b .
if the above system has no solution then
return FAIL
else
Let a q ← b \mathbf{a}_q\leftarrow\mathbf{b} a q ← b , where b \mathbf{b} b is a basic rational solution of the system.
end if
end for
Verify f ( x ) − g ( x − a m ) ≡ 0 f(\mathbf{x})-g(\mathbf{x}-\mathbf{a}_m)\equiv0 f ( x ) − g ( x − a m ) ≡ 0 using the sparse verifier from the proof of Corollary 1.6.
if f ( x ) − g ( x − a m ) ≡ 0 f(\mathbf{x})-g(\mathbf{x}-\mathbf{a}_m)\equiv0 f ( x ) − g ( x − a m ) ≡ 0 then
return a m \mathbf{a}_m a m
else
return FAIL
end if
Computing the sparse representation of P i , a ( f ) P_{i,\mathbf{a}}(f) P i , a ( f )
We now explain how to compute P q P_q P q in algorithm 1.
Lemma 4.1. Given a q − 1 \mathbf{a}_{q-1} a q − 1 , the step that computes P q P_q P q in algorithm 1 either returns FAIL or computes the sparse representation of
P q ( x ) = P δ q − 1 , a q − 1 ( f ) ( x ) P_q(\mathbf{x})=P_{\delta_q-1,\mathbf{a}_{q-1}}(f)(\mathbf{x}) P q ( x ) = P δ q − 1 , a q − 1 ( f ) ( x ) using poly ( n , s , t , log d ) \operatorname{poly}(n,s,t,\log d) poly ( n , s , t , log d ) arithmetic operations. In the rational bit-complexity model, the same procedure uses
poly ( n , s , t , τ , log d , Ht ( a q − 1 ) ) \operatorname{poly}(n,s,t,\tau,\log d,\operatorname{Ht}(\mathbf{a}_{q-1})) poly ( n , s , t , τ , log d , Ht ( a q − 1 )) bit operations. If it succeeds, then
sp ( P q ) ≤ s 2 t and, over Q , Ht ( P q ) ≤ B g l o b . \operatorname{sp}(P_q)\leq s^2t \qquad\text{and, over }\mathbb{Q,}\qquad\operatorname{Ht}(P_q)\leq B_{\mathrm{glob}}. sp ( P q ) ≤ s 2 t and, over Q , Ht ( P q ) ≤ B glob .
Moreover, if
H ≥ δ q ( f ( x + a q − 1 ) ) = H ≥ δ q ( g ( x ) ) , H^{\geq\delta_q}(f(\mathbf{x}+\mathbf{a}_{q-1}))=H^{\geq\delta_q}(g(\mathbf{x})), H ≥ δ q ( f ( x + a q − 1 )) = H ≥ δ q ( g ( x )) ,
then the enumeration checks in the procedure do not fail.
Proof. For every monomial c γ x γ c_\gamma\mathbf{x}^{\gamma} c γ x γ of H > δ q ( f ) H^{>\delta_q}(f) H > δ q ( f ) , the terms of c γ ( x + a q − 1 ) γ c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma c γ ( x + a q − 1 ) γ of degree exactly δ q \delta_q δ q are indexed by vectors v ⪯ γ \mathbf{v}\preceq\gamma v ⪯ γ satisfying
supp ( v ) ⊆ supp ( a q − 1 ) , ∣ v ∣ = ∣ γ ∣ − δ q . (5) \operatorname{supp}(\mathbf{v})\subseteq\operatorname{supp}(\mathbf{a}_{q-1}),\qquad|\mathbf{v}|=|\gamma|-\delta_q. \tag*{(5)} supp ( v ) ⊆ supp ( a q − 1 ) , ∣ v ∣ = ∣ γ ∣ − δ q . (5)
Here v ℓ v_\ell v ℓ means that, from the factor ( x ℓ + a q − 1 , ℓ ) γ ℓ (x_\ell+a_{q-1,\ell})^{\gamma_\ell} ( x ℓ + a q − 1 , ℓ ) γ ℓ , we choose v ℓ v_\ell v ℓ copies of a q − 1 , ℓ a_{q-1,\ell} a q − 1 , ℓ and the remaining γ ℓ − v ℓ \gamma_\ell-v_\ell γ ℓ − v ℓ copies of x ℓ x_\ell x ℓ . Their coefficients are
c γ ∏ ℓ = 1 n ( γ ℓ v ℓ ) ( a q − 1 , ℓ ) v ℓ , c_\gamma\prod_{\ell=1}^{n}\binom{\gamma_\ell}{v_\ell}(a_{q-1,\ell})^{v_\ell}, c γ ℓ = 1 ∏ n ( v ℓ γ ℓ ) ( a q − 1 , ℓ ) v ℓ ,
and the corresponding monomial is x γ − v \mathbf{x}^{\gamma-\mathbf{v}} x γ − v .
The only point at which we use the additional hypothesis in the lemma is to show that these enumeration checks cannot reject. Under that hypothesis, Lemma 3.2 applies with a = a q − 1 \mathbf{a}=\mathbf{a}_{q-1} a = a q − 1 and r = δ q r=\delta_q r = δ q , and gives
sp ( H ≥ δ q ( ( x + a q − 1 ) γ ) ) ≤ s t . \operatorname{sp}\left(H^{\geq\delta_q}((\mathbf{x}+\mathbf{a}_{q-1})^\gamma)\right)\leq st. sp ( H ≥ δ q (( x + a q − 1 ) γ ) ) ≤ s t .
The degree-δ q \delta_q δ q terms are part of this polynomial. The vectors satisfying (5) are exactly the choices that produce those degree-δ q \delta_q δ q monomials, and different vectors give different monomials. Hence the displayed bound implies that there are at most s t st s t such vectors.
We now give a procedure to enumerate all vectors satisfying (5) . The procedure either returns a list of all such vectors or returns FAIL if there are more than s t st s t such vectors. The procedure is polynomial-time in the input size, which is polynomial in n , s , t , τ , log d , Ht ( a q − 1 ) n,s,t,\tau,\log d,\operatorname{Ht}(\mathbf{a}_{q-1}) n , s , t , τ , log d , Ht ( a q − 1 ) . We first compute:
S : = ∑ ℓ : a q − 1 , ℓ ≠ 0 γ ℓ . S:=\sum_{\ell:a_{q-1,\ell}\ne0}\gamma_\ell. S := ℓ : a q − 1 , ℓ = 0 ∑ γ ℓ .
If ∣ γ ∣ − δ q > S |\gamma|-\delta_q>S ∣ γ ∣ − δ q > S , then no vector satisfying (5) exists, because the sum of the coordinates of any such vector is ∣ γ ∣ − δ q |\gamma|-\delta_q ∣ γ ∣ − δ q , while the sum of the coordinates where a q − 1 \mathbf{a}_{q-1} a q − 1 is nonzero is only S S S . In this case the degree-δ q \delta_q δ q part for this monomial is empty. The degree-( δ q − 1 ) (\delta_q-1) ( δ q − 1 ) part is empty as well, since it would require one additional copy of some coordinate of a q − 1 \mathbf{a}_{q-1} a q − 1 . Thus this monomial contributes nothing to P q P_q P q .
It remains to handle the case ∣ γ ∣ − δ q ≤ S |\gamma|-\delta_q\leq S ∣ γ ∣ − δ q ≤ S . If ∣ γ ∣ − δ q ≥ s t |\gamma|-\delta_q\geq st ∣ γ ∣ − δ q ≥ s t , the procedure returns FAIL. Under the lemma’s additional hypothesis, this case cannot occur. Indeed, since ∣ γ ∣ − δ q ≤ S |\gamma|-\delta_q\leq S ∣ γ ∣ − δ q ≤ S , choose any v ⪯ γ \mathbf{v}\preceq\gamma v ⪯ γ supported on supp ( a q − 1 ) \operatorname{supp}(\mathbf{a}_{q-1}) supp ( a q − 1 ) with ∣ v ∣ = ∣ γ ∣ − δ q |\mathbf{v}|=|\gamma|-\delta_q ∣ v ∣ = ∣ γ ∣ − δ q . For every u ⪯ v \mathbf{u}\preceq\mathbf{v} u ⪯ v , the corresponding term in c γ ( x + a q − 1 ) γ c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma c γ ( x + a q − 1 ) γ is nonzero, distinct, and has degree at least δ q \delta_q δ q . Therefore
∏ ℓ : v ℓ > 0 ( v ℓ + 1 ) ≥ ∣ v ∣ + 1 = ∣ γ ∣ − δ q + 1 ≥ s t + 1 , \prod_{\ell:v_\ell>0}(v_\ell+1)\geq|\mathbf{v}|+1=|\gamma|-\delta_q+1\geq st+1, ℓ : v ℓ > 0 ∏ ( v ℓ + 1 ) ≥ ∣ v ∣ + 1 = ∣ γ ∣ − δ q + 1 ≥ s t + 1 ,
contradicting the displayed sparsity bound above.
It remains to handle the case ∣ γ ∣ − δ q ≤ s t − 1 |\gamma|-\delta_q\leq st-1 ∣ γ ∣ − δ q ≤ s t − 1 and ∣ γ ∣ − δ q ≤ S |\gamma|-\delta_q\leq S ∣ γ ∣ − δ q ≤ S . Let ℓ 1 , … , ℓ m \ell_1,\ldots,\ell_m ℓ 1 , … , ℓ m be the indices for which a q − 1 , ℓ ≠ 0 a_{q-1,\ell}\ne0 a q − 1 , ℓ = 0 . We build a dynamic-programming table whose entries are short lists of vectors. The entry V i ( h ) \mathcal{V}_i(h) V i ( h ) records, with cap s t + 1 st+1 s t + 1 , all ways to obtain total drop h h h using only the coordinates ℓ i , ℓ i + 1 , … , ℓ m \ell_i,\ell_{i+1},\ldots,\ell_m ℓ i , ℓ i + 1 , … , ℓ m . For i = m + 1 , m , … , 1 i=m+1,m,\ldots,1 i = m + 1 , m , … , 1 and h = 0 , … , ∣ γ ∣ − δ q h=0,\ldots,|\gamma|-\delta_q h = 0 , … , ∣ γ ∣ − δ q , let V i ( h ) \mathcal{V}_i(h) V i ( h ) be a list of vectors ( v ℓ i , … , v ℓ m ) (v_{\ell_i},\ldots,v_{\ell_m}) ( v ℓ i , … , v ℓ m ) with
0 ≤ v ℓ r ≤ γ ℓ r for r = i , … , m , v ℓ i + ⋯ + v ℓ m = h . 0\leq v_{\ell_r}\leq\gamma_{\ell_r}\quad\text{for }r=i,\ldots,m,\qquad v_{\ell_i}+\cdots+v_{\ell_m}=h. 0 ≤ v ℓ r ≤ γ ℓ r for r = i , … , m , v ℓ i + ⋯ + v ℓ m = h .
If there are more than s t st s t such vectors, we keep only s t + 1 st+1 s t + 1 of them. The table is filled from the end. We start with
V m + 1 ( 0 ) = { ( ) } , V m + 1 ( h ) = ∅ ( h > 0 ) , \mathcal{V}_{m+1}(0)=\{()\},\qquad\mathcal{V}_{m+1}(h)=\varnothing\quad(h>0), V m + 1 ( 0 ) = {( )} , V m + 1 ( h ) = ∅ ( h > 0 ) ,
where () is the empty vector. For i ≤ m i\le m i ≤ m , the list V i ( h ) \mathcal{V}_i(h) V i ( h ) is obtained by trying e = 0 , … , min { γ ℓ i , h } e=0,\ldots,\min\{\gamma_{\ell_i},h\} e = 0 , … , min { γ ℓ i , h } and appending e e e in front of every vector in V i + 1 ( h − e ) \mathcal{V}_{i+1}(h-e) V i + 1 ( h − e ) :
( e , w ) where w ∈ V i + 1 ( h − e ) . (e,\mathbf{w})\qquad\text{where}\qquad\mathbf{w}\in\mathcal{V}_{i+1}(h-e). ( e , w ) where w ∈ V i + 1 ( h − e ) .
We stop adding to an entry once it contains s t + 1 st+1 s t + 1 vectors. By induction on i i i , each entry either contains all vectors satisfying its condition, or contains s t + 1 st+1 s t + 1 such vectors. Hence V 1 ( ∣ γ ∣ − δ q ) \mathcal{V}_1(|\gamma|-\delta_q) V 1 ( ∣ γ ∣ − δ q ) directly gives the vectors satisfying (5) , after adding zero coordinates outside { ℓ 1 , … , ℓ m } \{\ell_1,\ldots,\ell_m\} { ℓ 1 , … , ℓ m } .
If V 1 ( ∣ γ ∣ − δ q ) \mathcal{V}_1(|\gamma|-\delta_q) V 1 ( ∣ γ ∣ − δ q ) has size s t + 1 st+1 s t + 1 , the procedure returns FAIL. Otherwise it is the exact list of all degree-δ q \delta_q δ q vectors. The table has O ( n s t ) O(nst) O ( n s t ) entries, each entry tries at most s t st s t values of e e e and stores at most s t + 1 st+1 s t + 1 vectors, so this takes polynomial time. Each listed vector gives the monomial and coefficient above.
The listed terms are exactly the degree-δ q \delta_q δ q part
C γ ( x ) = H δ q ( c γ ( x + a q − 1 ) γ ) . C_\gamma(\mathbf{x})=H^{\delta_q}(c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma). C γ ( x ) = H δ q ( c γ ( x + a q − 1 ) γ ) .
We now recover the degree-( δ q − 1 ) (\delta_q-1) ( δ q − 1 ) contribution from C γ C_\gamma C γ by a direct coefficient calculation. Write
D a q − 1 = ∑ ℓ = 1 n a q − 1 , ℓ ∂ ∂ x ℓ . D_{\mathbf{a}_{q-1}}=\sum_{\ell=1}^{n}a_{q-1,\ell}\frac{\partial}{\partial x_\ell}. D a q − 1 = ℓ = 1 ∑ n a q − 1 , ℓ ∂ x ℓ ∂ .
Let e ℓ \mathbf{e}_\ell e ℓ denote the ℓ \ell ℓ th standard basis vector. Fix w ⪯ γ \mathbf{w}\preceq\gamma w ⪯ γ with supp ( w ) ⊆ supp ( a q − 1 ) \operatorname{supp}(\mathbf{w})\subseteq\operatorname{supp}(\mathbf{a}_{q-1}) supp ( w ) ⊆ supp ( a q − 1 ) and ∣ w ∣ = ∣ γ ∣ − δ q + 1 |\mathbf{w}|=|\gamma|-\delta_q+1 ∣ w ∣ = ∣ γ ∣ − δ q + 1 . The monomial x γ − w \mathbf{x}^{\gamma-\mathbf{w}} x γ − w can arise in D a q − 1 ( C γ ) D_{\mathbf{a}_{q-1}}(C_\gamma) D a q − 1 ( C γ ) only by differentiating, for some ℓ \ell ℓ with w ℓ > 0 w_\ell>0 w ℓ > 0 , the degree-δ q \delta_q δ q monomial corresponding to w − e ℓ \mathbf{w}-\mathbf{e}_\ell w − e ℓ . Thus its coefficient in D a q − 1 ( C γ ) D_{\mathbf{a}_{q-1}}(C_\gamma) D a q − 1 ( C γ ) is
c γ a q − 1 w ∑ ℓ : w ℓ > 0 ( γ w − e ℓ ) ( γ ℓ − w ℓ + 1 ) . c_\gamma\mathbf{a}_{q-1}^{\mathbf{w}}\sum_{\ell:w_\ell>0}\binom{\gamma}{\mathbf{w}-\mathbf{e}_\ell}(\gamma_\ell-w_\ell+1). c γ a q − 1 w ℓ : w ℓ > 0 ∑ ( w − e ℓ γ ) ( γ ℓ − w ℓ + 1 ) .
For every ℓ \ell ℓ with $w_\ell>0,
( γ w − e ℓ ) ( γ ℓ − w ℓ + 1 ) = w ℓ ( γ w ) . \binom{\gamma}{\mathbf{w}-\mathbf{e}_\ell}(\gamma_\ell-w_\ell+1)=w_\ell\binom{\gamma}{\mathbf{w}}. ( w − e ℓ γ ) ( γ ℓ − w ℓ + 1 ) = w ℓ ( w γ ) .
Hence the coefficient above equals
( ∣ γ ∣ − δ q + 1 ) c γ ( γ w ) a q − 1 w , (|\gamma|-\delta_q+1)c_\gamma\binom{\gamma}{\mathbf{w}}\mathbf{a}_{q-1}^{\mathbf{w}}, ( ∣ γ ∣ − δ q + 1 ) c γ ( w γ ) a q − 1 w ,
which is ( ∣ γ ∣ − δ q + 1 ) (|\gamma|-\delta_q+1) ( ∣ γ ∣ − δ q + 1 ) times the coefficient of x γ − w \mathbf{x}^{\gamma-\mathbf{w}} x γ − w in H δ q − 1 ( c γ ( x + a q − 1 ) γ ) H^{\delta_q-1}(c_\gamma(\mathbf{x}+\mathbf{a}_{q-1})^\gamma) H δ q − 1 ( c γ ( x + a q − 1 ) γ ) . Therefore the contribution of c γ x γ c_\gamma\mathbf{x}^\gamma c γ x γ to P q P_q P q is
1 ∣ γ ∣ − δ q + 1 D a q − 1 ( C γ ( x ) ) . \frac{1}{|\gamma|-\delta_q+1}D_{\mathbf{a}_{q-1}}(C_\gamma(\mathbf{x})). ∣ γ ∣ − δ q + 1 1 D a q − 1 ( C γ ( x )) .
Summing these contributions over all monomials of H > δ q ( f ) H^{>\delta_q}(f) H > δ q ( f ) and collecting like terms gives exactly P δ q − 1 , a q − 1 ( f ) P_{\delta_q-1,\mathbf{a}_{q-1}}(f) P δ q − 1 , a q − 1 ( f ) .
After the terms have been collected, we make one final size check. If the result has more than s 2 t s^2t s 2 t monomials, or if one of its coefficients has height larger than the supplied height cap, then we return FAIL. In algorithm 1, this cap is B g l o b \mathcal{B}_{\mathrm{glob}} B glob . Otherwise we output the collected sparse representation.
The vector-list dynamic program, the binomial coefficients with ∣ v ∣ ≤ s t − 1 |\mathbf{v}|\le st-1 ∣ v ∣ ≤ s t − 1 , the one additional multiplication by a coordinate of a q − 1 \mathbf{a}_{q-1} a q − 1 and by an exponent in the directional derivative, the collection of like terms, and the final height comparisons all use
poly ( n , s , t , τ , log d , Ht ( a q − 1 ) ) \operatorname{poly}(n,s,t,\tau,\log d,\operatorname{Ht}(\mathbf{a}_{q-1})) poly ( n , s , t , τ , log d , Ht ( a q − 1 ))
bit operations.
Remark 4.2. The computation of P q P_q P q uses the current vector a q − 1 \mathbf{a}_{q-1} a q − 1 , but on a yes instance its value can be bounded through the fixed witnessing shift c \mathbf{c} c . Indeed, the tail equality proved in Theorem 4.3 gives P q = P δ q − 1 , c ( f ) P_q=P_{\delta_{q-1},\mathbf{c}}(f) P q = P δ q − 1 , c ( f ) on every yes instance. Thus the sparsity and height of the computed tail are controlled by proposition 3.3, using the single fixed shift c \mathbf{c} c rather than a bound that grows recursively with q q q .
Theorem 4.3. Algorithm 1 correctly determines whether there exists a shift in S f , g S_{f,g} S f , g .
Proof. First suppose S f , g = ∅ S_{f,g}=\varnothing S f , g = ∅ . Then for every vector a \mathbf{a} a , the polynomial f ( x ) − g ( x − a ) f(\mathbf{x})-g(\mathbf{x}-\mathbf{a}) f ( x ) − g ( x − a ) is nonzero. Thus no candidate can pass the final verification check. The algorithm may return FAIL earlier because an enumeration exceeds the support cap, because a computed coefficient exceeds B g l o b \mathcal{B}_{\mathrm{glob}} B glob , or because a linear system is infeasible. If none of these early checks fails, then all intermediate sparse objects are bounded by the explicit caps in the algorithm and the candidate coordinates are bounded by the basic-solution determinant bound, so the final sparse verifier from Corollary 1.6 runs within the stated polynomial time and rejects. Hence the algorithm can only return FAIL on no instances.
It remains to consider a yes instance. By Theorem 1.5 , fix c ∈ S f , g \mathbf{c}\in S_{f,g} c ∈ S f , g of height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) . Then g ( x ) ≡ f ( x + c ) g(\mathbf{x})\equiv f(\mathbf{x}+\mathbf{c}) g ( x ) ≡ f ( x + c ) . By Lemma 2.4, for every 0 ≤ i ≤ d − 1 0\leq i\leq d-1 0 ≤ i ≤ d − 1 ,
H i ( g ( x ) ) = H i ( f ( x ) ) + f c ( i + 1 ) ( x ) + P i , c ( f ) ( x ) . (6) H^i(g(\mathbf{x}))=H^i(f(\mathbf{x}))+f_{\mathbf{c}}^{(i+1)}(\mathbf{x})+P_{i,\mathbf{c}}(f)(\mathbf{x}). \tag*{(6)} H i ( g ( x )) = H i ( f ( x )) + f c ( i + 1 ) ( x ) + P i , c ( f ) ( x ) . (6)
We prove the following invariant at the beginning of iteration q q q :
(i) Both c \mathbf{c} c and the current vector a q − 1 \mathbf{a}_{q-1} a q − 1 satisfy L q − 1 \mathcal{L}_{q-1} L q − 1 .
(ii) Every solution b \mathbf{b} b of L q − 1 \mathcal{L}_{q-1} L q − 1 satisfies
f δ p ( 1 ) ( b , x ) ≡ f δ p ( 1 ) ( c , x ) for all 1 ≤ p < q . (7) f_{\delta_p}^{(1)}(\mathbf{b},\mathbf{x})\equiv f_{\delta_p}^{(1)}(\mathbf{c},\mathbf{x})\qquad\text{for all }1\leq p<q. \tag*{(7)} f δ p ( 1 ) ( b , x ) ≡ f δ p ( 1 ) ( c , x ) for all 1 ≤ p < q . (7)
(iii) The current vector a q − 1 \mathbf{a}_{q-1} a q − 1 satisfies
H ≥ δ q ( f ( x + a q − 1 ) ) = H ≥ δ q ( g ( x ) ) . (8) H^{\geq\delta_q}(f(\mathbf{x}+\mathbf{a}_{q-1}))=H^{\geq\delta_q}(g(\mathbf{x})). \tag*{(8)} H ≥ δ q ( f ( x + a q − 1 )) = H ≥ δ q ( g ( x )) . (8)
For q = 1 q=1 q = 1 , the first item holds because L 0 \mathcal{L}_0 L 0 is empty, the second item is vacuous, and the third holds because a 0 = 0 \mathbf{a}_0=\mathbf{0} a 0 = 0 , δ 1 = d \delta_1=d δ 1 = d , and translations do not change the top homogeneous component:
H d ( f ) = H d ( f ( x + c ) ) = H d ( g ) . H^d(f)=H^d(f(\mathbf{x}+\mathbf{c}))=H^d(g). H d ( f ) = H d ( f ( x + c )) = H d ( g ) .
Now assume the invariant holds at the beginning of iteration q q q . The high-truncation equality (8) is exactly the hypothesis used in Lemma 4.1 to apply Lemma 3.2 with r = δ q r=\delta_q r = δ q . Hence the enumeration checks in the computation of P q P_q P q do not fail.
We next compare the tail being computed with the corresponding tail at the true shift c \mathbf{c} c . If j > δ q j>\delta_q j > δ q and H j ( f ) ≠ 0 H^j(f)\ne0 H j ( f ) = 0 , then j = δ p j=\delta_p j = δ p for some p < q p<q p < q . Applying the induction invariant to the algorithm’s current vector a q − 1 \mathbf{a}_{q-1} a q − 1 gives equality of the first directional derivatives in the directions a q − 1 \mathbf{a}_{q-1} a q − 1 and c \mathbf{c} c . By Lemma 2.3 ,
f j ( r ) ( a q − 1 , x ) ≡ f j ( r ) ( c , x ) for every r ≥ 1 and j > δ q . (9) f_j^{(r)}(\mathbf{a}_{q-1},\mathbf{x})\equiv f_j^{(r)}(\mathbf{c},\mathbf{x})\qquad\text{for every }r\geq1\text{ and }j>\delta_q. \tag*{(9)} f j ( r ) ( a q − 1 , x ) ≡ f j ( r ) ( c , x ) for every r ≥ 1 and j > δ q . (9)
Therefore
P q ( x ) = P δ q − 1 , a q − 1 ( f ) ( x ) = P δ q − 1 , c ( f ) ( x ) . (10) P_q(\mathbf{x})=P_{\delta_q-1,\mathbf{a}_{q-1}}(f)(\mathbf{x})=P_{\delta_q-1,\mathbf{c}}(f)(\mathbf{x}). \tag*{(10)} P q ( x ) = P δ q − 1 , a q − 1 ( f ) ( x ) = P δ q − 1 , c ( f ) ( x ) . (10)
By (10) , the polynomial being checked is P δ q − 1 , c ( f ) P_{\delta_q-1,\mathbf{c}}(f) P δ q − 1 , c ( f ) , which depends only on the fixed witnessing shift c \mathbf{c} c . The structural lemma gives the required sparsity bound, so the size checks in Lemma 4.1 pass. In the rational bit-complexity version, proposition 3.3 also applies: P δ q − 1 , c ( f ) P_{\delta_q-1,\mathbf{c}}(f) P δ q − 1 , c ( f ) has height at most B g l o b \mathcal{B}_{\mathrm{glob}} B glob . Hence the height checks pass as well, so the computation of P q P_q P q does not return FAIL.
Using (6) and (10) with i = δ q − 1 i=\delta_q-1 i = δ q − 1 , we get
H δ q − 1 ( g ( x ) ) = H δ q − 1 ( f ( x ) ) + f δ q ( 1 ) ( c , x ) + P q ( x ) . (11) H^{\delta_q-1}(g(\mathbf{x}))=H^{\delta_q-1}(f(\mathbf{x}))+f_{\delta_q}^{(1)}(\mathbf{c},\mathbf{x})+P_q(\mathbf{x}). \tag*{(11)} H δ q − 1 ( g ( x )) = H δ q − 1 ( f ( x )) + f δ q ( 1 ) ( c , x ) + P q ( x ) . (11)
Thus c \mathbf{c} c satisfies the new equations added in iteration q q q , and hence satisfies L q \mathcal{L}_q L q .
Let b \mathbf{b} b be any solution of L q \mathcal{L}_q L q . Since L q − 1 ⊆ L q \mathcal{L}_{q-1}\subseteq\mathcal{L}_q L q − 1 ⊆ L q , the induction invariant gives (7) for all p < q p<q p < q . Subtracting (11) from the new equation in L q \mathcal{L}_q L q gives
f δ q ( 1 ) ( b , x ) ≡ f δ q ( 1 ) ( c , x ) . (12) f_{\delta_q}^{(1)}(\mathbf{b},\mathbf{x})\equiv f_{\delta_q}^{(1)}(\mathbf{c},\mathbf{x}). \tag*{(12)} f δ q ( 1 ) ( b , x ) ≡ f δ q ( 1 ) ( c , x ) . (12)
Therefore every solution of L q \mathcal{L}_q L q satisfies the derivative equalities for all p ≤ q p\leq q p ≤ q .
The algorithm chooses a q \mathbf{a}_q a q to be a solution of L q \mathcal{L}_q L q . In the rational bit-complexity version it chooses a basic rational solution; by Lemma A.5 in Appendix § 7 and the choice of B g l o b \mathcal{B}_{\mathrm{glob}} B glob , this solution has height at most B g l o b \mathcal{B}_{\mathrm{glob}} B glob . If q < m q<m q < m , we prove the high-truncation invariant for the next iteration. By the previous paragraph and Lemma 2.3, all directional derivative contributions from components H δ p ( f ) H^{\delta_p}(f) H δ p ( f ) with p ≤ q p\leq q p ≤ q are the same under a q \mathbf{a}_q a q and under c \mathbf{c} c . For degrees at least δ q + 1 \delta_{q+1} δ q + 1 , every contribution either comes from one of these already processed higher components, or from the top part of the component of the same degree, which is independent of the shift. Hence
H ≥ δ q + 1 ( f ( x + a q ) ) = H ≥ δ q + 1 ( f ( x + c ) ) = H ≥ δ q + 1 ( g ( x ) ) . H^{\geq\delta_{q+1}}(f(\mathbf{x}+\mathbf{a}_q))=H^{\geq\delta_{q+1}}(f(\mathbf{x}+\mathbf{c}))=H^{\geq\delta_{q+1}}(g(\mathbf{x})). H ≥ δ q + 1 ( f ( x + a q )) = H ≥ δ q + 1 ( f ( x + c )) = H ≥ δ q + 1 ( g ( x )) .
This proves the invariant for the next iteration.
After the final iteration, the returned vector a m \mathbf{a}_m a m satisfies
f δ p ( 1 ) ( a m , x ) ≡ f δ p ( 1 ) ( c , x ) for every 1 ≤ p ≤ m . f_{\delta_p}^{(1)}(\mathbf{a}_m,\mathbf{x})\equiv f_{\delta_p}^{(1)}(\mathbf{c},\mathbf{x})\qquad\text{for every }1\leq p\leq m. f δ p ( 1 ) ( a m , x ) ≡ f δ p ( 1 ) ( c , x ) for every 1 ≤ p ≤ m .
If H j ( f ) = 0 H^j(f)=0 H j ( f ) = 0 or j = 0 j=0 j = 0 , then f j ( 1 ) ( a m , x ) = f j ( 1 ) ( c , x ) = 0 f_j^{(1)}(\mathbf{a}_m,\mathbf{x})=f_j^{(1)}(\mathbf{c},\mathbf{x})=0 f j ( 1 ) ( a m , x ) = f j ( 1 ) ( c , x ) = 0 . Therefore
f j ( 1 ) ( a m , x ) ≡ f j ( 1 ) ( c , x ) for all 0 ≤ j ≤ d . f_j^{(1)}(\mathbf{a}_m,\mathbf{x})\equiv f_j^{(1)}(\mathbf{c},\mathbf{x})\qquad\text{for all }0\leq j\leq d. f j ( 1 ) ( a m , x ) ≡ f j ( 1 ) ( c , x ) for all 0 ≤ j ≤ d .
Since c ∈ S f , g \mathbf{c}\in S_{f,g} c ∈ S f , g , Lemma 2.5 implies a m ∈ S f , g \mathbf{a}_m\in S_{f,g} a m ∈ S f , g . The final verification succeeds, and the algorithm returns a valid shift.
Proposition 4.4 (Runtime and height bounds). In the rational bit-complexity version, every basic rational solution a q \mathbf{a}_q a q computed by algorithm 1 has height
poly ( n , s , t , τ , log d ) . \operatorname{poly}(n,s,t,\tau,\log d). poly ( n , s , t , τ , log d ) . Moreover, the algorithm can be implemented using poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations.
Proof. There are at most s s s nonzero positive homogeneous components of f f f , so the algorithm has at most s s s iterations. In iteration q q q , only the degree δ q − 1 \delta_q-1 δ q − 1 equations are newly added; all earlier equations are kept in L q − 1 \mathcal{L}_{q-1} L q − 1 .
We first record the size and height of the equations added in one stage. Suppose that the algorithm reaches the linear-system step in iteration q q q . Then the computation of P q P_q P q has been accepted by the global checks. Hence
sp ( P q ) ≤ s 2 t , Ht ( P q ) ≤ B g l o b . \operatorname{sp}(P_q)\leq s^2t,\qquad\operatorname{Ht}(P_q)\leq\mathcal{B}_{\mathrm{glob}}. sp ( P q ) ≤ s 2 t , Ht ( P q ) ≤ B glob .
Therefore the right-hand side H δ q − 1 ( g ) − H δ q − 1 ( f ) − P q H^{\delta_q-1}(g)-H^{\delta_q-1}(f)-P_q H δ q − 1 ( g ) − H δ q − 1 ( f ) − P q has support at most t + s + s 2 t t+s+s^2t t + s + s 2 t and height bounded by poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) . Here we use the fact that B g l o b \mathcal{B}_{\mathrm{glob}} B glob was chosen to be a fixed polynomial bound large enough to dominate all height bounds used by the algorithm. The newly added equations are obtained by comparing coefficients in
f δ q ( 1 ) ( b , x ) = H δ q − 1 ( g ) − H δ q − 1 ( f ) − P q . f_{\delta_q}^{(1)}(\mathbf{b},\mathbf{x}) = H^{\delta_q-1}(g) - H^{\delta_q-1}(f) - P_q. f δ q ( 1 ) ( b , x ) = H δ q − 1 ( g ) − H δ q − 1 ( f ) − P q .
The right-hand side has support at most t + s + s 2 t t+s+s^2t t + s + s 2 t . On the other hand,
f δ q ( 1 ) ( b , x ) = ∑ ℓ = 1 n b ℓ ∂ ℓ H δ q ( f ) . f_{\delta_q}^{(1)}(\mathbf{b},\mathbf{x}) = \sum_{\ell=1}^{n} b_\ell\partial_\ell H^{\delta_q}(f). f δ q ( 1 ) ( b , x ) = ℓ = 1 ∑ n b ℓ ∂ ℓ H δ q ( f ) .
Thus the support of the left-hand side is contained in the union of the supports of the n n n partial derivatives of H δ q ( f ) H^{\delta_q}(f) H δ q ( f ) . Since sp ( H δ q ( f ) ) ≤ s \operatorname{sp}(H^{\delta_q}(f)) \le s sp ( H δ q ( f )) ≤ s , this union has size at most n s ns n s . Consequently, the coefficient comparison in iteration q q q introduces at most n s + t + s + s 2 t = poly ( n , s , t ) ns+t+s+s^2t=\operatorname{poly}(n,s,t) n s + t + s + s 2 t = poly ( n , s , t ) scalar linear equations.
The coefficients of these equations come from the partial derivatives ∂ ℓ H δ q ( f ) \partial_\ell H^{\delta_q}(f) ∂ ℓ H δ q ( f ) . Differentiating a monomial only multiplies its coefficient by an exponent bounded by d d d , so the entries of the coefficient matrix have height O ( τ + log d ) O(\tau+\log d) O ( τ + log d ) . The right-hand side has height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) , as shown above. Therefore, after any iteration q q q , the accumulated system L q \mathcal{L}_q L q has only poly ( n , s , t ) \operatorname{poly}(n,s,t) poly ( n , s , t ) scalar equations in the n n n variables b 1 , … , b n b_1,\ldots,b_n b 1 , … , b n , and all entries of its coefficient matrix and right-hand side have height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) .
We now apply Lemma A.5 in Appendix § 7 . If the accumulated system L q \mathcal{L}_q L q is feasible, then a basic rational solution a q \mathbf{a}_q a q has height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) , and such a solution can be computed using poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations. On yes instances, the choice of B g l o b \mathcal{B}_{\mathrm{glob}} B glob is large enough to dominate this polynomial height bound. On no instances, this polynomial bound is sufficient for the bit-complexity analysis; no separate height cap is imposed on a q \mathbf{a}_q a q .
It remains to justify that the whole algorithm has polynomial bit complexity. We argue inductively only for the cost of computing the successive tails and solutions; the height of P q P_q P q itself is controlled by the global check above, not by a recursive height bound. The initial vector is a 0 = 0 \mathbf{a}_0=\mathbf{0} a 0 = 0 , so it has height 0 0 0 . Suppose that the algorithm has reached iteration q q q and that a q − 1 \mathbf{a}_{q-1} a q − 1 has height
poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d )
Then Lemma 4.1 computes P q P_q P q , or returns FAIL, using poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations. If the computation succeeds, the global support and height checks give
sp ( P q ) ≤ s 2 t , Ht ( P q ) ≤ B g l o b , \operatorname{sp}(P_q) \le s^2t,\qquad\operatorname{Ht}(P_q) \le\mathcal{B}_{\mathrm{glob}}, sp ( P q ) ≤ s 2 t , Ht ( P q ) ≤ B glob ,
so the newly added equations have the polynomial size and height bounds proved above. Hence exact linear algebra, together with the appendix Lemma A.5 , computes the next basic rational solution a q \mathbf{a}_q a q using
poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d )
bit operations, and this solution again has height
poly ( n , s , t , τ , log d ) . \operatorname{poly}(n,s,t,\tau,\log d). poly ( n , s , t , τ , log d ) .
This completes the induction for every candidate vector produced by the algorithm. Since there are at most s s s iterations, the total cost of all computations of the polynomials P q P_q P q and all linear-system solves is poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) . Finally, if the algorithm reaches the last verification step, the candidate shift has polynomial height. Therefore the final sparse verification can be performed in poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations by the proof of Corollary 1.6. Hence the whole rational bit-complexity version of the algorithm runs in poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) bit operations, and every basic rational solution a q \mathbf{a}_q a q computed by the algorithm has height poly ( n , s , t , τ , log d ) \operatorname{poly}(n,s,t,\tau,\log d) poly ( n , s , t , τ , log d ) .
Conclusion and Open Problems
We gave the first deterministic polynomial-time algorithm, in the sparse input size, for target-given shift equivalence of sparse multivariate polynomials over Q \mathbb{Q} Q . For f , g ∈ Q [ x ] f,g \in\mathbb{Q}[x] f , g ∈ Q [ x ] of sparsities s , t s,t s , t and degree at most d d d , the algorithm decides whether there is a a ∈ Q n \mathbf{a} \in\mathbb{Q}^{n} a ∈ Q n such that
f ( x + a ) ≡ g ( x ) f(\mathbf{x}+\mathbf{a}) \equiv g(\mathbf{x}) f ( x + a ) ≡ g ( x )
using polynomially many arithmetic operations in n , s , t , log d n,s,t,\log d n , s , t , log d . It outputs a rational shift of polynomial height and runs in polynomial bit complexity, with polynomial bounds in n , s , t , τ , log d n,s,t,\tau,\log d n , s , t , τ , log d . As noted in the introduction, the structural and arithmetic parts extend to any field of characteristic zero or larger than d d d . This exponentially improves on the indirect ROABP-based consequence of the framework of Dvir, Oliveira, and Shpilka described above [16 ] , whose dependence on the degree is polynomial in d d d rather than polynomial in log d \log d log d .
The key point is that, although sparse polynomials are not closed under shifts, our structural lemma shows that the shifted expansions arising in a yes instance remain sparse after the relevant truncations. This allows the homogeneous descent to be carried out entirely in sparse representation. Over Q \mathbb{Q} Q , the same structural control also keeps the bit-complexity analysis from becoming recursive in the heights of the intermediate candidates.
In the algebraic-RAM model described above, separate black-box access to two promised-sparse inputs is handled by sparse interpolation. This differs from receiving evaluation access only to the composed expression f ( x + a ) − g ( x + b ) f(\mathbf{x}+\mathbf{a})-g(\mathbf{x}+\mathbf{b}) f ( x + a ) − g ( x + b ) , for which our structural verifier cannot inspect f f f and g g g . Black-box PIT for any-order ROABPs [23 , 20 ] gives polynomial dependence on d d d and quasipolynomial-type dependence overall; obtaining complexity polynomial in n , s , t , log d n,s,t,\log d n , s , t , log d for this composed-oracle problem remains open.
Another direction is to understand the small-characteristic regime. Our algorithm uses Taylor expansion, directional derivatives, and factorial denominators, and therefore assumes that the characteristic is zero or larger than the degree. In small characteristic, several derivative-based characterizations no longer apply in the same form. It would be interesting to determine whether sparse shift equivalence still admits an efficient deterministic algorithm for formal polynomial identities in small characteristic.
Acknowledgements. The authors thank OpenAI’s ChatGPT Pro for assistance during the preparation of this manuscript. ChatGPT Pro also suggested the argument leading to the small rational shift existence proof of Theorem 1.5 . The authors have independently checked the arguments and take full responsibility for the correctness of all results and proofs.
References
Missing Proofs
Observation A.1. Let A ⊆ C n A \subseteq\mathbb{C}^{n} A ⊆ C n be an affine subspace. If a 1 , … , a m ∈ A a_{1},\ldots,a_{m} \in A a 1 , … , a m ∈ A and λ 1 , … , λ m ∈ C \lambda_{1},\ldots,\lambda_{m} \in\mathbb{C} λ 1 , … , λ m ∈ C satisfy
∑ i = 1 m λ i = 1 , \sum_{i=1}^{m}\lambda_i = 1, i = 1 ∑ m λ i = 1 , then
∑ i = 1 m λ i a i ∈ A . \sum_{i=1}^{m}\lambda_i a_i \in A. i = 1 ∑ m λ i a i ∈ A . In particular, affine subspaces are closed under affine averages.
Proof. Write A = a 0 + V A = a_0 + V A = a 0 + V , where V ⊆ C n V \subseteq\mathbb{C}^{n} V ⊆ C n is a linear subspace. For each i i i , write a i = a 0 + v i a_i = a_0 + v_i a i = a 0 + v i with v i ∈ V v_i \in V v i ∈ V . Then
∑ i = 1 m λ i a i = a 0 + ∑ i = 1 m λ i v i ∈ a 0 + V = A , \sum_{i=1}^{m}\lambda_i a_i = a_0 + \sum_{i=1}^{m}\lambda_i v_i \in a_0 + V = A, i = 1 ∑ m λ i a i = a 0 + i = 1 ∑ m λ i v i ∈ a 0 + V = A ,
since ∑ i λ i = 1 \sum_i \lambda_i = 1 ∑ i λ i = 1 and V V V is closed under linear combinations.
Proof of proposition 2.9. Write
f ( x + z ) − g ( x ) = ∑ α F α ( z ) x α . f(x+z)-g(x)=\sum_{\alpha}F_{\alpha}(z)x^{\alpha}. f ( x + z ) − g ( x ) = α ∑ F α ( z ) x α .
where each F α ∈ Q [ z ] F_{\alpha} \in\mathbb{Q}[z] F α ∈ Q [ z ] . Thus S f , g ( C ) S_{f,g}(\mathbb{C}) S f , g ( C ) is the common zero set of finitely many polynomials with rational coefficients:
S f , g ( C ) = { a ∈ C n : F α ( a ) = 0 for all α } . S_{f,g}(\mathbb{C})=\{a\in\mathbb{C}^{n}:F_{\alpha}(a)=0\text{ for all }\alpha\}. S f , g ( C ) = { a ∈ C n : F α ( a ) = 0 for all α } .
Since S f , g ( C ) S_{f,g}(\mathbb{C}) S f , g ( C ) is nonempty, choose c ∈ S f , g ( C ) c \in S_{f,g}(\mathbb{C}) c ∈ S f , g ( C ) . Then F α ( c ) = 0 F_{\alpha}(c)=0 F α ( c ) = 0 for all α \alpha α . Now, consider the ideal
I : = ⟨ F α ⟩ α ⊆ Q ‾ [ z ] . I:=\langle F_{\alpha}\rangle_{\alpha}\subseteq\overline{\mathbb{Q}}[z]. I := ⟨ F α ⟩ α ⊆ Q [ z ] .
We claim that I I I is a proper ideal. Indeed, if 1 ∈ I 1\in I 1 ∈ I , then we could write
1 = ∑ α H α ( z ) F α ( z ) 1=\sum_{\alpha}H_{\alpha}(z)F_{\alpha}(z) 1 = α ∑ H α ( z ) F α ( z )
with H α ∈ Q ‾ [ z ] H_{\alpha}\in\overline{\mathbb{Q}}[z] H α ∈ Q [ z ] , and evaluating at z = c z=c z = c would give 1 = 0 1=0 1 = 0 , a contradiction. Thus I I I is proper. Since Q ‾ \overline{\mathbb{Q}} Q is algebraically closed, the weak Nullstellensatz gives a point
a ∈ Q ‾ n a\in\overline{\mathbb{Q}}^{n} a ∈ Q n
such that F α ( a ) = 0 F_{\alpha}(a)=0 F α ( a ) = 0 for all α \alpha α . Equivalently, f ( x + a ) = g ( x ) f(x+a)=g(x) f ( x + a ) = g ( x ) .
Let L / Q L/\mathbb{Q} L / Q be a finite Galois extension containing all coordinates of a a a , and let
G : = Gal ( L / Q ) . G:=\operatorname{Gal}(L/\mathbb{Q}). G := Gal ( L / Q ) .
For every σ ∈ G \sigma\in G σ ∈ G , applying σ \sigma σ to the identity f ( x + a ) = g ( x ) f(x+a)=g(x) f ( x + a ) = g ( x ) gives
f ( x + σ ( a ) ) = g ( x ) , f(x+\sigma(a))=g(x), f ( x + σ ( a )) = g ( x ) ,
because the coefficients of f f f and g g g lie in Q \mathbb{Q} Q . Hence σ ( a ) ∈ S f , g ( C ) \sigma(a)\in S_{f,g}(\mathbb{C}) σ ( a ) ∈ S f , g ( C ) for every $\sigma\in G. Since S f , g ( C ) S_{f,g}(\mathbb{C}) S f , g ( C ) is an affine subspace, it is closed under affine averages; see observation A.1. Therefore
a ˉ : = 1 ∣ G ∣ ∑ σ ∈ G σ ( a ) ∈ S f , g ( C ) . \bar{a} := \frac{1}{|G|} \sum_{\sigma\in G} \sigma(a) \in S_{f,g}(\mathbb{C}). a ˉ := ∣ G ∣ 1 σ ∈ G ∑ σ ( a ) ∈ S f , g ( C ) .
On the other hand, a ˉ \bar{a} a ˉ is fixed by every element of G G G . Formally, for any τ ∈ G \tau\in G τ ∈ G , the sum is just a reordering
∑ σ ∈ G τ ( σ ( a ) ) = ∑ σ ∈ G σ ( a ) . \sum_{\sigma\in G} \tau(\sigma(a)) = \sum_{\sigma\in G} \sigma(a). σ ∈ G ∑ τ ( σ ( a )) = σ ∈ G ∑ σ ( a ) .
Thus each coordinate of a ˉ \bar{a} a ˉ lies in L G = Q L^G = \mathbb{Q} L G = Q .4 Therefore
a ˉ ∈ Q n . \bar{a} \in\mathbb{Q}^n. a ˉ ∈ Q n .
Consequently there exists a rational vector q : = a ˉ ∈ Q n \mathbf{q} := \bar{a} \in\mathbb{Q}^n q := a ˉ ∈ Q n such that
f ( x + q ) = g ( x ) , f(\mathbf{x}+\mathbf{q}) = g(\mathbf{x}), f ( x + q ) = g ( x ) ,
as desired.
Proof of Theorem 1.5 . Suppose S f , g ( Q ) ≠ ∅ S_{f,g}(\mathbb{Q}) \ne\varnothing S f , g ( Q ) = ∅ . By proposition 2.9, choose a rational shift c ∈ S f , g ( Q ) \mathbf{c} \in S_{f,g}(\mathbb{Q}) c ∈ S f , g ( Q ) .
The proof has three steps. First, the structural bound confines all relevant derivatives of f f f to a polynomial-dimensional space W W W . Second, on W W W we represent the translation from f f f to g g g by a small-height unipotent operator and take its finite logarithm to recover D c f D_{\mathbf{c}}f D c f . Third, we solve D b f = D c f D_{\mathbf{b}}f = D_{\mathbf{c}}f D b f = D c f for a small basic rational solution b \mathbf{b} b ; the difference b − c \mathbf{b}-\mathbf{c} b − c stabilizes f f f , so b \mathbf{b} b is again a valid shift.
If f f f is constant, then g = f g=f g = f , and the zero shift is a rational witness of height 0. Thus we may assume that f f f is nonconstant.
Let S = supp ( c ) S=\operatorname{supp}(\mathbf{c}) S = supp ( c ) and
W = ⟨ ∂ v f ∣ v ∈ N n , supp ( v ) ⊆ S ⟩ . W = \langle\partial^{\mathbf{v}} f \mid\mathbf{v} \in\mathbb{N}^n,\ \operatorname{supp}(\mathbf{v}) \subseteq S \rangle. W = ⟨ ∂ v f ∣ v ∈ N n , supp ( v ) ⊆ S ⟩ .
By Lemma 3.2 with r = 0 r=0 r = 0 , every monomial x γ \mathbf{x}^{\boldsymbol{\gamma}} x γ of f f f satisfies
∏ i ∈ S ( γ i + 1 ) ≤ s t . \prod_{i \in S}(\gamma_i+1) \le st. i ∈ S ∏ ( γ i + 1 ) ≤ s t .
For a fixed monomial x γ \mathbf{x}^{\boldsymbol{\gamma}} x γ of f f f , a derivative ∂ v ( x γ ) \partial^{\mathbf{v}}(\mathbf{x}^{\boldsymbol{\gamma}}) ∂ v ( x γ ) with supp ( v ) ⊆ S \operatorname{supp}(\mathbf{v}) \subseteq S supp ( v ) ⊆ S is nonzero exactly when 0 ≤ v i ≤ γ i 0 \le v_i \le\gamma_i 0 ≤ v i ≤ γ i for every i ∈ S i \in S i ∈ S . Therefore,
Fact A.2. The number of nonzero derivatives
∂ v ( x γ ) , supp ( v ) ⊆ S , \partial^{\mathbf{v}}(\mathbf{x}^{\boldsymbol{\gamma}}), \qquad\operatorname{supp}(\mathbf{v}) \subseteq S, ∂ v ( x γ ) , supp ( v ) ⊆ S , is at most
∏ i ∈ S ( γ i + 1 ) ≤ s t . \prod_{i \in S}(\gamma_i+1) \le st. i ∈ S ∏ ( γ i + 1 ) ≤ s t .
Fact A.3. Each such nonzero derivative satisfies
∣ v ∣ = ∑ i ∈ S v i ≤ ∑ i ∈ S γ i ≤ ∏ i ∈ S ( γ i + 1 ) − 1 ≤ s t − 1. |\mathbf{v}| = \sum_{i \in S} v_i \le\sum_{i \in S} \gamma_i \le\prod_{i \in S}(\gamma_i+1)-1 \le st-1. ∣ v ∣ = i ∈ S ∑ v i ≤ i ∈ S ∑ γ i ≤ i ∈ S ∏ ( γ i + 1 ) − 1 ≤ s t − 1.
Since f f f has at most s s s monomials, fact A.2 implies
dim W ≤ s 2 t . \dim W \le s^{2}t. dim W ≤ s 2 t .
Let
m = dim W ≤ s 2 t . m = \dim W \le s^{2}t. m = dim W ≤ s 2 t .
Choose a basis
B = { w 1 = f , w 2 , … , w m } B = \{w_1 = f, w_2, \ldots, w_m\} B = { w 1 = f , w 2 , … , w m }
of W W W such that each
w j = ∂ v j f w_j = \partial^{v_j} f w j = ∂ v j f
for some v j ∈ N n v_j \in\mathbb{N}^n v j ∈ N n with supp ( v j ) ⊆ S \operatorname{supp}(v_j) \subseteq S supp ( v j ) ⊆ S . Since we take w 1 = f w_1 = f w 1 = f , we have v 1 = 0 v_1 = 0 v 1 = 0 .
Now solve the linear system
∑ j = 2 m y j w j = g − f , \sum_{j=2}^{m} y_j w_j = g-f, j = 2 ∑ m y j w j = g − f ,
in variables y 2 , … , y m y_2,\ldots,y_m y 2 , … , y m , where the linear equations of the system are obtained by comparing coefficients of monomials on both sides.
We claim that the system is satisfiable over Q \mathbb{Q} Q . This is because
g ( x ) − f ( x ) = f ( x + c ) − f ( x ) = ∑ v ≠ 0 supp ( v ) ⊆ S c v v ! ∂ v f ∈ span { w 2 , … , w m } , g(x)-f(x)=f(x+c)-f(x)=\sum_{\substack{v\ne0\\ \operatorname{supp}(v)\subseteq S}}\frac{c^v}{v!}\partial^v f\in\operatorname{span}\{w_2,\ldots,w_m\}, g ( x ) − f ( x ) = f ( x + c ) − f ( x ) = v = 0 supp ( v ) ⊆ S ∑ v ! c v ∂ v f ∈ span { w 2 , … , w m } ,
where the inclusion follows because w 1 = f w_1=f w 1 = f is the only polynomial of degree d d d in the basis B B B , while the displayed sum has degree at most d − 1 d-1 d − 1 and hence lies in the span of B ∖ { w 1 } B\setminus\{w_1\} B ∖ { w 1 } .
By fact A.3, every coefficient of the derivatives w j = ∂ v j f w_j=\partial^{v_j}f w j = ∂ v j f has height at most
O ( τ + s t log d ) , O(\tau+st\log d), O ( τ + s t log d ) ,
because differentiating multiplies the input coefficients by falling factorials of exponents and each exponent is bounded by d d d . Therefore, the linear system has coefficient height O ( τ + s t log d ) O(\tau+st\log d) O ( τ + s t log d ) and it has m − 1 ≤ s 2 t m-1\le s^2t m − 1 ≤ s 2 t variables. Then, by Lemma A.5 , it has a rational solution ( y 2 , … , y m ) (y_2,\ldots,y_m) ( y 2 , … , y m ) with height
poly ( s , t , log d , τ ) . \operatorname{poly}(s,t,\log d,\tau). poly ( s , t , log d , τ ) .
Define the differential operator:
Y = 1 + N with N = ∑ j = 2 m y j ∂ v j . (13) Y=1+N \qquad\text{with}\qquad N=\sum_{j=2}^{m}y_j\partial^{v_j}. \tag*{(13)} Y = 1 + N with N = j = 2 ∑ m y j ∂ v j . (13)
Then we have
Y f = f + ∑ j = 2 m y j w j = g . Yf=f+\sum_{j=2}^{m}y_jw_j=g. Y f = f + j = 2 ∑ m y j w j = g .
Fact A.3 says that any derivative of f f f with respect to S S S -variables and total order ≥ s t \ge st ≥ s t is zero. Therefore,
N s t h = 0 for every h ∈ W . N^{st}h=0 \qquad\text{for every }h\in W. N s t h = 0 for every h ∈ W .
Thus the logarithm of Y Y Y is finite on W W W :
log Y = ∑ r = 1 s t − 1 ( − 1 ) r + 1 r N r . \log Y=\sum_{r=1}^{st-1}\frac{(-1)^{r+1}}{r}N^r. log Y = r = 1 ∑ s t − 1 r ( − 1 ) r + 1 N r .
Put
q = ( log Y ) f . q=(\log Y)f. q = ( log Y ) f .
The polynomial q q q has coefficient height poly ( n , s , t , log d , τ ) \operatorname{poly}(n,s,t,\log d,\tau) poly ( n , s , t , log d , τ ) . Indeed, work in the basis B B B of W W W . Choose m m m monomial coordinates in which the coefficient matrix of w 1 , … , w m w_1,\ldots,w_m w 1 , … , w m is nonsingular; this matrix has height O ( τ + s t log d ) O(\tau+st\log d) O ( τ + s t log d ) . For each basis element w j w_j w j , the polynomial N w j Nw_j N w j is a polynomial-height linear combination of derivatives of f f f of total order at most s t − 1 st-1 s t − 1 . Expressing N w j Nw_j N w j back in B B B by Lemma A.5 gives polynomial-height coordinates. Thus the matrix A A A of the transformation N ∣ W N|_W N ∣ W has polynomial height. Since A s t = 0 A^{st}=0 A s t = 0 ,
q = ( ∑ r = 1 s t − 1 ( − 1 ) r + 1 r A r ) e 1 q=\left(\sum_{r=1}^{st-1}\frac{(-1)^{r+1}}{r}A^r\right)e_1 q = ( r = 1 ∑ s t − 1 r ( − 1 ) r + 1 A r ) e 1
in B B B -coordinates, and repeated matrix multiplication and addition for s t st s t steps keep the bit-height polynomial.
Now compare Y Y Y with the shift operator
T c = exp ( ∑ i ∈ S c i ∂ i ) . T_c=\exp\left(\sum_{i\in S}c_i\partial_i\right). T c = exp ( i ∈ S ∑ c i ∂ i ) .
We have
Y f = g = T c f . Yf=g=T_cf. Y f = g = T c f .
Since Y Y Y and T c T_c T c are constant-coefficient differential operators, they commute with every ∂ v \partial^{\mathbf v} ∂ v . Therefore, for every v \mathbf v v with supp ( v ) ⊆ S \operatorname{supp}(\mathbf v)\subseteq S supp ( v ) ⊆ S ,
( Y − T c ) ∂ v f = ∂ v ( Y − T c ) f = 0. (Y-T_c)\partial^{\mathbf v}f=\partial^{\mathbf v}(Y-T_c)f=0. ( Y − T c ) ∂ v f = ∂ v ( Y − T c ) f = 0.
Thus Y Y Y and T c T_c T c act identically on W W W . Their logarithms also act identically on W W W , because the logarithm is a finite polynomial in the nilpotent operator Y − 1 = T c − 1 Y-1=T_c-1 Y − 1 = T c − 1 on W W W . Hence
q = ( log Y ) f = ( log T c ) f = ( ∑ i ∈ S c i ∂ i ) f . q=(\log Y)f=(\log T_c)f=\left(\sum_{i\in S}c_i\partial_i\right)f. q = ( log Y ) f = ( log T c ) f = ( i ∈ S ∑ c i ∂ i ) f .
Finally, solve the linear system in variables b i b_i b i , i ∈ S i\in S i ∈ S :
∑ i ∈ S b i ∂ i f = q . \sum_{i\in S}b_i\partial_i f=q. i ∈ S ∑ b i ∂ i f = q .
It is consistent, since b i = c i b_i=c_i b i = c i is a solution. The coefficient matrix has height O ( τ + log d ) O(\tau+\log d) O ( τ + log d ) , and the right-hand side q q q has polynomial height. Thus Lemma A.5 gives a rational solution ( b i ) i ∈ S (b_i)_{i\in S} ( b i ) i ∈ S with
Ht ( b i ) ≤ poly ( n , s , t , log d , τ ) . \operatorname{Ht}(b_i)\leq\operatorname{poly}(n,s,t,\log d,\tau). Ht ( b i ) ≤ poly ( n , s , t , log d , τ ) .
Set b i = 0 b_i=0 b i = 0 for i ∉ S i\notin S i ∈ / S . Then
∑ i = 1 n b i ∂ i f = ∑ i = 1 n c i ∂ i f , \sum_{i=1}^{n}b_i\partial_i f=\sum_{i=1}^{n}c_i\partial_i f, i = 1 ∑ n b i ∂ i f = i = 1 ∑ n c i ∂ i f ,
so
∑ i = 1 n ( b i − c i ) ∂ i f = 0 \sum_{i=1}^{n}(b_i-c_i)\partial_i f=0 i = 1 ∑ n ( b i − c i ) ∂ i f = 0
Hence, by Lemma 2.7, we have b − c ∈ S f ( C ) \mathbf b-\mathbf c\in S_f(\mathbb{C}) b − c ∈ S f ( C ) . It follows that b ∈ S f , g ∩ Q n \mathbf b\in S_{f,g}\cap\mathbb{Q}^n b ∈ S f , g ∩ Q n and has the desired height bound.
Definition A.4 (Basic rational solution). Let M y = r M\mathbf{y}=\mathbf{r} M y = r be a feasible linear system over Q \mathbb{Q} Q , with M ∈ Q m × n M \in\mathbb{Q}^{m\times n} M ∈ Q m × n and ρ = rank ( M ) \rho=\operatorname{rank}(M) ρ = rank ( M ) . Choose ρ \rho ρ linearly independent columns of M M M whose span contains r \mathbf{r} r , set all other variables to zero, and solve for the variables in the chosen columns. The resulting vector is called a basic rational solution.
Lemma A.5 (Basic rational solution: height and bit complexity). Let M ∈ Q m × n M \in\mathbb{Q}^{m\times n} M ∈ Q m × n and r ∈ Q m \mathbf{r} \in\mathbb{Q}^{m} r ∈ Q m be a linear system M y = r M\mathbf{y}=\mathbf{r} M y = r such that every entry of M M M and r \mathbf{r} r has height at most H H H . If the system is feasible, then:
(i) there exists a basic rational solution y ⋆ ∈ Q n \mathbf{y}^{\star} \in\mathbb{Q}^{n} y ⋆ ∈ Q n , and
(ii) every coordinate of y ⋆ \mathbf{y}^{\star} y ⋆ has height poly ( m , n , H ) \operatorname{poly}(m,n,H) poly ( m , n , H ) .
Moreover, such a basic rational solution can be computed deterministically in poly ( m , n , H ) \operatorname{poly}(m,n,H) poly ( m , n , H ) bit operations.
Proof. Let ρ = rank ( M ) \rho=\operatorname{rank}(M) ρ = rank ( M ) . Since the system is feasible, r \mathbf{r} r lies in the column span of M M M . Choose ρ \rho ρ independent columns B B B that form a basis of this column span. Then r ∈ span ( M B ) \mathbf{r} \in\operatorname{span}(M_B) r ∈ span ( M B ) , so the reduced system M B y B = r M_B\mathbf{y}_B=\mathbf{r} M B y B = r is feasible. Choose ρ \rho ρ independent rows R R R such that the square matrix C = ( M B ) R C=(M_B)_R C = ( M B ) R is nonsingular, and let d = r R \mathbf{d}=\mathbf{r}_R d = r R . Solving
C z = d C\mathbf{z}=\mathbf{d} C z = d
determines the unique vector z \mathbf{z} z with M B z = r M_B\mathbf{z}=\mathbf{r} M B z = r ; the remaining rows are satisfied because they are linear combinations of the rows in R R R on the column space spanned by M B M_B M B . Setting all variables outside B B B to zero gives a basic rational solution of the original system.
For height, write each coordinate of z \mathbf{z} z by Cramer’s rule as det ( C i ) / det ( C ) \det(C_i)/\det(C) det ( C i ) / det ( C ) , where C i C_i C i denotes the matrix obtained from C C C by replacing its i i i th column with the right-hand side vector d \mathbf{d} d . By Hadamard’s bound, determinants of r × r r\times r r × r matrices with entry height ≤ H \le H ≤ H have height poly ( r , H ) \operatorname{poly}(r,H) poly ( r , H ) , hence each coordinate has height poly ( m , n , H ) \operatorname{poly}(m,n,H) poly ( m , n , H ) .
For computation, use fraction-free Gaussian elimination (or equivalent exact linear algebra over Q \mathbb{Q} Q ) to find ρ \rho ρ , a nonsingular basis matrix C C C , and the corresponding solution exactly; the bit-lengths of all intermediate integers and the total bit-operation cost are bounded by poly ( m , n , H ) \operatorname{poly}(m,n,H) poly ( m , n , H ) .