Computing the real isolated points of an algebraic hypersurface Huu Phuoc Le, Mohab Safey El Din, Timo de Wolff

To cite this version:

Huu Phuoc Le, Mohab Safey El Din, Timo de Wolff. Computing the real isolated points of an algebraic hypersurface. ISSAC ’20: International Symposium on Symbolic and Algebraic Computation, Jul 2020, Kalamata, Greece. pp.297-304, ￿10.1145/3373207.3404049￿. ￿hal-02920059￿

HAL Id: hal-02920059 https://hal.archives-ouvertes.fr/hal-02920059 Submitted on 24 Aug 2020

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. COMPUTINGTHE REAL ISOLATED POINTSOFAN ALGEBRAIC HYPERSURFACE

Huu Phuoc Le Mohab Safey El Din Sorbonne Université, CNRS, Sorbonne Université, CNRS, Laboratoire d’Informatique de Paris 6, LIP6, Laboratoire d’Informatique de Paris 6, LIP6, Équipe POLSYS Équipe POLSYS F-75252, Paris Cedex 05, France F-75252, Paris Cedex 05, France [email protected] [email protected]

Timo de Wolff Technische Universität Braunschweig, Institut für Analysis und Algebra, AG Algebra Universitsplats¨ 2 38106 Braunschweig, Germany [email protected]

August 24, 2020

ABSTRACT

Let 푅 be the field of real numbers. We consider the problem of computing the real isolated points of a real algebraic set in 푅푛 given as the vanishing set of a polynomial system. This problem plays an important role for studying rigidity properties of mechanism in material designs. In this paper, we design an algorithm which solves this problem. It is based on the computations of critical points as well as roadmaps for answering connectivity queries in real algebraic sets. This leads to a probabilistic algorithm of complexity (푛푑)푂(푛 log(푛)) for computing the real isolated points of real algebraic hypersurfaces of degree 푑. It allows us to solve in practice instances which are out of reach of the state-of-the-art.

Keywords Semi-algebraic sets · Critical method · Real algebraic geometry · Auxetics · Rigidity

Mohab Safey El Din and Huu Phuoc Le are supported by the ANR grants ANR-18-CE33-0011 SESAME, and ANR-19-CE40-0018 DE RERUM NATURA, the joint ANR-FWF ANR-19-CE48-0015 ECARP project, the PGMO grant CAMISADO and the European Union’s Horizon 2020 research and innovative training network programme under the Marie Skłodowska-Curie grant agreement N° 813211 (POEMA). Timo de Wolff is supported by the DFG grant WO 2206/1-1.

1 Introduction

Let 푄, 푅 and 퐶 be respectively the fields of rational, real and complex numbers. For 푥 ∈ 푅푛 and 푟 ∈ 푅, we denote by 퐵(푥, 푟) ⊂ 푅푛 the open centered at 푥 of radius 푟. 푛 푛 Let 푓 ∈ 푄[푥1, . . . , 푥푛] and ℋ ⊂ 퐶 be the hypersurface defined by 푓 = 0. We aim at computing the isolated points of ℋ ∩ 푅 , i.e. the set of points 푥 ∈ ℋ ∩ 푅푛 s.t. for some positive 푟, 퐵(푥, 푟) ∩ ℋ = {푥}. We shall denote this set of isolated real points by Z (ℋ).

