Jean-Charles Faugère
email: jean-charles.faugere@inria.fr

Pierre-Jean Spaenlehauer
email: pierre-jean.spaenlehauer@inria.fr

Jules Svartz
email: jsvartz@ens-cachan.fr

Computing Small Certificates of Inconsistency of Quadratic Fewnomial Systems

Bézout's theorem states that dense generic systems of n multivariate quadratic equations in n variables have 2 n solutions over algebraically closed fields. When only a small subset M of monomials appear in the equations (fewnomial systems), the number of solutions may decrease dramatically. We focus in this work on subsets of quadratic monomials M such that generic systems with support M do not admit any solution at all. For these systems, Hilbert's Nullstellensatz ensures the existence of algebraic certificates of inconsistency. However, up to our knowledge all known bounds on the sizes of such certificates -including those which take into account the Newton polytopes of the polynomials-are exponential in n. Our main results show that if the inequality 2|M| -2n ≤ √ 1 + 8ν -1 holds for a quadratic fewnomial system -where ν is the matching number of a graph associated with M, and |M| is the cardinality of M -then there exists generically a certificate of inconsistency of linear size (measured as the number of coefficients in the ground field K). Moreover this certificate can be computed within a polynomial number of arithmetic operations. Next, we evaluate how often this inequality holds, and we give evidence that the probability that the inequality is satisfied depends strongly on the number of squares. More precisely, we show that if M is picked uniformly at random among the subsets of n + k + 1 quadratic monomials containing at least Ω(n 1/2+ε ) squares, then the probability that the inequality holds tends to 1 as n grows. Interestingly, this phenomenon is related with the matching number of random graphs in the Erdös-Renyi model. Finally, we provide experimental results showing that certificates in inconsistency can be computed for systems with more than 10000 variables and equations.

Introduction

Context and problem statement. Identifying classes of structured polynomial systems and designing dedicated algorithms to solve them is a central theme in computer algebra and in computational algebraic geometry, due to the wide range of applications where such systems appear. We investigate quadratic systems involving a small number of monomials (quadratic fewnomial 1 systems). Let K be a field, K its algebraic closure and M be a finite subset of monomials of degree at most two in a polynomial ring K[X 1 , . . . , X n ]. Suppose also that the constant 1 belongs to M, and let L M be the K-linear space of polynomials in K[X 1 , . . . , X n ] spanned by M.

A classical question is to bound the number of solutions in K n of a system f 1 (X 1 , . . . , X n ) =

• • • = f n (X 1 , . . . , X n ) = 0, where all polynomials lie in L M and have generic coefficients. When the exponent vectors of the monomials in M are the points with integer coordinates in a lattice polytope, Kushnirenko's theorem states that the number of toric solutions (i.e. solutions whose all coordinates are nonzero) is bounded by the normalized volume of the polytope [START_REF] Kushnirenko | Newton polytopes and the Bezout theorem[END_REF]. A variant of this theorem indicates that such generic polynomial systems do not admit any solution if the dimension of the Q-linear space generated by the exponent vectors of the monomials in M does not equal n. Solving a polynomial system and deciding if it has any solution in K n are two closely related questions. One classical method to produce a certificate that a polynomial system does not have any solution is to provide an algebraic relation via Hilbert's Nullstellensatz:

Problem 1 -Effective fewnomial Nullstellensatz. Given a system (f 1 , . . . , f m ) ∈ L m M such that f 1 (X) = • • • = f m (X) = 0 has no solution in K n , compute h 1 , . . . h m ∈ K[X 1 , . . . , X n ] such that m i=1 f i h i = 1.
Bounding the sizes of the polynomials h i is a crucial question to estimate the complexity of this problem. In this paper, the notion of size that we use is the number of coefficients in K required to describe the polynomials h 1 , . . . , h m .

On the other hand, the specification of "solving a polynomial system" depends on the context. If the number of solutions in the algebraic closure K is finite, one way to represent them symbolically is to provide a rational parametrization of their coordinates by the roots of a univariate polynomial. For the sake of simplicity, we consider only the problem of computing a univariate polynomial whose roots parametrize the set of solutions: Problem 2 -Partial 0-dimensional fewnomial system solving. Given a polynomial system f 1 = • • • = f m = 0 with support M that have finitely-many solutions in K n and a monomial µ ∈ M, compute a univariate polynomial P µ ∈ K[µ] which vanishes at all the solutions of the system.

