text:
# Classes of Spatiotemporal Objects and Their Closure Properties

## 1 Introduction

Many natural or man-made phenomena have both a spatial and a temporal extent. Consider for example a forest fire, a meteorological event (e.g., the movement of clouds pressure areas), property histories in a city or the flight of an air plane. To store information about such phenomena in a database, appropriate data modeling constructs are needed.

In this paper, we introduce and discuss a general framework for specifying spatio-temporal data. Hereto, the new concept of spatio-temporal object is introduced. We represent a spatio-temporal object as a finite number of objects represented by means of a spatial reference object, a temporal object (i.e., a time interval) and a time-dependent geometric transformation that determines how this spatial object moves or changes through space during the considered time interval. Although this model is suited for data in arbitrary dimensions, we focus on two-dimensional reference objects that move or change during time.

In this framework, a number of classes of practically relevant spatio-temporal objects arise naturally. These classes are indexed by the type of spatial reference object and the type of transformation functions that are allowed. On the level of reference objects, we consider polygons, triangles, triangles with two sides parallel to the coordinate axes of the two-dimensional plane and rectangles with all sides parallel to the coordinate axes. We consider time-dependent affinities, scalings and translations for what concerns transformation functions. These functions can be expressed by rational, polynomial, respectively linear functions.

We investigate these classes with respect to closure under Boolean set operations, namely union, intersection and set-difference.

By definition, these classes are closed under union (a spatio-temporal object is described as the union of atomic objects). We call a class closed under intersection (respectively set-difference) if any finite intersection (respectively set-difference) of objects from a class can again be described by an object from that class (i.e., as a union of atomic objects). The classes that we consider are not necessarily closed under intersection and set-difference.

We provide an in-depth and exhaustive study of their closure with respect to all set-theoretic operations, and we conclude that our model for representing spatio-temporal data gives very poor closure results for the classes of objects we considered important for spatio-temporal practice. The only classes that seems to be useful in this respect have polygons as spatial reference objects and use rational affinities to move or change these objects in time.

A conclusion is that we have to enrich the data model by allowing set-theoretic operations other than union in the construction of geometric objects from atomic geometric objects. As soon as we also allow spatio-temporal objects to be constructed from atomic ones by means of union and intersection (or union and set-difference) then the model becomes closed for all Boolean set operations. Indeed, as an important result, we show that our classes, that are drawn from practice, have the nice property that they are closed under intersection if and only if they are closed under set-difference.

To appreciate the need for applying set-theoretic operators to spatiotemporal objects, consider the following scenario. Let two spatial objects represent the extents of the safe areas around two different ships. Taking into account the movement of ships, the extents of the safe areas over a period of time can be represented as two spatiotemporal objects. To avoid collisions, one needs to be able to determine the intersection of those objects.

The substantial literature on spatial and temporal databases does not provide much guidance in dealing with spatiotemporal phenomena. Spatial databases  deal with spatial objects (e.g., rectangles or polygons) and temporal databases  with temporal ones (e.g., time intervals). Their combination can handle discrete change  but not continuous change, which is required by applications dealing with phenomena like movement, natural disasters, or the growth of urban areas. In the latter applications, the temporal and spatial aspects cannot be conveniently separated.

Spatiotemporal data models and query languages are a topic of growing interest. The need to model both discrete and continuous change has been identified. The issue of closure under Boolean set operations has also received in this context a considerable attention. This is not surprising, since, for example, closure under intersection is essential for spatiotemporal join.

The paper  presents one of the first such models. However, it is only capable of modeling discrete change.

In  the authors define in an abstract way moving points and regions. Apart from moving points, no other classes of concrete, database-representable spatiotemporal objects are defined. In that approach continuous movement (but not growth or shrinking) can be modeled using linear interpolation functions. In the subsequent paper , the authors discuss a concrete, polyhedral representation of moving, growing and shrinking regions, which is applicable only to significantly restricted classes of spatiotemporal objects. This guarantees closure but eliminates the possibility of representing scaling and more general transformations. The results of the present paper shed some light on when similar concrete representations exist and when they do not.

In  the authors propose a formal spatiotemporal data model based on constraints in which, like in , only discrete change can be modeled. An SQL-based query language is also presented.

We have proposed elsewhere  a spatiotemporal data model based on parametric polygons: polygons whose vertices are defined using linear functions of time. This model is also capable of modeling continuous change but is not closed under intersection. A variation of this model restricted to rectangles but extended with periodic functions is given in . The latter model is closed under set theoretic operators, enabling the definition of an extended relational algebra query language, for which query evaluation can be done in PTIME in the size of the input spatiotemporal database. The closure properties for  and  seem analoguous to the closure properties of the framework presented in this paper, respectively, but the relationships among these frameworks needs to be further explored.

Both discrete and continuous change can be represented using constraint databases . Compared to the latter technology, our approach seems more constructive and amenable to implementation using standard database techniques. On the other hand, constraint databases do not suffer from the lack of closure under intersection. To some degree, it is due to the fact that the intersection of two generalized tuples in constraint databases need not immediately computed but rather the tuples may be only conjoined together. In most implementations of constraint databases  the “real” computation of the intersection occurs during projection or the presentation of the query result to the user. It is unclear whether such a strategy offers any computational advantages over the approach in which the intersections are computed immediately. In fact, recent work on spatial constraint databases  proposes extensions to relational algebra that require immediate computations of spatial object intersections. Also, our approach is potentially more general than constraint databases. For example, by moving beyond rational functions (but keeping the same basic framework) we can represent rotations with a fixed center. Finally, in our model it is easy to obtain any snapshot of a spatiotemporal object, making tasks like animation straightforward. It is not so in constraint databases where geometric representations of snapshots have to be explicitly constructed from constraints .

This paper is organized as follows: In Section 2, we give definitions and describe the relevant classes of spatio-temporal objects. The closure results for these classes with respect to Boolean set operations are given in Section 3. We propose the extended model in Section 4 and describe a normal form for objects in this extended model. Section 5 gives comments and concludes the paper.

## 2 Definitions and preliminaries

In this section, we define the notion of spatio-temporal object. In our approach, a spatio-temporal object consists of a spatial reference object, a time interval during which the spatio-temporal object exists and a continuous transformation that defines how the spatial reference object moves and changes during the interval of time.

### 2.1 Spatio-temporal and geometric objects

Let $`𝐑`$ be the set of real numbers and $`𝐑^2`$ be the $`2`$-dimensional real plane.

###### Definition 2.1

A spatial object is a subset of $`𝐑^2`$. A temporal object is a subset of $`𝐑`$ (we assume a single temporal dimension). A spatio-temporal object is a subset of $`𝐑^2\times 𝐑`$.  $``$$``$

These definitions are very general and disregard the fact that objects should be finitely representable in the computer’s memory. In this paper, we will study more restricted classes of spatial and spatio-temporal objects that are important from a practical point of view and have simple and efficient representations. Such classes have been identified in the course of spatial and spatio-temporal database research.

Here, we propose a geometric approach: a spatio-temporal object is defined as a spatial reference object together with a continuous transformation that defines how the object moves or changes during some time interval.

###### Definition 2.2

An atomic geometric object $`𝒪`$ is a triple $`(S,I,f)`$, where

* $`S𝐑^2`$ is the spatial reference object of $`𝒪`$, which is semi-algebraic111A semi-algebraic set in $`𝐑^d`$ is a Boolean combination of sets of the form $`\{(x_1,x_2,\mathrm{},x_d)p(x_1,x_2,\mathrm{},x_d)>0\}`$, where $`p`$ is a polynomial with integer coefficients in the real variables $`x_1`$, $`x_2`$, …, $`x_d`$. in $`𝐑^2`$;
* $`I𝐑`$ is the time domain of $`𝒪`$, which is a connected and bounded semi-algebraic set in $`𝐑`$ (i.e., a point or a bounded interval); and
* $`f:𝐑^2\times 𝐑𝐑^2`$ is the transformation function of $`𝒪`$, which is semi-algebraic222A function $`f`$ is said to be semi-algebraic if its graph is a semi-algebraic subset of $`(𝐑^2\times 𝐑)\times 𝐑^2`$. and continuous both in the time coordinate and in the spatial coordinates.

The semantics of an atomic geometric object $`𝒪=(S,I,f)`$ is the spatio-temporal object $`st(𝒪)=\{(x,y;t)𝐑^2\times 𝐑(x^{})(y^{})((x^{},y^{})StI(x,y)=f(x^{},y^{};t))\}.`$  $``$$``$

We remark that this definition guarantees that there is a finite representation of an atomic geometric object by means of the polynomial inequalities that describe its reference object, its time domain and the graph of its transformation function. This means that this data model is within the constraint model for databases (we refer to  for an overview of the research results in this area).

###### Definition 2.3

A geometric object is a finite set of atomic geometric objects. The semantics of a geometric object $`\{𝒪_1,\mathrm{},𝒪_n\}`$ is the union of the semantics of the atomic objects that constitute it, i.e., the set

$$\underset{1in}{}st(𝒪_i).$$

$``$$``$

We agree that whenever we write “the spatio-temporal object $`𝒪`$”, where $`𝒪`$ is an (atomic) geometric object, we mean the semantics of the (atomic) geometric object $`𝒪`$. Also, when $`𝒪=(S,I,f)`$ is an atomic object and $`tI`$, we will refer to the set $`\{(x,y)(x^{})(y^{})((x^{},y^{})S(x,y)=f(x^{},y^{},t))\}`$ as the frame of $`𝒪`$ at time $`t`$ and we will denote it $`f(S;t)`$.

We define the time domain of a geometric object to be the smallest time interval that contains all the time domains of the composing atomic geometric objects. Recall that the smallest interval containing a set of intervals is also known as the convex closure of this set. We denote the convex closure of the sets $`I_1`$, $`I_2`$, …, $`I_n`$ by $`\overline{}_{i=1}^nI_i`$.

Remark that a spatio-temporal object is empty (or non-existing) outside the time domain of the geometric object that defines it. Also, within its time domain a spatio-temporal object can be empty (for instance, at any moment when no atomic geometric object exists).

We conclude this section by remarking that the above introduced notions of spatial and spatio-temporal object and of (atomic) geometric object can be generalized to arbitrary dimension $`d`$ (by simply substituting $`d`$ for $`2`$ in the above definitions). Since all the results in this paper are formulated for dimension 2, we have chosen not to use this generalization here.

### 2.2 Practically relevant classes of geometric objects

Here, we define special classes of geometric objects that are relevant to spatio-temporal database practice. These classes are denoted by

$$𝒮,$$

and they are determined by the type $`𝒮`$ of spatial reference object and the type $``$ of transformation function. For clarity, a geometric object belongs to a class if all of its atomic geometric objects belong to that class.

The classes of geometric figures in the plane $`𝐑^2`$ that we will consider are

* $`𝒮_{\mathrm{Poly}}`$, the class of arbitrary polygons,
* $`𝒮_{\mathrm{Tr}}`$, the class of arbitrary triangles,
* $`𝒮_{\mathrm{TrAx}}`$, the class of triangles with two sides parallel to the coordinate axes, and
* $`𝒮_{\mathrm{Rect}}`$ the class of rectangles with all sides parallel to the coordinate axes.

