Expressing the box cone radius in the relational calculus with real polynomial constraints

Discrete & Computational Geometry, Jul 2003

Floris Geerts

A PDF file should load here. If you do not see its contents the file may be temporarily unavailable at the journal website or you do not have a PDF plug-in installed and enabled in your browser.

Alternatively, you can download the file locally and open with any standalone PDF reader:

https://link.springer.com/content/pdf/10.1007%2Fs00454-003-0770-2.pdf

Expressing the box cone radius in the relational calculus with real polynomial constraints

Discrete Comput Geom Geometry Discrete & Computational Floris Geerts 0 0 Department WNI, University of Limburg (LUC) , B-3590, Diepenbeek , Belgium We show that there is a query expressible in first-order logic over the reals that returns, on any given semi-algebraic set A, for every point, a radius around which A is conical in every small enough box. We obtain this result by combining results from differential topology and real algebraic geometry, with recent algorithmic results by Rannou. 1. Introduction The framework of constraint databases, introduced by Kanellakis et al. [ 13 ], provides a nice theoretical model for spatial databases [ 19 ]. A spatial dataset is modeled using real polynomial inequality constraints; such sets are also known as semi-algebraic sets [ 1 ], [ 4 ]. The relational calculus (first-order logic) with real polynomial constraints then serves as a basic query language, denoted here by FO. The study of the expressive power of query languages for constraint databases is an active domain of research [ 18 ]. One of the problems in particular that received attention in recent years is that of determining the exact power of FO in expressing topological properties of spatial databases [ 3 ], [ 8 ], [ 11 ], [ 16 ], [ 21 ]. One such well-known property, which is central in this research, is that inside a small enough ball around each point, a semi-algebraic set has the topology of a cone. A radius at which this behavior shows is called a cone radius in the point for the set. In this paper we prove a stronger property of semi-algebraic sets. We prove that inside any box located around the center of and completely included in a small enough ball around each point, a semi-algebraic set has the topology of a cone. A radius at which this behavior shows is called a box cone radius in the point for the set. The existence of such a radius was already proven for semi-algebraic sets in R2, but the methods of the proof do not generalize to arbitrary dimensions [ 16 ]. Accordingly, a (box) cone radius query is a query that returns, for a semi-algebraic set A in n-dimensional space Rn, a set of pairs ( p, r ) giving for every point p a (box) cone radius r in p for A. In this paper we show that there exists an FO formula expressing a (box) cone radius query. Again, the (box) cone radius query was shown to be expressible in FO for semi-algebraic sets in R2, but the methods of the proof do not generalize to arbitrary dimensions [ 8 ]. Expressibility of the (box) cone radius, apart from being a natural question in itself, also has applications. Indeed, the expressive power of FO in expressing topological properties is rather limited. For example, topological connectivity is not expressible in FO [ 2 ]. Therefore, recursive extensions of FO have been studied in order to express more queries [ 12 ], [ 15 ], [ 17 ], [ 14 ], [ 7 ], [ 6 ]. In particular, the question whether topological connectivity is expressible in FO + TC, the extension of FO with a transitive closure operator [ 15 ], was raised. This question was first answered affirmatively for linear spatial databases in Rn [ 15 ]. Later, this result was extended to quadratic spatial databases in R2 [ 17 ], and then to arbitrary closed spatial databases in R2 [ 8 ]. This last result was obtained by expressing the cone radius query for closed spatial databases in FO. In our companion paper [ 9 ] it is shown that for arbitrary spatial databases in Rn, the expressibility of the box cone radius query implies that a piecewise linear spatial database can be constructed in FO + TC, which has the same topological properties as the original database. Hence, the question whether a spatial databases is connected, can be reduced to the question whether a linear spatial database is connected. Since this last question is expressible in FO + TC, topological connectivity of spatial databases in Rn is also expressible in FO + TC. More generally, using the expressibility of the box cone radius query, one can show that any computable topological query can be expressed in FO + TCS, a variant of FO + TC in which one can control the termination behavior of the transitive closure operator [ 9 ]. Again, this generalizes the result obtained for spatial databases in R2 [ 7 ]. 2. Preliminaries 2.1. Spatial Databases and Queries A semi-algebraic set in Rn is a finite union of sets definable by conditions of the form f1(x ) = f2(x ) = · · · = fk (x ) = 0, g1(x ) > 0, g2(x ) > 0, . . . , g (x ) > 0, with x = (x1, . . . , xn) ∈ Rn, and where f1(x ), . . . , fk (x ), g1(x ), . . . , g (x ) are multivariate polynomials in the variables x1, . . . , xn with real coefficients. A database schema S is a finite set of relation names, each with a given arity. A database over S assigns to each S ∈ S a semi-algebraic set S D in Rn if n is the arity of S. A k-ary query over S is a function mapping each database over S to a semi-algebraic set in Rk . As query language we use first-order logic (FO) over the vocabulary (+, ·, 0, 1, <) expanded with the relation names in S [ 18 ]. Let R be the model-theoretic structure R, +, ·, 0, 1, < . A formula ϕ(x1, . . . , xk ) expresses the k-ary query defined by ϕ(D) := {(a1, . . . , ak ) ∈ Rk | R, D |= ϕ(a1, . . . , ak )}, for any database D, where |= denotes the model-theoretic satisfaction relation. Note that ϕ(D) is always semi-algebraic because all relations in D are; indeed, by Tarski’s theorem [ 24 ], the relations that are first-order definable on the real ordered field are precisely the semi-algebraic sets. Example 1. The interior query is expressible in FO: Let S be a schema containing the relation name S. Consider the FO formula ϕint(x ) := (∃ε > 0)(∀x1) · · · (∀xn)( x − x < ε → S(x1, . . . , xn)). For any database D, ϕint(D) equals the interior of S D. However, not every query is first-order expressible: the query which asks whether a set is connected is not expressible in FO. This result and other results related to constraint databases have recently been collected in a single volume [ 18 ]. 2.2. Cones Let A ⊆ Rn be a semi-algebraic set and let p ∈ Rn be a point not in A. We define the cone with base A and top p as the union of all closed line segments between p and the points in A. We denote this set by Cone( A, p) := {t b + (1 − t ) p | b ∈ A, 0 ≤ t ≤ 1}. For a point p ∈ Rn and ε > 0, denote the closed ball centered at p with radius ε by Bn( p, ε), and denote the sphere centered at p with radius ε, by Sn−1( p, ε). We use the following notation: Let Rn be equipped with the standard Euclidean topology. Let X ⊆ Y ⊆ Rn, the closure of X with respect to the induced topology on Y is denoted by clY (X ), and intY (X ) indicates the interior of X with respect to the induced topology on Y . When the ambient space Y is Rn, we omit the subscript Y . We denote cl(X )\int(X ), the boundary of X , by bd(X ). Let X ⊆ Rn and Y ⊆ Rm . A function h: X → Y is called a homeomorphism if it is a bijection and both h and h−1 are continuous with respect to induced topology on X and Y . The following well-known theorem says that, locally around each point of A, a semialgebraic set A has the topology of a cone. Theorem [ 1 ], [ 4 ]. Let A ⊆ Rn be a semi-algebraic set and let p be a point of A. Then there is a real number ε > 0 such that there exists a homeomorphism h: A ∩ Bn( p, ε) → Cone( A ∩ Sn−1( p, ε), p). Any real number ε > 0 as in the lemma is called a cone radius of A in p. In this paper we prove the following theorem: Theorem 1. Let A ⊆ Rn be a semi-algebraic set and let p be a point of A. Then there is a real number ε > 0 such that for any box Box = [ p1 − b1, p1 + a1] × · · · × [ pn − bn, pn + an] ⊆ Bn( p, ε), there exists a homeomorphism h: A ∩ Box → Cone( A ∩ bd(Box), p). Any real number ε > 0 as in the theorem is called a box cone radius of A in p. In Section 3 we show that every box cone radius is a cone radius. However, the converse does not necessary hold as the following example shows: Example 2. Consider A = {(x , y) ∈ R2 | (0 ≤ x ≤ 1 ∧ 0 ≤ y ≤ 1 ∧ x 2 + (y − 1)2 = 1) ∨ (x = 1 ∧ 1 ≤ y ≤ 3)} and let p = (0, 0). On the left of Fig. 1 the set A together with three circles S1, S2, and S3 and two rectangles B1 and B2 are shown. On the right of Fig. 1 the corresponding cones can be seen. It is clear that the radius of S1 is not a cone radius of A in p (the cone is the empty set) and that the radius of both S2 and S3 is a cone radius of A in p. However, looking at the cone corresponding to B1, the radius of S2 is not a box cone radius of A in p (the cone is a two-dimensional set). The radius of S3 is a box radius of A in p as can be seen from the cone corresponding to B2. Let S be a schema containing a relation name S of arity n. A (box) cone radius query Qradius is a query which maps any database D over S to a set of pairs ( p, r ) ∈ Rn × R such that for every point p ∈ S D there exists at least one pair ( p, r ) ∈ Qradius(D), and for every ( p, r ) ∈ Qradius(D), r is a (box) cone radius in p for S D. Our second result is the following: Theorem 2. There exists an FO-expressible box cone radius query. 2.3. C 1-Whitney Decomposition In this section we construct a C 1-Whitney decomposition of a semi-algebraic set A and show that this construction is expressible in FO. The construction consists of several steps. Firstly, A is decomposed in parts which are C 1-smooth, resulting in the C 1-decomposition Expressing the Box Cone Radius in the Relational Calculus with Real Polynomial Constraints 611 of A. Secondly, the decomposition is refined such that all points in a single part have the same local topological type. This gives the C 1-Whitney decomposition of A. Finally, this decomposition is made compatible with a finite number of specified sets. Before giving the formal definition of a C 1-decomposition, we give an example. Example 3. Consider the semi-algebraic set A = {(x , y) ∈ R2 | (y > |x |) ∨ (y = −x ∧ y ≥ 0)} which is depicted in Fig. 2. We first look at those points where A has no tangent space. It is clear that A has no tangent space in the origin. However, if we decompose A into {(x , y) ∈ R2 | (y > |x |) ∨ (y = −x ∧ y > 0)} and {(0, 0)}, then both parts have a tangent space in any of its points. We then decompose these parts according to their dimension: let A2 be the two-dimensional part {(x , y) ∈ R2 | y > |x |}, let A1 be the one-dimensional part {(x , y) ∈ R2 | (y = −x ∧ y > 0)}, and finally let A0 be the zero-dimensional part {(0, 0)}. The sets A0, A1, A2 will form the C 1-decomposition of A. The following definitions are taken from [ 20 ]. Let A be a semi-algebraic set in Rn. The secants limit set of A in a point p ∈ A is defined as the set limsecp A := cl({λ(u − v) ∈ Rn | λ ∈ R and u, v ∈ A ∩ Bn( p, η)}). η>0 If limsecp A is a vector space (this is true when for all s, t ∈ limsecp A, the sum s + t is also an element of limsecp A), then we define the tangent space of A in p as Tp A := p + limsecp A. If limsecp A is not a vector space, the tangent space of A in p is undefined. The set A is C 1-smooth in p if and only if Tp A exists and there exist a neighborhood U of p such that the orthogonal projection of A ∩ U on Tp A is bijective. A set is C 1-smooth if it is C 1-smooth in all its points. We define the set Smoothk ( A) = {x ∈ Rn | A is C 1-smooth in x and of dimension k}. We can now decompose [ 26 ], [ 22 ] A into at most n + 1 nonempty C 1-smooth parts A0, . . . , An as follows: Define An = Smoothn( A). Suppose that An, . . . , Ak+1 is already constructed. Then define Ak = Smoothk A\ n i=k+1 Ai . (1) The sets A0, . . . , An are called the C 1-decomposition of A. F. Geerts Let S be a database schema containing a relation name S of arity n. For each k ≥ 0, define the query Qk-smooth as Qk-smooth(D) := Smoothk (S D) for any database D over S. By the constructions given by Rannou [ 20 ], the following is readily verified: Proposition 1. Let S be a database schema containing a relation name S of arity n. For each 0 ≤ k ≤ n the query Qk-smooth is expressible in FO. The following example motivates the construction of the C 1-Whitney decomposition. Example 4. Let A = {(x , y, z) ∈ R3 | x 2 − zy2 = 0}. This set is known as the Whitney umbrella and is depicted in Fig. 3. The C 1-decomposition of A consists of two nonempty sets A2 = Smooth2( A) = {(x , y, z) ∈ R3 | x 2 − zy2 = 0 ∧ ¬(x = 0 ∧ y = 0)} and A1 = Smooth1( A) = {(x , y, z) ∈ R3 | x = 0 ∧ y = 0}. However, the local topological type changes when one looks at points in A1 with z < 0, z = 0, and z > 0. On the contrary, any two points in A2 have the same local topological type. For this reason, one aAg12re=es {t(ox s,pyl,itz)up∈thRe3se|txA=1in0to∧ Ay11==0{(∧x ,z y>,z)0}∈, aRnd3 |A0x == {0(x∧, yy, z=) ∈0 ∧R3z |<x 0=}, 0 ∧ y = 0 ∧ z = 0}. Then the sets A0, A1 1 1 ∪ A2, and A2 form a decomposition of A which is called the C 1-Whitney decomposition of A. To avoid such situations as that in Example 4, Whitney [ 27 ] introduced the following condition for C 1-smooth semi-algebraic sets X, Y ⊆ Rn and a point x ∈ X . One says that the triple (X, x , Y ) has the Whitney property when the following holds: if (xi ), (yi ) are sequences in X , Y , respectively, both converging to x , if the sequence of tangent spaces (Tyi Y ) converges to a subspace T ⊆ Rn, and if the sequence (−xi→yi ) of lines containing xi − yi converges to a line L ⊆ Rn, then L ⊆ T . One says that (X, Y ) has the Whitney property if (X, x , Y ) has the Whitney property for any point x ∈ X . We define the set Whitney(X, Y ) = {x ∈ Rn | X, Y are C 1-smooth, x ∈ X and (X, x , Y ) has the Whitney property}. Let S be a database schema containing two relation names S1 and S2 of arity n. Define the n-ary query, defined as QWhitney(D) := Whitney(S1D, S2D) for any database D over S. Expressing the Box Cone Radius in the Relational Calculus with Real Polynomial Constraints 613 Again, by constructions given by Rannou [ 20 ] the following is readily verified: Proposition 2. Let S be a database schema containing two relation names S1 and S2 of arity n. The n-ary query QWhitney is expressible in FO. We can decompose A into n + 1 C 1-smooth sets A0, . . . , An such that ( Ai , Aj ) has the Whitney property for every i < j . Indeed, let An := Smoothn( A). Now suppose An, . . . , Ak+1 have already been constructed. Part Ak is then constructed as follows: Rk := Smoothk A\ Ak := n i=k+1 n i=k+1 Ai , intRk (Whitney(Rk , Ri )). (2) (3) In (3) the interior is taken relative to the set Rk . As a result, the set Ak is still C 1-smooth because it is an open subset of the C 1-smooth set Rk . The sets A0, . . . , An are called the C 1-Whitney decomposition of A. A C 1-Whitney decomposition A0, . . . , An of A is called compatible with a finite set of semi-algebraic sets {B1, . . . , Bk } if for any of the Bi ’s, each connected component of the Ai ’s is either included in or disjoint with Bi . For reasons that will become clear in Section 3, we now construct a C 1-Whitney decomposition of cl( A) which is compatible with A and {x ∈ Rn | x1a1 p1, . . . , xnan pn} for each tuple (a1, . . . , an) ∈ {=, =}n. Example 5. Consider again the semi-algebraic set A = {(x , y) ∈ R2 | (y > |x |) ∨ (y = −x ∧ y ≥ 0)}. Let A2 = {(x , y) ∈ R2 | y > |x | > 0}, A1 = {(x , y) ∈ R2 | y = −x ∧ y > 0} ∪ {(x , y) ∈ R2 | y = x ∧ y > 0} ∪ {(x , y) ∈ R2 | x = 0 ∧ y > 0}, and A0 = {(0, 0)}. Then A0, A1, A2 is a C 1-Whitney decomposition of cl( A) compatible with A, {(0, 0)}, {(x , y) ∈ R2 | x = 0}, and {(x , y) ∈ R2 | y = 0}. This example is illustrated in Fig. 4. We now decompose cl( A) into n + 1 C 1-smooth parts A0, . . . , An such that ( Ai , Aj ) has the Whitney property for every i < j , and such that this decomposition is compatible with A and {x ∈ Rn | x1a1 p1, . . . , xnan pn} for each tuple (a1, . . . , an) ∈ {=, =}n. The following construction is an adaptation of the construction given by Shiota [22, Lemma I.2.2]. We define An = Smoothn( A). Now suppose that the parts An, . . . , Ak+1 have already been constructed. Then part Ak is constructed as follows. Define B0 = A, B1 = cl( A)\ A and for i = 0, 1 define Biσ1···σn := {x ∈ Bi | x1σ1 p1, . . . , xnσn pn}, with σ1, . . . , σn ∈ {<, =, >}. For each tuple σ = (σ1, . . . , σn) ∈ {<, =, >}n and i = 0, 1 construct Riσ,k := Smoothk Biσ\ n j=k+1 Wiσ,k := intRiσ,k (Whitney(Riσ,k , Aj )), n j=k+1 Aj ,  Aiσ,k := Wiσ,k \cl W1σ−i,k ∪  σ ∈{<,=,>}n σ =σ  (W0σ,k ∪ W1σ,k ) . (4) (5) (6) Then we define Akσ = A0σ,k ∪ A1σ,k and Ak := σ∈{<,=,>}n Akσ. Set Ak indeed has the desired properties: by (4) it is C 1-smooth and of dimension k, (5) guarantees that for all points in Ak , and for any j > k, ( Ak , Aj ) has the Whitney property, and (6) ensures that the connected components are either included in or disjoint with A and {x ∈ Rn | x1a1 p1, . . . , xnan pn} for each tuple (a1, . . . , an) ∈ {=, =}n. It is well known [ 26 ], [ 22 ] that the dimension of cl( A)\ nj=k Aj is strictly smaller than the dimension of cl( A)\ nj=k+1 Aj for i = 0, 1. Hence, the decomposition will consists of exactly n + 1 sets Ak , some of which may be empty. Let S be a database schema containing a relation name S of arity n. We define the nary query Qk-part(D) = (S D)k , with (S D)k the kth part of the decomposition constructed above for A = S D. A direct consequence of Propositions 1 and 2 is the following: Proposition 3. Let S be a database schema containing a relation name S of arity n. For each 0 ≤ k ≤ n, the n-ary query Qk-part is expressible in FO. 3. Expressing the Box Cone Radius in FO Before proving Theorem 1, we look again at Example 2. In this example it is clear what the local topology of A in p is. Indeed, A looks like a straight line locally around p. Hence, a radius ε will be a box cone radius if the boundary of any box around p in Bn( p, ε) intersects A in a single point. For this reason the radius of S2 is not a box cone radius (there is even a box whose boundary has a one-dimensional intersection!). Similarly, if ε is large and you take a very large box, the intersection of the boundary of this box with A will be empty. Also in this case, ε will not be a box cone radius. Expressing the Box Cone Radius in the Relational Calculus with Real Polynomial Constraints 615 Since the boundary of a box in R2 consists of horizontal and vertical line segments, it is sufficient to look at the intersection of those segments with A. The possible intersections are shown in Fig. 5. Only cases (b) and (e) deliver a single intersection point. In the proof of Theorem 1 we will identify the points in which the intersection behavior changes for the vertical or horizontal line segments. In Example 2 the vertical intersections change from the empty set to one point, when crossing the point (1, 3). Similarly, the horizontal intersections change from the empty set to a single point when crossing the horizontal line at x = 1. The points in which these changes occur will be the so-called critical points. These points correspond to zero-dimensional parts of the C 1-Whitney decomposition (like the point (1, 3)), or those points where there is a horizontal or vertical tangent space (like the points in {(x , y) ∈ R2 | x = 1 ∧ (1 ≤ y < 3)}). A radius ε will then be a box cone radius when B2( p, ε) does not contain any critical points. The critical point closest to p is the point (1, 1), hence any radius smaller than 1 will be a box cone radius. We will formalize the above intuitive example and prove the first result of this paper. Theorem 1. [ pn − bn, pn + an] ⊆ Bn( p, ε), there exists a homeomorphism is a real number ε > 0 such that for any box Box = [ p1 − b1, p1 + a1] × · · · × Let A ⊆ Rn be a semi-algebraic set and let p be a point of A. Then there h: A ∩ Box → Cone( A ∩ bd(Box), p). with fj−1(0) for any j = 1, . . . , n. ( pn − xn)2 and fn+1(x ) = ( p1 − x1)2 + · · · + ( pn − xn)2. Proof. Let A ⊆ Rn, p ∈ A, and let A0, . . . , An be the C 1-Whitney decomposi(a1, . . . , an) ∈ {=, =}n. Let x ∈ tion of cl( A) compatible with A and {x ∈ Rn and define f1(x ) = ( p1 − x1)2, . . . , fn(x ) = | x1a1 p1, . . . , xnan pn} for each tuple For each k = 0, . . . , n, any connected component of Ak is the disjoint union of connected components of Akσ with σ ∈ {<, =, >}n. Since the C 1-Whitney decomposition A0, . . . , An is compatible with { x ∈ | x1a1 p1, . . . , xnan pn} for each tuple (a1, . . . , an) ∈ {=, =}n, any connected component of Akσ is either included in or disjoint Rn Rn those indices j such that Aσ k ∩ fj−1(0) = ∅ . For each k = 1, . . . , n and any σ ∈ {<, =, >}n, we define Jkσ ⊆ {1, . . . , n + 1} as The theorem directly follows from the following two claims: Claim 1. If ε is a positive real number such that ( A0\{ p}) ∩ int(Bn( p, ε)) = ∅ (7) and, for each k = 1, . . . , n and any σ ∈ {<, =, >}n and j ∈ Jkσ, the restriction fj | ( Akσ ∩ int(Bn( p, ε))) −→ R has no critical points, then ε is a box cone radius in p for A. Here, the critical points of fj | X for some subset X ⊆ Rn, are the points x ∈ X where the differential mapping dx ( fj | X ): Tx X → R, defined by dx ( fj | X )(v1, . . . , vn) = ((∂( fj | X )/∂ x1)(x ), . . . , (∂( fj | X )/∂ xn)(x )) · (v1, . . . , vn), is not surjective. Claim 2. There exists a positive real number ε such that the conditions of the above claim hold. Proof of Claim 1. We equip each part Ak with the standard Riemannian metric , induced from Rk . Then for any C 1-function f on Ak , we can define the gradient vector field grad( f | Ak ). The value of grad( f | Ak ) in a point x is the unique vector in Tx Ak with the property grad( f | Ak )(x ), v = dx ( f | Ak )(v). Next, for each σ ∈ {<, =, >}n, we define the following continuous vector field on Aσ: k ξkσ = −grad( fn+1 | Akσ) j∈Jkσ\{n+1} |grad( fj | Akσ)|. Clearly, ξkσ(x ) = 0 if and only if x ∈ Akσ is a critical point of at least one of the fj | Akσ’s with j ∈ Jkσ. In Fig. 6 we have depicted the vector field ξ in case where A = R2 and p = 0. By conditions (7) and (8), ε > 0 is such that within int(Bn( p, ε)) no critical points occur. Hence, ξkσ(x )( fj ) < 0 for x ∈ Akσ ∩ int(Bn( p, ε)) and each j ∈ Jkσ. (Here, we take the alternative view of tangent vectors where the vector ξkσ(x ) is seen as a function which maps real-valued functions on Akσ to a real number [5, Chapter 8].) Since parts A1, . . . , An are C 1-manifolds, we can clearly obtain a continuous flow on each part Aiσ by integrating the continuous vector field ξkσ. In general, however, we cannot expect to obtain a continuous flow on the set cl( A) by just putting the flows (8) Expressing the Box Cone Radius in the Relational Calculus with Real Polynomial Constraints 617 together. Therefore the vector fields ξkσ will be transformed into vector fields ηkσ which are controlled along the boundary of each part. Integrating these new vector fields and putting the flows together then results in a continuous flow on cl( A) [ 10 ]. Technically, the controlled vectors field ηkσ are constructed inductively on the dimension of the parts by means of a C 1-controlled tube system for the C 1-Whitney decomposition A1, . . . , An [ 23 ], [22, Lemmas I.1.3 and I.1.5]. Moreover, these vector fields can be chosen such that they also satisfy ηkσ(x )( fj ) < 0 for x ∈ Akσ ∩ int(Bn( p, ε)) and j ∈ Jkσ. Since cl( A) ∩ int(Bn( p, ε)) is locally closed, the vector fields ηkσ admit a continuous flow θiσ which nicely fit together into a continuous flow on cl( A) ∩ int (Bn( p, ε)) [22, Lemma I.1.6]. Let Box = [ p1 − b1, p1 + a1] × · · · × [ pn − bn, pn + an] ⊆ int(Bn( p, ε)). We will show that the flow induces the required homeomorphism between A ∩ Box and Cone( A ∩ bd(Box), p), proving that ε is a box cone radius in p for A. The flow is the union of flows θkσ for k = 1, . . . , n and σ ∈ {<, =, >}n. Each individual flow θkσ can be chosen to be the continuous map R × ( Akσ ∩ int(Bn( p, ε))) → Aσ k ∩ int(Bn( p, ε)), which is the unique solution of d dt θkσ(t, x ) = ηkσ(x ) k ∩ int(Bn( p, ε)) and initial condition θkσ(0, x ) = x for x ∈ Akσ ∩ bd(Box). for x ∈ Aσ Since ηkσ(x )( fj ) < 0 for j ∈ Jkσ, we have that | pj − (θkσ(t1, x ))j | > | pj − (θkσ(t2, x ))j | for any t1 < t2, (9) for all j ∈ Jkσ. This means that the coordinates of the integral curves γx : t → θkσ(t, x ) are either monotone decreasing for increasing values of t , or equal to pj for some j . For each t ∈ (0, 1], define the box Boxt = [ p1 − t b1, p1 + t a1] × · · · × [ pn − t bn, pn + t an] and the mapping (illustrated in Fig. 7) (hkσ)t : Aσ k ∩ bd(Box) → ( Akσ ∩ bd(Boxt ))\{ p}, x → γx ∩ bd(Boxt ). We now define ht : cl( A) ∩ bd(Box) → cl( A) ∩ bd(Boxt ) by ht (x ) = (hkσ)t (x ), where k and σ are the unique indices such that x ∈ Akσ, and show that it is a homeomorphism for each t ∈ (0, 1]. It suffices to prove that each (hkσ)t is a function, since bijectivity and continuity follow directly from the properties of flows of vector fields [ 10 ]. Firstly, for each x ∈ Aσ k ∩ bd(Boxt ) such that k ∩ bd(Box) there exists a point y ∈ Aσ (hkσ)t (x ) = y. Indeed, it follows from property (9) that limt →+∞ θkσ(t , x ) = p, and, hence, the curve γx must have an intersection with bd(Boxt ). Secondly, suppose that for an x ∈ Aσ k ∩ bd(Box), (hkσ)t (x ) = {y1, y2}. By definition of (hkσ)t , this happens when θkσ(t1, x ) = y1 and θkσ(t2, x ) = y2, or, in other words, when the integral curve γx intersects bd(Boxt ) twice. Clearly, property (9) implies that y1 = y2. However, we show that this also is impossible. We give the argument for n = 2, the n-dimensional case being analogous. In this case, Boxt = [ p1 − t b1, p1 + t a1] × [ p2 − t b2, p2 + t a2]. By property (9), there exists a unique σ ∈ {<, =, >}2 such that θkσ(t, x ) ⊆ Boxtσ.1 Suppose that θkσ(t, x ) ⊆ Bt(>,>), the other cases being analogous. Hence, either 1. y1 = ( p1 + t a1, p2 + t a2); or 2. y1 = ( p1 + t a1, u) with p2 < u ≤ p2 + t a2; or 3. y1 = (v, p2 + t a2) with p1 < v ≤ p1 + t a1. Suppose that we are in the second case. Then y2 = (u , v ) with p1 < u < p1 + t a1 and p2 < v < u. Since y2 ∈ Boxt , v must be equal to p2 + t a2, but this is impossible since we have that p2 < v ≤ u ≤ p2 + t a2. Hence, (hkσ)t is a function. Next, we define the homeomorphism h1 := (0, 1] × (cl( A) ∩ bd(Box)) → cl( A) ∩ Box\{ p}, by h1(t, x ) := ht (x ). Since A0, . . . , An is compatible with A and the flows of which h1 is constructed preserve the connected components of the Ak ’s, the restriction h1−1 | (( A ∩ Box)\{ p}) will also be a homeomorphism between ( A ∩Box)\{ p} and (0, 1]×( A ∩bd(Box)). Since the cylinder (0, 1] × ( A ∩ bd(Box)) is homeomorphic to Cone( A ∩ bd(Box), p)\{ p}, e.g., by the homeomorphism h2(t, x ) := (1 − t ) p + t x , we obtain a homeomorphism h3 := h2 ◦ h1−1: ( A ∩ Box)\{ p} → Cone( A ∩ bd(Box), p)\{ p}. The homeomorphism h3 can be trivially extended to the point p, resulting in the desired homeomorphism h. Proof of Claim 2. We now observe that for each p there exists a positive real number ε > 0 such that both (7) and (8) are satisfied. Indeed, it is clear that the distance between p and A0\{ p} is strictly positive. Let ε0 be this distance. 1 Let X ⊆ Rn and σ ∈ {<, =, >}n. Then Xσ = {x ∈ X | x σ1 0, . . . , x σn 0}. Next, a critical value of fj | Akσ is the image by fj | Akσ of a critical point. The set of critical points of fj | Akσ is semi-algebraic and admits a C 1-cell decomposition C = {C1, . . . , Cm } such that fj | C is C 1 [ 25 ]. Sard’s theorem for C 1-mapping [ 28 ] implies that each fj | C attains only a finite number of values. Hence the image by fj | Akσ of the set of critical points is finite. This is true for every k = 1, . . . , n and every σ ∈ {<, =, >}n and j ∈ Jkσ. Denote by εσjk the minimal critical value of fj | Akσ. (If there are no critical values, k ∩ fj−1(0). However, this set εσjk = 1.) Note that εσjk can only be zero for points of Aσ implies that j ∈ Jkσ, which is impossible. Hence, any 0 < ε < min{ε0, εσjk /n | k = 1, . . . , n, σ ∈ {<, =, >}n, j ∈ Jkσ} is a good one. This concludes the proof of Theorem 1. Theorem 2. There exists an FO-expressible box cone radius query. Proof. Let S be a schema containing a relation name S of arity n, and let D be a database over S. By Claim 1, we can define the following cone radius query: Qradius(D) := {( p, r ) ∈ Rn × R | p ∈ S D and r ∈ (0, ε)}, where ε is such that conditions (7) and (8) are satisfied for the semi-algebraic set A = S D. Let us express this query in FO. We define the critical point query as Qcrit(D) := {( p, x ) ∈ Rn × Rn | x ∈ Q0-Whitney(D) or p ∈ S D and x ∈ Qk-Whitney(D) for a some k, fj (x ) = 0 and x is a critical point of fj | Qk-Whitney(D) for a certain j = 1, . . . , n + 1}. Claim. Let Z be a C 1 semi-algebraic set in Rn of dimension k. Then x ∈ Rn is a critical point of fj | Z if and only if the tangent space of Z is parallel to {(x1, . . . , xn) ∈ Rn | xj = 0}. Similarly, x ∈ Rn is a critical point of fn+1 | Z if and only if the tangent space of Z in x is orthogonal to p − x . Proof of Claim. We prove the claim for f = fn+1 = ( p1 − x1)2 + · · · + ( pn − xn)2, the other case being subcases. We compute the differential dx ( f | Z ) as follows: Locally around x , we may assume that the projection on the first k coordinates : Z → U ⊆ Rk is a homeomorphism. By definition of the differential, dx ( f | Z ) = (d(x1,...,xk)g) (d(x1,...,xk) −1)−1, where g = ( f | Z ) ◦ −1. By the C 1 Inverse Function Theorem, we may assume that −1: U → Z : (x1, . . . , xk ) → (x , . . . , xk , ϕk+1, . . . , ϕn), where ϕxii)(2x1+, . . .nj,=xkk+)1(aprej −C 1ϕ-jm(xa1p,p.in..g,s,xka)n)d2.hAennceelegm: eUnta→ry caRlc:u(lxa1ti,o.n. .sh,oxwk)s =that t hik=e1d(ipffie−rn j=k+1 ∂ϕj (x1, . . . , xk ) ( pj − xj ) ∂ xi ential of f | Z in x is the vector  dx ( f | Z ) = 2  ( pi − xi ) + (v1, . . . , vn) = Hence, the product Since d(x1,...,xk) −1 is an isomorphism between the tangent space T(x1,...,xk)U of U in the projection (x ), and the tangent space Tx Z of Z in x , any tangent vector (v1, . . . , vn) ∈ Tx Z is of the form (d(x1,...,xk) −1)(v1, . . . , vk ). More specifically, any tangent vector v ∈ Tx Z can be written as v1, . . . , vk , k ∂ϕk+1 (x1, . . . , xk )vi , . . . , k ∂ϕn (x1, . . . , xk )vi . i=1 ∂ xi i=1 ∂ xi ∧ n n j=1 k=1 k i=1 dx ( f | Z )v = 2 ( pi − xi )vi + 2 ( pj − xj ) n j=k+1 k ∂ϕj (x1, . . . , xk )vi i=1 ∂ xi is equal to 2 in=1(xi − pi )vi . This implies that the differential mapping dx ( f | Z ) is not surjective if and only if 2 in=1( pi − xi )vi = 0 for all tangent vectors v ∈ Tx Z . It is clear that this implies the claim. The proof of the theorem now continues as follows. The tangent space query Qtangent(D) := {(x , v) ∈ Rn × Rn | S D is C 1, x ∈ S D and v ∈ Tx S D} is expressible in FO [20, Lemma 2]. Because the orthogonality and parallelism of two vectors can be easily expressed in FO, the formula ϕcrit( p, x ) = (ϕ0-part(S)(x ) ∧ (x = p)) ∨ S( p) (∀vϕtangent(ϕj-part(S))(x , v) ∧ (xk = pk ) → ( pk − xk )vk = 0) ∨ ∀vϕtangent(ϕj-part(S))(x , v) ∧ (x = p) → ( p1 − x1)v1 + · · · + ( pn − xn)vn = 0 expresses Qcrit correctly by the above claim. Here, ϕj-part denotes an FO formula expressing Qj-part for j = 0, . . . , n, and ϕtangent is an FO formula expressing Qtangent. Let ϕval( p, r ) be the FO formula which expresses the query which returns the critical values of critical points given by Qcrit. By the above there exists a minimal critical value and any value smaller than this minimal value is a cone radius. We therefore conclude that the query expressed in FO as ϕradius( p, r ) := (∀r )(ϕval( p, r ) → r < r ) is a cone radius query, as desired. Theorem 3. There exists an FO-expressible cone radius query. Proof. The proof is the same as for Theorems 1 and 2, except that the constructed C 1-Whitney decomposition of cl( A) only needs to be compatible with A and only the critical points with respect to fn+1 must be considered. Corollary 1. Every box cone radius is a cone radius. Proof. This follows from the fact that the set of critical points identified in the proof of Theorem 1 is a superset of those identified in the proof of Theorem 3. Acknowledgments References The author thanks Jan Van den Bussche for many interesting discussions and critical remarks, which led to improvements in the presentation of the paper. The author also thanks Masahiro Shiota for his feedback on the construction of the vector fields in the proof of Theorem 1. 1. R. Benedetti and J.J. Risler. Real Algebraic and Semi-Algebraic Sets . Hermann, Paris, 1990 . 2. M. Benedikt , G. Dong , L. Libkin , and L. Wong , Relational expressive power of constraint query languages . Journal of the ACM , 45 ( 1 ): 1 - 34 , 1998 . 3. M. Benedikt , M. Grohe , L. Libkin , and L. Segoufin . Reachability and connectivity queries in constraint databases . In Proceedings of the 19th ACM Symposium on Principles of Database Systems , pages 104 - 115 . ACM Press, New York, 2000 . 4. J. Bochnak , M. Coste , and M.-F. Roy . Real Algebraic Geometry , volume 36 of Ergebenisse der Mathematik und ihrer Grenzgebiete. Springer-Verlag, Berlin, 1998 . 5. D. Gauld . Differential Topology: An Introduction , volume 72 of A Series of Monographs and Textbooks in Pure and Applied Mathematics. Marcel Dekker , New York, 1982 . 6. F. Geerts . Linear approximation of semi-algebraic spatial databases using transitive closure logic, in arbitrary dimension . In G. Ghelli and G. Grahne, editors, Proceedings of the 8th International Workshop on Databases and Programming Languages , volume 2397 of Lecture Notes in Computer Science, pages 182 - 197 . Springer-Verlag, Berlin, 2002 . 7. F. Geerts and B. Kuijpers . Linear approximation of planar spatial databases using transitive-closure logic . In Proceedings of the 19th ACM Symposium on Principles of Database Systems , pages 126 - 135 . ACM Press, New York, 2000 . 8. F. Geerts and B. Kuijpers . Expressing topological connectivity of spatial databases . In A. Mendelzon and R. Connor, editors, Research Issues in Structured and Semistructured Database Programming , volume 1949 of Lecture Notes in Computer Science , pages 224 - 238 . Springer-Verlag, Berlin, 2001 . 9. F. Geerts , B. Kuijpers , and J. Van den Bussche. Linearization and completeness results for terminating transitive closure queries on spatial databases . Submitted , 2002 . 10. C.G. Gibson , K. Wirthmu¨ller, A.A. du Plessis, and E.J.N. Looijenga . Topological Stability of Smooth Mappings , volume 552 of Lecture Notes in Mathematics. Springer-Verlag, Berlin, 1976 . 11. M. Grohe and L. Segoufin . On first-order topological queries . Transaction on Computational Logic , 3 ( 3 ): 336 - 358 , 2002 . 12. S. Grumbach and G. Kuper . Tractable recursion over geometric data . In G. Smolka, editor, Proceedings of the 3rd Conference on Principles and Practice of Constraint Programming , volume 1330 of Lecture Notes in Computer Science, pages 450 - 462 . Springer-Verlag, Berlin, 1997 . 13. P.C. Kanellakis , G.M. Kuper , and P.Z. Revesz . Constraint query languages . Journal of Computer and System Sciences , 51 ( 1 ): 26 - 52 , 1995 . 14. S. Kreutzer . Operational semantics for fixed-point logics on constraint databases . In R. Nieuwenhuis and A . Voronkov, editors, Proceedings of the 8th International Conference on Logic for Programming and Automated Reasoning , volume 2250 of Lecture Notes in Artificial Intelligence , pages 465 - 479 . SpringerVerlag, Berlin, 2002 . 15. B. Kuijpers , J. Paredaens , M. Smits , and J. Van den Bussche. Termination properties of spatial datalog . In D. Pedreschi and C. Zaniolo, editors, Logic in Databases (LID '96) , volume 1154 of Lecture Notes in Computer Science, pages 101 - 116 . Springer-Verlag, Berlin, 1996 . 16. B. Kuijpers , J. Paredaens , and J. Van den Bussche. Topological elementary equivalence of closed semialgebraic sets in the real plane . Journal of Symbolic Logic , 65 ( 4 ): 1530 - 1555 , 2000 . 17. B. Kuijpers and M. Smits . On expressing topological connectivity in spatial datalog . In V. Gaede , A. Brodsky , O. Gunter , D. Srivastava , V. Vianu , and M. Wallace, editors, Proceedings of the 2nd Workshop on Constraint Databases and Applications , volume 1191 of Lecture Notes in Computer Science, pages 116 - 133 . Springer-Verlag, Berlin, 1997 . 18. G.M. Kuper , J. Paredaens , and L. Libkin, editors. Constraint Databases . Springer-Verlag, Berlin, 2000 . 19. J. Paredaens , J. Van den Bussche, and D. Van Gucht . Towards a theory of spatial database queries . In Proceedings of the 13th ACM Symposium on Principles of Database Systems , pages 279 - 288 . ACM Press, New York, 1994 . 20. E. Rannou. The complexity of stratification computation . Discrete & Computational Geometry , 19 : 47 - 79 , 1998 . 21. L. Segoufin and V. Vianu . Querying spatial databases via topological invariants . Journal of Computer and System Sciences , 61 ( 2 ): 276 - 301 , 2000 . 22. M. Shiota . Geometry of Subanalytic and Semialgebraic Sets . Birkha¨user, Basel, 1997 . 23. M. Shiota . Personal communication. 24. L. van den Dries. Alfred Tarski's elimination theory for real closed fields . Journal of Symbolic Logic , 53 ( 1 ): 7 - 19 , 1988 . 25. L. van den Dries. Tame Topology and o-minimal Structures . Cambridge University Press, Cambridge, 1998 . 26. L. van den Dries and C. Miller . Geometric categories and o-minimal structures . Duke Mathematical Journal , 82 ( 2 ): 497 - 540 , 1996 . 27. H. Whitney . Local properties of analytic varieties. Differential and Combinatorial Topology. “A symposium in honor of Marston Morse ,” pages 205 - 244 . Princeton University Press, Princeton, NJ, 1965 . 28. A.J. Wilkie . A theorem of the complement and some new o-minimal structures . Selecta Mathematica , New Series, 5 : 397 - 421 , 1999 .


This is a preview of a remote PDF: https://link.springer.com/content/pdf/10.1007%2Fs00454-003-0770-2.pdf

Floris Geerts. Expressing the box cone radius in the relational calculus with real polynomial constraints, Discrete & Computational Geometry, 2003, 607-622, DOI: 10.1007/s00454-003-0770-2