Hence, the roots of the univariate polynomial P µ contain the images of the solutions of the input multivariate system via the monomial map (X 1 , . . . , X n ) → µ. Related works. Sparse elimination theory for solving systems with special monomial structures have been developed since the 80s [START_REF] Sturmfels | Sparse elimination theory[END_REF]. Several lines of work have been initiated during this period. When the exponent vectors of the monomials occurring in the polynomials of the system are the lattice points in a lattice polytope, connections with convex and toric geometry have been established and dedicated solving methods have been designed: homotopy continuation methods [START_REF] Huber | A polyhedral method for solving sparse polynomial systems[END_REF][START_REF] Verschelde | Homotopies exploiting Newton polytopes for solving sparse polynomial systems[END_REF], resultants [START_REF] Sturmfels | Sparse elimination theory[END_REF][START_REF] Canny | A subdivision-based algorithm for the sparse resultant[END_REF], Gröbner bases [START_REF] Sturmfels | Gröbner bases and convex polytopes[END_REF][START_REF] Faugère | Sparse Gröbner bases: the unmixed case[END_REF], etc. One important theme of these developments is to relate algebraic structures with combinatorial properties of convex bodies. In particular, Kushnirenko and Bernshtein's theorems [START_REF] Kushnirenko | Newton polytopes and the Bezout theorem[END_REF][START_REF] Bernshtein | The number of roots of a system of equations[END_REF] provide bounds on the number of isolated toric solutions in terms of the Newton polytopes of the input polynomials. Another line of work have been initiated by Khovanskii in the 80s on fewnomial systems [START_REF] Khovanskii | On a class of systems of transcendental equations[END_REF]. The main theme in this setting is to relate the algebraic and algorithmic complexity of several problems to the number of monomials occurring in the equations. For instance, a classical and challenging question is to bound the number of real solutions in the positive orthant, see e.g. [START_REF] Khovanskii | On a class of systems of transcendental equations[END_REF][START_REF] Shub | On the intractability of Hilbert's Nullstellensatz and an algebraic version of "P= NP[END_REF][START_REF] Bertrand | Polynomial systems with few real zeroes[END_REF][START_REF] Bihan | New fewnomial upper bounds from Gale dual polynomial systems[END_REF][START_REF] Koiran | On the intersection of a sparse curve and a low-degree curve: A polynomial version of the lost theorem[END_REF]21] for results on this topic. Bounding the size of a certificate of inconsistency of a polynomial system via the Nullstellensatz is a classical problem. Up to our knowledge, all known upper bounds on the size of such certificates are exponential in the number of variables n; moreover, examples by Masser and Philippon and by Lazard and Mora show that one cannot hope for better bounds in the worst case. A classical bound is given by Kollar [START_REF] Kollár | Sharp effective Nullstellensatz[END_REF]: if the maximal degree of the input inconsistent system f 1 , . . . , f m is D, then there exist h 1 , . . . , h m such that m i=1 f i h i = 1 and the degrees of the h i are bounded by n min(n, m)D min(n,m) + min(n, m)D. This bound is general and does not require any further assumption. It was later improved to deg( [START_REF] Fitchas | Nullstellensatz effectif et conjecture de Serre (théorème de Quillen-Suslin) pour le calcul formel[END_REF]. When there is no solution at infinity, the degrees of the polynomials h i are bounded by (D -1)n [START_REF] Lazard | Algèbre linéaire sur k[x 1 , . . . , x n ] et élimination[END_REF][START_REF] Brownawell | Bounds for the degrees in the Nullstellensatz[END_REF]: the number of coefficients in dense polynomials of this degree is still exponential in n. For general polynomial systems, it would be surprising that certificates of inconsistency with size polynomial in the input size exist, as this would imply N P = coN P . Estimates taking into account the bitsize of the coefficients that appear in the certificate in terms of the bitsize of the coefficients of the input system are provided by Arithmetic Nullstellensätze, see e.g. [START_REF] Krick | Sharp estimates for the arithmetic Nullstellensatz[END_REF] and references within. Two milestones on the sparse effective Nullstellensatz are the bounds in [START_REF] Canny | A subdivision-based algorithm for the sparse resultant[END_REF] and [START_REF] Sombra | A sparse effective Nullstellensatz[END_REF]: these bounds provide certificates of size bounded by a quantity which depends on the Newton polytopes of the input polynomials. However, their size is exponential in the size of the input, and these bounds do not take into account the sparsity of the support inside its Newton polytope. One of the main difficulty to generalize these techniques to fewnomial quadratic systems is the fact that the proofs rely on algebraic properties (normality, Cohen-Macaulay algebras) that hold for semigroup algebras generated by lattice points in normal polytopes, but not for semigroup algebras generated by a scattered set of monomials.

f i h i ) ≤ max(3, D) n
Other models of sparse systems have also been investigated. For instance, systems where each quadratic equation involves a small subset of variables have been investigated in [START_REF] Semaev | On solving sparse algebraic equations over finite fields[END_REF] and [START_REF] Cifuentes | Exploiting chordal structure in polynomial ideals: a Gröbner bases approach[END_REF]. Connections between combinatorial properties of graphs and polynomial systems is a classical topic which has been investigated from several viewpoints. For instance, square-free monomial ideals have many combinatorial properties and can be seen as the edge ideals of graphs, see e.g. [START_REF] Fröberg | On Stanley-Reisner rings[END_REF][START_REF] Herzog | Monomial ideals whose powers have a linear resolution[END_REF]. Connections between the regularity of the edge ideal of a graph and its matching number and cochordal cover number are shown in [START_REF] Woodroofe | Matchings, coverings, and Castelnuovo-Mumford regularity[END_REF]. Cohen-Macaulay criteria for such ideals are investigated in [START_REF] Herzog | Distributive lattices, bipartite graphs and alexander duality[END_REF][START_REF] Crupi | Cohen-macaulay edge ideal whose height is half of the number of vertices[END_REF].

Bounds on the size of certificate of inconsistency of polynomial systems are a important ingredient in algebraic proof complexity, see e.g. the Nullstellensatz proof system [START_REF] Beame | Lower bounds on Hilbert's Nullstellensatz and propositional proofs[END_REF] and related works [START_REF] Clegg | Using the Groebner basis algorithm to find proofs of unsatisfiability[END_REF].

Main results.

An open question is whether there exist certificates of inconsistency of polynomial size for general fewnomial systems involving n + k + 1 monomials in n variables. The goal of this work is to investigate this question in the case of quadratic polynomials. We present an explicit criterion which identifies subsets M of monomials of degree at most 2 such that systems of n equations in n variables with support M and generic coefficients do not have any solution, and such that there exists a sparse certificate n i=1 f i h i = 1, where all polynomials h 1 , . . . , h n lie in L M . Therefore, the number of coefficients in K required to represent the certificate is the same as that of the input system. Moreover, when M is such a subset, we propose a method which computes such h 1 , . . . , h n within a polynomial number of arithmetic operations.

More precisely, we model the set M by a graph G on n + 1 vertices, where each edge represents a nonconstant square-free monomial in M. The constant 1 and the squares in M are distinguished with loops in the graph (the precise construction is described in Section 3). Let ν(M) denote the matching number (i.e. the maximum cardinality of a matching) of the subgraph of vertices in G with a loop.

Theorem 1.1. If m ≥ |M|- √ 1+8ν(M)-1 2
, then a generic system (f [START_REF] Gall | Powers of tensors and fast matrix multiplication[END_REF]).

We would like to emphasize that the inequality m ≥ |M| -√ 1+8ν(M)-1 2 can be checked in polynomial time, since the matching number of a graph can be computed in polynomial time with Edmonds' algorithm [START_REF] Edmonds | Paths, trees, and flowers[END_REF]. Next, we relate how often the assumptions of Theorem 1.1 hold with the number of squares in the support M. If the subset of square monomials and the subset of square-free monomials in M are chosen at random, and the cardinality of M is n + k + 1 and the number of squares is larger than Ω(n 1/2+ε ) for some ε > 0, then the assumptions of Theorem 1.1 hold with large probability, leading to the following statement: Theorem 1.2. Let k be a fixed integer, a n , b n ∈ N be such a n + b n = n + k + 1, and M be a subset of monomials of degree at most 2 in K[X 1 , . . . , X n ] distributed uniformly at random among those that contain the constant 1, a n nonsquare monomials, and b n -1 non-constant square monomials. Assume further that b n = Ω(n 1/2+ε ), for ε > 0. Then the probability that the assumptions of Theorem 1.1 with m = n are satisfied for M tends towards 1 as n grows.