In this paper, we assume triangles, polygons and rectangles to be filled objects. But since we allow two or more corner points of a triangle or rectangle to coincide, the model can deal with polylines and points too. A line segment and a point are considered triangles. Also line segments parallel to the axes and points are considered rectangles. Finally, note that $`𝒮_{\mathrm{Rect}}𝒮_{\mathrm{TrAx}}𝒮_{\mathrm{Tr}}𝒮_{\mathrm{Poly}}`$.

The classes of transformation functions we will consider are

* $`_{\mathrm{Aff}}`$, the class of the affine transformations,
* $`_{\mathrm{Sc}}`$, the class of the scalings,
* $`_{\mathrm{Trans}}`$, the class of the translations, and
* $`_{\mathrm{id}}`$, the class consisting of the identity mapping.

It is clear that $`_{\mathrm{id}}`$, $`_{\mathrm{Trans}}`$ and $`_{\mathrm{Sc}}`$ are subclasses of $`_{\mathrm{Aff}}`$. More technically, these classes are defined as follows. The class $`_{\mathrm{Aff}}`$ of affine transformations consists of the mappings $`𝐑^2\times 𝐑𝐑^2`$ of the form

$$(x,y;t)(\begin{array}{cc}a(t)& b(t)\\ c(t)& d(t)\end{array})(\begin{array}{c}x\\ y\end{array})+(\begin{array}{c}e(t)\\ f(t)\end{array}),$$

where $`a`$, $`b`$, $`c`$, $`d`$, $`e`$, and $`f`$ are function from $`𝐑`$ to $`𝐑`$ with $`a(t)d(t)c(t)b(t)0`$ for all $`t`$ in the relevant time domain.

The class $`_{\mathrm{Sc}}`$ of scalings consists of the affine transformations for which the functions $`b`$ and $`c`$ are identical to 0. The class $`_{\mathrm{Trans}}`$ consists of the scalings for which the functions $`a`$ and $`d`$ are identical to 1.

For practical purposes we will only consider functions $`a`$, $`b`$, $`c`$, $`d`$, $`e`$, and $`f`$ that are semi-algebraic and continuous as required by the definition. These are

* the rational functions (i.e., fractions of polynomial functions),
* the polynomial functions and
* the linear polynomial functions.

The corresponding classes of transformations will be denoted using superscripts $`^{\mathrm{Rat}}`$, $`^{\mathrm{Poly}}`$, and $`^{\mathrm{Lin}}`$. For example, $`_{\mathrm{Sc}}^{\mathrm{Rat}}`$ represents the class of rational scalings. We assume that the time domain of an atomic geometric object belongs to the domain of the transformation function and that the denominator of a rational function in the definition of a transformation is never zero in the closure of the time domain (thus, the moving figure will remain within fixed bounds during the time domain).

Note that the shape of a spatio-temporal object at a certain time instant is not necessarily the same as the shape of the reference object of the geometric object that gives rise to the spatio-temporal object. For example, a rectangle is mapped to a parallelogram under an affinity.

### 2.3 Example