Motivation We consider here a particular instance of the more general problem of computing the isolated points of a semi- algebraic set. Such problems arise naturally and frequently in the design of rigid mechanism in material design. Those are modeled canonically with semi-algebraic constraints, and isolated points to the semi-algebraic set under consideration are related to mobility/rigidity properties of the mechanism. A particular example is the study of auxetic materials, i.e., materials that shrink in all directions under compression. These materials appear in nature (first discovered in [20]) e.g., in foams, bones or propylene; see e.g. [32], and have various potential applications. They are an active field of research, not only on the practical side, e.g., [16, 11], but also with respect to mathematical foundations; see e.g. [5, 6]. On the constructive side, these materials are closely related to tensegrity frameworks, e.g., [21, 8], which can possess various sorts of rigidity properties. Hence, we aim to provide a practical algorithm for computing these real isolated points in the particular case of real traces of complex hypersurfaces first. This simplification allows us to significantly improve the state-of-the-art complexity for this problem and to establish a new algorithmic framework for such computations. State-of-the-art As far as we know, there is no established algorithm dedicated to the problem under consideration here. However, effective real algebraic geometry provides subroutines from which such a computation could be done. Let ℋ be a hypersurface defined by 푓 = 0 with 푓 ∈ 푄[푥1, . . . , 푥푛] of degree 푑. A first approach would be to compute a cylindrical algebraic decomposition adapted to ℋ ∩ 푅푛 [7]. It partitions ℋ ∩ 푅푑 into connected cells, i.e. subsets which are homeomorphic to ]0, 1[푖 for some 1 ≤ 푖 ≤ 푛. Next, one needs to identify cells which correspond to isolated points using adjacency information (see e.g. [1]). Such a procedure is at least doubly exponential in 푛 and polynomial in 푑. A better alternative is to encode real isolated points with quantified formula over the reals. Using e.g. [2, Algorithm 14.21], one can 2 3 compute isolated points of ℋ ∩ 푅푛 in time 푑푂(푛 ). Note also that [31] allows to compute isolated points in time 푑푂(푛 ). A third alternative (suggested by the reviewers) is to use [2, Algorithm 12.16] to compute sample points in each connected component of ℋ ∩ 푅푛 and then decide whether spheres, centered at these points, of infinitesimal radius, meet ℋ ∩ 푅푛. Note that these points are encoded with parametrizations of degree 푑푂(푛) (their coordinates are evaluations of polynomials at the roots of a univariate polynomial with infinitesimal coefficients). Applying [2, Alg. 12.16] on this last real root decision problem would lead to a 2 complexity 푑푂(푛 ) since the input polynomials would have degree 푑푂(푛). Another approach would be to run [2, Alg. 12.16] modulo the algebraic extension used to define the sample points. That would lead to a complexity 푑푂(푛) but this research direction requires modifications of [2, Alg. 12.16] since it assumes the input coefficients to lie in an integral domain, which is not satisfied in our case. Besides, we report on practical experiments showing that using [2, Alg. 12.16] to compute only sample points in ℋ ∩ 푅푛 does not allow us to solve instances of moderate size. The topological nature of our problem is related to connectedness. Computing isolated points of ℋ ∩ 푅푛 is equivalent to computing those connected components of ℋ ∩ 푅푛 which are reduced to a single point (see Lemma 1). Hence, one considers computing roadmaps: these are algebraic curves contained in ℋ which have a non-empty and connected intersection with all connected components of the real set under study. Once such a roadmap is computed, it suffices to compute the isolated points of a semi- algebraic curve in 푅푛. This latter step is not trivial; as many of the algorithms computing roadmaps output either curve segments (see e.g., [4]) or algebraic curves (see e.g., [28]). Such curves are encoded through rational parametrizations, i.e., as the Zariski of the projection of the (푥1, . . . , 푥푛)-space of the solution set to 휕푤 푤(푡, 푠) = 0, 푥푖 = 푣푖(푡, 푠)/ 휕푡 (푡, 푠), 1 ≤ 푖 ≤ 푛 where 푤 ∈ 푄[푡, 푠] is square-free and monic in 푡 and 푠 and the 푣푖’s lie in 푄[푡, 푠] (see e.g., [28]). As far as we know, there is no published algorithm for computing isolated points from such an encoding.

2 Computing roadmaps started with Canny’s (probabilistic) algorithm running in time 푑푂(푛 ) on real algebraic sets. Later on, [27] introduced new types of connectivity results enabling more freedom in the design of roadmap algorithms. This led to [27, 4] 1.5 for computing roadmaps in time (푛푑)푂(푛 ). More recently, [3], still using these new types of connectivity results, provide a 2 3 roadmap algorithm running in time 푑푂(푛 log 푛)푛푂(푛 log 푛) for general real algebraic sets (at the cost of introducing a number of infinitesimals). This is improved in [28], for smooth bounded real algebraic sets, with a probabilistic algorithm running in time 푂((푛푑)12푛 log2 푛). These results makes plausible to obtain a full algorithm running in time (푛푑)푂(푛 log 푛) to compute the isolated points of ℋ ∩ 푅푛.

Main result We provide a probabilistic algorithm which takes as input 푓 and computes the set of real isolated points Z (ℋ) of ℋ ∩ 푅푛. A few remarks on the output data-structure are in order. Any finite algebraic set 푍 ⊂ 퐶푛 defined over 푄 can be represented as the projection on the (푥1, . . . , 푥푛)-space of the solution set to

푤(푡) = 0, 푥푖 = 푣푖(푡), 1 ≤ 푖 ≤ 푛 where 푤 ∈ 푄[푡] is square-free and the 푣푖’s lie in 푄[푡]. The sequence of polynomials (푤, 푣1, . . . , 푣푛) is called a zero-dimensional parametrization; such a representation goes back to Kronecker [19]. Such representations (and their variants with denominators) are widely used in computer algebra (see e.g. [12, 13, 14]). For a zero-dimensional parametrization Q, 푍(Q) ⊂ 퐶푛 denotes the finite set represented by Q. Observe that considering additionally isolating boxes, one can encode 푍(Q) ∩ 푅푛. Our main result is as follows. 푛 Theorem 1. Let 푓 ∈ 푄[푥1, . . . , 푥푛] of degree 푑 and ℋ ⊂ 퐶 be the algebraic set defined by 푓 = 0. There exists a probabilistic algorithm which, on an input 푓 of degree 푑, computes a zero-dimensional parametrization P and isolating boxes which encode Z (ℋ) using (푛푑)푂(푛 log(푛)) arithmetic operations in 푄.

In Section 5, we report on practical experiments showing that it already allows us to solve non-trivial problems which are actually out of reach of [2, Alg. 12.16] to compute sample points in ℋ ∩ 푅푛 only. We sketch now the geometric ingredients which allow

2 us to obtain such an algorithm. Assume that 푓 is non-negative over 푅푛 (if this is not the case, just replace it by its square) and let 푥 ∈ Z (ℋ). Since 푥 is isolated and 푓 is non-negative over 푅푛, the intuition is that for 푒 > 0 and small enough, the real solution set to 푓 = 푒 looks like a ball around 푥, hence a bounded and closed connected component 퐶푥. Then the restriction of every projection 푛 on the 푥푖-axis to the algebraic set ℋ푒 ⊂ 퐶 defined by 푓 = 푒 intersects 퐶푥. When 푒 tends to 0, these critical points in 퐶푥 “tend to 푥”. This first process allows us to compute a superset of candidate points in ℋ ∩ 푅푛 containing Z (ℋ). Of course, one would like that this superset is finite and this will be the case up to some generic linear change of coordinates, using e.g. [25]. All in all, at this stage we have “candidate points” that may lie in Z (ℋ). Writing a quantified formula to decide if there exists a ball around these points which does not meet ℋ ∩ 푅푛 raises complexity issues (those points are encoded by zero-dimensional parametrizations of degree 푑푂(푛), given as input to a decision procedure). Hence we need new ingredients. Note that our “candidate points” lie on “curves of critical points” which are obtained by letting 푒 vary in the polynomial systems defining the aforementioned critical points. Assume now that ℋ ∩ 푅푛 is bounded, hence contained in a ball 퐵. Then, for 푒′ small enough, the real algebraic set defined by 푓 = 0 is “approximated” by the union of the connected components of the real set defined by 푓 = 푒′ which are contained in 퐵. Besides, these “curves of critical points”, that we just mentioned, hit these connected components when one fixes 푒′. We actually prove that two distinct points of our set of “candidate points” are connected through these “curves of critical points” and those connected components defined by 푓 = 푒′ in 퐵 if and only if they do not lie in Z (ℋ). Hence, we use computations of roadmaps of the real set defined by 푓 = 푒′ to answer those connectivity queries. Then, advanced algorithms for roadmaps and polynomial system solving allows us to achieve the announced complexity bound. Many details are hidden in this description. In particular, we use infinitesimal deformations and techniques of semi-algebraic geometry. While infinitesimals are needed for proofs, they may be difficult to use in practice. On the algorithmic side, we go further exploiting the geometry of the problem to avoid using infinitesimals. Structure of the paper In Section 2, we study the geometry of our problem and prove a series of auxiliary results (in particular Proposition 7, which coins the theoretical ingredient we need). Section 3 is devoted to describe the algorithm. Section 4 is devoted to the complexity analysis and Section 5 reports on the practical performances of our algorithm. Acknowledgments. We thank the reviewers for their helpful comments. 2 The geometry of the problem

2.1 Candidates for isolated points

푛 As above, let 푓 ∈ 푄[푥1, . . . , 푥푛] and ℋ ⊂ 퐶 be the hypersurface defined by 푓 = 0. Let f be a subset of 퐶[푥1, . . . , 푥푛], we denote by 푉 (f) the simultaneous vanishing locus in 퐶푛 of f. Lemma 1. The set Z (ℋ) is the (finite) union of the semi-algebraically connected components of ℋ ∩ 푅푛 which are a singleton.

Proof. Recall that real algebraic sets have a finite number of semi-algebraically connected components [2, Theorem 5.21]. Let 풞 be a semi-algebraically connected component of ℋ ∩ 푅푛. Assume that 퐶 is not a singleton and take 푥 and 푦 in 풞 with 푥 ̸= 푦. Then, there exists a semi-algebraic continuous map 훾 : [0, 1] → 풞 s.t. 훾(0) = 푥 and 훾(1) = 푦 ; besides, since 푥 ̸= 푦, there exist 푡 ∈ (0, 1) such that 훾(푡) ̸= 푥. By continuity of 훾 and the norm function, any ball 퐵 centered at 푥 contains a point 훾(푡) ̸= 푥. Now assume that 풞 = {푥}. Observe that ℋ ∩ 푅푛 − {푥} is closed (since semi-algebraically connected components of real algebraic sets are closed). Since ℋ ∩ 푅푛 is bounded, we deduce that ℋ ∩ 푅푛 − {푥} is closed and bounded. Then, the map 푦 → ‖푦 − 푥‖2 reaches a minimum over ℋ ∩ 푅푛 − {푥}. Let 푒 be this minimum value. We deduce that any ball centered at 푥 of radius less than 푒 does not meet ℋ ∩ 푅푛 − {푥}.

To compute those connected components of ℋ ∩ 푅푛 which are singletons, we use classical objects of optimization and which are mainly polar varieties. Let 퐾 be an algebraically closed field, let 휑 ∈ 퐾[푥1, . . . , 푥푛] which defines the polynomial 푛 mapping (푥1, . . . , 푥푛) ↦→ 휑(푥1, . . . , 푥푛) and 푉 ⊂ 퐾 be a smooth equidimensional algebraic set. We denote by 푊 (휑, 푉 ) the set of critical points of the restriction of 휑 to 푉 . If 푐 is the co- of 푉 and (푔1, . . . , 푔푠) generates the vanishing ideal associated to 푉 , then 푊 (휑, 푉 ) is the subset of 푉 at which the Jacobian matrix associated to (푔1, . . . , 푔푠, 휑) has rank less than or equal to 푐 (see e.g., [28, Subsection 3.1]). In particular, the case where 휑 is replaced by the canonical projection on the 푖-th coordinate

휋푖 :(푥1, . . . , 푥푛) ↦→ 푥푖, is excessively used throughout our paper. In our context, we do not assume that ℋ is smooth. Hence, to exploit strong topological properties of polar varieties, we retrieve a smooth situation using deformation techniques. We consider an infinitesimal 휀, i.e., a transcendental element over 푅 such that 0 < 휀 < 푟 for any positive element 푟 ∈ 푅, and the field of Puiseux series over 푅, denoted by

{︁∑︀ 푖/푞 }︁ 푅⟨휀⟩ = 푎푖휀 | 푖 ∈ , 푖0 ∈ , 푞 ∈ − {0}, 푎푖 ∈ 푅 . 푖≥푖0 N Z N

3 Recall that 푅⟨휀⟩ is a real closed field [2, Theorem 2.91]. One defines 퐶⟨휀⟩ as for 푅⟨휀⟩ but taking the coefficients of the series in 퐶. ∑︀ 푖/푞 Recall that 퐶⟨휀⟩ is an algebraic closure of 푅⟨휀⟩ [2, Theorem 2.17]. Consider 휎 = 푎푖휀 ∈ 푅⟨휀⟩ with 푎푖 ̸= 0. Then, 푎푖 푖≥푖0 0 0 is called the valuation of 휎. When 푖0 ≥ 0, 휎 is said to be bounded over 푅 and the set of bounded elements of 푅⟨휀⟩ is denoted by 푅⟨휀⟩푏. One defines the function lim휀 : 푅⟨휀⟩푏 → 푅 that maps 휎 to 푎0 (which is 0 when 푖0 > 0) and writes lim휀 휎 = 푎0; note that 푛 lim휀 is a ring homomorphism from 푅⟨휀⟩푏 to 푅. All these definitions extend to 푅⟨휀⟩ componentwise. For a semi-algebraic set 푛 풮 ⊂ 푅⟨휀⟩ , we naturally define the limit of 풮 as lim휀 풮 = {lim휀 푥 | 푥 ∈ 풮 and 푥 is bounded over 푅}. Let 풮 ⊂ 푅푛 be a semi-algebraic set defined by a semi-algebraic formula Φ. We denote by ext(풮, 푅⟨휀⟩) the semi-algebraic set of points which are solutions of Φ in 푅⟨휀⟩푛. We refer to [2, Chap. 2] for more details on infinitesimals and real Puiseux series. 푛 By e.g., [22, Lemma 3.5], ℋ휀 and ℋ−휀 respectively defined by 푓 = 휀 and 푓 = −휀 are two disjoint smooth algebraic sets in 퐶⟨휀⟩ . 푛 푛 Lemma 2. For any 푥 lying in a bounded connected component of ℋ ∩ 푅 , there exists a point 푥휀 ∈ (ℋ휀 ∪ ℋ−휀) ∩ 푅⟨휀⟩푏 such 푛 that lim휀 푥휀 = 푥. For such a point 푥휀, let 풞휀 be the connected component of (ℋ휀 ∪ ℋ−휀) ∩ 푅⟨휀⟩ containing 푥휀. Then, 풞휀 is bounded over 푅.

Proof. See [22, Lemma 3.6] for the first claim. The second part can be deduced following the proof of [2, Proposition 12.51].

Proposition 3. Assume that Z (ℋ) is not empty and let 푥 ∈ Z (ℋ). There exists a semi-algebraically connected component 풞휀 푛 that is bounded over 푅 of (ℋ휀 ∪ ℋ−휀) ∩ 푅⟨휀⟩ such that lim휀 풞휀 = {푥}.

Consequently, for 1 ≤ 푖 ≤ 푛, there exists an 푥휀 ∈ (푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀)) ∩ 풞휀 such that lim휀 푥휀 = 푥. Hence we have that