The cornerstones of the proof of this theorem rely on properties of random graphs in the Erdös-Renyi model. Experiments suggest that this result is sharp: when there are at most O(n 1/2 ) square monomials in M, we observe experimentally that the probability of having a certificate in L m M seems to converge to a non-zero value smaller than 1 as n grows. This is also the case when the support is chosen uniformly at random (the expected number of squares is O(1)). We propose a conjecture stating that the limit probability is nonzero in that case.

We also study a limit case: when |M| = n + k + 1 and all the squares are in M. The generic number of solutions in this setting is given by the Bézout's theorem: it equals 2 n . We shall see that with probability tending to 1, these solutions can be compactly represented as the orbits of 2 2k+2 points under an action of (Z/2Z) n-2k-2 . Computing these solutions amounts to solving a system of 2k + 2 equations in 2k + 2 variables: the time complexity of this task does not depend on n. A direct consequence is that computing a compact representation of the solutions of such systems require a number of operations in K which is polynomial in n, even though their number of solutions is exponential in n. This suggests that the number of solutions in the algebraic closure, which is often used to measure the complexity of solving polynomial systems, might in some cases greatly overestimate the complexity for fewnomial systems. Another open issue is to extend this work to the non quadratic case.

Finally, we show experimental results obtained with our proof-of-concept implementation. They show that certificates of inconsistency can be computed for quadratic fewnomial systems with more than 10000 variables and equations when there are sufficiently many squares in the monomial support. Moreover, we also observe some unexpected behaviors which raise new questions about fewnomial systems. For instance, as n grows, there seems to be a phase transition in the probability of having a small certificate of inconsistency. Moreover, in the case where there are few squares in the fewnomial system (this case is not covered by the theoretical analysis), there seems to be a non-zero probability that a fewnomial system has a small certificate of inconsistency. These phenomenons remain to be explained.

Organization of the paper. Section 2 introduces notation and states preliminary results. The core result of the paper is proved in Section 3, establishing a connection between the matching number and the existence of a small certificate of inconsistency. Section 4 is devoted to a probabilistic analysis of the matching number of some random graphs in the Erdös-Renyi model. Section 5 investigates some families of fewnomial systems where all squares appear in the equations. Finally, we report experimental results in Section 6 and state a conjecture for quadratic fewnomial systems involving few square monomials.

Notation and preliminaries

Notation. Throughout this paper, K denotes a field of odd characteristic. Its algebraic closure is denoted by K. If X 1 , . . . , X n are variables, and α ∈ N n , then the shorthand X α stands for the monomial X α 1 1 . . . X αn n . The symbol M denotes a finite subset of monomials in K[X 1 , . . . , X n ] containing the constant 1. For any i ∈ N, M i denotes the subset of all products of i monomials in M. Its cardinality is denoted by |M i |. By convention, |M 0 | = 1. By slight abuse of notation, we call dimension of an ideal I in a ring R the Krull dimension of the quotient ring R/I. Complexity model. Complexity bounds in this paper count the number of operations {+, -, ×, ÷} in the field K. It is not our goal to take into account the bitsize of the coefficients in K. Hence, we count each arithmetic operation with unit cost. We do not take into account operations on monomials. The notion of size that we use for polynomial systems is the number of coefficients in K required to represent them. Note that if K is a finite field, then the bitsizes of the elements in K are bounded, and hence the bit complexity is the same as the arithmetic complexity. Given partial functions g, h from a set I to N, we use the following classical Landau notation: f = O(g) means that f /g is bounded above by a constant, f = Ω(g) is equivalent to g = O(f ), and f = Θ(g) means that f = O(g) and g = O(f ).

Genericity. Let L M denote the K-linear space spanned by M. It has dimension |M|. We say that a property holds for a generic system (f

1 , . . . , f m ) ∈ L m M if there exists a dense Zariski open subset O of L m M s.t.
this property holds for any system in O. Semigroup algebras. The main algebraic structure that we consider are semigroup algebras (also called toric rings

): if M ⊂ K[X 1 , . . . , X n ] is a finite subset of monomials containing 1, we let K[M] denote the subalgebra of K[X 1 , . . . , X n ]
generated by M. We do not make any assumption on the Krull dimension of the ring K[M]. Semigroup algebras which are domains are the coordinate rings of affine toric varieties [START_REF] Cox | Toric varieties[END_REF]. We refer to [START_REF] Miller | Combinatorial commutative algebra[END_REF]Ch. 7] for a more detailed presentation. By slight abuse of notation, we call variety of a system

f 1 , . . . , f m ∈ K[M] the variety in K n associated to the ideal f 1 , . . . , f n ⊂ K[X 1 , . . . , X n ].
The following proposition is a variant of the weak Nullstellensatz for the total coordinate ring of projective toric varieties (see e.g. [9, Prop. 5.2.6]).

Proposition 2.1. The variety associated with a system

f 1 , . . . , f m ∈ K[M] is empty if and only if there exist h 1 , . . . , h m ∈ K[M] such that m i=1 f i h i = 1. Proof. the ring K[M] is isomorphic to K[X]/I M ,
[M] instead of K[X]
constrains the problem, we shall see that this approach enables us to find efficiently small certificates. This leads to the following variant of Problem 1:

Problem 3 -Effective fewnomial Nullstellensatz in K[M]. Given a system f 1 , . . . , f m ∈ K[M] and such that f 1 (X) = • • • = f m (X) = 0 has no solution in K n , compute h 1 , . . . , h m ∈ K[M] such that m i=1 f i h i = 1.

Monomials and support graphs

In this section, we show a connection between graphs and properties of K[M]. In particular, we focus on quadratic relations between monomials in M, i.e. at K-linear relations in the vector space spanned by M 2 . We start by adding a new variable X 0 and by considering the homogenized support