Let $`𝒪_A=(S_A,I_A,f_A)`$ and $`𝒪_B=(S_B,I_B,f_B)`$ be two (atomic) geometric objects with spatial reference objects $`S_A`$ and $`S_B`$ respectively the triangles with corner points $`(1,0)`$, $`(1,0)`$, $`(0,1)`$ and $`(1,0)`$, $`(1,0)`$, $`(0,1)`$, and time domains $`I_A=I_B=[0,2]`$. In this time domain, $`S_A`$ remains at its place (i.e., $`f_A(x,y;t)=(x,y)`$ for all $`t`$), while $`S_B`$ is translated with constant speed (equal to 1) in the direction of the positive $`y`$-axis (i.e., $`f_B(x,y;t)=(x,y+t)`$. The functions $`f_A`$ and $`f_B`$ belong to $`_{\mathrm{Trans}}^{\mathrm{Lin}}`$.

At $`t=0`$ both objects intersect in a line segment. For $`0<t<1`$ they intersect in a hexagon, for $`1t<2`$ in a quadrangle, and finally for $`t=2`$ in a point.

## 3 Closure properties under Boolean set operations

In this section, we work with the classes $`𝒮,`$ introduced in the previous section, and we investigate which of these classes $`𝒮,`$ are closed under the Boolean set operations $``$ (union), $``$ (intersection) and $``$ (set difference). We first define what closure means.

###### Definition 3.1

Let $`\theta `$ be one of the operations $``$, $``$ or $``$. We say that the class $`𝒮,`$ is (atomically) closed under $`\theta `$ if for any two (atomic) geometric objects $`𝒪_1`$ and $`𝒪_2`$ in $`𝒮,`$ there exists a geometric object $`𝒪`$ in $`𝒮,`$ such that $`st(𝒪)=st(𝒪_1)𝜃st(𝒪_2)`$.  $``$$``$

We will refer to an object $`𝒪`$ that satisfies the condition in the definition as an intersection, union or difference of $`𝒪_1`$ and $`𝒪_2`$ (they need not be unique).

For the union operation, the closure follows immediately from the definition.

###### Property 3.1

For any class of objects $`𝒮`$ and any class of transformations $``$, $`𝒮,`$ is closed under $``$.  $``$$``$

For $``$ and $``$ the situation is more complicated. The next theorem is the main result that we want to prove in this section. It summarizes the closure results for intersection and set-difference.

###### Theorem 3.1

For any class of objects $`𝒮`$ among $`𝒮_{\mathrm{Poly}}`$, $`𝒮_{\mathrm{Tr}}`$, $`𝒮_{\mathrm{TrAx}}`$ and $`𝒮_{\mathrm{Rect}}`$ and any class of transformations $``$ among $`_{\mathrm{Aff}}`$, $`_{\mathrm{Sc}}`$, $`_{\mathrm{Trans}}`$ and $`_{\mathrm{id}}`$, the closure with respect to $``$ and $``$ is summarized in the following table.

| $``$, $``$ | $`_{\mathrm{Aff}}^{\mathrm{Rat}}`$ | $`_{\mathrm{Aff}}^{\mathrm{Poly}}`$ | $`_{\mathrm{Aff}}^{\mathrm{Lin}}`$ | $`_{\mathrm{Sc}}^{\mathrm{Rat}}`$ | $`_{\mathrm{Sc}}^{\mathrm{Poly}}`$ | $`_{\mathrm{Sc}}^{\mathrm{Lin}}`$ | $`_{\mathrm{Trans}}^{\mathrm{Rat}}`$ | $`_{\mathrm{Trans}}^{\mathrm{Poly}}`$ | $`_{\mathrm{Trans}}^{\mathrm{Lin}}`$ | $`_{\mathrm{id}}`$ |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| $`𝒮_{\mathrm{Poly}}`$ | $`+`$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $`+^{}`$ |
| $`𝒮_{\mathrm{Tr}}`$ | $`+`$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $`+^{}`$ |
| $`𝒮_{\mathrm{TrAx}}`$ | $`+`$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ | $``$ |
| $`𝒮_{\mathrm{Rect}}`$ | $`+`$ | $``$ | $``$ | $`+`$ | $`+`$ | $`+`$ | $``$ | $``$ | $``$ | $`+`$ |

Closure is indicated by a $`+`$ sign, non-closure by a $``$ sign.  $``$$``$

The items marked with $``$ are from .

The remainder of this section is devoted to proving this theorem. We do this by first proving some lemmas in a first subsection that reduce the number of cases that have to be looked at and by then proving the remaining cases in a second subsection.

### 3.1 Reduction properties

The properties in this section reduce the number of cases that have to be investigated. First, we give a set-theoretic lemma that will be used frequently.

###### Lemma 3.1

Let $`A_1,\mathrm{},A_n`$ and $`B_1,\mathrm{},B_m`$ be sets. Then

1. $`(_{i=1}^nA_i)(_{j=1}^mB_j)=_{i=1}^n_{j=1}^m(A_iB_j)`$,
2. $`(_{i=1}^nA_i)(_{j=1}^mB_j)=_{i=1}^n((\mathrm{}((A_iB_1)B_2)\mathrm{})B_m)`$

Proof. The first equality follows directly from distributivity of intersection with respect to union.

The second equality can be proven by induction on $`m`$, using the observation that $`(_{i=1}^nA_i)B=(_{i=1}^nA_i)B^c=_{i=1}^n(A_iB^c)=_{i=1}^n(A_iB)`$, where $`B^c`$ denotes the complement of $`B`$ with respect to some universe.  $``$$``$

The next property says that for $``$ and $``$ closure and closure on atomic objects coincide.

###### Property 3.2 (Atomicity)

Let $`𝒮`$ be a class of objects and $``$ a class of transformations. Then

1. $`𝒮,`$ is closed under $``$ if and only if it is atomically closed under $``$, and
2. $`𝒮,`$ is closed under $``$ if and only if it is atomically closed under $``$.

Proof. Both for (a) and (b) the only-if direction is obvious. So we concentrate on the if-direction.

For the if-direction of (a), assume that $`𝒮,`$ is atomically closed under $``$ and let $`\{𝒪_{1,1},𝒪_{1,2},\mathrm{},𝒪_{1,n}\}`$ and $`\{𝒪_{2,1},𝒪_{2,2},\mathrm{},𝒪_{2,m}\}`$ be two geometric objects from $`𝒮,`$. By using Lemma 3.1 (a), we get

$$(\underset{i=1}{\overset{n}{}}st(𝒪_{1,i}))(\underset{j=1}{\overset{m}{}}st(𝒪_{2,j}))=\underset{i=1}{\overset{n}{}}\underset{j=1}{\overset{m}{}}(st(𝒪_{1,i})st(𝒪_{2,j})).$$

Since $``$ is assumed to be atomically closed, each $`st(𝒪_{1,i})st(𝒪_{2,j})`$ can be written as a union $`_{k=1}^{l_{ij}}st(𝒪_{k,i,j})`$, where each $`𝒪_{k,i,j}`$ is an atomic geometric object. Therefore, the intersection of $`\{𝒪_{1,1},𝒪_{1,2},\mathrm{},𝒪_{1,n}\}`$ and $`\{𝒪_{2,1},𝒪_{2,2},\mathrm{},𝒪_{2,m}\}`$ can also be written as $`_{i=1}^n_{j=1}^m_{k=1}^{l_{i,j}}st(𝒪_{k,i,j})`$. This completes the proof of the if-direction of (a).

For the if-direction of (b), assume that $`𝒮,`$ is atomically closed under $``$ and let $`\{𝒪_{1,1},𝒪_{1,2},\mathrm{},𝒪_{1,n}\}`$ and $`\{𝒪_{2,1},𝒪_{2,2},\mathrm{},𝒪_{2,m}\}`$ be two geometric objects from $`𝒮,`$. By using Lemma 3.1 (b), we get

$$(\underset{i=1}{\overset{n}{}}st(𝒪_{1,i}))(\underset{j=1}{\overset{m}{}}st(𝒪_{2,j}))=\underset{i=1}{\overset{n}{}}((\mathrm{}((st(𝒪_{1,i})st(𝒪_{2,1}))st(𝒪_{2,2}))\mathrm{})st(𝒪_{2,m})).$$

We prove, by induction on $`m`$, that $`((\mathrm{}((st(𝒪_{1,i})st(𝒪_{2,1}))st(𝒪_{2,2}))\mathrm{})st(𝒪_{2,m}))`$ is of the form $`_{k=1}^lst(𝒪_k^{})`$. Since $``$ is assumed to be atomically closed, $`st(𝒪_{1i})st(𝒪_{21})`$ can be written as a union $`_{k=1}^{l_1}st(𝒪_k^{})`$, where each $`𝒪_k^{}`$ is an atomic geometric object. This proves the case $`m=1`$. Next, assume we have shown that $`((\mathrm{}((st(𝒪_{1,i})st(𝒪_{2,1}))st(𝒪_{2,2}))\mathrm{})st(𝒪_{2,m1}))`$ is $`_{k=1}^lst(𝒪_k^{})`$ with all $`𝒪_k^{}`$ atomic geometric objects. Then $`((\mathrm{}((st(𝒪_{1,i})st(𝒪_{2,1}))st(𝒪_{2,2}))\mathrm{})st(𝒪_{2,m}))`$ is $`(_{k=1}^lst(𝒪_k^{}))st(𝒪_{2,m})`$, which is $`_{k=1}^l(st(𝒪_k^{})st(𝒪_{2,m}))`$, using Lemma 3.1 (b). Again, since $``$ is assumed to be atomically closed, each of the sets $`st(𝒪_k^{})st(𝒪_{2,m})`$ is of the form $`_{r=1}^{l_k}st(𝒪_r^{\prime \prime })`$. Therefore, the set-difference of $`\{𝒪_{1,1},𝒪_{1,2},\mathrm{},𝒪_{1,n}\}`$ and $`\{𝒪_{2,1},𝒪_{2,2},\mathrm{},𝒪_{2,m}\}`$ is also the semantics of a geometric object from $`𝒮,`$. This completes the proof.  $``$$``$

The following property states that intersection and set-difference are equivalent with respect to closure.

###### Property 3.3 (Equivalence of $``$ and $``$)

Let $`𝒮`$ be a class of objects and $``$ a class of transformations. Then $`𝒮,`$ is closed under $``$ if and only if it is closed under $``$.

Proof. By Property 3.2 it suffices to prove this property for atomic geometric objects.

For the if-direction, assume that $`𝒮,`$ is closed under $``$ and let $`𝒪_1`$ and $`𝒪_2`$ be two atomic geometric objects from $`𝒮,`$. Since,

$$st(𝒪_1)st(𝒪_2)=(st(𝒪_1)st(𝒪_2))((st(𝒪_1)st(𝒪_2))(st(𝒪_2)st(𝒪_1)))$$

and since $`(st(𝒪_1)st(𝒪_2))`$ and $`(st(𝒪_2)st(𝒪_1))`$ are by assumption $`_{i=1}^nst(𝒪_i^{})`$ respectively $`_{j=1}^nst(𝒪_j^{\prime \prime })`$ with all $`𝒪_i^{}`$ and $`𝒪_j^{\prime \prime }`$ atomic geometric objects. Therefore, $`st(𝒪_1)st(𝒪_2)`$ equals $`((\mathrm{}(st(𝒪_2)st(𝒪_1^{}))\mathrm{})st(𝒪_n^{}))((\mathrm{}(st(𝒪_2)st(𝒪_1^{\prime \prime }))\mathrm{})st(𝒪_m^{\prime \prime }))`$, using Lemma 3.1 (b). Using the argumentation from the proof of the if-direction of (b) of Property 3.2, we can show that this set is again a union of semantics of atomic geometric objects from $`𝒮,`$.

For the only-if direction, assume that $`𝒮,`$ is closed under $``$ and let $`𝒪_1=(S_1,I_1,f_1)`$ and $`𝒪_2=(S_2,I_2,f_2)`$ be two atomic geometric objects from $`𝒮,`$. We have to show that $`st(𝒪_1)st(𝒪_2)`$ can be written as $`_{i=1}^nst(𝒪_i^{})`$, with $`𝒪_i^{}`$ atomic geometric objects. We can restrict our attention to the set $`st(𝒪_1)st(𝒪_2)`$ in the interval $`I_1I_2`$ rather than in the complete interval $`I_1\overline{}I_2`$ (since the set-difference is empty in $`I_2I_1`$ and equal to $`𝒪_1`$ in $`I_1I_2`$). Let $`I`$ denote the topological closure of $`I_1I_2`$. The set $`S_B=\{(x,y)𝐑^2(x^{})(y^{})(t)((x^{},y^{})S_1tIf_1(x^{},y^{},t)=f_2(x,y;t))\}`$ is compact (i.e., topologically closed and bounded) since it is the image of the compact set $`S_1\times I`$ under the continuous function $`f_2^1f_1`$. Therefore, also $`S=S_2S_B`$ is a compact set in $`𝐑^2`$. Let $`\alpha :(x,y)(ax+b_1,ay+b_2)`$ be a scaling followed by a translation that maps $`S_2`$ to a set that strictly contains $`S`$ (this is possible since $`S`$ is bounded). Remark that $`\alpha `$ maps any line to a parallel line. Let $`𝒪_3`$ be the atomic geometric object $`(\alpha (S_2),I,f_2)`$. At any moment $`t`$ in $`I`$, we thus have that $`f_2(S_2;t)f_2(\alpha (S_2);t)`$ (since affinities are monotone mappings) and $`f_1(S_1;t)f_2(\alpha (S_2);t)`$. Therefore, $`st(𝒪_1)st(𝒪_2)=st(𝒪_1)(st(𝒪_3)st(𝒪_2))`$.

Now, $`st(𝒪_3)st(𝒪_2)`$ can always be written as the semantics of a geometric object in $`𝒮,`$ where $`𝒮`$ and $``$ are any pairs allowed in Theorem 3.1. For each of the classes $`𝒮_{\mathrm{Poly}}`$, $`𝒮_{\mathrm{Tr}}`$, $`𝒮_{\mathrm{TrAx}}`$, and $`𝒮_{\mathrm{Rect}}`$ this is illustrated in Figure 2. For each of these classes $`\alpha (S_2)S_2`$ can be partitioned into a finite number of reference objects $`T_1`$, …, $`T_n`$ from these classes. So, define the atomic geometric objects $`𝒪_i^{}=(T_i,I,f_2)`$ ($`1in`$). Then $`st(𝒪_3)st(𝒪_2)=_{i=1}^nst(𝒪_i^{})`$. Therefore, $`st(𝒪_1)(st(𝒪_3)st(𝒪_2))=st(𝒪_1)_{i=1}^nst(𝒪_i^{})=_{i=1}^n(st(𝒪_1)st(𝒪_i^{}))`$. Since we have assumed that $`𝒮,`$ is closed for intersection, the intersections $`st(𝒪_1)st(𝒪_i^{})`$ can be written as $`_{k=1}^{l_i}st(𝒪_k^{\prime \prime })`$ with $`𝒪_k^{\prime \prime }`$ atomic geometric objects from $`𝒮,`$. Therefore also $`st(𝒪_1)(st(𝒪_3)st(𝒪_2))`$ can be written as such a union. This completes the proof.  $``$$``$

A final reduction property says that the closure results for polygons and triangles coincide. We can therefore concentrate on triangles further on.

###### Property 3.4

Let $``$ be a class of transformations, and let $`\theta `$ be one of the operations $``$, $``$ or $``$. Then $`𝒮_{\mathrm{Poly}},`$ is closed under $`\theta `$ if and only if $`𝒮_{\mathrm{Tr}},`$ is closed under $`\theta `$.

Proof. This property follows from the fact that any atomic geometric object $`𝒪=(S,I,f)`$ from $`𝒮_{\mathrm{Poly}},`$ corresponds to a geometric object from $`𝒮_{\mathrm{Tr}},`$. Indeed, let $`T_1,\mathrm{},T_n`$ be an arbitrary triangulation of the polygon $`S`$. The geometric object $`\{𝒪_1,\mathrm{},𝒪_n\}`$ with $`𝒪_i=(T_i,I,f)`$ ($`1in`$) has the same semantics as $`𝒪=(S,I,f)`$.

So, if $`𝒮_{\mathrm{Poly}},`$ is closed under $`\theta `$, then also any union, intersection or set-difference of two elements of $`𝒮_{\mathrm{Tr}},`$ is again a geometric object of $`𝒮_{\mathrm{Poly}},`$ and because of the above argument also of $`𝒮_{\mathrm{Tr}},`$.

On the other hand, suppose that $`𝒮_{\mathrm{Tr}},`$ is closed under $`\theta `$. If $`𝒪_1`$ and $`𝒪_2`$ are objects in $`𝒮_{\mathrm{Poly}},`$, then so are their union, intersection or set-difference, since they are in $`𝒮_{\mathrm{Tr}},`$, which is a subclass of $`𝒮_{\mathrm{Poly}},`$.  $``$$``$

### 3.2 Closure and non-closure proofs

In this section, we complete the proof of Theorem 3.1, by means of a series of lemmas that cover all the cases presented in the matrix of Theorem 3.1. Here, we take the reduction results of the previous section into account. In particular, we only consider intersections or set-differences of atomic geometric objects, and we do not have to consider polygons any more.

#### 3.2.1 Finite time partition

Before giving these lemmas we introduce the technical notion of finite time partition. This will be of use in many of the proofs in this section. The finite time partition property tells us how and when the form (or appearance) of the intersection or set-difference of two atomic geometric objects changes. We observe that the intersection of two moving triangles can be empty, a single point, a straight line segment, a triangle, a quadrangle, a pentagon and a hexagon. The intersection of two moving rectangles can be empty, a single point, a line segment or a rectangle. We refer to all these different forms of the intersection or the set-difference as their possible shapes. Also the difference of two triangles or two rectangles can take a finite number of different shapes. In the example in Figure 1, the intersection takes four different shapes, whereas the difference takes five different shapes.

We define this notion now more technically. Let $`𝒪_1=(S_1,I_1,f_1)`$ and $`𝒪_2=(S_2,I_2,f_2)`$ be two atomic geometric objects with rational affine transformations with time domains $`I_1`$ and $`I_2`$. In the following, we denote by $`I_1\overline{}I_2`$ the convex closure of the set $`I_1I_2`$ in $`𝐑`$. Let $`t`$ be in $`I_1\overline{}I_2`$. Firstly, we call any line that intersects the border of $`f_i(S_i;t)`$ in infinitely many points, a carrier of the frame $`f_i(S_i;t)`$ and denote it $`car(f_i(S_i;t))`$ ($`i=1,2`$).

###### Definition 3.2 (Finite time partition)

We call a finite time partition of $`𝒪_1`$ and $`𝒪_2`$ any partition of the interval $`I_1\overline{}I_2`$ into a finite number of time intervals $`J_1,\mathrm{},J_m`$ such that for any $`t,t^{}J_i`$ (and all $`1im`$), $`car(f_1(S_1;t))car(f_2(S_2;t))`$ and $`car(f_1(S_1;t^{}))car(f_2(S_2;t^{}))`$ are topologically equivalent sets333We call two subsets $`A`$ and $`B`$ of $`𝐑^2`$ topologically equivalent when there exists an orientation-preserving homeomorphism $`h`$ of $`𝐑^2`$ such that $`h(A)=B`$. in $`𝐑^2`$.  $``$$``$

###### Property 3.5

Let $`𝒪_1`$ and $`𝒪_2`$ be two atomic geometric objects with rational affine transformations with time domains $`I_1`$ and $`I_2`$. There exists a finite time partition of $`𝒪_1`$ and $`𝒪_2`$.

Proof. Let $`𝒪_1=(S_1,I_1,f_1)`$ and $`𝒪_2=(S_2,I_2,f_2)`$ be two atomic geometric objects satisfying the conditions of the statement of this property. From the assumption that the reference objects $`S_1`$ and $`S_2`$ are semi-algebraic and the transformation functions $`f_1`$ and $`f_2`$ are affine rational functions, it follows that the sets $`st(𝒪_1)`$ and $`st(𝒪_2)`$ are semi-algebraic subsets of $`𝐑^2\times 𝐑`$ (for details on this type of basic results on semi-algebraic sets, we refer to Chapter 2 of ). Let $`I`$ be the set $`I_1\overline{}I_2`$.

Also, the set $`A=_{tI_1\overline{}I_2}(car(f_1(S_1;t))car(f_2(S_2;t)))`$ is semi-algebraic, since it can be defined in the first-order logic of the reals over the semi-algebraic sets $`st(𝒪_1)`$ and $`st(𝒪_2)`$ (this closure property of first-order logic over the reals can be found in Chapter 2 of ). We can therefore consider the set $`A`$ as a subset of $`𝐑^2\times 𝐑`$ parameterized by the time parameter $`t`$. It follows from Semi-algebraic Triviality (Theorem 9.3.2 in  and also page 147 in ) that the set $`A`$ induces a finite partition on $`I_1\overline{}I_2`$ such that in each partition class $`A`$ remains topologically equivalent.  $``$$``$

#### 3.2.2 Technical lemmas

The following two lemmas are technical lemmas that say that two/three points that move with their respective rational affinities can be combined into one line/triangle that moves by a single rational affinity. For the proofs we refer to the Appendix.

###### Lemma 3.2

Let $`𝒪_i=(\{(x_i,y_i)\},I,g_i)`$ ($`i=1,2,3`$) be three atomic geometric objects with $`g_i_{\mathrm{Aff}}^{\mathrm{Rat}}`$. If the three points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ form a triangle $`S`$ (i.e., are not collinear) and if $`g_1(x_1,y_1;t)`$, $`g_2(x_2,y_2;t)`$ and $`g_3(x_3,y_3;t)`$ form a triangle $`S_t`$ at any moment $`tI`$ (i.e., are not collinear), then there exists an atomic geometric $`𝒪=(S,I,g)`$ with $`g_{\mathrm{Aff}}^{\mathrm{Rat}}`$ such that $`g_i(x_i,y_i;t)=g(x_i,y_i;t)`$ for all $`tI`$ and $`i=1,2,3`$.  $``$$``$

###### Lemma 3.3

Let $`𝒪_i=(\{(x_i,y_i)\},I,g_i)`$ ($`i=1,2`$) be two atomic geometric objects with $`g_i_{\mathrm{Aff}}^{\mathrm{Rat}}`$. If the two points $`(x_1,y_1)`$ and $`(x_2,y_2)`$ form a line segment $`L`$ (i.e., are not equal) and if $`g_1(x_1,y_1;t)`$ and $`g_2(x_2,y_2;t)`$ form a line segment $`L_t`$ at any moment $`tI`$ (i.e., are not equal), then there exists an atomic geometric $`𝒪=(L,I,g)`$ with $`g_{\mathrm{Aff}}^{\mathrm{Rat}}`$ such that $`g_i(x_i,y_i;t)=g(x_i,y_i;t)`$ for all $`tI`$ and $`i=1,2`$.  $``$$``$

The next lemma shows that if two lines that move with a rational affinity intersect, also the intersection point is moved by a rational affinity. The proof of this lemma is in the Appendix.

###### Lemma 3.4

Let $`𝒪_i=(L_i,I,g_i)`$ ($`i=1,2`$) be two atomic geometric objects with $`L_i`$ line segments and $`g_i_{\mathrm{Aff}}^{\mathrm{Rat}}`$. If the line segments $`g_1(L_1;t)`$ and $`g_2(L_2;t)`$ intersect at any moment $`tI`$, then there exists an atomic geometric $`𝒪=(\{(x_0,y_0)\},I,g)`$ with $`g_{\mathrm{Aff}}^{\mathrm{Rat}}`$ that describes the intersection point of $`g_1(L_1;t)`$ and $`g_2(L_2;t)`$ in $`I`$.  $``$$``$

#### 3.2.3 Results for affinities

We can now start our series of closure and non-closure lemmas and start with the affine transformations. For the most general classes we have the following positive result.

###### Lemma 3.5

The classes $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ and $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ are closed under $``$ and $``$.

Proof. By Property 3.4, it suffices to show this lemma for triangles. By Properties 3.2 (atomicity) and 3.3, it suffices to show that the intersection of two atomic geometric objects $`𝒪_1=(T_1,I_1,f_1)`$ and $`𝒪_2=(T_2,I_2,f_2)`$ from $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ is represented by an object in $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$.

According to Property 3.5 (finite time partition), the intersection of the two moving triangles can only take a finite number of different shapes, with each new shape occurring in an element of a finite partition of $`I_1\overline{}I_2`$ into intervals $`J_1,\mathrm{},J_m`$ (in fact, we only have to consider $`I_1I_2`$ here, since outside this intersection the intersection of $`𝒪_1`$ and $`𝒪_2`$ is empty anyway). Let $`J_l`$ be an interval in this partition. The intersection of $`𝒪_1`$ and $`𝒪_2`$ can be a convex polygon (with at most six corner points), a line segment or a single point in $`J_l`$.

First, suppose the intersection is a convex polygon. Let $`t_0`$ be a point in $`J_l`$ (even if it is a degenerated interval, $`J_l`$ contains at least one point). We take the intersection of $`f_1(T_1;t_0)`$ and $`f_2(T_2;t_0)`$ as reference object $`P`$. The set $`P𝐑^2`$ can be triangulated, for instance by connecting its corner points to its point of gravity: this yields triangles $`T_1^{},\mathrm{},T_m^{}`$ (with $`1m6`$). Each of the corner points $`(x_1,y_1)`$, $`(x_2,y_2)`$, $`(x_3,y_3)`$ of a triangle $`T_j^{}`$ is moved in the time interval $`J_l`$ by a rational affinity (in particular it is moved $`f_1`$ or $`f_2`$ applied to the inverse image of $`f_1(;t_0)`$, respectively $`f_2(,t_0)`$). More specifically, a corner point of $`T_j^{}`$ is moved by $`f_1`$ if it is originating from a corner point of $`𝒪_1`$; a corner point of $`T_j^{}`$ is moved by $`f_2`$ if it is originating from a corner point of $`𝒪_2`$; Lemma 3.4 shows that there exists a rational affinity that moves a corner point of $`T_j^{}`$ if it is an intersection point of side lines of $`𝒪_1`$ and $`𝒪_2`$; a corner point of $`T_j^{}`$ can be taken to be moved by $`f_1`$ if it is originating from the point of gravity of $`P`$. Therefore, all corner points of $`T_j^{}`$ are moved by a rational affinity. Lemma 3.2 guarantees the existence of a rational affinity $`f_j`$ that moves $`T_j^{}`$. The intersection of $`𝒪_1`$ and $`𝒪_2`$ in $`J_l`$ is therefore described by the atomic geometric objects $`(T_j^{},J_l,f_j)`$ ($`1jm6`$).

Second, we investigate the situation if the intersection of $`𝒪_1`$ and $`𝒪_2`$ is a line segment. The end points of the intersection originate from $`𝒪_1`$ or $`𝒪_2`$ or can be the result of intersecting side lines of $`𝒪_1`$ and $`𝒪_2`$. In both cases, (from Lemma 3.4 for an intersection point) it is clear that the two end points are moved by a rational affine transformation. Lemma 3.3 then shows that there exists a single rational affine transformation $`f`$ to move the intersection. This intersection can therefore be described by an atomic geometric object $`(L,J_l,f)`$, where $`L`$ is some line segment.

Third, we look at the case where the intersection is a single point. This point can originate from $`𝒪_1`$ or $`𝒪_2`$ or can be the result of intersecting side lines of $`𝒪_1`$ and $`𝒪_2`$. In both cases, (from Lemma 3.4 for an intersection point), it is clear that in this case the intersection’s movement is a rational affine transformation.  $``$$``$

In general, if the affine transformations of $`𝒪_1`$ and $`𝒪_2`$ are given by polynomial or linear functions, the corner points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ of triangles in the intersection (or difference) are in general rational in these functions. The computations in the proof of the Lemmas 3.2, 3.3 and 3.4 suggest that this leads to non-closure.

###### Lemma 3.6

The classes $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$, $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{Aff}}^{\mathrm{Lin}}`$$``$, $``$$`𝒮_{\mathrm{Tr}}`$,$`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$ and $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Lin}}`$$``$ are not closed under $``$ and $``$.

Proof. It suffices to prove the lemma for triangles. We give a counterexample for intersection that serves for both classes $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Lin}}`$$``$ and $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$. Consider two atomic geometric objects $`𝒪_1`$ and $`𝒪_2`$ with reference objects triangles with corner points $`(1,1)`$, $`(3,1)`$, $`(2,3)`$ and $`(2,2)`$, $`(4,2)`$, $`(3,4)`$, respectively. The affine transformations of these triangles are given by the matrices