푛 푛 Z (ℋ) ⊂ ∩푖=1 lim휀((푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀)) ∩ 푅⟨휀⟩푏 ).

푛 Proof. By Lemma 2, there exists 푥휀 ∈ (ℋ휀 ∪ ℋ−휀) ∩ 푅⟨휀⟩ such that lim휀 푥휀 = 푥. Assume that 푥휀 ∈ ℋ휀 and let 풞휀 be the 푛 connected component of ℋ휀 ∩ 푅⟨휀⟩ containing 푥휀. Again, by Lemma 2, 풞휀 is bounded over 푅. We prove that lim휀 풞휀 = {푥} by contradiction. The case 푥휀 ∈ ℋ−휀 is done similarly.

Assume that there exists a point 푦휀 ∈ 풞휀 such that lim휀 푦휀 = 푦 and 푦 ̸= 푥. Since 풞휀 is semi-algebraically connected, there exists a semi-algebraically 훾 : ext([0, 1], 푅⟨휀⟩) → 풞휀 such that 훾(0) = 푥휀 and 훾(1) = 푦휀. By [2, Proposition 12.49], lim휀 Im(훾) is connected and contains 푥 and 푦. As lim휀 is a ring homomorphism, 푓(lim휀 훾(푡)) = lim휀 푓(훾(푡)) = 0, so lim휀 Im(훾) 푛 is contained in ℋ ∩ 푅 . This contradicts the isolatedness of 푥, then we conclude that lim휀 풞휀 = {푥}. 푛 Since 풞휀 is a semi-algebraically connected component of the real algebraic set ℋ휀 ∩ 푅⟨휀⟩ , it is closed. Also, 풞휀 is bounded over 푅. Hence, for any 1 ≤ 푖 ≤ 푛, the projection 휋푖 reaches its extrema over 풞휀 [2, Proposition 7.6], which implies that 풞휀 ∩ 푊 (휋푖, ℋ휀) is 푛 non-empty. Take 푥휀 ∈ 푊 (휋푖, ℋ휀) ∩ 풞휀, then 푥휀 is bounded over 푅 and its limit is 푥. Thus, Z (ℋ) ⊂ lim휀(푊 (휋푖, ℋ휀) ∩ 푅⟨휀⟩푏 ) 푛 푛 for any 1 ≤ 푖 ≤ 푛, which implies Z (ℋ) ⊂ ∩푖=1 lim휀(푊 (휋푖, ℋ휀) ∩ 푅⟨휀⟩푏 ).

2.2 Simplification

We introduce in this subsection a method to reduce our problem to the case where ℋ ∩ 푅푛 is bounded for all 푥 ∈ 푅푛. Such assumptions are required to prove the results in Subsection 2.3. Our technique is inspired by [2, Section 12.6]. The idea is to associate to the possibly unbounded algebraic set ℋ ∩ 푅푛 a bounded real algebraic set whose isolated points are strongly related to Z (ℋ). The construction of such an algebraic set is as follows.

Let 푥푛+1 be a new variable and 0 < 휌 ∈ 푅 such that 휌 is greater than the Euclidean norm ‖·‖ of every isolated point of ℋ ∩ 푅푛. Note that such a 휌 can be obtained from a finite set of points containing the the isolated points of ℋ ∩ 푅푛. We explain in Subsection 3.2 how to compute such a finite set. We consider the algebraic set 풱 defined by the system

2 2 2 2 푓 = 0, 푥1 + ... + 푥푛 + 푥푛+1 − 휌 = 0.

Let 휋푥 be the projection (푥1, . . . , 푥푛, 푥푛+1) ↦→ (푥1, . . . , 푥푛). The real counterpart of 풱 is the intersection of ℋ lifted to 푅푛+1 with the sphere of center 0 and radius 휌. Therefore, 풱 is a bounded 푛+1 푛+1 real algebraic set in 푅 . Moreover, the restriction of 휋푥 to 풱 ∩ 푅 is exactly ℋ ∩ 퐵(0, 휌). By the definition of 휌, this image contains all the real isolated points of ℋ. Lemma 4 below relates Z (ℋ) to the isolated points of 풱 ∩ 푅푛+1. 푛+1 Lemma 4. Let 풱 and 휋푥 as above. We denote by Z (풱) ⊂ 푅 the set of real isolated points of 풱 with non-zero 푥푛+1 coordinate. Then, 휋푥(Z (풱)) = Z (ℋ).

푛+1 푛 ′ Proof. Note that 휋푥(풱 ∩ 푅 ) = (ℋ ∩ 푅 ) ∩ 퐵(0, 휌). We consider a real isolated point 푥 = (훼1, . . . , 훼푛, 훼푛+1) of 풱 with ′ ′ 훼푛+1 ̸= 0 and 푥 = 휋푥(푥 ) = (훼1, . . . , 훼푛). Assume by contradiction that 푥 ̸∈ Z (ℋ), we will prove that 푥 ̸∈ Z (풱), i.e., for any ′ 푛+1 ′ ′ 푟 > 0, there exists 푦 = (훽1, . . . , 훽푛, 훽푛+1) ∈ 풱∩푅 such that ‖푦 −푥 ‖ < 푟. Since 푥 is not isolated, there exists a point 푦 ̸= 푥 푟 ′ −1 2 2 2 2 2 such that ‖푦 − 푥‖ < . Let 푦 ∈ 휋푥 (푦) such that 훼푛+1훽푛+1 ≥ 0. We have that ‖푥‖ + 훼푛+1 = ‖푦‖ + 훽푛+1 = 휌 . 1+2휌/|훼푛+1| Now we estimate |‖푦‖2 − ‖푥‖2| = (‖푥‖ + ‖푦‖) · |‖푦‖ − ‖푥‖| ≤ 2휌 ·‖푦 − 푥‖,

4 2 2 2 2 |훼푛+1 − 훽푛+1| |‖푦‖ − ‖푥‖ | 2휌 ·‖푦 − 푥‖ |훼푛+1 − 훽푛+1| ≤ = ≤ . |훼푛+1| |훼푛+1| |훼푛+1| Finally, (︂ )︂ ′ ′ 2휌 ‖푦 − 푥 ‖ ≤ ‖푦 − 푥‖ + |훼푛+1 − 훼푛+1| ≤ 1 + ‖푦 − 푥‖ < 푟. |훼푛+1| ′ 푛+1 So, 푥 is not isolated in 풱 ∩ 푅 . This contradiction implies that 휋푥(Z (풱)) ⊂ Z (ℋ). ′ 푛 It remains to prove that Z (ℋ) ⊂ 휋푥(Z (풱)). For any real isolated point 푥 ∈ Z (ℋ), we consider a ball 퐵(푥, 푟 ) ⊂ 퐵(0, 휌) ⊂ 푅 ′ −1 ′ 푛+1 −1 푛+1 such that 퐵(푥, 푟 ) ∩ ℋ = {푥}. We have that 휋푥 (퐵(푥, 푟 )) ∩ 풱 ∩ 푅 is equal to 휋푥 (푥) ∩ 풱 ∩ 푅 , which is finite. So, all −1 ′ 푛+1 the points in 휋푥 (퐵(푥, 푟 )) ∩ 풱 ∩ 푅 are isolated. Since Z (ℋ) ⊂ 퐵(0, 휌), we deduce that Z (ℋ) is contained in 휋푥(Z (풱)).