M h = {X 2-deg(µ) 0
µ} µ∈M . We associate with M a simple labeled undirected graph G on S = {0, . . . , n} whose edges are

E = {(i, j) | X i X j ∈ M h , i = j}. There is a loop at a vertex i iff X 2 i ∈ M h . Example 3.1. Let M = {1, X 2 1 , X 2 2 , X 2 3 , X 3 , X 4 , X 1 X 2 , X 2 X 3 , X 3 X 4 }.
The following picture represents the graph G; squares in M h are indicated by a loop.

0 1 2 3 4
Quadratic relations between elements of M are of the form µ 1 µ 2 = µ 3 µ 4 for (not necessarily distinct) monomials µ 1 , µ 2 , µ 3 , µ 4 ∈ M. For the quadratic supports M that we consider in this paper, these quadratic relations come in three flavors that appear as subgraphs of G and are described in Figure 1. The next proposition shows how the cardinality of M 2 can be computed from the number of quadratic relations and the number of 4-cliques in G. We recall that a 4-clique is a subgraph on 4 vertices such that every pair of vertices is linked by an edge. Proposition 3.2. The cardinality of M 2 equals |M|+1 Type 1: products of two (non-necessarily distinct) elements in M. However, some of these products are counted several times because of the quadratic relations between elements in M. This is corrected by the terms -λ(G) + clique 4 (G); we detail below the possible cases:

(X i X j ) • (X k X ℓ ) = (X i X ℓ ) • (X j X k ) i j k ℓ Type 2: (X i X j )•(X i X k ) = (X 2 i )•(X j X k ) i j k Type 3: (X i X j ) • (X i X j ) = (X 2 i ) • (X 2 j ) i j
• If µ = X i X j X k X ℓ is a product of four distinct variables, then µ can be obtained from M by three different products, since µ = (X i X j )(X k X ℓ ) = (X i X k )(X j X ℓ ) = (X i X ℓ )(X j X k ).
Depending on the number of pairs of such edges that lie in the graph, the monomial µ is counted one, two or three times in |M|+1

2

. If there is only one way to obtain µ (for example if (X i X j ) and (X k X ℓ ) are the only monomials in M whose products are µ), then the subgraph associated with the vertices {X i , X j , X k , X ℓ } is neither of type 1 nor a 4-clique. Hence, µ is counted only one time. If there are two ways to obtain µ, then the subgraph associated with the vertices {X i , X j , X k , X ℓ } is of type 1 but not a 4-clique. Hence, µ is counted twice in |M|+1 2 but this is corrected by the term λ(G). If all the three products are possible, then the subgraph associated with the vertices {X i , X j , X k , X ℓ } contains three subgraphs of type 1, and is also a 4-clique. Therefore µ is counted 3 times in

|M|+1 2
, removed 3 times in λ(G) and counted once in clique 4 (G).

• If µ = X 2 i X j X k is a monomial involving three distinct variables, then µ is counted twice in |M|+1 2
if and only the subgraph associated with the vertices {X i , X j , X k } is of type 2. In this case one contribution is removed by the term λ(G), hence µ is counted one time.

• Similarly, monomials µ = X 2 i X 2 j are counted once or twice in the formula |M|+1

2

: if it is counted twice (i.e. when X i X j , X 2 i , X 2 j ∈ M), then the subgraph associated with {X i , X j } is of type 3.

Notation.

For a graph G associated with a set of monomials M, let G ′ be the subgraph of squares (i.e. the subgraph of vertices with a loop). Definition 3.3. A matching (also called independent edge set) of G ′ is a set of edges of G ′ without common vertices. We let ν(M) denote the matching number of G ′ , i.e. the maximum cardinality of a matching of G ′ .

The matching number of a graph can be computed in polynomial time by Edmonds's algorithm [START_REF] Edmonds | Paths, trees, and flowers[END_REF]. We refer to [START_REF] Lovász | Matching theory[END_REF] for more details on matching theory. We state now the main result of this section, which connects the matching number of the graph G ′ to the existence of a small certificate of inconsistency:

Theorem 3.4. Let (f 1 , . . . , f m ) ∈ L m M be a system with generic coefficients. If m ≥ |M| - √ 1+8ν(M)-1 2
, then there exist polynomials h