| $`\left(\begin{array}{cc}t& 2t\\ 3t& t\end{array}\right)`$ | and | $`\left(\begin{array}{cc}t& 2t+1\\ t& 3t+1\end{array}\right),`$ |
| --- | --- | --- |

respectively. Assume these objects are moved in some interval of the strictly positive $`t`$-axis (for example $`I=[1,2]`$), the intersection of the two objects is a triangle with corner points $`(6t+2,8t+2)`$, $`(\frac{1}{2}t\frac{(181t+70)}{(13t+4)},\frac{1}{2}t\frac{(243t+70)}{(13t+4)})`$ and $`(\frac{29}{4}t,\frac{37}{4}t)`$.

Assume that this triangle could be represented as a geometric object $`\{𝒪_1,\mathrm{},𝒪_m\}`$ from $``$$`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$. Then, there exists some subinterval $`J`$ of $`I`$ during which the corner point $`(\frac{1}{2}t\frac{(181t+70)}{(13t+4)},\frac{1}{2}t\frac{(243t+70)}{(13t+4)})`$ is the image of a corner point $`(x_0,y_0)`$ of a reference triangle that is transformed by a polynomial (or linear) affinity. We therefore have that, for instance the $`x`$-coordinate $`\frac{1}{2}t\frac{(181t+70)}{(13t+4)}`$ of the above point is of the form $`a(t)x_0+b(t)y_0+e(t)`$ for $`tJ`$ with $`a(t)`$, $`b(t)`$ and $`e(t)`$ polynomials (or linear polynomials) in $`t`$. Therefore, $`181t^2+70t2(a(t)x_0+b(t)y_0+e(t))(13t+4)=0`$ for all $`tJ`$. Since the number of zero’s of this polynomial exceeds its degree, it is identical to zero. Therefore, $`a(t)x_0+b(t)y_0+e(t)`$ is of the form $`\alpha t+\beta `$. This leads to the conditions $`\beta =0`$, $`181=26\alpha `$ and $`70=8\alpha `$. There is no solution and we have a contradiction.  $``$$``$

###### Lemma 3.7

The classes $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ and $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ are closed under $``$ and $``$.

Proof. Let us first consider the class $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$. Because of Lemmas 3.2, and 3.3, it suffices to consider the intersection of two atomic geometric objects $`𝒪_1=(R_1,I_1,f_1)`$ and $`𝒪_2=(R_2,I_2,f_2)`$. The image of a rectangle under an affinity is a parallelogram. The shape of the intersection of $`f_1(R_1;t)`$ and $`f_2(R_2;t)`$ for some $`t`$ in $`I_1I_2`$ can therefore be a convex polygon with at most eight corner points, a line segment or a point.

In any of these cases, we can copy the argumentation used in the proof of Lemma 3.5. In case the intersection is a line segment or a point, this settles the case. In the case where it is a convex polygon, we can reuse the triangulation technique presented in the proof of Lemma 3.5, now noting that it can consist of at most eight triangles instead of six. So, we get that the intersection of $`𝒪_1`$ and $`𝒪_2`$ can be described by the atomic geometric objects $`(T_j^{},J_l,f_j)`$ ($`1jm8`$), where the $`T_j^{}`$ are triangles and the $`f_j`$ are rational affinities.

For the purpose of this lemma, we need to describe the intersection of $`𝒪_1`$ and $`𝒪_2`$ by means of moving rectangles, however. This can be achieved by replacing each of the triangles $`T_j^{}`$ by three rectangles $`R_{1j}`$, $`R_{2j}`$ and $`R_{3j}`$. Let the corner points of $`T_j^{}`$ be $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$. The rectangle $`R_{ij}`$ are chosen such that a constant affinity $`f_{ij}`$ maps $`R_{ij}`$ to the parallelogram with corner points $`(x_i,y_i)`$, $`\frac{1}{2}(x_1+x_2,y_1+y_2)`$, $`\frac{1}{2}(x_1+x_3,y_1+y_3)`$ and $`\frac{1}{2}(x_3+x_2,y_3+y_2)`$ ($`i=1,2,3`$). So, $`T_j^{}`$ is the union of the three parallelograms: $`T_j^{}=f_{1j}(R_{1j})f_{2j}(R_{2j})f_{3j}(R_{3j})`$.

So, if we replace $`(T_j^{},J_i,f_j)`$ by $`(R_{ij},J_l,f_jf_{ij})`$ we get a description of the intersection of $`𝒪_1`$ and $`𝒪_2`$ during $`J_l`$ in terms of atomic geometric objects from $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$.

The closure result for $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$ can be obtained by further dividing the rectangles $`R_{i,j}`$ along a diagonal into two triangles from $`𝒮_{\mathrm{TrAx}}`$.  $``$$``$

The following lemma concludes the results for affinities.

###### Lemma 3.8

The classes $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^\mathrm{L}`$$``$ and $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Aff}}^\mathrm{L}`$$``$ are not closed under $``$ and $``$ for $`\mathrm{L}\{\mathrm{Lin},\mathrm{Poly}\}`$.

Proof. First, let us look at $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^\mathrm{L}`$$``$. We give a counterexample for intersection that serves for both classes $``$$`𝒮_{\mathrm{Rect}}`$, $`_{\mathrm{Aff}}^{\mathrm{Lin}}`$$``$ and $``$$`𝒮_{\mathrm{Rect}}`$, $`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$. We modify the counterexample from the proof of Lemma 3.6. Consider two atomic geometric objects $`𝒪_1`$ and $`𝒪_2`$ with reference objects rectangles with corner points $`(1,1)`$, $`(3,1)`$, $`(1,3)`$, $`(3,3)`$ and $`(2,2)`$, $`(4,2)`$, $`(2,4)`$, $`(4,4)`$, respectively. The affine transformations of the rectangles are given by the matrices

| $`\left(\begin{array}{cc}t& 2t\\ 3t& t\end{array}\right)`$ | and | $`\left(\begin{array}{cc}t& 2t+1\\ t& 3t+1\end{array}\right),`$ |
| --- | --- | --- |

respectively.

In some interval of the strictly positive $`t`$-axis, the intersection of the two objects is a triangle with corner points $`(6t+2,8t+2)`$, $`(t\frac{(28t+15)}{(3t+2)},3t\frac{(13t+2)}{(3t+2)})`$ and $`(\frac{21}{2}t,\frac{17}{2}t)`$.

The same type of argumentation as in the proof of Lemma 3.6, can be used to show that at least a rational affinity is needed to describe the intersection. Therefore, both $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^{\mathrm{Lin}}`$$``$ and $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{Aff}}^{\mathrm{Poly}}`$$``$ are not closed for intersection and set-difference.

Secondly, for $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Aff}}^\mathrm{L}`$$``$, we can reuse the above counterexample leaving out the corner points $`(1,1)`$ and $`(4,4)`$ respectively. The intersection remains the same and the argumentation can be repeated.  $``$$``$