Thus, we conclude that 휋푥(Z (풱)) = Z (ℋ).

푛 Note that the condition 푥푛+1 ̸= 0 is crucial. For a connected component 풞 of ℋ ∩ 푅 that is not a singleton, its intersection with the closed ball 퐵(0, 휌) can have an isolated point on the of the ball, which corresponds to an isolated point of 풱 ∩ 푅푛+1. This situation depends on the choice of 휌 and can be easily detected by checking the vanishing of the coordinate 푥푛+1.

2.3 Identification of isolated points

푛 푛 By Proposition 3, the real points of ∩푖=1 lim휀 푊 (휋푖, ℋ휀) are potential isolated points of ℋ ∩ 푅 . We study now how to identify, among those candidates, which points are truely isolated. 2 2 2 푛+1 We use the same 푔 = 푥1 + ... + 푥푛+1 − 휌 and 풱 = 푉 (푓, 푔) ⊂ 퐶 as in Subsection 2.2. Let 풱휀 = 푉 (푓 − 휀, 푔) and 푛+1 풱−휀 = 푉 (푓 + 휀, 푔), note that they are both algebraic subsets of 퐶⟨휀⟩ . 푛+1 푛+1 Lemma 5. Let 푥 ∈ 풱 ∩ 푅 such that its 푥푛+1 coordinate is non-zero. Then, 푥 is not an isolated point of 풱 ∩ 푅 if and only 푛+1 if there exists a semi-algebraically connected component 풞휀 of (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ , bounded over 푅, such that {푥} ( lim휀 풞휀.

푛+1 Proof. Let 푥 = (훼1, . . . , 훼푛+1) ∈ 풱 ∩ 푅 such that 훼푛+1 ̸= 0. As 푓(훼1, . . . , 훼푛) = 0, by Lemma 2, there exists a point 푛+1 푛 푥휀 = (훽1, . . . , 훽푛+1) ∈ 푅⟨휀⟩ such that (훽1, . . . , 훽푛) ∈ (ℋ휀 ∪ ℋ−휀) ∩ 푅⟨휀⟩ and lim휀(훽1, . . . , 훽푛) = (훼1, . . . , 훼푛). Since 푛+1 훼푛+1 ̸= 0, we can choose 훽푛+1 such that 푔(푥휀) = 0. Therefore, for any 푥 as above, there exists 푥휀 ∈ (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ such that lim휀 푥휀 = 푥. 푛+1 푛+1 푛+1 Since (풱휀 ∪풱−휀)∩푅⟨휀⟩ lies on the sphere (in 푅⟨휀⟩ ) defined by 푔 = 0, every connected component of (풱휀 ∪풱−휀)∩푅⟨휀⟩ 푛+1 푛+1 is bounded over 푅. Hence, the points of 풱 ∩푅 whose 푥푛+1 coordinates are not zero are contained in lim휀(풱휀 ∪풱−휀)∩푅⟨휀⟩ . 푛+1 Let 푥 be a non-isolated point of 풱 ∩ 푅 whose 푥푛+1-coordinate is not zero. We assume by contradiction that for any semi-al- 푛+1 gebraically connected component 풞휀 of (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ (which is bounded over 푅 by above), then it happens that either lim휀 풞휀 = {푥} or 푥 ̸∈ lim휀 풞휀. 푛+1 Since (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ has finitely many connected components, the number of connected components of the second type is also finite. Since 풱 ∩ 푅푛+1 is not a singleton (by the existence of 푥), the connected components of the second type exist. So, we enumerate them as 풞1,..., 풞푘 and 푥 ̸∈ lim휀 풞푗 for 1 ≤ 푗 ≤ 푘. 푛+1 As 푥 is not isolated in 풱 ∩ 푅 with non-zero 푥푛+1 coordinate by assumption, there exists a sequence of points (푥푖)푖≥0 in 푛+1 풱 ∩푅 of non-zero 푥푛+1 coordinates that converges to 푥. Since there are finitely many 풞푖, there exists an index 푗 such that lim휀 풞푗 contains a sub-sequence of (푥푖)푖≥0. By Proposition 12.49 [BPR], the limit of the semi-algebraically connected component 풞푗 (which is bounded over 푅) is a closed and connected semi-algebraic set. It follows that 푥 ∈ lim휀 풞푗 , which is a contradiction. Therefore, 푛+1 there exists a semi-algebraically connected component of (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ , bounded over 푅, such that {푥} ( lim휀 풞휀.

It remains to prove the reverse implication. Assume that {푥} ( lim휀 풞휀 for some semi-algebraically connected component 풞휀 of 푛+1 (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ that is bounded over 푅. As lim휀 풞휀 is connected, we finish the proof.

푛+1 푛+1 Lemma 6. Let 푥 ∈ 풱 ∩ 푅 whose 푥푛+1 coordinate is non-zero. Assume that 푥 is not an isolated point of 풱 ∩ 푅 . For 푛+1 any semi-algebraically connected component 풞휀 of (풱휀 ∪ 풱−휀) ∩ 푅 , bounded over 푅, such that {푥} ( lim휀 풞휀, there exists ′ ′ 1 ≤ 푖 ≤ 푛 such that 풞휀 ∩ (푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) contains a point 푥휀 which satisfies lim휀 푥휀 ̸= 푥.

푛+1 Proof. Let 풞휀 be semi-algebraically connected component of (풱휀 ∪ 풱−휀) ∩ 푅⟨휀⟩ , bounded over 푅, such that {푥} ( lim휀 풞휀. Lemma 5 ensures the existence of such a connected component 풞휀.

Now let 푥휀 and 푦휀 be two points contained in 풞휀 such that lim휀 푥휀 = 푥, lim휀 푦휀 = 푦 and 푥 ̸= 푦. Let 푥 = (훼1, . . . , 훼푛+1) and 푦 = (훽1, . . . , 훽푛+1). Since 푥 ̸= 푦, there exists 1 ≤ 푖 ≤ 푛 + 1 such that 훼푖 ̸= 훽푖. Note that if (훼1, . . . , 훼푛) = (훽1, . . . , 훽푛) for any 푦 ∈ lim휀 풞휀, then lim휀 풞휀 contains at most two points (by the constraint 푔 = 0). However, since lim휀 풞휀 is connected and contains at least two points, it must be an infinite set. So, we can choose 푦 such that have that 1 ≤ 푖 ≤ 푛. 푛+1 As 풞휀 is closed in 푅⟨휀⟩ (as a connected component of an algebraic set) and bounded over 푅 by definition, its projection on the 푥푖 coordinate is a closed interval [푎, 푏] ⊂ 푅⟨휀⟩ (see [2, Theorem 3.23]), which is bounded over 푅 (because 풞휀 is). ′ ′ 푛+1 ′ −1 Also, since [푎, 푏] is closed, there exist 푥푎 and 푥푏 in 푅⟨휀⟩ such that 푥푎 ∈ 휋푖 (푎) ∩ 풞휀 ∩ (푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) and

5 ′ −1 푥푏 ∈ 휋푖 (푏) ∩ 풞휀 ∩ (푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)). Since 훼푖 ̸= 훽푖 both lying in 푅, {훼푖, 훽푖} ⊂ [lim휀 푎, lim휀 푏] implies that ′ ′ ′ ′ lim휀 푎 ̸= lim휀 푏. It follows that lim휀 푥푎 ̸= lim휀 푥푏. Thus, at least one point among lim휀 푥푎 and lim휀 푥푏 does not coincide with 푥. ′ ′ Hence, there exists a point 푥휀 in 풞휀 ∩ (푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) such that lim휀 푥휀 ̸= 푥.

We can easily deduce from Lemma 5 and Lemma 6 the following proposition, which is the main ingredient of our algorithm. 푛 Proposition 7. Let 푥 ∈ ∩푖=1 lim휀 푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀) whose 푥푛+1 coordinate is non-zero. Then, 푥 is not an isolated point 푛+1 푛+1 of 풱 ∩ 푅 if and only if there exist 1 ≤ 푖 ≤ 푛 and a connected component 풞휀 of 풱휀 ∩ 푅⟨휀⟩ , which is bounded over 푅, such ′ ′ that 풞휀 ∩ 푊 (휋푖, ℋ휀) contains 푥휀, 푥휀 satisfying 푥 = lim휀 푥휀 ̸= lim휀 푥휀.

3 Algorithm

3.1 General description

The algorithm takes as input a polynomial 푓 ∈ 푅[푥1, . . . , 푥푛].

The first step consists in computing a parametrization P encoding a finite set of points which contains Z (ℋ). Let ℋ휀 and ℋ−휀 푛 푛 be the algebraic subsets of 퐶⟨휀⟩ respectively defined by 푓 = 휀 and 푓 = −휀. By Proposition 3, the set ∩푖=1 lim휀 푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀) contains the real isolated points of ℋ. To ensure that this set is finite, we use generically chosen linear change of coordinates. 푛 퐴 Given a matrix 퐴 ∈ 퐺퐿푛(푄), a polynomial 푝 ∈ 푄[푥1, . . . , 푥푛] and an algebraic set 풮 ⊂ 퐶 , we denote by 푝 the polynomial 푝(퐴 · 푥) obtained by applying the change of variables 퐴 to 푝 and 풮퐴 = {퐴−1 · 푥 | 푥 ∈ 풮}. Then, we have that 푉 (푝)퐴 = 푉 (푝퐴).

퐴 퐴 In [25], it is proved that, with 퐴 outside a prescribed proper Zariski closed subset of 퐺퐿푛(푄), 푊 (휋푖, ℋ휀 )∪푊 (휋푖, ℋ−휀) is finite for ⟨ 퐴 퐴 ⟩ 1 ≤ 푖 ≤ 푛. Additionally, since 퐴 is assumed to be generically chosen, [24] shows that the ideal ℓ · 휕푓 − 1, 휕푓 for all 푗 ̸= 푖 휕푥푖 휕푥푗 defines either an empty set or a one-equidimensional algebraic set, where ℓ is a new variable. Those extra assumptions are required in our subroutine Candidates (see the next subsection). Note that, for any matrix 퐴, the real isolated points of ℋ퐴 is the image of −1 Z (ℋ) by the linear mapping associated to 퐴 . Thus, in practice, we will choose randomly a 퐴 ∈ 퐺퐿푛+1(푄), compute the real isolated points of ℋ퐴, and then go back to Z (ℋ) by applying the change of coordinates induced by 퐴−1. This random choice of 퐴 makes our algorithm probabilistic. The next step consists of identifying those of the candidates which are isolated in ℋ퐴 ∩ 푅푛 ; this step relies on Proposition 7. To reduce our problem to the context where Proposition 7 can be applied, we use Lemma 4. One needs to compute 휌 ∈ 푅, such that 휌 is larger than the maximum norm of the real isolated points we want to compute. This value of 휌 can be easily obtained by isolating the real roots of the zero-dimensional parametrization encoding the candidates. Further, we call GetNormBound a subroutine which 2 2 2 2 takes as input P and returns 휌 as we just sketched. We let 푔 = 푥1 + ... + 푥푛 + 푥푛+1 − 휌 . By Lemma 4, Z (ℋ) is the projection of the set of real isolated points of the algebraic set 풱 defined by 푓 = 푔 = 0 at which 푥푛+1 ̸= 0. Let 풳 be the set of points of 풱 projecting to the candidates encoded by P. 퐴 퐴 퐴 퐴 Proposition 7 would lead us to compute 푊 (휋푖, 풱휀 ) ∪ 푊 (휋푖, 풱−휀) as well as a roadmap of 풱휀 ∪ 풱−휀. As explained in the introduction, this induces computations over the ground field 푅⟨휀⟩ which we want to avoid. We bypass this computational difficulty 퐴 퐴 푛+1 퐴 퐴 as follows. We compute a roadmap ℛ푒 for 풱푒 ∪ 풱−푒 ∩ 푅 (defined by {푓 = 푒, 푔 = 0} and {푓 = −푒, 푔 = 0} respectively) for 푒 small enough (see Subsection 3.3) and define a semi-algebraic curve 풦 containing 풳 such that 푥 ∈ 풳 is isolated in 풱퐴 ∩ 푅푛+1 if and only if it is not connected to any other 푥′ ∈ 풳 by 풦. We call IsIsolated the subroutine that takes as input P, 푓 퐴 and 푔 and returns P with isolating boxes 퐵 of the real points of defined by P which are isolated in 풱퐴 ∩ 푅푛+1. 퐴 Once the real isolated points of 풱 is computed, we remove the boxes corresponding to points at which 푥푛+1 = 0 and project the 퐴 remaining points on the (푥1, . . . , 푥푛)-space to obtain the isolated points of ℋ . This whole step uses a subroutine which we call Remove (see [28, Appendix J]). Finally, we reverse the change of variable by applying 퐴−1 to get Z (ℋ). We summarize our discussion in Algorithm 1 below.

3.2 Computation of candidates

퐴 퐴 퐴 퐴 Further, we let ℋ휀 (resp. ℋ−휀) be the algebraic set associated to 푓 = 휀 (resp. 푓 = −휀). To avoid to overload notation, we omit the change of variables 퐴 as upper script. Let ℓ be a new variable. For 1 ≤ 푖 ≤ 푛, 퐼푖 denotes the ideal of 푄[ℓ, 푥1, . . . , 푥푛] {︁ }︁ generated by the set of polynomials ℓ · 휕푓 − 1, 휕푓 for all 푗 ̸= 푖 . 휕푥푖 휕푥푗

Following the discussion in Subsection 3.1, the algebraic set associated to 퐼푖 is either empty or one-equidimensional and 푊 (휋푖, ℋ휀)∪ 푊 (휋푖, ℋ−휀) is finite. Hence, [24, Theorem 1] shows that the algebraic set associated to the ideal ⟨푓⟩ + (퐼푖 ∩ 푄[푥1, . . . , 푥푛]) is zero-dimensional and contains lim휀 푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀).

In our problem, the intersection of lim휀 푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀) is needed rather than each limit itself. Hence, we use the inclusion 푛 (︀ ∑︀푛 )︀ ∩푖=1 lim 푊 (휋푖, ℋ휀) ∪ 푊 (휋푖, ℋ−휀) ⊂ 푉 ⟨푓⟩ + 퐼푖 ∩ 푄[푥1, . . . , 푥푛] . 휀 푖=1

6 Algorithm 1: IsolatedPoints

Input: A polynomial 푓 ∈ 푄[푥1, . . . , 푥푛] Output: A zero-dimensional parametrization P such that Z (ℋ) ⊂ 푍(P) and a set of boxes isolating Z (ℋ) 1 퐴 chosen randomly in 퐺퐿푛+1(푄) 퐴 2 P ← Candidates(푓 ) 3 휌 ← GetNormBound(P) 2 2 2 2 4 푔 ← 푥1 + ... + 푥푛 + 푥푛+1 − 휌 퐴 5 P, 퐵 ← IsIsolated(P, 푓 , 푔) 6 P, 퐵 ← Removes(P, 퐵, 푥푛+1) 퐴−1 퐴−1 7 P, 퐵 ← P , 퐵 8 return (P, 퐵)

We can compute the algebraic set on the right-hand side as follows:

1. For each 1 ≤ 푖 ≤ 푛, compute a set 퐺푖 of generators of the ideal 퐼푖 ∩ 푄[푥1, . . . , 푥푛].

2. Compute a zero-dimensional parametrization P of the set of polynomials {푓} ∪ 퐺1 ∪ ... ∪ 퐺푛.

Such computations mimic those in [24]. The complexity of this algorithm of course depends on the algebraic elimination procedure we use. For the complexity analysis in Section 4, we employ the geometric resolution [14]. It basically consists in computing a one-dimensional parametrization of the curve defined by 퐼푖 and next computes a zero-dimensional parametrization of the finite set obtained by intersecting this curve with the hypersurface defined by 푓 = 0. We call ParametricCurve a subroutine that, taking the polynomial 푓 and 1 ≤ 푖 ≤ 푛, computes a one-dimensional parametrization G푖 of the curve defined above. Also, let IntersectCurve be a subroutine that, given a one-dimensional rational parametrization G푖 and 푓, outputs a zero-dimensional parametrization P푖 of their intersection. Finally, we use a subroutine Intersection that, from the parametrizations P푖’s, computes a zero-dimensional 푛 parametrization of ∩푖=1푍(P푖).

Algorithm 2: Algorithm Candidates

Input: The polynomial 푓 ∈ 푄[푥1, . . . , 푥푛] Output: A zero-dimensional parametrization P 1 for 1 ≤ 푖 ≤ 푛 do 2 G푖 ← ParametricCurve(푔, 푖) 3 P푖 ← IntersectCurve(G푖, 푔) 4 end 5 P ← Intersection(P1,..., P푛) 6 return P

3.3 Description of IsIsolated

This subsection is devoted to the subroutine IsIsolated that identifies isolated points of ℋ퐴 ∩ 푅푛 among the candidates 푛 퐴 푍(P) ∩ 푅 computed in the previous subsection. We keep using 푓 to address 푓 . Let 풫 be the set {푥 = (푥1, . . . , 푥푛+1) ∈ 푛+1 푅 | (푥1, . . . , 푥푛) ∈ 푍(P), 푔(푥) = 0, 푥푛+1 ̸= 0}. 푛+1 For 푒 ∈ 푅, 풱푒 ∈ 퐶 denotes the algebraic set defined by 푓 = 푒 and 푔 = 0. We follow the idea mentioned in the end of Subsection 3.1, that is to replace the infinitesimal 휀 by a sufficiently small 푒 ∈ 푅 then adapt the results of Subsection 2.3 to 풱푒. 푛+1 By definition, 풱푒 ∩ 푅 is bounded for any 푒 ∈ 푅. Let 푡 be a new variable, 휋푥 :(푥, 푡) ↦→ 푥 and 휋푡 :(푥, 푡) ↦→ 푡. For a 푛+1 −1 semi-algebraic set 풮 ⊂ 푅 × 푅 in the coordinate (푥, 푡) and a subset ℐ of 푅, the notation 풮ℐ stands for the fiber 휋푡 (ℐ) ∩ 풮. Let 푛+1 풱푡 = {(푥, 푡) ∈ 푅 × 푅 | 푓(푥) = 푡, 푔(푥) = 0}. Note that 풱푡 is smooth. Recall that the set of critical values of the restriction of 휋푡 to 풱푡 is finite by the algebraic Sard’s theorem (see e.g., [28, Proposition B.2]). 푛+1 Since for 푒 ∈ 푅, the set 풱푒 ∩ 푅 is compact, the restriction of 휋푡 to 풱푡 is proper. Then, by Thom’s isotopy lemma [9], 휋푡 realizes a locally trivial fibration over any open connected subset of 푅 which does not intersect the set of critical values of the restriction of 휋푡 to 풱푡. Let 휂 ∈ 푅 such that the open set ] − 휂, 0[∪]0, 휂[ does not contain any critical value of the restriction of 휋푡 to the algebraic 푛+1 set 풱푡. Hence, 풱푒 is nonsingular for 푒 ∈] − 휂, 0[∪]0, 휂[, (풱푒 ∩ 푅 ) × (] − 휂, 0[∪]0, 휂[) is diffeomorphic to 풱푡,]−휂,0[∪]0,휂[.

We need to mention that 푊 (휋푖, ℋ푒) corresponds to the critical points of 휋푖 restricted to 풱푒 with non-zero 푥푛+1 coordinate. Further, we use 푊 (휋푖, 풱푒) to address those latter critical points.

7 Now, for 1 ≤ 푖 ≤ 푛, we define 풲푖 as the closure of

{︁ 푛+2 휕푓 휕푓 }︁ (푥, 푡) ∈ 푅 | (푥) ̸= 0, (푥) = 0 for 푗 ̸= 푖, 푥푛+1 ̸= 0 ∩ 풱푡. 휕푥푖 휕푥푗

휕푓 휕푓 Since 퐴 is assumed to be generically chosen, 풲푖 is either empty or one-equidimensional (because ⟨ℓ · − 1, ∀푗 ̸= 푖⟩ either 휕푥푖 휕푥푗 defines an empty set or a one-equidimensional algebraic set by [24]). This implies that the set of singular points of 풲푖 is finite.

By [18], the set of non-properness of the restriction of 휋푡 to 풲푖 is finite (this is the set of points 푦 such that for any closed interval 푈 −1 containing 푦, 휋푡 (푈) ∩ 풲푖 is not bounded). Using again [18], the restriction of 휋푡 to 풲푖 realizes a locally trivial fibration over any connected open subset which does not meet the union of the images by 휋푡 of the singular points of 풲푖, the set of non-properness, and ′ the set of critical values of the restriction of 휋푡 to 풲푖. We let 휂푖 be the minimum of the absolute values of the points in this union. ′ ′ We choose now 0 < 푒0 < min(휂, 휂1, . . . , 휂푛). We call SpecializationValue a subroutine that takes as input 푓 and 푔 and returns such a 푒0. Note that SpecializationValue is easily obtained from elimination algorithms solving polynomial systems (from which we can compute critical values) and from [26] to compute the set of non-properness of some map.

With 푒0 as above, we denote ℐ =] − 푒0, 0[∪]0, 푒0[. Let 풲푖,ℐ is semi-algebraically diffeomorphic to 풲푖,푒 × ℐ for every 푒 ∈ ℐ. As 풱푒 is nonsingular, the critical locus 푊 (휋푖, 풱푒) is guaranteed to be finite by the genericity of the change of variables 퐴 (hence 푛+1 풲푖,푒 is) and that 푊 (휋푖, 풱푒) ∩ 푅 coincides with 휋푥(풲푖,푒). Thus, the above diffeomorphism implies that, for any connected component 풞 of 풲푖,ℐ , 풞 is diffeomorphic to an open interval in 푅. Moreover, if 풞 is bounded, then 풞 ∖ 풞 contains exactly two points 2 2 which satisfy respectively 푓 = 0 and 푓 = 푒0. We now consider

{︁ 푛+1 휕푓 }︁ ℒ푖 = 푥 ∈ 푅 | 0 < 푓 < 푒0, 푔 = 0, = 0 for푗 ̸= 푖, 푥푛+1 ̸= 0 . 휕푥푗

{︁ 휕푓 휕푓 }︁ It is the intersection of the Zariski closure 풦푖 of the solution set to ̸= 0, = 0 for 푗 ̸= 푖, 푥푛+1 ̸= 0 with the semi-algebraic 휕푥푖 휕푥푗 set defined by 0 < 푓 < 푒0. Note that 풦푖 is either empty or one-equidimensional. As 풱푒 is nonsingular for 푒 ∈ ℐ, ℒ푖 and ℒ푗 are 푛+1 disjoint for 푖 ̸= 푗. Since the restriction of 휋푥 to 풱푡 is an isomorphism between the algebraic sets 풱푡 and 푅 with the inverse map 푥 ↦→ (푥, 푓(푥)), the properties of 풲ℐ mentioned above are transferred to its image ℒ푖 by the projection 휋푥.

Further, we consider a subroutine ParametricCurve which takes as input 푓 and 푖 ∈ [1, 푛] and returns a rational parametrization K푖 of 풦푖. Also, let Union be a subroutine that takes a family of rational parametrizations K1,..., K푛 to compute a rational parametrization 푛 encoding the union of the algebraic curves defined by the K푖’s. We denote by K the output of Union ; it encodes 풦 = ∪푖=1풦푖. We refer to [28, Appendix J.2] for these two subroutines.

Lemma 8 below establishes a well-defined notion of limit for a point 푥푒 ∈ 푊 (휋푖, 풱푒) ∪ 푊 (휋푖, 풱−푒) when 푒 tends to 0. 푛+1 Lemma 8. Let 푒0 and ℒ푖 be as above. For 푒 ∈]0, 푒0[ and 푥푒 ∈ (푊 (휋푖, 풱푒) ∪ 푊 (휋푖, 풱−푒)) ∩ 푅 , there exists a (unique) connected component 풞 of ℒ푖 containing 푥푒. If 풞 is bounded, let 푥 be the only point in 풞 satisfying 푓(푥) = 0, then 푥 ∈ 푛+1 lim휀(푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) ∩ 푅⟨휀⟩ . Thus, we set lim0 푥푒 = 푥. 2 2 Moreover, the extension ext(풞, 푅⟨휀⟩) contains exactly one point 푥휀 such that 푓(푥휀) = 휀 and lim휀 푥휀 = 푥.

푛+1 Proof. Since 푥푒 ∈ (푊 (휋푖, 풱푒) ∪ 푊 (휋푖, 풱−푒)) ∩ 푅 and 0 < 푒 < 푒0, we have 푥푒 ∈ ℒ푖, the existence of 풞 follows naturally. Let 푥 be the unique point of 풞 satisfying 푓 = 0. Then, the notion lim0 is well-defined. From the proof of [2, Theorem 12.43], we have that 푛+1 (︀ )︀ lim휀(푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) ∩ 푅⟨휀⟩ = 휋푥 풲(0,+∞) ∩ 푉 (푡) . (︀ )︀ As 휋푥 풲(0,+∞) ∩ 푉 (푡) is the set of points corresponding to 푓 = 0 of ℒ푖, we deduce that 푥 ∈ lim휀(푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) ∩ 푅⟨휀⟩푛+1.

Since the extension ext(풞, 푅⟨휀⟩) is a connected component of ext(ℒ푖, 푅⟨휀⟩) and homeomorphic to an open interval in 푅⟨휀⟩, there 2 2 2 2 exists 푥휀 ∈ ext(풞, 푅⟨휀⟩) such that 푓(푥휀) = 휀 . Moreover, since 0 = lim휀 푓(푥휀) = 푓(lim휀 푥휀) and 푥 is the only point in 풞 satisfying 푓 = 0, we conclude that lim휀 푥휀 = 푥.

푛+1 Now, let ℛ푒 be a roadmap associated to the algebraic set 풱푒 ∪ 풱−푒, i.e. ℛ푒 is contained in (풱푒 ∪ 풱−푒) ∩ 푅 , of at most dimension 푛+1 one and has non-empty intersection with every connected component of (풱푒 ∪ 풱−푒) ∩ 푅 . We also require that ℛ푒 contains 푛 푛+1 ∪푖=1(푊 (휋푖, 풱푒) ∪ 푊 (휋푖, 풱−푒)) ∩ 푅 . The proposition below is the key to describe IsIsolated. 푛 Proposition 9. Given 푒 ∈]0, 푒0[ and ℐ =] − 푒0, 0[∪]0, 푒0[ as above. Let ℒ = ∪푖=1ℒ푖 and 푥 ∈ 풫. Then 푥 is not isolated in 푛+1 ′ ′ 풱 ∩ 푅 if and only if there exists 푥 ∈ 풫 such that 푥 and 푥 are connected in 풫 ∪ ℒ ∪ ℛ푒.

Proof. Assume first that 푥 is not isolated. By Proposition 7, there exists 1 ≤ 푖 ≤ 푛 and a connected component 풞휀 of (풱휀 ∪ 풱−휀) ∩ 푛+1 ′ 푅⟨휀⟩ , which is bounded over 푅, such that 풞휀 ∩ (푊 (휋푖, 풱휀) ∪ 푊 (휋푖, 풱−휀)) contains 푥휀 and 푥휀 satisfying 푥 = lim휀 푥휀 ̸= ′ lim휀 푥휀. By the choice of 푒0, there exist a diffeomorphism 휃 : 풱푡,ℐ → 풱푒 × ℐ such that 휃(풲푖,ℐ ) = 휃(풲푖,푒) × ℐ. Using [2, Exercise 3.2], ext(휃, 푅⟨휀⟩) is a diffeomorphism between:

ext(풱푡,ℐ , 푅⟨휀⟩) =∼ ext(풱푒, 푅⟨휀⟩) × ext(ℐ, 푅⟨휀⟩),

8 ext(풲푖,ℐ , 푅⟨휀⟩) =∼ ext(풲푖,푒, 푅⟨휀⟩) × ext(ℐ, 푅⟨휀⟩).

푛+1 푛+1 As 휋푥 is an isomorphism from 풱푡 to 푅 , there exists a (unique) bounded connected component 풞푒 of 풱푒 ∩ 푅 s.t. 풞휀 is ′ ′ diffeomorphic to ext(풞푒, 푅⟨휀⟩). Moreover, let 퐿 and 퐿 be the connected components of ext(ℒ푖, 푅⟨휀⟩) containing 푥휀 and 푥휀 ′ ′ respectively and 푥푒 and 푥푒 (∈ ext(풞푒, 푅⟨휀⟩)) be the intersections of ext(풞푒, 푅⟨휀⟩) with 퐿 and 퐿 respectively. Then, lim휀 푥휀 ′ ′ ′ ′ ′ (lim휀 퐿 ) connects lim휀 푥푒 (lim휀 푥푒) to 푥 (푥 ). As lim휀 푥푒 and lim휀 푥푒 are connected in 풞푒, we conclude that 푥 and 푥 are also connected in 풫 ∪ ℒ ∪ ℛ푒. The reverse implication is immediate using the above techniques

From Lemma 8 and Proposition 9, any 푒 lying in the interval ]0, 푒0[ defined above can be used to replace the infinitesimal 휀. So, we {︁ 휕푓 }︁ simply take 푒 = 푒0/2. For 1 ≤ 푖 ≤ 푛, we use a subroutine ZeroDimSolve which takes as input 푓 − 푒0/2, 푔, for all 푗 ̸= 푖 휕푥푗 to compute a zero-dimensional parametrization Q푖 such that 푊 (휋푖, 풱푒) = {푥 ∈ 푍(Q푖)|푥푛+1 ̸= 0}.

To use Proposition 9, we need to compute ℛ푒0/2, which we refer to the algorithm Roadmap in [28]. This algorithm allows us to 푛+1 compute roadmaps for smooth and bounded real algebraic sets, which is indeed the case of (풱푒0/2 ∪ 풱−푒0/2) ∩ 푅 . First, we call (another) Union that, on the zero-dimensional parametrizations Q푖, it computes a zero-dimensional parametrization Q encoding 푛 ∪푖=1푍(Q푖). Given the polynomials 푓, 푔, the value 푒0/2 and the parametrization Q, a combination of Union and Roadmap returns

a one-dimensional parametrization R representing ℛ푒0/2.

Deciding connectivity over 풫 ∪ ℒ ∪ ℛ푒 is done as follows. We use Union to compute a rational parametrization S encoding 풦 ∪ ℛ푒. Then, with input S, P, 푥푛+1 ̸= 0 and the inequalities 0 < 푓 < 푒0, we use Newton Puiseux expansions and cylindrical algebraic decomposition (see [10, 30]) following [27], taking advantage of the fact that polynomials involved in rational parametrizations of algebraic curves are bivariate. We denote by ConnectivityQuery the subroutine that takes those inputs and returns P and isolating boxes of the points defined by P which are not connected to other points of P.

Algorithm 3: IsIsolated 퐴 Input: The polynomials 푓 ∈ 푄[푥1, . . . , 푥푛] and 푔 ∈ 푄[푥1, . . . , 푥푛+1] and the zero-dimensional parametrization P. Output: P with isolating boxes of the isolated points of 풱퐴 ∩ 푅푛+1 퐴 1 푒0 ← SpecializationValue(푓 , 푔) 2 for 1 ≤ 푖 ≤ 푛 do (︁{︁ 퐴 휕푓 퐴 }︁)︁ 3 Q푖 ← ZeroDimSolve 푓 − 푒0/2, 푔, for all 푗 ̸= 푖 휕푥푗 퐴 4 K푖 ← ParametricCurve(푓 , 푖) 5 end 6 K ← Union(K1,..., K푛) 7 Q ← Union(Q1,..., Q푛) 퐴 퐴 8 R ← Union(RoadMap(푓 − 푒0/2, 푔, Q), RoadMap(푓 + 푒0/2, 푔, Q)) 9 S ← Union(K, R) 퐴 10 퐵 ← ConnectivityQuery(S, P, 푥푛+1 ̸= 0, 0 < 푓 < 푒0) 11 return (P, 퐵)

4 Complexity analysis

All complexity results are given in the number of arithmetic operations in 푄. Hereafter, we assume that a generic enough matrix 퐴 is found from a random choice. In order to end the proof of Theorem 1, we now estimate the arithmetic runtime of the calls to Candidates and IsIsolated.

퐴 ⟨ 퐴 휕푓 퐴 ⟩ Complexity of Algorithm 2 Since 푊 (휋푖, ℋ휀 ) is the finite algebraic set associated to 푓 − 푒, for all 푗 ̸= 푖 , its degree 휕푥푗 is bounded by 푑(푑 − 1)푛 [17]. Consequently, the degree of the output zero-dimensional parametrization lies in 푑푂(푛). Using [24, Theorem 6] (which is based on the geometric resolution algorithm in [14]), it is computed within 푑푂(푛) arithmetic operations in 푄. The last step which takes intersections is done using the algorithm in [28, Appendix J.1] ; it does not change the asymptotic complexity. We have seen that GetNormBound reduces to isolate the real roots of a zero-dimensional parametrization of degree 푑푂(푛). This can be done within 푑푂(푛) operations by Uspensky’s algorithm [23].

Complexity of Algorithm 3 Each call to SpecializationValue reduces to computing critical values of 휋푖 of a smooth algebraic set defined by polynomials of degree ≤ 푑. This is done using (푛푑)푂(푛) arithmetic operations in 푄 (see [15]). Using [14] for

9 ZeroDimSolve and [29] for ParametricCurve does not increase the overall complexity. The loop is performed 푛 times ; hence the complexity lies in (푛푑)푂(푛). All output zero-dimensional parametrizations have degree bounded by 푑푂(푛). Running Union on these parametrizations does not increase the asymptotic complexity. One gets then parametrizations of degree bounded by 푛푑푂(푛). Finally, using [28] for Roadmap uses (푛푑)푂(푛 log(푛)) arithmetic operations in 푄 and outputs a rational parametrization of degree lying in (푛푑)푂(푛 log(푛)). The call to ConnectivityQuery, done as explained in [27] is polynomial in the degree of the roadmap. The final steps which consist in calling Removes and undoing the change of variables does not change the asymptotic complexity. Summing up altogether the above complexity estimates, one obtains an algorithm using (푛푑)푂(푛 log(푛)) arithmetics operations in 푄 at most. This ends the proof of Theorem 1. 5 Experimental results

We report on practical performances of our algorithm. Computations were done on an Intel(R) Xeon(R) CPU E3-1505M v6 @ 3.00GHz with 32GB of RAM. We take sums of squares of 푛 random dense quadrics in 푛 variables (with a non-empty intersection over 푅) ; we obtain dense quartics defining a finite set of points. Timings are given in seconds (s.), minutes (m.), hours (h.) and days (d.).

We used Faugère’s FGB library for computing Gröbner bases in order to perform algebraic elimination in Algorithms 1, 2 and 3. We also used our C implementation for bivariate polynomial system solving (based on resultant computations) which we need to analyze connectivity queries in roadmaps. Timings for Algorithm 2 are given in the column CAND below. Timings for the computation of the roadmaps are given in the column RMP and timings for the analysis of connectivity queries are given in the column QRI below. Roadmaps are obtained as the union of critical loci of some maps in slices of the input variety [28]. We report on the highest degree of these critical loci in the column SRMP. The column SQRI reports on the maximum degree of the bivariate zero-dimensional system we need to study to analyze connectivity queries on the roadmap. None of the examples we considered could be tackled using the implementations of Cylindrical Algebraic Decomposition algorithms in Maple and Mathematica.

We also implemented [2, Alg. 12.16] using the FLINT C library with evaluation/interpolation techniques instead to tackle coefficients involving infinitesimals. This algorithm only computes sample points per connected components. That implementation was not able to compute sample points of the input quartics for any of our examples. We then report in the column [BPR] on the degree of the zero-dimensional system which is expected to be solved by [2, BPR]. This is to be compared with columns SRMP and SQRI.

푛 CANDRMPQRI total SRMPSQRI [BPR] 4 2 s. 15 s. 33 s. 50 s. 36 359 7290 5 < 10 min. 1h. 7h. 8 h. 108 4644 65 610 6 < 12ℎ 2 d. 18 d. 20 d. 308 47952 590 490

References

[1] ARNON, D. S. A cluster-based cylindrical algebraic decomposition algorithm. J. Symb. Comput. 5, 1/2 (1988), 189–212. [2] BASU,S.,POLLACK,R., AND ROY, M.-F. Algorithms in Real Algebraic Geometry (Algorithms and Computation in Mathematics). Springer-Verlag, 2006. [3] BASU,S., AND ROY,M. Divide and conquer roadmap for algebraic sets. Discrete & Computational Geometry 52, 2 (2014), 278–343. [4] BASU,S.,ROY,M.,SAFEY EL DIN,M., AND SCHOST,É. A baby step-giant step roadmap algorithm for general algebraic sets. Foundations of Computational Mathematics 14, 6 (2014), 1117–1172. [5] BORCEA,C., AND STREINU, I. Geometric auxetics. Proc. R. Soc. Lond., A, Math. Phys. Eng. Sci. 471, 2184 (2015), 24. [6] BORCEA,C.S., AND STREINU, I. Periodic auxetics: structure and design. Q. J. Mech. Appl. Math. 71, 2 (2018), 125–138. [7] COLLINS,G.E. Quantifier elimination for real closed fields by cylindrical algebraic decomposition: a synopsis. ACM SIGSAM Bulletin 10, 1 (1976), 10–12. [8] CONNELLY,R., AND WHITELEY, W. The stability of tensegrity frameworks. International Journal of Space Structures 7, 2 (1992), 153–163. [9] COSTE,M., AND SHIOTA,M. Thom’s first isotopy lemma: a semialgebraic version, with uniform bounds. RIMS Kokyuroku 815 (1992), 176–189. [10] DUVAL, D. Rational puiseux expansions. Compositio Mathematica 70, 2 (1989), 119–154. [11] GASPAR,N.,REN,X.,SMITH,C.,GRIMA,J., AND EVANS,K. Novel honeycombs with auxetic behaviour. Acta Materialia 53, 8 (2005), 2439 – 2445. [12] GIANNI, P. M., AND MORA, T. Algebraic solution of systems of polynomial equations using Gröebner bases. In Applied Algebra, Algebraic Algorithms and Error-Correcting Codes, 5th International Conference, AAECC-5, Menorca, Spain, Proceedings (1987), pp. 247–257.

10 [13] GIUSTI,M.,HEINTZ,J.,MORAIS,J.E., AND PARDO,L.M. When polynomial equation systems can be "solved" fast? In Applied Algebra, Algebraic Algorithms and Error-Correcting Codes, 11th International Symposium, AAECC-11, Paris, France, Proceedings (1995), pp. 205–231. [14] GIUSTI,M.,LECERF,G., AND SALVY,B. A Gröbner free alternative for polynomial system solving. Journal of Complexity 17, 1 (2001), 154 – 211. [15] GREUET,A., AND SAFEY EL DIN,M. Probabilistic algorithm for polynomial optimization over a real algebraic set. SIAM Journal on Optimization 24, 3 (2014). [16] GRIMA,J.N., AND EVANS,K.E. Auxetic behavior from rotating triangles. Journal of Materials Science 41, 10 (May 2006), 3193–3196. [17] HEINTZ,J. Definability and fast quantifier elimination in algebraically closed fields. Theor. Comput. Sci. 24 (1983), 239–277. [18] JELONEK,Z., AND KURDYKA,K. Quantitative generalized Bertini-Sard theorem for smooth affine varieties. Discrete & Computational Geometry 34, 4 (2005), 659–678. [19] KRONECKER,L. Grundzüge einer arithmetischen theorie der algebraischen grössen. Journal für die reine und angewandte Mathematik 92 (1882), 1–122. [20] LAKES, R. Foam structures with a negative poisson’s ratio. Science 235, 4792 (1987), 1038–1040. [21] ROTH,B., AND WHITELEY, W. Tensegrity frameworks. Trans. Am. Math. Soc. 265 (1981), 419–446. [22] ROUILLIER, F., ROY,M., AND SAFEY EL DIN,M. Finding at least one point in each connected component of a real algebraic set defined by a single equation. J. Complexity 16, 4 (2000), 716–750. [23] ROUILLIER, F., AND ZIMMERMANN, P. Efficient isolation of polynomial’s real roots. Journal of Computational and Applied Mathematics 162, 1 (2004), 33–50. [24] SAFEY EL DIN,M. Computing Sampling Points on a Singular Real Hypersurface using Lagrange’s System. Research Report RR-5464, INRIA, 2005. [25] SAFEY EL DIN,M., AND SCHOST,E. Polar varieties and computation of one point in each connected component of a smooth real algebraic set. In Proc. of the 2003 Int. Symp. on Symb. and Alg. Comp. (2003), ISSAC ’03, ACM, p. 224–231. [26] SAFEY EL DIN,M., AND SCHOST,É. Properness defects of projections and computation of at least one point in each connected component of a real algebraic set. Discrete & Computational Geometry 32, 3 (2004), 417–430. [27] SAFEY EL DIN,M., AND SCHOST,É. A baby steps/giant steps probabilistic algorithm for computing roadmaps in smooth bounded real hypersurface. Discrete & Computational Geometry 45, 1 (2011), 181–220. [28] SAFEY EL DIN,M., AND SCHOST,É. A nearly optimal algorithm for deciding connectivity queries in smooth and bounded real algebraic sets. J. ACM 63, 6 (Jan. 2017), 48:1–48:37. [29] SCHOST,É. Computing parametric geometric resolutions. Applicable Algebra in Engineering, Communication and Computing 13, 5 (2003), 349–393. [30] SCHWARTZ, J. T., AND SHARIR,M. On the “piano movers” problem. II. general techniques for computing topological properties of real algebraic manifolds. Advances in Applied Mathematics 4, 3 (1983), 298 – 351. [31] VOROBJOV,N. Complexity of computing the local dimension of a semialgebraic set. Journal of Symbolic Computation 27, 6 (1999), 565–579. [32] YANG, W., LI,Z.-M.,SHI, W., AND XIE,B.-H. Review on auxetic materials. Journal of Materials Science 39 (2004), 3269–3279.

11