{'fraction_non_alphanumeric': 0.038344436050637545, 'fraction_numerical': 0.013758212576975024, 'mean_word_length': 4.212887828162291, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 19, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
General non-realizability certificates for spheres with linear programming

In this paper we present a simple technique to derive certificates of non-realizability for an abstract polytopal sphere. Our approach uses a variant of the classical algebraic certificates introduced by Bokowski and Sturmfels in [Computational Synthetic Geometry, 1989], the final polynomials. More specifically we reduce the problem of finding a realization to that of finding a positive point in a variety and try to find a polynomial with positive coefficients in the generating ideal (a positive polynomial), showing that such point does not exist. Many, if not most, of the techniques for proving non-realizability developed in the last three decades can be seen as following this framework, using more or less elaborate ways of constructing such positive polynomials. Our proposal is more straightforward as we simply use linear programming to exhaustively search for such positive polynomials in the ideal restricted to some linear subspace. Somewhat surprisingly, this elementary strategy yields results that are competitive with more elaborate alternatives, and allows us to derive new examples of non-realizable abstract polytopal spheres.


Introduction
One of the oldest questions in modern polytope theory is whether a given abstract polytopal sphere is realizable as the boundary of a convex polytope. The question was first answered by Steinitz for 3-dimensional polytopes in a theorem which classifies all realizable 3-polytopes in graph-theoretic terms [27]. To date there is no higher-dimensional analog of Steinitz's theorem, and attempts to answer the question frequently rely on the theory of oriented matroids, exhaustive computation and classification of spheres with a fixed dimension and number of vertices, and algebraic certificates of non-realizability based on Grassmann-Plücker relations [4,9,24].
Due to the large number of Grassmann-Plücker relations, the search for algebraic certificates based on them-the so-called final polynomials-often requires some assumption on the structure of such polynomials in order for the search to be feasible. In this paper, we present a new method to search for algebraic certificates of non-realizability with no assumed structure. Our algorithm uses linear programming together with the more compact description of the realization space given by the reduced slack ideal model [15] to find algebraic certificates of non-realizability. In the end we produce certificates for a collection of large simplicial and quasi-simplicial spheres, including some for which realizability was not previously known.
The rest of the paper is organized as follows. In Section 2, we describe the general techniques used for producing algebraic certificates of non-realizability. These techniques are all based on finding positive polynomials in an ideal, which we describe how to find for a general ideal in Section 3. Section 4 specializes these techniques to the setting of realizability of spheres. This section includes a brief introduction to the reduced slack model of the realization space [15]. Finally in Section 5, we discuss the implementation of our algorithm, describe the relation of our certificates to classical final polynomials, and list the results of our computations regarding the realizability of a database of selected spheres. In particular, we derive non-realizability certificates for a large number of new instances of prismatoids, a class of polytopes introduced in [6], recover the recent result of [24] on the non-realizability of Jockusch's family of simplicial 3-spheres (see [23]), as well as providing a few other examples of new or simpler non-realizability certificates.

Algebraic certificates for sphere non-realizability
In this section we will introduce and contextualize some of the algebraic approaches that have been used to certify that a given sphere is non-realizable. In order to do that we start by recalling two essentially equivalent models for the realization space of an abstract polytopal sphere: the slack model and the Grassmannian model. In what follows we present only a brief overview of the facts that we will need; a thorough presentation of these models can be found in [15].
Given an abstract d-dimensional sphere P with vertex set {1, . . . , n} and facet set F = {F 1 , . . . , F m }, recall that the symbolic slack matrix of P is the n × m matrix S P (x) whose (i, j)-entry is zero if i ∈ F j and an indeterminate variable otherwise. The slack variety of P , V P , is then the Zariski closure of the set {S P (ξ) : rank (S P (ξ)) ≤ d + 1 and ξ ∈ R N * }. Throughout the paper we will denote by R * , R + , and R ++ the non-zero, non-negative, and positive real numbers respectively. The variety V P is cut out by the slack ideal of P , I P , which is the ideal generated by the (d+2)-minors of S P (x) saturated by the product of all variables. The slack variety gives us a natural model for the realization space of a polytope up to projective equivalence [13].

Proposition 1 ([13, Corollary 3.4]).
There is a one to one correspondence between realizations of a polytope P up to projective equivalence and the elements of V P ∩ R N ++ up to column and row scalings by positive scalars. In particular, P is not realizable if and only if V P ∩ R N ++ = ∅. This correspondence is explicitly given by the slack matrices of each realization. Recall that a (realized) polytope P with vertices v 1 , . . . , v n ∈ R d and facets defined by inequalities α ⊤ j x ≤ b j , with α j ∈ R d and b j ∈ R, has a slack matrix S P with entries of the form (S P ) i,j = b j − α ⊤ j v i , which by construction lies in the slack variety and is well defined up to column scalings.
A related model that has been more classically used to derive non-realizability certificates is the Grassmannian model. Let Gr(d + 1, n) be the Grassmannian variety of (d + 1)-dimensional spaces in R n , which we will think of as coordinatized by Plücker coordinates {p J : J ⊆ {1, . . . , n} and |J| = d + 1}, and let I Gr (d + 1, n) be the ideal that cuts out the Grassmannian in those coordinates. We define two special sets of such coordinates. The first, Γ 0 , will be the collection of subsets J such that there is a facet F of P with J ⊂ F . To define the second, Γ 1 , we need to have a way of identifying affine bases of facets of a polytope, i.e., sets of vertices in a facet that are affinely independent in any realization of P . We will call such sets facet bases. Note that in practice, since we do not know anything about the realizations of P a priori, we need a combinatorial way to identify such bases. One way to do this is by choosing a flag in the face lattice. By definition, a flag is a maximal chain in the face lattice and hence has length d + 1 for a d-polytope: where G i is an i-dimensional face of P . Then a set of vertices chosen so that v i ∈ G i \G i−1 for i = 0, . . . , d must be affinely independent. (If any v i was in the affine hull of v 0 , . . . , v i−1 , then we would have v i ∈ G i−1 by the definition of a face of P .) Thus the vertices indexed by {i 0 , . . . , i d−1 } chosen as above form a facet basis for G d−1 . We call the full set of vertices, indexed by {i 0 , . . . , i d }, a flag of vertices. Notice that for any facet F of P , there can be many flags with G d−1 = F , each resulting in a flag of vertices which is the union of a facet basis for F with a vertex not in F . To highlight this connection to affine bases of facets, we will also refer to these flags of vertices as facet extensions, and Γ 1 will be the collection of subsets J that are facet extensions of P . By duality, one can similarly define a flag of facets that will be of use later on.
Every coordinate indexed by J in Γ 1 comes with a sign χ J ∈ {±1} depending on the orientation of J as will be discussed later. We then define the Grassmannian variety of P as the Zariski closure of the set where Π Γ1 is the signed projection onto the coordinates in Γ 1 , i.e., Π Γ1 (ξ) = y ∈ R Γ1 such that y J = χ J ξ J . Again, the Grassmanian variety gives us a natural model for the realization space of a polytope. In particular, we have a simple realizability characterization.
Proposition 2. P is not realizable if and only if Gr(P ) ∩ R N ++ = ∅. Note that Gr(P ) and V P are essentially equivalent [15,Theorem 4.7]. More explicitly, for any facet F j of P pick B j to be a flag of vertices such that F j is part of the underlying flag. Then for any ξ ∈ Gr(P ) the matrix obtained by filling each entry (i, j) of S P (x) with ξ {i}∪Bj is in V P . On the other hand, given any point ξ in the slack variety, the image by Π Γ1 of the column space of S(ξ) gives us a point in Gr(P ). Moreover, these maps preserve positivity of the coordinates, so it is clear that the realizability questions are totally equivalent, and just offer two possible viewpoints.
In any case, the question of realizability of polytopes boils down to a fundamental question in real algebra: how can we certify that a given variety has no positive points? This is a special case of the more general question of checking emptiness of semialgebraic sets, for which there are several Positivstellensatz type theorems that offer answers. A direct application of the version in [2] yields the following theorem.
where σ i (x) are sums of squares of polynomials.
Applied to Proposition 2, the witness polynomials given by this theorem are known as final polynomials (see Corollary 4.22 of [5]) and have been used since the 1980s for certifying nonrealizability of polytopes, see e.g., [3], [4], [26], [10], [22] and [9]. Searching for certificates using the full strength of Theorem 3 is possible using semidefinite programming. However, dealing with sums of squares is not always desirable, since semidefinite programming has numerical and scalability issues that are not present in linear programming. A simple alternative is to consider only scalar σ i .
We will call a polynomial positive if it is non-zero and has only non-negative coefficients. Such a polynomial can obviously never vanish in the positive orthant, so we have the following simple proposition, that we can see as a weakening of Theorem 3. This seems like a dramatic weakening of the certificate, and it is fair to ask if it has any use whatsoever in this form. The answer is that it can still be quite effective. For principal ideals, for example, Polya's Theorem on non-negativity over the simplex [25] tells us that if V( p ) has no non-negative points, then there is indeed a positive polynomial in p . This is stronger than demanding no positive points, but similar. In the general case, the picture is not much different. Building on work of Handelman [19], Einsiedler and Tuncel [8] give a full characterization of when positive polynomials exist. Again, asking that no variety of an initial ideal has a positive point is stronger than simply asking that the ideal has no positive point, but it comes close enough for it to suggest that these types of certificates can still be quite effective. In fact, as we will see, the classical approaches to obtain final polynomials for certifying non-realizability of polytopes have generally relied precisely on constructing positive polynomials in the ideal using combinatorial arguments.
In order to use Proposition 2 to effectively build witnesses to non-realizability, there is another issue: getting a good handle on the ideal of Gr(P ). We know that Gr(P ) = V((I Gr (d + 1, n) + Γ 0 ) ∩ R[Γ 1 ]). However, the ideal I Gr (d + 1, n) of the Grassmannian is complicated in general; thus, in practical computations, one works with the subideal I tri (d + 1, n) generated by the 3-term Plücker relations, which have the form x ijS x klS − x ikS x jlS + x ilS x jkS , where S is a fixed set of indices different from i, j, k, l.
The most popular classic method for proving non-realizability of polytopes is perhaps the special class of final polynomials introduced in [3], the bi-quadratic final polynomials. These are a special type of positive polynomials in (I tri (d + 1, n) + Γ 0 ) ∩ R[Γ 1 ] that can be constructed efficiently with linear programming. Another method to construct final polynomials was recently proposed in [24], the positive Plücker tree certificates. Again, these are in fact positive polynomials in (I tri (d+ 1, n)+ Γ 0 )∩R[Γ 1 ], constructed with some non-trivial combinatorial reasoning and integer programming.
These methods require additional reasoning or assumptions on the form of the desired positive polynomials because brute force search in the Grassmannian model is limited by how quickly the space of possible polynomials grows. By working directly with the slack ideal model, we see a trade-off in complexity. The ideal generators are generally of higher degree (up to the degree d + 2 of the minors we start with), but in a smaller number of variables that can be further reduced in many cases by parametrizing the variety.

Finding positive polynomials in general ideals
Before specializing to slack ideals, we first outline a general approach to finding positive polynomials in general ideals and their parametrized counterparts.
Given an ideal I = f 1 , . . . , f k , which we may assume homogeneous without loss of generality, if we want to check the existence of a positive polynomial in I, we want to check if there exists a non-zero polynomial of the form where the c β i are real numbers, that has only non-negative coefficients. Moreover, if there is any positive polynomial, there is a homogeneous one, so we can fix the degree D and consider the set I D of all products x β f i with |β| = D − deg(f i ). For simplicity suppose I D = {q 1 , . . . , q N }. We are then simply searching for a non-zero polynomial N i=1 c i q i with non-negative coefficients. By writing q i (x) = |α|=D a α i x α , this simply becomes the linear feasibility question Alternatively, after a little manipulation, we can dualize this problem to the problem of checking if is zero or +∞. We can think of this dual formulation as of asking if the linearization of the system q i (x) = 0, for i = 1, . . . , N , attained by replacing each monomial by a distinct variable, has a solution on the positive orthant. When trying to apply this method directly to our problem of realizability of spheres, one immediately runs into problems. For P a d-dimensional polytope, the usual way to generate the slack variety is by taking all the (d + 2)-minors of the slack matrix, so D must be at least d + 2. The number of variables is the number of non-zero entries of the slack matrix, which can be up to (n − d)m, where n is the number of vertices and m the number of facets, and is never much lower than that in the most interesting cases. This means that the number of monomials of degree D in those variables is (n−d)m+D−1 D with D ≥ d + 2. The LP feasibility question we want to solve has, in the primal formulation, this many constrains, and a number of variables that also grows exponentially. Even for polytopes with few vertices and facets in low dimension, this soon gets out of reach for any LP solver. In our case, however, we will see that there is a natural parametrization of the variety associated to the ideal that we can exploit.
Suppose there is a set of variables y = (y 1 , . . . , y m ) and polynomials g 1 , g 2 , . . . , g N such that coincides with the variety V(I). Then positive polynomials on I would immediately translate to relations of the type β c β g β (y) = 0, for c β > 0, and where g β (y) denotes the product g 1 (y) β1 g 2 (y) β2 · · · g N (y) βN . Reciprocally, any relation of this type will immediately imply that the positive polynomial p(x) = c β x β vanishes on V(I), and so V(I) has no positive points (and its vanishing ideal contains a positive polynomial).
By limiting our search to a finite set J of β's and denoting g β (y) = α a α β y α we transform the search for such certificates into the LP feasibility problem Again, by manipulating and dualizing we get the dual formulation which has optimal solution zero if the original formulation is infeasible and −∞ if it is feasible. Note that one can think of this last formulation as simply the standard linearization of the semialgebraic optimization problem [12] we know that the rows of S P form a linearly equivalent realization of P . In particular, the rows of any d + 1 linearly independent columns of S P also form such a realization. Furthermore, if we have a symbolic slack matrix S P (x), then we can determine d+1 necessarily linearly independent columns by taking a flag of facets. In [15], (if all other facets are simplicial) we call the symbolic slack matrix restricted to these columns a reduced slack matrix.

Application to realizability of spheres
Fix one such flag, and let u ⊤ i be the row corresponding to vertex i in the submatrix of S P whose columns are those indexed by the flag. Let i 1 , . . . , i d index an affine basis for facet F j , and consider the linear operator This operator vanishes on every u i such that vertex i is in facet F j , since the columns will be linearly dependent. On the other hand, it does not vanish for every i since the rank of the submatrix of S P we are considering is d + 1. In particular, it will be non-zero whenever a vertex i is not in facet F j . So we have a linear operator that is zero on the facet and non-zero elsewhere which means that there exists a non-zero real λ j such that for all i we have The only thing we have to be careful with is the sign of this determinant, for which we have to pay attention to the orientation of P .
Given a simplex ∆ = conv{x 0 , . . . , x d } ⊆ R d , we can define the orientation of ∆ by the sign of Since this sign depends on the order of the vertices x i , we call an ordering of 0, . . . , d an orientation of the simplex ∆.
Given an affine basis B = {i 0 , . . . , i d−1 } for a facet F of a d-polytope P , an ordering on B determines an orientation of each simplex B ∪ {v} for v ∈ Vert(P )\F by first taking the ordered elements of B followed by v. Since P is a polytope, for a fixed order on B, all simplices of this form have the same orientation.
Example 6. Let P be the triangular prism given by conv{0, e 1 , e 2 , e 3 , e 1 +e 3 , e 2 +e 3 }. Then a basis for facet F = conv{0, e 1 , e 3 , e 1 + e 3 } is given by vertices 1, 2, and 5 and the sign of the determinants whose columns are indexed by {1, 2, 5, 3} and {1, 2, 5, 6} is negative: Since P is a polytope, in fact, we can order the vertices of each facet basis so that every simplex of vertices of P as above has the same orientation. For brevity, we will call a set of facet bases ordered in this way oriented. Furthermore, we can order the vertices of each facet of P so that the elements of B appear first in the order corresponding to this orientation, followed by the remaining vertices of F . When facets are written in this way we will also say they are oriented. We have defined orientations starting from a realization of P for simplicity. However, one often wishes to determine such an orientation using only the combinatorics of P . Even without a realization, we can determine relationships between the orientations of certain facet bases using properties of determinants. For example, if two facets intersect in d − 1 elements, say so that if {i 1 , . . . , i d−1 , j k } is a facet basis for F k , k = 1, 2, then they must have opposite orientations. We will talk more about how to determine an orientation later, but will often assume that an orientation is already known.
Returning to our discussion on the linear operator l j (x), if we assume P is oriented and that v i1 , . . . , v i d are always chosen as an oriented affine basis for facet F j , then all the l j (u i ) will have the same sign, and so the matrix [l j (u i )] i,j is, up to column and row scaling by positive scalars, either S P or −S P (depending on the orientation chosen). We can assume to have picked a positive orientation in what follows. We therefore get a parametrization of every entry of the slack matrix as a determinant of the entries in the columns indexed by the flag. Thus, given a set of oriented facets for P , we can construct a parametrization of the slack variety as follows.
(1) Choose a flag F of facets of P .
(2) Form the reduced symbolic slack matrix S F (x). Let u ⊤ i denote the ith row of this matrix. (3) Calculate a parametrized slack matrix in the reduced slack variables using: where F (1), . . . , F (d) are the elements of the oriented facet basis for F .
Remark 8. Notice that when F is a non-simplicial facet, there is not a unique choice of vertices for a facet basis. However, since each basis choice defines the same facet, the resulting columns must be linearly dependent. Therefore, in the above parametrization, we may add redundant columns to the reconstructed slack matrix corresponding to the different choices of facet basis. This will not change the properties of the slack matrix, but may add new polynomials to the parametrization and increase the chances of finding a non-realizability certificate (see the last part of Example 16).
Another way to think of the determinants we use to parametrize the slack matrix is as Plücker coordinates of the reduced slack matrix. That is, if where we recall that the Plücker coordinates of a rank d + 1 matrix A ∈ R n×(d+1) are indexed by sets of d + 1 rows p i0,...,i d (A). This is the classic parametrization of the Grassmannian and specializes to a natural parametrization of the variety Gr(P ). On the other hand, this is not truly a parametrization of the entirety of the slack variety, as we are not free to scale columns, but it gives us at least an element per equivalence class, modulo positive column scalings, which is enough for our purposes.
Example 9. Consider the triangular prism with oriented facets 132, 645, 1254, 1436, 3652. The last four facets form a flag of facets whose reduced slack matrix is and the parametrized slack matrix is In this case, we can directly see that the parametrized slack variety contains a realization (a point for which all non-zero entries of the slack matrix have the same sign, namely when we set all variables to 1).
We are now ready to search for certificates using the linear program (4), since we have a parametrization of Gr(P ) by polynomials of degree d + 1 in the variables of the reduced symbolic slack matrix. In order to further reduce the computational effort, we will however need some further considerations.
Note that the slack variety is invariant under scalings of rows and columns. This means that we can always scale rows and columns by positive scalars as to fix some entries to be one without loss of generality (see [14,Lemma 5.2]): if there was a positive point in the variety before there is still one now. The same is true for the parametrized version: if we scale the rows and columns of the reduced slack matrix to fix some entries to be one, we obtain a dehomogenized version of the parametrized variety for which the same tools as before can be used. A more rigorous discussion of the scaling procedure can be found in [21, Section 3], but we can see below some examples of the procedure.
Example 10. Recall the triangular prism P from Example 9 with the same orderings and labellings, and the same reduced slack matrix. We can scale the first three rows to set x 1,1 , x 2,1 and x 3,1 to be one, then the last three columns to set x 3,2 , x 2,3 and x 1,4 to also be one, and finally the last three rows to set the remaining variables to one. In fact, we can eliminate all variables, obtaining a single point in the parametrized variety, which is  and has only positive signs outside of the forced zeroes. Thus, P is realizable. Note that the reason we can have such dramatic reduction of the dimension of the slack variety is that the triangular prism is projectively unique.
We will denote by S H (x) the original, homogenous, parametrized slack matrix, and by S(x) the dehomogenized version. In most circumstances we will drop the variables from the notation and simply use S H and S if there is no contextual ambiguity. We will use the polynomials S i,j , the entries of the dehomogenized slack matrix, as the polynomials for applying the schemes (3) or (4).

Computational results
5.1. General framework. Given a candidate abstract polytope P , for which we have computed the dehomogenized parametrized slack matrix S as described in the previous section, we will proceed as follows. For fixed positive integers k, l we will construct the set G k,l of all products of at most k entries (possibly repeated) of S, each entry with degree at most l. Let G k,l = {g 1 , . . . , g m } and g i (x) = α a α i x α ; then we will solve the slight modification of (3) given by This problem is always feasible, and it is a simple exercise to check that its optimal value will be either 0 or 1. If it is 0, that means that a certificate of non-realizability of the polytope was found, and one can write it explicitly as which cannot happen in a realizable polytope as all entries of the slack matrix must be strictly positive. We will call a certificate obtained in this way from (6) using G k,l a (k, l)-positive polynomial.
Remark 11. Note that even for a fixed set G k,l , the certificates we obtain from (6) are in general not unique and will depend, for example, on which algorithm is used to solve the linear program. The examples below were obtained using the primal simplex method implemented in Gurobi 9.1.0.
While Gurobi is an inexact solver, in all the examples we computed all recovered coefficients were integers (in fact, plus or minus one). Furthermore, we always double-check that the certificates sum to zero using the reconstructed slack matrix, i.e., symbolic computations, which is a cheap exact verification of the certificate obtained. In case the inexactness causes problems in particular instances, one could resort to an exact LP solver.
In what follows we explore two concrete examples of non-realizable spheres, to explicitly illustrate how these certificates work. where we ordered the vertices in each facet so that the facet is positively oriented. We consider the corresponding reduced slack matrix with the following dehomogenization: Searching for (2, 2)-positive polynomial certificates, we find the certificate of non-realizability S 9,8 S 8,4 + S 9,8 S 5,7 + S 10,7 S 3,10 + S 9,11 S 8,4 + S 3,9 S 9,6 = 0, where the facets outside the flag that appear are, ordered positively, where we ordered the vertices in each facet so that the facet is positively oriented. We consider the corresponding reduced slack matrix with the following dehomogenization: Searching again for (2, 2)-positive polynomial certificates, we find the certificate of non-realizability

5.2.
Recovering classic final polynomials. While the certificates in the previous examples prove non-realizability independently, one might wish to derive classical final polynomial certificates in Plücker coordinates from them. As we discussed previously, the parametrization we are using for the slack matrices is, in fact, a parametrization of the Grassmannian variety, hence it should be almost automatic to switch from one to the other. However, to translate our parametrization back to Plücker coordinates, we need to undo the scaling of the entries of the reduced slack matrix that we set to one. We will see that this rehomogenization step can sometimes complicate the translation of our certificates.
Note that there is more than one way to make this rehomogenization, so there could conceivably be easier certificates that can be derived in this way. Proving that this is indeed a final polynomial independently of our previous computations is possible, but not immediate.

Implementation details.
In the beginning of the section we established our general approach, which is essentially that of solving an instance of problem (6). In this subsection we discuss additional details of the actual instantiation, explaining our implementation.
We describe the main steps in our algorithm for the search of non-realizability certificates. Let P be an abstract d-dimensional polytope with n vertices and m facets. The inputs of our algorithm are: • list of facets of P given as lists of vertex labels; • d: dimension of abstract polytope P ; • F : flag as list of d + 1 facet indices; • k: maximum number of factors in the products of constraints; • l: maximum degree of constraints to consider. Note that the computation of a flag F can be done automatically from the list of facets, using the SlackIdeals package in Macaulay2 [21]. Our implementation uses SageMath [28], that includes Macaulay2 and the LP solver Gurobi 9.1.0 [18].

5.3.1.
Step 1: Constructing parametrization. If we have a given orientation of the facets of P , we can construct each parametrized entry S i,j of the slack matrix by simply computing the corresponding determinant, as explained in Section 4.
An orientation can be computed using methods implemented in Polymake [11]. Alternatively, the method we describe below orients the facets at the same time as constructing the parametrization. While this method is not guaranteed to find an orientation, it always succeeded in our tests.
(1) Choose a basis B j for each (non-simplicial) facet F j of P .
(2) Use the given flag F to form the corresponding dehomogenized reduced slack matrix S F (x).
(3) Reconstruct all entries of the slack matrix (including the entries corresponding to the facets in F ) via the appropriate determinants of S F (x). If we were given an orientation, then we can compute the determinants so that all entries have the appropriate sign. Otherwise we proceed to simultaneously find an orientation and the correct sign of each entry of the matrix with the algorithm below.
(4) Initialize the set P of known positive polynomials to be the set of all variables. (5) Check all columns whose sign is unknown for entries that are of the form ± q i , where each q i ∈ P. If such a polynomial exists it determines the sign of that column, since q i > 0. Add the entries of that column, with any monomial factors removed, with the correct sign to P. (6) We repeat the last step until the sign of every column has been determined or the set of positive polynomials is unchanged.

5.3.2.
Step 2: Constructing constraints and their products for linear program. Given the previously determined orientation, we have a slack matrix whose entries are Plücker coordinates with the correct sign. In particular, the set of entries and any products thereof gives us a collection of polynomials that must be positive. We choose a set of constraints by restricting to entries of degree up to l and taking products of up to k of these entries. Call this set of constraints G k,l . We store these products as a matrix M k,l of coefficients, where each row represents a constraint in G k,l and each column is a monomial that appears in some constraint. By storing only the coefficients of the (distinct) monomials, this matrix effectively records the linearization of our constraints. Thus we now have the constraints of a linear program.
(1) We solve the linear program (6) whose coefficient matrix is the transpose of M k,l using the primal simplex method in Gurobi 9.1.0. (2) If the optimal solution is zero, then we find the indices of the non-zero dual variables, which correspond to an infeasible set O of primal constraints.

5.3.4.
Step 4: (Optional) Rehomogenizing infeasibility certificate. As we saw in the previous section, it is possible, but not necessary, to rehomogenize the certificates attained in the last step. That is done with the following method.
(1) As in Step 1 (2)-(3), use the given flag F to form the corresponding (homogeneous) reduced slack matrix S H F (x). Reconstruct all entries of the slack matrix (including the entries in the facets in F ) via the appropriate determinants of S H F (x) and using the orientation of facets determined at Step 1. (Unlike Step 1, here we do not dehomogenize S F (x)).
(2) We recompute the entries of the reconstructed slack matrix S H (x) that correspond to entries used in the certificate O and then identify the variables we need to multiply each entry by to maintain the certificate validity; that is, we want where the polynomials q are entries of S H (x) and β q are monomial factors.

Constraint selection heuristics.
While the proposed approach yields results in several interesting cases, its computational difficulty grows quickly with the number of vertices and facets. This motivates the need for heuristic techniques to reduce the size of the problem when trying to tackle polytopes whose slack matrices are too big for the full strength of our proposed approach.
We provide three such heuristics, that can be used individually or combined, in order to derive certificates for larger problems.
Vertex avoidance. Examining the certificates obtained using the full power of our methods, certain trends can be observed. Take the certificate of Example 13, where we can see that none of the slack entries used corresponds to any of the vertices {4, 9, 12} or any facet containing at least one of them. These three vertices actually form a triangular face of this polytope. This type of behaviour, where the obtained certificates avoid the rows indexed by the vertices of a fixed face and the columns indexed by any facet that intersects this face, seems to be extremely common, and motivates our first heuristic simplification: pick a face G of the polytope and remove from the parametrized slack matrix the rows of the vertices of G and the columns of facets intersecting G.

Vertex fixing.
If, instead of absent vertices, we focus on vertices that do appear in the certificate, another pattern emerges. Again looking at Example 13 we can now see that if we take any entry (i, j) of the slack matrix appearing in that certificate and take the union of the vertex i and the vertices of the facet F j , it always contains both vertices 3 and 7, which are the vertices of an edge of the polytope. Again, this is a behaviour that can be repeatedly observed in our numerical testing, suggesting a second heuristic simplification: pick a face G of the polytope and consider only entries (i, j) of the parametrized slack matrix such that {i} ∪ F j contains G.
While we formulate and use the previous two heuristics in terms of faces, it might be useful in some cases, particularly in polytopes with a large number of vertices, to avoid or fix a more general set of vertices, not necessarily forming a face.

Monomial simplification.
A somewhat different reduction that can be done is an algebraic simplification. When computing the parametrized slack matrix, the reconstructed entries of a column in the flag are simply the original entries of the corresponding column of the reduced slack matrix (whose entries are either 0, 1 or a single variable) all multiplied by the same polynomial, which is the d-minor indexed by the remaining columns of the flag and the vertices of the chosen facet basis of F . This minor has to be non-negative, and can be added to the set of polynomial constraints. In fact, quite often there is more than one variable that can be factored out in each entry, maintaining the positivity of the remaining expression. This means that when restricting the constraints to be used by degree, we may attain a richer set at a lower degree, thus obtaining solutions at easier computational regimes. Adding these minors is our third and last proposed heuristic and its effect can be seen at the end of Example 16. If any of the facets in the chosen flag is not a simplex, we will also add redundant columns with all possible choices of facet bases, and perform this factorization for each of them, as that can lead to different low degree polynomials in our constraint set, strengthening its expressive power.
Example 16. Let P be prismatoid #3513 from [6]. It is 5-dimensional and has 14 vertices and 94 facets, two of which are non-simplicial. Note that the corresponding slack matrix has 651 distinct non-constant entry values, 230 of them with degree ≤ 3, in 31 variables. Computing all products of two constraints is therefore not practical, so we resort to the above mentioned simplifications.
Under a certain labeling of the vertices, we consider the flag: where we ordered the vertices in each facet so that the facet is positively oriented and for the non-simplicial facets we wrote a basis in bold. We consider the corresponding reduced slack matrix with the following dehomogenization: Applying the first proposed constraint selection heuristic, in the reconstructed slack matrix we only consider slack entries S i,j that avoid the vertices forming the triangle {2, 4, 7}, i.e., such that i / ∈ {2, 4, 7} and F j does not contain any of 2, 4, or 7. This leaves us with only 53 constraints in 31 variables. Searching for (2, 3)-positive polynomial certificates we find the certificate of nonrealizability: S 5,2 S 11,9 + S 5,5 S 13,8 + S 5,2 S 8,7 = 0. where the facets outside the flag used are Finally, using monomial simplification, we find a simpler certificate choosing (k, l) = (1,2). In this case we consider 50 constraints (plus 31 variables) in the reconstructed slack matrix. The certificate is: S 8,7 + S 11,9 + S 6,10 = 0, S H 8,7 x 13,5 + S H 11,9 x 10,5 + S H 6,10 x 3,5 = 0, where the additional column used corresponds to the set F 10 = {8, 9, 10, 11, 13}, which comes from choosing a different facet basis for {7, 8, 9, 10, 11, 12, 13}. 5.5. Numerical results. In this section we provide performance results from our algorithm applied to a set of examples, obtained from several literature sources, of non-realizable polytopes or polytopes whose realizability is open. All computations in this paper were performed on a desktop computer with 8 cores, Intel i7-7700, running at 3.6GHz with 32GB RAM.

Database of simplicial spheres
In Table 1 we summarize the results about some 4-dimensional simplicial spheres. For some of them we could not find a non-realizability certificate. We have seen a non-realizability certificate for Altshuler's sphere N 10 3574 in Example 12. Modifying N 10 3574 , Joseph Doolittle recently constructed three 4-dimensional simplicial spheres whose realizability was not known [7]. We proved that they are all non-realizable and presented an explicit certificate for one of them in Example 13. The certificates for the other two spheres can be found at [16].
Notice that the above certificate has 10 terms, whereas Pfeifle's certificate has 11 terms.
Remark 18. We ran our algorithm on each of the last three spheres in Table 1 for several choices of flag and (k, l) = (2, 4) or (3,2) considering all constraints, and with (k, l) = (3, 3) after removing an edge of the sphere. We did not find a non-realizability certificate in any of these attempts. This does not mean that these spheres are realizable. In fact, in [24, Section 5.1] Pfeifle found a non-realizability certificate for the last sphere in the table.

Prismatoids
In [6] Criado and Santos constructed 4093 abstract 5-dimensional non-d-step prismatoids with number of vertices between 14 and 28. These are examples of non-Hirsch spheres but it is not known if any of them is realizable as a convex polytope. We applied our method to several of these prismatoids with many different vertex numbers and, in all cases, we could find a (2, 3)-positive polynomial, proving that they are non-polytopal, see [16]. For instance, in the cases with the lowest number of vertices, 14 and 15, we could exhaustively rule out all proposed spheres. This leads us to suspect that in fact none of the 4093 is polytopal.
Remark 20. The four prismatoids with 14 vertices have 94 facets and in [6] are denoted by numbers #1039, #1963, #2669 and #3513. In [24, Section 5.2], Pfeifle found non-realizability certificates for these prismatoids, each with 5 terms of degree 4. For the same prismatoids we found (2, 3)-positive polynomials, which give shorter certificates with 3 terms of degree 4 after rehomogenization, as seen in Example 16. The complete data about our computations can be found at [16].
For each of the 36 prismatoids with 15 vertices and 103, 105 or 107 facets we found a (2, 3)-positive polynomial certificate of non-realizability. We summarize the results in Table 2, where for each prismatoid we list the number of terms in the non-realizability certificate we found. Again, more details can be found at [16].
Example 21. Prismatoid #2105 is the largest prismatoid constructed by Criado and Santos in [6], having 28 vertices and 273 facets, two of which are non-simplicial. The corresponding slack matrix has 6261 distinct non-constant entry values, 910 of which have degree ≤ 3, in 87 variables. Computing all products of two constraints of degree ≤ 3 is doable and running the algorithm takes 6 minutes and 24 seconds.  where we ordered the vertices in each facet so that the facet is positively oriented and for the non-simplicial facets we write a basis in bold. We consider the corresponding reduced slack matrix S F (x) with the following dehomogenization: The above matrix is the transpose of the dehomogenized S F (x), where we denote the variable entries with a ⋆.
We apply the three constraint selection heuristics described in Section 5.4, considering in the reconstructed slack matrix only slack entries S i,j that

Concluding remarks
We have presented a conceptually simple algorithm for producing certificates of non-realizability for abstract polytopal spheres. We first generate a novel parametrization of the realization space, and then solve a straightforward linear program which tries to find positive polynomials in the defining ideal of the realization space. We give explicit examples of certificates found via this method, both in cases that were already known where we are also able to find simpler certificates than those obtained by previous methods, and in cases where no previous certificates were known.
The certificates we produce can easily be interpreted as classical final polynomials. Unlike many other techniques used to provide such certificates, we do not need to make any assumptions on the structure of the desired final polynomial. However, close inspection of the structure of the certificates we obtain allows us to suggest further improvements to our algorithm via several heuristics that allow us to significantly decrease the size of our search space in the case of larger spheres. While these preliminary results are very encouraging, some questions remain open.
Are all prismatoids non-realizable? As mentioned before, we could easily derive a (2, 3)-positive polynomial for every prismatoid that we tried. It would be interesting to explore those certificates and find a general obstruction to realizability for polytopes constructed in [6].
Can the heuristics be improved? The proposed heuristics can lighten the computational load of the method, but are not enough to deal with some of the larger cases of interest, like Firsching's spheres. It would be important to develop smarter ways of reducing the size of the problem, to make these examples more treatable.
How important is the choice of flag? Our algorithm starts with an arbitrary choice of flag. It is unclear, both in theoretical and in practical terms, how that can affect its performance. In particular, one could try to see if there exists some criterion that would allow choosing particularly suitable flags as a starting point.