The proof of Lemma 3.5 is based on the property that affinities do not preserve parallelism to the axes. We will see later that for scalings, which do preserve parallelism to the axes, the class of the objects of $`𝒮_{\mathrm{TrAx}}`$ is not closed.

#### 3.2.4 Results for scalings

We divide the results for scalings into one positive and two negative results.

###### Lemma 3.9

$``$$`𝒮_{\mathrm{Rect}}`$, $`_{\mathrm{Sc}}^\mathrm{L}`$$``$ is closed under $``$ and $``$ for $`\mathrm{L}\{\mathrm{Lin},\mathrm{Poly},\mathrm{Rat}\}`$.

Proof. Because of Lemmas 3.2, and 3.3, it suffices to consider the intersection of two atomic geometric objects $`𝒪_1=(R_1,I_1,g_1)`$ and $`𝒪_2=(R_2,I_2,g_2)`$.

According to Property 3.5, the intersection of the two rectangles takes different shapes in elements of a finite partition of $`I_1I_2`$ (we only consider this intersection, since elsewhere in $`I_1\overline{}I_2`$ the intersection of $`𝒪_1`$ and $`𝒪_2`$ is empty in any case). Let $`J`$ be an interval in this partition. First, we remark that scalings map lines that are parallel to the $`x`$-axis or to the $`y`$-axis to a parallel line. Therefore, at any moment $`t`$ in $`J`$ both the frame of $`𝒪_1`$ and the frame of $`𝒪_2`$ are rectangles with sides parallel to the coordinate axis.

Let us assume that the intersection of $`𝒪_1`$ and $`𝒪_2`$ is a rectangle in $`J`$.

We remark that this intersection rectangle is uniquely determined by the coordinates of its upper-left corner point $`(x_{ul}(t),y_{ul}(t))`$ and the coordinates of the lower-right corner point $`(x_{lr}(t),y_{lr}(t))`$. Let assume the upper-left corner point of the intersection comes from $`𝒪_1`$ and the lower-right from $`𝒪_2`$ (possibly we have to work with the upper-right and lower-left corners, but this is equivalent). Let the scaling of $`𝒪_1`$ be determined by $`a_1(t)`$, $`b_1(t)`$, $`e_1(t)`$, $`f_1(t)`$ and the one of $`𝒪_2`$ by $`a_2(t)`$, $`b_2(t)`$, $`e_2(t)`$, $`f_2(t)`$ (following the matrix notation of section 2.2).

The intersection is an atomic geometric object $`𝒪=(R,J,f)`$ composed as follows. The reference rectangle $`R`$ has as upper-left corner point $`(x_{ul},y_{ul})`$ the upper-left corner point of the reference object $`R_1`$ of $`𝒪_1`$ and as lower-right corner point $`(x_{lr},y_{lr})`$ the lower-right corner point of the reference object $`R_2`$ of $`𝒪_2`$ (if $`(x_{lr},y_{lr})`$ and $`(x_{lr},y_{lr})`$ have an $`x`$\- or $`y`$-coordinate in common, we work with $`(x_{lr}+1,y_{lr}+1)`$ instead of $`(x_{lr},y_{lr})`$ and replace $`e_2(t)`$ with $`e_2(t)a_2(t)`$ and $`f_2(t)`$ with $`f_2(t)b_2(t)`$ in the description of $`g_2`$). The transformation function $`g`$ of $`𝒪`$ is determined by

| $`a(t)`$ | = | $`\frac{(a_1(t)x_{ul}a_2(t)x_{lr}+e_1(t)e_2(t)}{x_{ul}x_{lr}},`$ |
| --- | --- | --- |
| $`b(t)`$ | = | $`\frac{(b_1(t)y_{ul}b_2(t)y_{lr}+f_1(t)f_2(t)}{y_{ul}y_{lr}},`$ |
| $`e(t)`$ | = | $`\frac{((a_2(t)a_1(t))x_{ul}x_{lr}e_1(t)x_{lr}+e_2(t)x_{ul}}{x_{ul}x_{lr}},`$ |
| $`f(t)`$ | = | $`\frac{((b_2(t)b_1(t))y_{ul}y_{lr}f_1(t)y_{lr}+f_2(t)y_{ul}}{y_{ul}y_{lr}}.`$ |

These formulas show that if the transformations of $`𝒪_1`$ and $`𝒪_2`$ are rational, polynomial, respectively linear, then also $`a(t)`$, $`b(t)`$, $`e(t)`$, $`f(t)`$ are rational, polynomial, respectively linear.

The cases where the intersection of $`𝒪_1`$ and $`𝒪_2`$ is a line segment or point in $`J`$ are analogous to but simpler than the previous case.  $``$$``$

###### Lemma 3.10

The classes $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Sc}}^\mathrm{L}`$$``$ and $``$$`𝒮_{\mathrm{TrAx}}`$$`,\{\mathrm{id}\}`$ are not closed under $``$ and $``$ for $`\mathrm{L}\{\mathrm{Lin},\mathrm{Poly},\mathrm{Rat}\}`$.

Proof. Consider the triangle with corner points $`(0,0)`$, $`(1,0)`$ and $`(0,1)`$ and the triangle with corner points $`(\frac{1}{3},1)`$, $`(\frac{2}{3},1)`$ and $`(\frac{2}{3},0)`$, both transformed by the identity transformation. Their intersection (for an illustration see (A) of Figure 3) cannot be described as a finite union of elements of $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{Sc}}^\mathrm{L}`$$``$ since scalings map lines that are parallel to a coordinate axis to a parallel line. (Remember, for affinities, this class was closed, partly because affinities do not necessarily preserve parallelism with the coordinate axis.)  $``$$``$

The following lemma could be left out since it is implied by Lemma 3.12. We give it since its proof is conceptually easier, however.

###### Lemma 3.11