1 , . . . , h m ∈ L M such that m i=1 f i h i = 1.
The proof of this theorem is postponed to the end of the section. It is actually not surprising that systems satisfying the assumptions of Theorem 3.4 do not have any solution, since the dimension of the Q-vector space generated by the exponent vectors in M is upper bounded by |M|ν(M): each edge (i, j) in G ′ means that X 2 i , X 2 j , X i X j ∈ M and the exponent vectors of these three monomials are linearly dependent over Q. The main point of Theorem 3.4 is that, under the condition on ν(M), the polynomials (h 1 , . . . , h m ) for the effective Nullstellensatz can be searched in L M . This allows to obtain to get small certificates of inconsistency: ω-1 arithmetic operations, where ω is a feasible exponent for matrix multiplication (ω < 2.37286 with Le Gall's algorithm [START_REF] Gall | Powers of tensors and fast matrix multiplication[END_REF]). This complexity is polynomial in the number of coefficients m|M| of the input system.

Proof. According to Theorem 3.4, there exist polynomials h 1 , . . . , h m with support M s.t. i h i f i = 1, by decomposing the polynomials h i in the monomial basis there exists a relation

i µ∈M α µ,i µf i = 1
where α µ,i ∈ K. Let V ⊂ Span K (M 2 ) be the linear space generated by the products {µ f i } µ∈M,i∈{1,...,m} . Consequently, computing the polynomials h i amounts to solving a linear system over K with m |M| unknowns and

|M 2 | equations. Solving it requires O(m|M| • |M 2 | ω-1 ) operations in K [32, Prop. 2.11]. Proposition 3.2 concludes the proof.
The sequel of this section is devoted to this proof of Theorem 3.4. The squareroot involved in the formula is a consequence of the following lemma, as the maximal value of p for which n ≥ n-p+1 2 . Lemma 3.6. There exist linear forms ℓ 1 , . . . , ℓ p ∈ K[X 1 , . . . , X n ] such that the ideal

I = X 2 1 , . . . , X 2 n , ℓ 1 (X 1 , . . . , X n ), . . . , ℓ p (X 1 , . . . , X n ) contains all monomials of degree 2 iff p ≥ n - √ 1+8n-1 2
.

Proof. The vector space of (np)-variate quadratic forms has dimension n-p+1

2

. From the

inequality p ≥ n- √ 1+8n-1 2
, we obtain n ≥ n-p+1

2

. This inequality and the fact that any quadratic form can be written as a linear combination of squares of linear forms (since char(K) = 2), implies that there exist ℓ ′ 1 , . . . , ℓ ′ n such that their squares ℓ ′ 1 2 , . . . , ℓ ′ n 2 generate the space of (np)-variate quadratic forms. Then the dimension of the linear space generated by ℓ ′ 1 , . . . , ℓ ′ n is necessarily maximal and equals n-p. Up to permuting the indices, we assume also that ℓ ′ 1 , . . . , ℓ ′ n-p are linearly independent. Hence the ideal

I ′ = ℓ ′ 1 (X 1 , . . . , X n-p ) 2 , . . . , ℓ ′ n (X 1 , . . . , X n-p ) 2 , X n-p+1 , .
. . , X n contains all monomials of degree 2. We rewrite I ′ as

I ′ = ℓ ′′ 1 (X 1 , . . . , X n ) 2 , . . . , ℓ ′′ n (X 1 , . . . , X n ) 2 , X n-p+1 , . . . , X n , ℓ ′′ i (X 1 , . . . , X n ) = ℓ ′ i (X 1 , . . . , X n-p ) if 1 ≤ i ≤ n -p ℓ ′′ i (X 1 , . . . , X n ) = X i -ℓ ′ i (X 1 , .
. . , X n-p ) otherwise. Note that the linear forms ℓ ′′ 1 , . . . , ℓ ′′ n are linearly independent by construction. We consider the automorphism θ of K[X 1 , . . . , X n ] defined by θ(X i ) = ℓ ′′ i (X 1 , . . . , X n ), and we set ℓ i (X 1 , . . . , X n ) = θ -1 (X n-p+i ) for i ∈ {1, . . . , p}. Therefore I is the inverse image of I ′ by θ and hence contains all the monomials of degree 2.

It remains to prove the converse statement, i.e. that p < n -

√ 1+8n-1 2
implies that there do not exist such linear forms ℓ 1 , . . . , ℓ p . This is achieved by a similar argument: if such linear forms existed, then there would exist a set of n generators of the vector space of (np)-variate quadratic forms. This is not possible if p < n -√ 1+8n-1 2

since this vector space has dimension n-p+1

2

.

We can now prove the main theorem of this section:

Proof of Theorem 3.4. We prove a homogeneous version of Theorem 3.4: let f

(h) 1 , . . . , f (h) m ∈ L h M ⊂ K[X 0 , . . . , X n ]
be the homogenization of the generic system f 1 , . . . , f m . We shall show that any monomial in (M h ) 2 (see the definition of M h at the beginning of this section) belongs to the ideal f

(h) 1 , . . . , f (h) m ⊂ K[M h ]
. This will imply that there exist h

(h) 1 , . . . , h (h) m ∈ K[M h ] such that m i=1 f (h) i h (h) i = X 4 0 ∈ (M h ) 2 .
Setting X 0 = 1 in this equation yields the desired relation. First, we prove the existence of one system f

(h) 1 , . . . , f (h)
m such that all monomials of (M h ) 2 appear in the ideal f 2 denote a matching of G ′ of maximum cardinality. We construct a system from A whose polynomials are:

(h) 1 , . . . , f (h) m . Throughout this proof, we let A = {{a 1 , b 1 }, . . . , {a ν(M) , b ν(M) }} ⊂ {0, . . . , n}
1. all the monomials in M h of the form X i X j with i = j; 2. all the monomials in M h of the form X 2 i with i not appearing in A; 3. for each i ∈ {1, . . . , ν(M)}, the polynomial X 2 a i -X 2 b i ; 4. the polynomials ℓ 1 (X 2 a 1 , . . . , X 2 a ν(M) ), . . . , ℓ p (X 2 a 1 , . . . , X 2 a ν(M) ), where the ν(M)-variate linear forms ℓ 1 , . . . , ℓ p are obtained by replacing n by ν(M) in Lemma 3.6. This is a system of |M| -√ 1+8ν(M)-1 2 polynomials, generating an ideal

I ⊂ K[M h ].
We claim that all monomials in (M h ) 2 are in the ideal of K[M h ] generated by these polynomials:

• every monomial in (M h ) 2 involving at least 3 different variables belongs necessarily to the ideal generated by the monomials X i X j with i = j; the same holds for monomials of the form X 3 i X j with i = j; • next, we look at monomials of the form X 4 i . If i does not appear in A, then by construction

X 2 i is in the ideal. If i is in A, then there exists j such that i = a j or i = b j . Noticing that X 4 a j = X 2 a j (X 2 a j -X 2 b j ) -(X a j X b j ) 2 or X 4 b j = X 2 b j (X 2 a j -X 2 b j ) -(X a j X b j ) 2 shows that X 4 i ∈ I.
• finally, we focus on monomials of the form X 2 i X 2 j . If i or j do not appear in A, then either X 2 i or X 2 j belongs to I. If both i and j appear in A then Lemma 3.6 tells us that X 2 i X 2 j belongs to the ideal generated by

X 4 a 1 , . . . , X 4 a ν(M) , ℓ 1 (X 2 a 1 , . . . , X 2 a ν(M) ), . . . , ℓ p (X 2 a 1 , . . . , X 2 a ν(M) ), X 2 a 1 - X 2 b 1 , . . . , X 2 a ν(M) -X 2 b ν(M) .
So far, we have proven that there exists at least one system such that Theorem 3.4 is correct. It remains to prove that this is true for a generic system. To this end, we note that all monomials in (M h ) 2 belongs to f

(h) 1 , . . . , f (h) m ⊂ K[M h ] if and only if Span K ({µ f (h) i } µ∈M h ,i∈{1,...,m} ) = Span K ((M h ) 2 ).
This is an open condition given by the non-vanishing of a product of minors of the matrix recording the coefficients of {µ f

Random support graphs

In this section, we assume that the support M is randomly generated and we estimate the probability that the assumptions of Theorem 3.4 are satisfied. Roughly speaking, the aim of this section is to show that the conditions of Theorem 3.4 hold with large probability if n is large enough and if there are sufficiently many squares in M. Let us consider the following variant of the Erdös-Rényi random graph model: for n ∈ N, we set two probabilities p n , q n ∈ [0, 1], and we consider a sequence of random supports (M n ) n∈N where

• M n is a subset of quadratic monomials of K[X 0 , . . . , X n ]; • each square X 2
i appears in M n independently with probability q n ; • each monomial of the form X i X j with i = j appears independently with probability p n .

The goal is to estimate in which cases the random variable ν(M n ) grows sufficiently quickly so that the assumptions of Theorem 3.4 are satisfied asymptotically with large probability. In order to estimate ν(M n ), we first forget the meaning of the graph in terms of monomials and count the number of isolated edges in a random graph G in this variant of the Erdös-Renyi model. Proposition 4.1. Let G be a random simple graph on n + 1 vertices. Each vertex has a loop with probability q ∈ [0, 1] and an edge between any two vertices appear with probability p ∈ [0, 1]. Let G ′ be the subgraph obtained by restricting G to the vertices with a loop and E be the random variable counting the number of isolated edges in G ′ . Then E has expected value and variance

E(E) = n + 1 2 q 2 p (1 -q(1 -(1 -p) 2 )) n-1 , Var(E) =E(E) -E(E) 2 + 6 n + 1 4 q 4 p 2 (1 -p) 4 (1 -q(1 -(1 -p) 4 )) n-3 . (4.1)
Proof. For each possible edge e between two vertices i = j, we denote by X e the random variable taking the value 1 if e is an isolated edge of G ′ , and 0 otherwise. The probability that i and j appear as vertices with loops in G is q 2 . Hence, the probability that the edge e lies in G ′ is q 2 p. Moreover, for a given vertex k = i, j, the probability that k appears in G ′ and at least one of the edges (i, k) and (j, k) belong to G is q(1 -(1p) 2 ). There are n -1 other vertices than i and j in G, hence X e follows a Bernoulli law of parameter

q 2 p(1 -q(1 -(1 -p) 2 )) n-1 . It follows that E(E) = e E(X e ) = n + 1 2 q 2 p(1 -q(1 -(1 -p) 2 )) n-1
The computation of the variance can be done similarly.

We now apply the previous proposition in the case where p and q depends on n, and analyze the convergence of E(E) and Var(E) as n grows to infinity.

Corollary 4.2. Let p

n = Θ(n -1 ) and q n = Θ(n β ). With the notation of Proposition 4.1, if -1/2 < β < 0 then E(E) = Θ n 2β+1 and Var(E) = Θ n 2β+1 . Proof. First, note that log (1 -q n (1 -(1 -p n ) 2 )) n-1 = -2np n q n + O n -1 since β < 0. This shows that E(E) = q 2 n pnn 2 2 e -2npnqn (1 + O(n -1
)). The claim on the asymptotic behavior of E(E) follows from e -2npnqn = Θ(1). Next, let λ denote the last summand in Eq. (4.1), namely λ = Var(E) -E(E) + E(E) 2 . The asymptotic behavior of λ can be obtained by a similar analysis:

log (1 -q n (1 -(1 -p n ) 4 )) n-3 = -4np n q n + O n -1 , hence λ = q 4 n p 2 n n 4 4 e -4npnqn (1 + O(n -1 )). Notice that E(E) 2 = q 4 n p 2 n n 4 4 e -4npnqn (1 + O(n -1 )). Conse- quently, E(E) 2 -λ = O(n 4β+1
), since e -4npnqn = Θ(1). Finally, putting all the estimates together, we obtain Var

(E) = Θ(n 2β+1 ) + O(n 4β+1 ) = Θ(n 2β+1 ) since β < 0.
Finally, we relate the distribution of E with the probability that the assumptions of Theorem 3.4 hold for fewnomial systems with

|M| = n + k + 1. If one wants that E(|M n |) = n + k + 1
for some fixed k and that the expected number of squares is (n + 1) 1/2+ε , then one has to choose

q n = (n + 1) -1/2+ε and p n = (n + k + 1 -(n + 1)q n )/ n+1
2 . The asymptotic expected behavior of the matching number in that case is described by the following statement: Lemma 4.3. Let M n be a sequence of random supports where each square monomial appears with probability q n , and each square-free monomial appears with probability p n . If p n = Θ(n -1 ) and q n = Ω(n -1/2+ε ), with 0 < ε < 1/2, then for any ℓ ∈ N, P (ν(M n ) ≥ ℓ) tends towards 1 as n grows.

Proof. Chebyshev's inequality implies that

P(E ≤ E(E)/2) ≤P(| E -E(E) |≥ E(E)/2) ≤ 4 Var(E) E(E) 2 =O n -2(-1/2+ε)-1 = O n -2ε .
Next, notice that E(E)/2 = Θ n 2ε by Corollary 4.2. Also, note that E ≤ ν(M n ), so that for n sufficiently large, we have

P (ν(M n ) ≤ n ε ) ≤ P E ≤ n 2ε = O n -2ε
, which tends towards 0 as n grows.

Next, we show that these estimates also hold for a different model of random monomial supports. For n ∈ N and two integers a, b ∈ N, we consider the random sets U n,a,b of quadratic monomials in K[X 0 , . . . , X n ] distributed uniformly at random among those that contain a non-squares and b squares. andU n,an,bn be a subset of quadratic monomials in K[X 0 , . . . , X n ] distributed uniformly at random among those that contain a n non-square monomials and b n squares. Assume further that b n = Ω(n 1/2+ε ), for ε > 0. Then the probability that the assumptions of Theorem 3.4 with m = n are satisfied for U n,an,bn tends towards 1 as n grows.

Theorem 4.4. Let k be a fixed integer, a n , b n ∈ N be such a n + b n = n + k + 1,
Proof. The proof of this theorem is technical and is similar to the classical techniques to prove properties of random graphs in the Erdös-Renyi models [START_REF] Erdös | On the evolution of random graphs[END_REF]. Details are provided in the appendix. Theorem 1.2 is a direct consequence of Theorem 4.4 and is obtained by dehomogenization.

Systems with all the squares

Next, we investigate the special case of fewnomial systems where all the squares X 2 i belong to M. This corresponds to a limit case of Theorem 4.4: ε = 1/2. In this setting, the Newton polytopes of the polynomials are the same as those of dense quadratic polynomials, hence these systems have generically 2 n solutions in K n . In the sequel of this section, M is a set of monomials of degree at most 2 in K[X 1 , . . . , X n ], of cardinality n + k + 1, and which contains the constant 1 and all the squares X 2 i . We also assume that n > 2k. We let ℓ denote the number of variables X i which appear in a square-free monomial in M. Hence ℓ ≤ 2k. For a 0-dimensional system (f 1 , . . . , f n ) ∈ L n M , we let S denote the n × (nℓ) matrix which contains the coefficients of the squares X 2 i such that X i does not appear in a square-free monomial in M. Proposition 5.1. Let (f 1 , . . . , f n ) ∈ L n M be a 0-dimensional system with support M. Then the system f 1 = • • • = f n = 0 has at most 2 n solutions in K n . If the matrix S has full rank, then the solutions are the orbits of at most 2 ℓ points under the action of (Z/2Z) n-ℓ given by

χ : (Z/2Z) n-ℓ × K n → K n (e i , (a 1 , . . . , a n )) → (a 1 , . . . , -a i j , . . . , a n ) ,
where the set {i j } is the set of indices such that X i j does not appear in a square-free monomial in M.

Proof. Up to a permutation of the indices, we can assume w.l.o.g. that X 1 , . . . , X n-ℓ are the variables that does not appear in a square-free monomial in M. Since the matrix S is full-rank, we perform Gaussian elimination to remove the squares X 2 i j which do not belong to an edge of the graph. This provides us with an equivalent system of the form

           X 2 1 -g 1 (X n-ℓ+1 , . . . , X n ) = 0 . . . X 2 n-ℓ -g n-ℓ (X n-ℓ+1 , . . . , X n ) = 0 h 1 (X n-ℓ+1 , . . . , X n ) = • • • = h ℓ (X n-ℓ+1 , . . . , X n ) = 0.
We end up with a system (h 1 , . . . , h ℓ ) of dense homogeneous polynomials in ℓ variables. Note that ℓ is bounded by 2k, which does not depend on n. Consequently, this system can be solved within a constant number of operations as n grows. By Bézout theorem, this system has at most 2 ℓ solutions. Finally, if (a n-ℓ+1 , . . . , a n ) is a solution of h 1 = • • • = h ℓ = 0, then (± g 1 (a n-ℓ+1 , . . . , a n ), . . . , ± g n-ℓ (a n-ℓ+1 , . . . , a n ), a n-ℓ+1 , . . . , a n ) is a solution of the input system. Moreover, all solutions are of this form.

Therefore, even though the number of solutions of such systems depends exponentially on n, they can be conveniently represented. Moreover, we show next that computing this representation can be achieved within a number of operations in K which is polynomial in n: Corollary 5.2. Let (f 1 , . . . , f n ) ∈ L n M be polynomials with support M satisfying the above assumptions (|M| = n + k + 1, all squares are in M, S has full-rank) and µ be a square-free monomial. For fixed k, Problem 2 with input (f 1 , . . . , f n ) and µ can be solved within O (n ω ) arithmetic operations as n grows, where ω is a feasible exponent for matrix multiplication.

Proof. With the same notations as in the proof of Proposition 5.1, and by noticing that h 1 , . . . , h ℓ ∩ K[µ] = f 1 , . . . , f n ∩ K[µ], solving Problem 2 with input (h 1 , . . . , h ℓ ) and µ yields a solution to Problem 2 with input (f 1 , . . . , f n ) and µ. Solving Problem 2 with input h 1 , . . . , h ℓ can be achieved within a time complexity which does not depend on n. Consequently, the only complexity that depends on n is the cost of computing the polynomials h 1 , . . . , h ℓ . This is done by linear algebra, within O (n ω ) operations in K.

Experimental results

In this section, we describe experimental results, validating the theoretical results and illustrating their practical relevance. In particular, our prototype implementation of the algorithm in the proof of Corollary 3.5 is able to compute Nullstellensatz' certificates of inconsistency for systems of 30000 equations and 30000 unknowns generated from the uniform model in Theorem 4.4. This may be compared to the practical timings for solving the same problem with dense generic quadratic systems, where 20 unknowns is already a difficult challenge due to the exponential size of the certificates.

Experimental setting. K is the finite field GF(65521). The experimental procedure depends on parameters n, k and β:

• generate a random support M of n + k + 1 monomials of degree at most 2, containing 1 and ⌊n β ⌋ squares. The subsets of square monomials and non-square monomials are respectively chosen uniformly at random; • generate a random system of n equations with support M, where all the coefficients are chosen uniformly at random in K; • return "success" if our implementation returns a relation 1 = n i=1 h i f i , with h i ∈ L M , else return "failure". By Theorem 4.4, for any choice of parameters k ∈ N and 0.5 < β < 1, the probability that "success" is returned should tend towards 1 as n grows.

First, we study the dependence of the asymptotic behavior on the choice of β. To this end, we fix k = 1 and we look at the experimental probability of success as n grows. Experimental results are reported in Figure 2. The results are in accordance with Theorem 4.4: when β > 0.5, the probability that such systems have no solution and that there exists a Nullstellensatz certificate in L M seems to tend to 1 as n grows. We also observe that the convergence seems to depend strongly on β: when β becomes close to the limit value 0.5, the speed of convergence seems to decrease. Next, we focus on the dependency on k. We fix β = 0.9 and let n grow for different values of k. Experiments are reported in Figure 3. Finally, we look at quadratic supports M of cardinality n + k + 1 generated uniformly at random without any constraint on the number of squares. This case is not covered by the analysis of this paper and experiments show a different behavior: the probability of success of the algorithm does not seem to tend to 1 as n grows, contrary to the case β > 0.5. However, this probability seems to converges to a nonzero value. Conjecture 6.1. Let k ∈ N be a fixed integer. For n ∈ N, let M n be a random subset of monomials in n variables of degree at most 2, uniformly distributed among those of cardinality n + k + 1 that contain 1. Let f 1 , . . . , f n ∈ L M be a system with support M and generic coefficients. Then the probability that there exist h 1 , . . . , h n ∈ L M such that n i=1 f i h i = 1 tends to a nonzero value as n grows.

Finally, we report in Figure 4 on experiments about the efficiency our prototype implementation for computing Nullstellensatz certificates. The experiments were conducted on a Mac Retina 2.8Ghz Intel Core i7, and linear algebra computations were performed with Magma V2.20-3. We see in these experiments that systems with several thousands of variables can be handled in a few seconds. The algorithm works in two steps: first we reduce the quadratic system with linear algebra (the complexity of this step is independent of β and is represented by the dashed curve); then, the matrix in degree 4 (multiplying all the reduced polynomials by all the monomials in M) is constructed and reduced. The time of this second step depends on β and is indicated by the plain curves. Therefore, these graphs seem to indicate that the cost of computing certificates of inconsistency for these systems is approximately twice the time of computing the row echelon form of a dense n × n matrix. and let M n be the random support constructed as above with respect to the probabilities p n and q n . We let MS n denote the subset of squares in M n and MNS n denote the subset of nonsquare monomials in M n . Also, we set ℓ = (k 2 + 3k + 2)/2. First, we notice that P(ν(M n ) ≥ ℓ) equals where c n,i,j = p i n (1 c n,i,j > 0, then P(ν(U n,an,bn ) ≥ ℓ) must tend to 1 as n grows.

-p n ) ( n+1 2 )-i q j n (1 -q n ) n+1-j n+1 j ( n+1
We prove now that lim inf n→∞ 0≤i≤an 0≤j≤bn

c n,i,j ≥ 1/4. First, we rewrite 0≤i≤an 0≤j≤bn c n,i,j as c n,i,j ≥ 1/4 > 0.

  0≤i≤an p i n (1 -p n ) ( n+1 2 )-i n+1 2 i     0≤j≤bn q j n (1 -q n ) n+1-j n + 1 j   . (A.
As explained above, this implies that lim This proof is concluded by noticing that k + 1 = |U n,an,bn |n.

Figure 1 :

 1 Figure 1: The three types of quadratic relations

Corollary 3 . 5 . 2 -

 352 With the notation and under the assumptions of Theorem 3.4, there is an explicit algorithm which solves Problem 1 within O m|M| |M|+1 λ(G) + clique 4 (G)

i

  } µ∈M,i∈{1,...,m} . Consequently, there exists a Zariski open subset O ⊂ K[M h ] m such that Theorem 3.4 holds. This open subset O is non-empty by the construction above. The proof is concluded by noticing that any non-empty open subset is dense in the Zariski topology.

Figure 2 :

 2 Figure 2: k = 2 fixed, n grows, several value of β. Every point is an average over 1000 tests. The relative positions of the curves follow the values of β.

Figure 3 :Figure 4 : 4

 344 Figure 3: β = 0.9 fixed, n grows, several value of k. Every point is an average over 10000 tests.

=

  n ) ≥ ℓ | |MS| = i and |MNS| = j) c n,i,j n,i,j ) ≥ ℓ) c n,i,j , (A.1)