The classes $``$$`𝒮_{\mathrm{Tr}}`$,$`_{\mathrm{Sc}}^\mathrm{L}`$$``$ and $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{Sc}}^\mathrm{L}`$$``$ are not closed under $``$ and $``$ for $`\mathrm{L}\{\mathrm{Lin},\mathrm{Poly}\}`$.

Proof. Because of Properties 3.2 and 3.4 it suffices to prove this for atomic geometric objects that have a triangle as a reference object. Consider the triangle with corner points $`(0,0)`$, $`(0,1)`$ and $`(1,0)`$, and the triangle with corner points $`(0,0)`$, $`(1,1)`$ and $`(1,0)`$. Their respective transformation functions are the scalings

| $`\left(\begin{array}{cc}1& 0\\ 0& t+1\end{array}\right)`$ | and | $`\left(\begin{array}{cc}1& 0\\ 0& 2t+1\end{array}\right).`$ |
| --- | --- | --- |

We consider for both objects the time interval $`[0,5]`$. At any moment during this interval the intersection is given by the triangle with corner points $`(0,0)`$, $`(\frac{t+1}{3t+2},\frac{(t+1)(2t+1)}{3t+2})`$ and $`(1,0)`$. Assume that this intersection is described by a geometric object $`\{𝒪_1,\mathrm{},𝒪_m\}`$ from $``$ $`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Sc}}^\mathrm{L}`$$``$. At least one of the atomic objects describes a moving triangle that contains $`(\frac{t+1}{3t+2},\frac{(t+1)(2t+1)}{3t+2})`$ as a corner point during some subinterval of $`[0,5]`$. The $`x`$-coordinate $`\frac{t+1}{3t+2}`$ is therefore of the form $`a(t)x_0+e(t)`$ with $`x_0`$ the $`x`$-coordinate of some corner point of a reference object, and $`a(t)`$ and $`e(t)`$ functions appearing in its transformation matrix. Therefore, $`a(t)x_0+e(t)`$ has degree $`0`$, i.e., it is a number, say $`\alpha `$. But then $`\alpha (3t+2)`$ and $`t+1`$ should be identical polynomials, leading to the equations $`3\alpha =1`$ and $`2\alpha =1`$ that clearly do not have a solution. It can therefore not be a linear or polynomial transformation.  $``$$``$

The next lemma completes the proofs for scalings.

###### Lemma 3.12

Neither $``$$`𝒮_{\mathrm{Tr}}`$,$`_{\mathrm{Sc}}^{\mathrm{Rat}}`$$``$ nor $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{Sc}}^{\mathrm{Rat}}`$$``$ is closed under $``$ and $``$.

Proof. Because of Properties 3.2 and 3.4 it suffices to prove this lemma for atomic geometric objects that have a triangle as a reference object. We give an example of two atomic geometric objects $`𝒪_1`$ and $`𝒪_2`$ that have an intersection that cannot be described in $``$$`𝒮_{\mathrm{Tr}}`$,$`_{\mathrm{Sc}}^{\mathrm{Rat}}`$$``$.

Let the reference triangle of the atomic geometric object $`𝒪_1`$ have corner points $`(0,0)`$, $`(1,1)`$ and $`(\frac{1}{3},\frac{1}{2})`$ and let the transformation of this object be the scaling that maps $`(x,y)`$ to

$$\left(\begin{array}{cc}\frac{3(t+1)}{t+3}& 0\\ 0& (t+1)\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}\frac{3(t+1)}{t+3}\\ t+1\end{array}\right).$$

Let the reference triangle of the atomic geometric object $`𝒪_2`$ have corner points $`(0,0)`$, $`(1,1)`$ and $`(0,1)`$ and let the scaling of this object be the time-independent mapping that maps $`(x,y)`$ to

$$\left(\begin{array}{cc}4& 0\\ 0& 4\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}2\\ 2\end{array}\right).$$

We consider both objects in the time interval $`(0,\frac{1}{2})`$. At any moment during this interval the intersection is given by the triangle with corner points $`(0,0)`$, $`(\frac{3(t+1)}{t+3},t+1)`$ and $`(1,1)`$. We remark that the point $`(\frac{3(t+1)}{t+3},t+1)`$ is situated above the diagonal $`y=x`$ and that in the limit towards 0, this point converges to $`(1,1)`$. In other words, the intersection is always a triangle during the time interval $`(0,\frac{1}{2})`$, but it converges to a line segment for $`t`$ going to 0. It is easily verified that this intersection cannot be described as the image of a single triangle under a scaling from $`_{\mathrm{Sc}}^{\mathrm{Rat}}`$.

More generally, assume that this intersection is described by a geometric object $`\{𝒪_1,\mathrm{},𝒪_m\}`$ from $``$ $`𝒮_{\mathrm{Tr}}`$, $`_{\mathrm{Sc}}^{\mathrm{Rat}}`$$``$. At least one of the atomic objects describes a moving triangle that covers a line segment connecting $`(0,0)`$ and $`(f(t),f(t))`$ of the line connecting $`(0,0)`$ and $`(1,1)`$ during a time interval $`(0,\epsilon ]`$ with $`\epsilon >0`$ (without loss of generality this interval can be assumed to be closed on the right side). Let the third cornerpoint $`(g(t),h(t))`$ be situated in the interior of the intersection triangle with cornerpoints $`(0,0)`$, $`(\frac{3(t+1)}{t+3},t+1)`$ and $`(1,1)`$. Let the scaling of this object be the one that maps $`(x,y)`$ to

$$\left(\begin{array}{cc}a(t)& 0\\ 0& b(t)\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}c(t)\\ d(t)\end{array}\right),$$

where $`(a(t)`$, $`b(t)`$, $`c(t)`$ and $`d(t)`$ are rational functions of $`t`$. Without loss of generality the reference triangle of this atomic object can be assumed to have cornerpoints $`(0,0)`$, $`(1,1)`$, and $`(a,b)`$, where the first is mapped to $`(0,0)`$, the second to $`(f(t),f(t))`$ and the third to $`(g(t),h(t))`$. Since we assume this reference object to be a triangle, we have $`ab`$. It then follows that $`a(t)`$ and $`b(t)`$ must be equal to $`f(t)`$ and that $`c(t)`$ and $`d(t)`$ must be constant 0. Therefore, this scaling maps the third cornerpoint $`(a,b)`$ to $`(g(t),h(t))=(af(t),bf(t))`$. Both $`a`$ and $`b`$ are therefore strictly positive. Since the point $`(af(t),bf(t))`$ is situated at the same side of the diagonal $`y=x`$ as the point $`(0,1)`$, we get the condition $`bf(t)af(t)>0`$, or $`b>a`$. On the other hand, this point is situated on the same side as $`(0,1)`$ of the line connecting $`(0,0)`$ and $`(\frac{3(t+1)}{t+3},t+1)`$. Therefore, we get

$$(t+1)af(t)\frac{3(t+1)}{t+3}bf(t)>0.$$

From this $`a\frac{3}{t+3}b>0`$ follows, or $`\frac{3b}{a}<t+3`$. Since $`tt+3`$ is strictly increasing in $`(0,\epsilon ]`$ and has infimum 3 over this interval, we get $`\frac{3b}{a}3`$, or $`ba`$. This contradicts $`b>a`$, that we obtained before. This concludes the proof.  $``$$``$

### 3.3 Results for translations

We give a general negative result for translations.

###### Lemma 3.13

For each of the classes $`𝒮`$ considered in the previous section, the class $`𝒮,`$ $`_{\mathrm{Trans}}^\mathrm{L}`$$``$ is not closed under $``$ and $``$, for $`\mathrm{L}\{\mathrm{Lin},\mathrm{Poly},\mathrm{Rat}\}`$.

Proof. First, we remark that translations preserve the shape and area of objects and the length of lines.

Consider now two reference objects, located in the plane $`t=0`$, from each of the relevant classes that have the interval $`[0,1]`$ on the $`x`$-axis as one of their sides. Let one reference object be located above the $`x`$-axis and the second be located below the $`x`$-axis. Let the first object undergo the translation $`(x,y)(xt,y)`$ in the direction of the negative $`x`$-axis and let the second object undergo the translation $`(x,y)(x+t,y)`$ in the opposite direction, both in the time interval $`[0,t_0]`$, for some $`t_0>0`$.

Then it is clear that the intersection of these objects is a shrinking line segment during the time interval $`[0,t_0]`$. So, in any of the cases, the intersection cannot be described as a finite union of translated objects.  $``$$``$

### 3.4 Results for the identity

For completeness, we also give the results for the identity mapping.

###### Lemma 3.14

The classes $``$$`𝒮_{\mathrm{Poly}}`$,$`_{\mathrm{id}}`$$``$, $``$$`𝒮_{\mathrm{Tr}}`$,$`_{\mathrm{id}}`$$``$ and $``$$`𝒮_{\mathrm{Rect}}`$,$`_{\mathrm{id}}`$$``$ are closed under $``$ and $``$. The class $``$$`𝒮_{\mathrm{TrAx}}`$,$`_{\mathrm{id}}`$$``$ is not closed under $``$ and $``$.

Proof. For the positive closure results, it suffices to remark the following. The intersection of two polygons is again a polygon (if line segments and points are considered to be in this class). The intersection of two triangles is a convex polygon with at most six corner points that can be triangulated, i.e., written as a disjoint union of triangles. The intersection of two rectangles is a rectangle, a line segment parallel to a coordinate axis, or a point.

For the negative result, we remark that the intersection of two reference objects from $`𝒮_{\mathrm{TrAx}}`$ cannot necessarily be written as a finite union of such objects. Figure 3 contains an example.  $``$$``$

Now we have proven all the closure and non-closure results listed in the table of Theorem 3.1.

## 4 The extended data model

It is clear that the model for representing spatio-temporal data, that we have presented in Section 2, gives mostly negative closure results (see Theorem 3.1) for the classes of objects we considered important for spatio-temporal practice. The only classes that seem to be useful for further investigation are $`𝒮`$, $`_{\mathrm{Aff}}^{\mathrm{Rat}}`$$``$, for any of the considered classes $`𝒮`$ of reference objects.

In this section, we will enrich the data model and get better closure results. We will also study normal forms for objects in this enriched model.

In Section 2, we defined a geometric object as a finite union of atomic objects. We could now try to modify this definition by allowing other operations than union in the construction of geometric objects from atomic geometric objects. The exhaustive list of alternative definitions that could be considered are: a geometric object is obtained from atomic geometric objects by means of

* union (see Section 3);
* intersection;
* set-difference;
* intersection and set-difference; and finally
* union, intersection and set-difference.

In this paper, we will not investigate alternatives (b), (c) and (d). These alternatives may be interesting from a mathematical point of view, but in any practical application it is natural to allow union in the construction of spatio-temporal objects. In fact it is easy to see that for instance alternative (b) gives even worse closure results. Hereto, we first make two basic observations. Firstly, it is clear that the intersection of convex objects always results in a convex object, and that the affine transformation of a convex object remains a convex object. Secondly, the intersection of connected convex objects is again connected. It should be clear therefore that when the reference objects are triangles or rectangles, then whenever a union has two connected components, it cannot be written as an intersection of atomic geometric objects.

For alternative (c), we remark that in contrast to the intersection, the difference of two convex objects can result in a non-convex object, or in a set of disjoint objects. So, it is possible to describe a wide class of objects as the difference of some atomic objects. But, this approach has two major drawbacks:

1. If we want to describe a certain object $`𝒪`$ as the difference of some other objects $`𝒪_1\mathrm{}𝒪_k`$, we have to artificially introduce those objects $`𝒪_1,\mathrm{},𝒪_k`$ into the database. There is no way of controlling the number of objects that have to be introduced, as this depends on the exact shape of the object $`𝒪`$.
2. The difference operator is not associative, so in the worst case the depth of the tree describing the relation between the objects equals the number of objects. For practical applicability of our model, we should have a tree with limited depth. (One way of achieving this is to define a normal form, see further).

Only alternative (e) will be further investigated here.

### 4.1 The extended data model

First, we define the extended model. Atomic geometric objects are defined as in Section 2.

###### Definition 4.1 (Extended data model)

An extended geometric object is a binary tree, where each non-leaf node has two children, where each of the nodes is labeled with $``$, $``$ or $``$ and where each leaf is labeled with an atomic geometric object.

The semantics of a geometric object is defined (recursively starting from the root of the tree) as the semantics of its root. If a node $`n`$ of the binary three has a left child $`lc`$ and a right child $`rc`$, and if the root is labeled $`\theta `$ (with $`\theta \{,,\}`$), the semantics $`sem(n)`$ of node $`n`$ is by definition $`sem(lc)𝜃sem(rc)`$. The semantics of a leaf labeled with the atomic geometric object $`𝒪`$ is $`st(𝒪)`$.  $``$$``$

We define the time domain of an extended geometric object to be the convex closure of the union of the time domains of all the composing atomic geometric objects.

By slight abuse of notation, we will write down binary trees as in Definition 4.1 in the usual set-theoretic notation. The expression $`𝒪_1(𝒪_2(𝒪_3𝒪_1))`$ is an example.

The following property is trivial and says that this model is closed for all Boolean set operations.

###### Property 4.1

For all the classes $`𝒮,`$ considered in Section 2.2 the extended version of the data model is closed for union, intersection and set-difference.

### 4.2 Normal forms for CSG

By allowing geometric objects to be constructed from atomic objects via union, intersection and difference, we arrive at a situation that is similar to what is used in the field of “Constructive Solid Geometry” (CSG) . This is a method of geometric modeling, where complex static objects are constructed out of simple objects by taking the union, intersection and difference.

Looking at literature on CSG, we find that there exists a normal form for objects composed as Boolean combinations (with the operators $``$, $``$, $``$) from atomic objects.

A tree representing a complex object (called a CSG tree) is in normal form when all intersection and subtraction operators have a left subtree which contains no union operators and a right subtree which is simply a primitive (a set of polygons representing a single solid object). All union operators are pushed towards the root, and all intersection and subtraction operators are pushed towards the leaves. In our setting, the primitives are atomic geometric objects and the complexes are geometric objects.

A CSG tree can be converted to normal form by repeatedly applying the following set of rewrite rules (which have the Church-Rosser property) to the tree and then its subtrees:

| $`A(BC)`$ | $``$ | $`(AB)C`$ | (Rule 1) |
| --- | --- | --- | --- |
| $`A(BC)`$ | $``$ | $`(AB)(AC)`$ | (Rule 2) |
| $`A(BC)`$ | $``$ | $`(AB)(AC)`$ | (Rule 3) |
| $`A(BC)`$ | $``$ | $`(AB)C`$ | (Rule 4) |
| $`A(BC)`$ | $``$ | $`(AB)(AC)`$ | (Rule 5) |
| $`A(BC)`$ | $``$ | $`(AB)C`$ | (Rule 6) |
| $`(AB)C`$ | $``$ | $`(AC)B`$ | (Rule 7) |
| $`(AB)C`$ | $``$ | $`(AC)(BC)`$ | (Rule 8) |
| $`(AB)C`$ | $``$ | $`(AC)(BC)`$ | (Rule 9) |

where $`A`$, $`B`$, and $`C`$ here can be both primitives or subtrees.

### 4.3 Normal forms for geometric objects

First, we define the notion of normal form for a geometric object in the extended data model.

###### Definition 4.2 (Normal form)

We say that a geometric object (in the extended version) is in normal form if every $``$\- or $``$-labeled node has no $``$-labeled node in the left subtree and has a right child that is labeled by an atomic object.  $``$$``$

By Rule 7, differences can be pushed down with respect to intersections and we obtain, in the set-theoretic notation, that a geometric object is in normal form if it is of the form

$$\underset{i=1}{\overset{n}{}}((𝒪_{i,1}\mathrm{}𝒪_{i,k_i})𝒪_{i,k_i+1}\mathrm{}𝒪_{i,k_i+l_i})$$

where $`𝒪_{i,j}`$ is an atomic object.

The rewrite Rules 1–9 can be easily converted to tree notation, as illustrated for Rule 1 in Figure 4. The following property says that any geometric object can be rewritten in normal form. For the proof, we refer to .

###### Property 4.2

Any geometric object in the extended data model can be rewritten, using Rules 1–9, into a geometric object with the same semantics that is in normal form. Furthermore, this system of rewrite rules has the Church-Rosser property.  $``$$``$

## 5 Conclusion

We have introduced the concept of spatio-temporal object to model events and objects that change in time. We also specified a framework for specifying such objects. For some special classes of spatio-temporal objects of practical relevance, we investigated their closure properties with respect to Boolean set operators. An exhaustive study of these closure properties shows that the chosen approach leads to mostly negative closure results. Therefore, we propose an adaptation to the model. The adapted model has better properties and also is easier to use.

To implement our approach, it is sufficient to be able to represent in a database the following:

* spatial objects (a solved problem for many classes of such objects),
* temporal objects (again a solved problem),
* function objects (lambda terms).

Although to our knowledge none of the currently available DBMS provides the last option, we believe that the object-relational (or object-oriented) technology will soon make it feasible. In fact, one of the earliest object-relational DBMS, Postgres , allowed storing functions as tuple components. Also, some object-oriented data models, e.g., OODAPLEX , permit functions as first-class objects.

Moreover, storing functions themselves is sometimes not necessary. If the transformation functions are polynomials or rational functions, they can be represented as lists of coefficients. For linear polynomials, such lists are of fixed length, opening the possibility of representing the corresponding spatiotemporal objects using the standard relational data model.

In addition to implementation issues, it would be challenging to develop a type system that captures different dimensions of specialization present in geometric objects: region specialization (polygon, rectangle, …), transformation specialization (affine mapping, scaling, …) and time function specialization (rational, polynomial, …).

## Appendix: Technical proofs from Section 3.2

Proof of Lemma 3.2. Let $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ be the three corner points of the triangle $`S`$ and let $`(x_i,y_i)`$ be transformed by the affinity $`g_i`$ given by

$$\left(\begin{array}{cc}a_i(t)& b_i(t)\\ c_i(t)& d_i(t)\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}e_i(t)\\ f_i(t)\end{array}\right),i=1,2,3.$$

The condition for the existence of a single affine transformation that transforms these corner points according to their respective affinities is that the first matrix in the matrix equation below is regular.

$$\left(\begin{array}{cccccc}x_1& y_1& 0& 0& 1& 0\\ 0& 0& x_1& y_1& 0& 1\\ x_2& y_2& 0& 0& 1& 0\\ 0& 0& x_2& y_2& 0& 1\\ x_3& y_3& 0& 0& 1& 0\\ 0& 0& x_3& y_3& 0& 1\end{array}\right)\left(\begin{array}{c}a(t)\\ b(t)\\ c(t)\\ d(t)\\ e(t)\\ f(t)\end{array}\right)=\left(\begin{array}{c}a_1(t)x_1+b_1(t)y_1+e_1(t)\\ c_1(t)x_1+d_1(t)y_1+f_1(t)\\ a_2(t)x_2+b_2(t)y_2+e_2(t)\\ c_2(t)x_2+d_2(t)y_2+f_2(t)\\ a_3(t)x_3+b_3(t)y_3+e_3(t)\\ c_3(t)x_3+d_3(t)y_3+f_3(t)\end{array}\right)$$

This is the case if and only if the three points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ are not collinear. By assumption, this condition is satisfied. We find the affine transformation that transforms the triangle $`S`$ according to the different movements of the corner points, by solving the above matrix equation.

The result of this computation is the affine transformation with coefficients $`a(t)`$, $`b(t)`$, $`c(t)`$, $`d(t)`$, $`e(t)`$, and $`f(t)`$ that have the following form (to save space time dependence is omitted):

$$\begin{array}{ccc}a(t)\hfill & =\hfill & \frac{x_1a_1y_3+x_1a_1y_2y_2b_3y_3+e_2y_3e_1y_3y_2e_3+e_1y_2+y_1a_3x_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & +\frac{a_2x_2y_3+y_1e_3y_2a_3x_3+b_2y_2y_3y_1a_2x_2+y_1b_3y_3y_1e_2y_1b_2y_2+b_1y_1y_2b_1y_1y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1},\hfill \\ & & \\ b(t)\hfill & =\hfill & \frac{x_1b_2y_2x_2a_3x_3+x_2b_1y_1+x_1b_3y_3x_3a_1x_1x_1a_2x_2x_2b_3y_3x_2e_3+x_3a_2x_2}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & \frac{x_3e_1+x_3b_2y_2+x_1a_3x_3+x_2a_1x_1+x_1e_3+x_2e_1x_3b_1y_1+x_3e_2x_1e_2}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1},\hfill \\ & & \\ c(t)\hfill & =\hfill & \frac{x_1c_1y_2x_1c_1y_3y_1c_2x_2+y_1f_3y_2f_3+f_1y_2+y_1c_3x_3y_2d_3y_3+y_1d_3y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & +\frac{y_1d_2y_2+d_1y_1y_2+f_2y_3y_2c_3x_3y_1f_2d_1y_1y_3+c_2x_2y_3+d_2y_2y_3f_1y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1},\hfill \\ & & \\ d(t)\hfill & =\hfill & \frac{x_2d_1y_1+x_1d_3y_3x_3d_1y_1+x_3d_2y_2x_1c_2x_2+x_3c_2x_2+x_2c_1x_1x_2f_3x_3f_1}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & \frac{x_1c_3x_3x_2c_3x_3x_2d_3y_3x_1d_2y_2x_3c_1x_1+x_2f_1+x_1f_3x_1f_2+x_3f_2}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1},\hfill \\ & & \\ e(t)\hfill & =\hfill & \frac{y_1x_3e_2+y_2x_1e_3y_2x_3e_1y_2x_3a_1x_1+y_2x_1b_3y_3e_2x_1y_3+e_1x_2y_3+b_1y_1x_2y_3a_2x_2x_1y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & +\frac{y_1x_2e_3b_2y_2x_1y_3+y_2x_1a_3x_3+y_1x_3b_2y_2+y_1x_3a_2x_2y_1x_2b_3y_3y_1x_2a_3x_3y_2x_3b_1y_1+a_1x_1x_2y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1},\hfill \\ & & \\ f(t)\hfill & =\hfill & \frac{y_2x_3f_1y_2x_3c_1x_1+y_1x_3d_2y_2+y_1x_3c_2x_2y_1x_2c_3x_3y_1x_2d_3y_3+c_1x_1x_2y_3+y_2x_1f_3y_1x_2f_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}\hfill \\ & & +\frac{y_1x_3f_2+f_1x_2y_3f_2x_1y_3+y_2x_1c_3x_3y_2x_3d_1y_1+y_2x_1d_3y_3+d_1y_1x_2y_3d_2y_2x_1y_3c_2x_2x_1y_3}{x_1y_2x_1y_3+x_2y_3x_3y_2+x_3y_1x_2y_1}.\hfill \end{array}$$

Indeed, the transformation matrix

$$\left(\begin{array}{cc}a(t)& b(t)\\ c(t)& d(t)\end{array}\right)$$

is regular. Simplifying the expression $`a(t)d(t)b(t)c(t)`$ gives the result

$$\frac{x_1(t)y_2(t)x_2(t)y_1(t)x_1(t)y_3(t)+x_3(t)y_1(t)+x_2(t)y_3(t)x_3(t)y_2(t)}{y_2x_1y_3x_1y_2x_3+y_1x_3+y_3x_2y_1x_2},$$

where $`x_i(t)=a_i(t)x_i+b_i(t)y_i+e_i(t)`$ and $`y_i(t)=c_i(t)x_i+d_i(t)y_i+f_i(t)`$, $`i=1,2,3.`$ This denominator of this expression is zero if and only if the three points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ are collinear. By assumption, the points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$ form a triangle, however. The numerator is non-zero since the points $`g_1(x_1,y_1;t)`$, $`g_2(x_2,y_2;t)`$ and $`g_3(x_3,y_3;t)`$ form a triangle $`S_t`$ at any moment $`tI`$.

The coefficients of the resulting affine transformation are linear functions of the coefficients of the original transformations of the corner points $`(x_1,y_1)`$, $`(x_2,y_2)`$ and $`(x_3,y_3)`$. As the original transformations are rational, the resulting affine transformation is rational too.  $``$$``$

Proof of Lemma 3.3. Let $`(x_1,y_1)`$ and $`(x_2,y_2)`$ be the two end points of the line segment $`L`$ and let $`(x_i,y_i)`$ be transformed by the affinity $`g_i`$ given by

$$\left(\begin{array}{cc}a_i(t)& b_i(t)\\ c_i(t)& d_i(t)\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}e_i(t)\\ f_i(t)\end{array}\right),i=1,2.$$