n→∞P

  (ν(U n,an,bn ) ≥ ℓ) = 1 for any ℓ ∈ N. Finally, P(ν(U n,an,bn ) ≥ ℓ) = P(ν(U n,an,bn ) ≥ (k 2 + 3k + 2)

  where I M is a toric ideal generated by binomials b 1 , . . . , b ℓ . Let f 1 , . . . , f m be the images of f 1 , . . . , f m by the isomorphism. Using the Nullstellensatz on the system f 1 , . . . , f m , b 1 , . . . , b ℓ in K[X] and pulling it back to K[M] proves the proposition. Proposition 2.1 indicates that we can look for polynomial relations in K[M] instead of the whole algebra K[X]. Although narrowing the search for the certificate in K

  probability that |MS n | = i and |MNS n | = j. Since the matching number is monotone with respect to the subgraph ordering, we obtain i 1 ≥ i 2 and j 1 ≥ j 2 =⇒ P(ν(U n,i 1 ,j 1 ) ≥ ℓ) ≥ P(ν(U n,i 2 ,j 2 ) ≥ ℓ). Since the sum of these bounds equals 1, and since the left-hand side of the inequality tends to 1 as n grows by Lemma 4.3, if lim inf

			c n,i,j +
		0≤i≤an
		0≤j≤bn
		0≤i≤( n+1 2 )
		an+1≤i≤( n+1 2 )
	Note that the first summand is bounded by 0≤i≤an	c n,i,j , the second summand is bounded by
		0≤j≤bn
	0≤i≤( n+1 2 )
	n→∞	0≤i≤an 0≤j≤bn

2 ) i is the Consequently, Equation (A.1) implies P(ν(M n ) ≥ ℓ) is bounded from above by