We prove that there always exists a rational affine functions $`a(t)`$, $`b(t)`$, $`c(t)`$ and $`d(t)`$, such that the matrix

$$\left(\begin{array}{cc}a(t)& b(t)\\ c(t)& d(t)\end{array}\right)$$

transforms the line segment as described in the statement of this lemma (so, the translation components $`e(t)`$ and $`f(t)`$ of this affinity are identical zero).

The condition for the existence of a single affinity that transforms the two endpoints of the line segment according to their respective affinities is that the first matrix in the following equation is regular.

$$\left(\begin{array}{cccc}x_1& y_1& 0& 0\\ 0& 0& x_1& y_1\\ x_2& y_2& 0& 0\\ 0& 0& x_2& y_2\end{array}\right)\left(\begin{array}{c}a(t)\\ b(t)\\ c(t)\\ d(t)\end{array}\right)=\left(\begin{array}{c}a_1(t)x_1+b_1(t)y_1+e_1(t)\\ c_1(t)x_1+d_1(t)y_1+f_1(t)\\ a_2(t)x_2+b_2(t)y_2+e_2(t)\\ c_2(t)x_2+d_2(t)y_2+f_2(t)\end{array}\right)$$

This is true if the two endpoints of the line segment do not coincide.

The affinity that determines the movement of the intersection, can be found by solving the above equation: it is given by

$$\begin{array}{c}a(t)=\frac{e_1(t)y_2y_1a_2(t)x_2y_1b_2(t)y_2y_1e_2(t)+a_1(t)x_1y_2+b_1(t)y_1y_2}{x_1y_2x_2y_1}\hfill \\ \\ b(t)=\frac{x_2e_1(t)x_1a_2(t)x_2x_1b_2(t)y_2x_1e_2(t)+x_2a_1(t)x_1+x_2b_1(t)y_1}{x_1y_2x_2y_1}\hfill \\ \\ c(t)=\frac{f_1(t)y_2y_1c_2(t)x_2y_1d_2(t)y_2y_1f_2(t)+c_1(t)x_1y_2+d_1(t)y_1y_2}{x_1y_2x_2y_1}\hfill \\ \\ d(t)=\frac{x_2f_1(t)x_1c_2(t)x_2x_1d_2(t)y_2x_1f_2(t)+x_2c_1(t)x_1+x_2d_1(t)y_1}{x_1y_2x_2y_1}.\hfill \end{array}$$

As in the case of the previous lemma, it can be shown that

$$\left(\begin{array}{cc}a(t)& b(t)\\ c(t)& d(t)\end{array}\right)$$

is regular and therefore determines an affinity.

This solution is linear in the components of the original rational affine transformations of $`𝒪_1`$ and $`𝒪_1`$, so it is also rational.  $``$$``$

Proof of Lemma 3.4. Let $`(x_i,y_i)`$ and $`(u_i,v_i)`$ be the two end points of the line segment $`L_i`$ ($`i=1,2`$). Let $`L_i`$ be transformed by the affinity $`g_i`$ given by

$$\left(\begin{array}{cc}a_i(t)& b_i(t)\\ c_i(t)& d_i(t)\end{array}\right)\left(\begin{array}{c}x\\ y\end{array}\right)+\left(\begin{array}{c}e_i(t)\\ f_i(t)\end{array}\right),i=1,2.$$

We compute the intersection of $`g_1(L_1;t)`$ and $`g_2(L_2;t)`$ by solving the equations

| $`\lambda _1(a_1(t)x_1+b_1(t)y_1+e_1(t))+(1\lambda _1)(a_1(t)u_1+b_1(t)v_1+e_1(t))=`$ |
| --- |
| $`\lambda _2(a_2(t)x_2+b_2(t)y_2+e_2(t))+(1\lambda _2)(a_2(t)u_2+b_2(t)v_2+e_2(t))`$ |
| and |
| $`\lambda _1(c_1(t)x_1+d_1(t)y_1+f_1(t))+(1\lambda _1)(c_1(t)u_1+d_1(t)v_1+f_1(t))=`$ |
| $`\lambda _2(c_2(t)x_2+d_2(t)y_2+f_2(t))+(1\lambda _2)(c_2(t)u_2+d_2(t)v_2+f_2(t))`$ |

in $`\lambda _1`$ and $`\lambda _2`$. The determinant of the matrix

$$\left(\begin{array}{cc}a_1(t)x_1+b_1(t)y_1a_1(t)u_1b_1(t)v_1& a_2(t)u_2+b_2(t)v_2a_2(t)x_2b_2(t)y_2\\ c_1(t)x_1+d_1(t)y_1c_1(t)u_1d_1(t)v_1& c_2(t)u_2+d_2(t)v_2c_2(t)x_2d_2(t)y_2\end{array}\right)$$

is zero if one of the $`g_i(L_i;t)`$ is parallel to one of the coordinate axes or if both line segments are parallel. The latter case is no problem as we can use the finite time partition (Property 3.5) to consider only those subintervals $`J`$ of $`I`$ during which the intersection exists. We treat the case of line segments parallel to one of the coordinate axis separately.

If the line segments are not parallel to one of the coordinate axes, the intersection point is the following. We only give the $`x`$-coordinate $`s_x(t)`$ (the $`y`$-coordinate $`s_y(t)`$ is expressed similarly). For clarity time dependence in the coefficients of the affinities is omitted.

We have that $`s_x(t)((a_1x_1+b_1y_1a_1u_1b_1v_1)(d_2v_2+c_2x_2+d_2y_2c_2u_2)+(a_2u_2+b_2v_2a_2x_2b_2y_2)(c_1x_1+d_1y_1c_1u_1d_1v_1))`$ equals

| $`((((x_2v_1u_2v_1)a_2+(v_2v_1+y_2v_1)b_2)d_1+((f_1d_2v_2f_2)x_2+u_2d_2y_2+(f_1+f_2)u_2)a_2+`$ |
| --- |
| $`(e_2c_2+b_2v_2c_2)x_2+((f_2c_2u_2+f_1)y_2+(f_1+f_2)v_2)b_2+e_2d_2y_2e_2d_2v_2e_2c_2u_2)x_1+`$ |
| $`((u_2u_1x_2u_1)a_2+(y_2u_1+v_2u_1)b_2)d_1y_1+((u_1d_2v_2+(f_1+f_2)u_1)x_2u_2u_1d_2y_2+`$ |
| $`(f_1f_2)u_2u_1)a_2+(b_2v_2u_1c_2e_2u_1c_2)x_2+((u_1c_2u_2+(f_1+f_2)u_1)y_2+(f_1f_2)v_2u_1)b_2`$ |
| $`e_2u_1d_2y_2+e_2u_1d_2v_2+e_2u_1c_2u_2)a_1+(((x_2v_1+u_2v_1)a_2+(y_2v_1+v_2v_1)b_2)c_1b_1+`$ |
| $`((u_2e_1x_2e_1)a_2+(v_2e_1y_2e_1)b_2)c_1)x_1+((((u_2u_1+x_2u_1)a_2+(v_2u_1+y_2u_1)b_2)c_1+`$ |
| $`\left(\left(f_1d_2v_2f_2\right)x_2+u_2d_2y_2+\left(f_1+f_2\right)u_2\right)a_2+\left(e_2c_2+b_2v_2c_2\right)x_2+`$ |
| $`((f_2c_2u_2+f_1)y_2+(f_1+f_2)v_2)b_2+e_2d_2y_2e_2d_2v_2e_2c_2u_2)y_1+`$ |
| $`\left(\left(v_1d_2v_2+\left(f_1+f_2\right)v_1\right)x_2u_2v_1d_2y_2+\left(f_1f_2\right)u_2v_1\right)a_2+\left(b_2v_2v_1c_2e_2v_1c_2\right)x_2+`$ |
| $`((v_1c_2u_2+(f_1+f_2)v_1)y_2+(f_1f_2)v_2v_1)b_2e_2v_1d_2y_2+e_2v_1c_2u_2+e_2v_1d_2v2)b_1+`$ |
| $`((u_2e_1x_2e_1)a_2+(v_2e_1y_2e_1)b_2)d_1y_1+((x_2u_1e_1u_2u_1e_1)a_2+`$ |
| $`(y_2u_1e_1v_2u_1e_1)b_2)c_1+((x_2v_1e_1u_2v_1e_1)a_2+(v_2v_1e_1+y_2v_1e_1)b_2)d_1)`$. |

For the intersection point to exists, $`((a_1x_1+b_1y_1a_1u_1b1_v1)(d_2v_2+c_2x_2+d_2y_2c_2u_2)+(a_2u_2+b_2v_2a_2x_2b_2y_2)(c_1x_1+d_1y_1c_1u_1d_1v_1))`$ should be different from zero. This condition expresses the fact that the line segments are not parallel, which is true by assumption.

The intersection point moves rationally, as its functions of time are rational functions in the coefficients of the original transformations. For any choice of reference point, it is clear that a rational affinity can be found that moves it as described by the above formulas $`(s_x(t),s_y(t))`$.

If one of the line segments $`g_1(L_1;t)`$ or $`g_2(L_2;t)`$ is parallel to the $`x`$-axis, the intersection point will have as $`y`$-coordinate the $`y`$-coordinate of that line segment. The same holds for segments parallel to the $`y`$-axis. In the case that one segment is parallel to the $`y`$-axis and the other to the $`x`$-axis, the intersection point moves with linear, polynomial, respectively rational functions of time, if both the objects $`𝒪_1`$ and $`𝒪_2`$ move with linear, polynomial, respectively rational functions of time.  $``$$``$