P(ν(U n,an,bn ) ≥ ℓ) bn+1≤j≤n+1 P(ν(U n,i,j ) ≥ ℓ) c n,i,j + 0≤j≤bn P(ν(U n,i,j ) ≥ ℓ) c n,i,j .

bn+1≤j≤n+1 c n,i,j and the third one is bounded by an+1≤i≤(

n+1

2 ) 0≤j≤bn c n,i,j .

  2)Notice that if (T n ) is a sequence of random variables following a binomial distribution B(n, s n ) (i.e. the sum of n Bernoulli independent variables of parameters n ) such that s n → then (T nns n )/√ ns n converges in distribution to the standard Gaussian distribution N (this can be seen on the pointwise convergence of the moment generating function). This implieslim inf ≤ ns n ) ≥ P(N ≤ 0) = 1/2,where N is a standard Gaussian distribution. Then, we remark that by construction the first factor in Eq. (A.2) equals P(|MNS n | ≤ n+1 2 p n ) and |MNS n | follows a binomial distribution of parameters ( n+1 2 , Ω(1/n)). Therefore, we obtain

		lim inf n→∞	  0≤i≤an	p i n (1 -p n ) ( n+1 2 )-i	n+1 2 i	  ≥ 1/2.
	A similar argument shows the same lower bound for the second factor in Eq. (A.2), finishing to
	prove that lim inf n→∞	0≤i≤an 0≤j≤bn

n→∞ 0 and ns n → n→∞ ∞, n→∞ P(T n

λ(G) + clique 4 (G), where λ(G) is the number of subgraphs of G isomorphic to any of the three graphs in Figure1and clique 4 (G) is the number of 4-cliques in G.