Strong Euler well-composedness

In this paper, we define a new flavour of well-composedness, called strong Euler well-composedness. In the general setting of regular cell complexes, a regular cell complex of dimension n is strongly Euler well-composed if the Euler characteristic of the link of each boundary cell is 1, which is the Euler characteristic of an (n-1)\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$(n-1)$$\end{document}-dimensional ball. Working in the particular setting of cubical complexes canonically associated with n\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n$$\end{document}D pictures, we formally prove in this paper that strong Euler well-composedness implies digital well-composedness in any dimension n≥2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n\ge 2$$\end{document} and that the converse is not true when n≥4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$n\ge 4$$\end{document}.


Introduction
The concept of well-composedness of a digital set (also called picture) was first introduced in Latecki et al. (1995) for two-dimensional (2D) pictures and extended later in Latecki (1997) for three-dimensional (3D) pictures: a well-composed picture satisfies that its continuous analog has a boundary surface that is a manifold. The concept is described in terms of forbidden subsets (also called critical configurations) for which the picture is not well-composed. 3D well-composed pictures may have some computational advantages regarding the application of several algorithms in computer vision, computer graphics and image processing (Siqueira et al. 2005;Boutry et al. 2018). For example, the topology of a given 2D picture can be preserved by rigid transformations thanks to well-composedness; topology-preserving front propagation can lead to well-composed segmentation; Euler numbers of 2D pictures can be computed locally thanks to well-composedness; well-composed Jordan curves are known to separate the digital plane; the boundary of the continuous analog of a well-composed 3D picture is a manifold. Furthermore, numerous applications related to well-composed pictures exist: the Marching Cubes Algorithm (Siqueira et al. 2008) has no ambiguous cases on well-composed pictures (no hole problem occurs), we can obtain thin topological maps on pictures thanks to well-composedness (Marchadier et al. 2004) and the tree of shapes is well-defined (Géraud et al. 2013). Regarding the new flavour of strong Euler well-composedness introduced in this paper, there is no known application so far. Nevertheless, since strong Euler well-composedness can be defined on regular cell complexes and because it implies DWCness on cubical grids, we think that this flavour of well-composedness could be used in wider applications such as, for example, the computation of thin topological maps on regular cell complexes.
In Boutry et al. (2015b), the concept of well-composedness and critical configuration was extended to any dimension n ≥ 2. Then, an nD picture is continuously well-composed if its continuous analog has a boundary surface that is an (n − 1)D manifold, whereas an nD picture is digitally well-composed if it does not contain any critical configuration.
Equivalences between different flavours of well-composedness have been studied in Boutry et al. (2018), namely: continuous well-composedness (CWCness), digital wellcomposedness (DWCness), well-composedness in the Alexandrov sense (AWCness), well-composedness based on the equivalence of connectivities (EWCness) and wellcomposedness on arbitrary grids (AGWCness). More specifically, it is well-known that AWCness, CWCness, DWCness and EWCness are equivalent in 2D. In 3D, only AWCness, CWCness, and DWCness are equivalent. No link between AGWCness and other flavours of well-composedness is known. For pictures of dimension n ≥ 4, our knowledge of the logical relationships between CWCness, DWCness and EWCness is very incomplete, though it has been shown that AWCness is equivalent to DWCness (see Boutry et al. 2020c) and that DWCness implies EWCness (see Boutry et al. 2015b). Recently, in Boutry et al. (2020b), a counterexample in 4D has been given to prove that DWCness does not imply CWCness, which the authors consider to be an important result since it breaks with the idea that all the different flavours of well-composedness are equivalent.
In Gonzalez-Diaz et al. (2015, 2017, Boutry et al. (2019), we defined another flavour of well-composedness called self-dual weak well-composedness (swWCness) that extends the notion of DWCness to any regular cell complex. Roughly speaking, a regular cell complex is a topological space made up of a collection of k-cells (homeomorphic 1 to k-dimensional balls) glued together by their boundaries. A regular cell complex satisfying that any of its k-cell is a k-dimensional cube is referred to as a cubical complex. A cubical complex Q(I ) can always be associated with any nD picture I (we will see later how to construct Q(I ) from I ). We say that a regular cell complex K (I ) is a cell complex over I if there exists a deformation retraction from K (I ) to Q(I ). Besides, K (I ) is said to be weakly well-composed if, for each vertex v on the boundary of K (I ), the set of n-cells of K (I ) incident to v are face-connected. In Gonzalez-Diaz et al. (2015, 2017, Boutry et al. (2019), we also developed a topological method for repairing the cubical complex Q(I ) canonically associated with an nD picture I not being DWC. Such a method constructs a "simplicial decomposition" P S (I ), P S (bI ) of I , where bI is I 's complement (an nD picture that is precisely defined in Definition 1), and where P S (I ) and P S (bI ) satisfy the following conditions: (1) P S (I ) is a cell complex over I , P S (bI ) is a cell complex over bI , and (2) P S (I ) and P S (bI ) are weakly well-composed, that is, P S (I ), P S (bI ) is self-dual weakly well-composed.
As it is shown in Boutry et al. (2019), in the setting of cubical complexes canonically associated with nD pictures, swWCness is equivalent to DWCness for all n ≥ 2. Our ultimate goal is to prove that our topological reparation method provides CWC regular cell complexes.
Since, according to us, such a goal is not reachable yet, in Boutry et al. (2020a), we proposed an intermediary flavour of well-composedness, called Euler wellcomposedness (χ WCness). The cell complex K (I ) over I is χ WC if the Euler characteristic of the link of each vertex of the boundary of K (I ) is equal to 1, which is the Euler characteristic of an (n − 1)-dimensional ball. Although partial results regarding χ WCness for nD pictures (in the case of n = 2, 3, 4) were given in Boutry et al. (2020a), we have observed that, in general, χ WCness does not imply DWCness. For example, consider the 4D picture I in Fig. 1, whose foreground is the set of points F I = {(0, 1, 0, 0), (0, 0, 0, 0), (0, 0, 1, 0), (1, 0, 1, 0), (1, 1, 1, 0), (0, 2, 0, 0), (0, 2, 1, 0), (1, 2, 1, 0)}. Clearly, I contains the 2D critical configuration { p, p } where p = (0, 1, 0, 0) and p = (1, 1, 1, 0), while it can be shown that Q(I ) is χ WC. This is established below in the proof of Lemma 3. That proof also shows that Q(bI ) is χ WC. It follows from the χ WCness of Q(I ) and Q(bI ) in this example that Theorem 4 of Boutry et al. (2020a) is actually incorrect -its computer-assisted "proof" was unfortunately flawed. The fact that a 4D picture I need not be DWC even if both of Q(I ) and Q(bI ) are χ WC is a significant weakness of the concept of χ WCness. Accordingly, the present paper will introduce a new flavour of well-composedness called strong Euler well-composedness ( + χWCness), which is a concept more restrictive than the one of χ WCness given in Boutry et al. (2020a), with the aim of proving that + χWCness implies DWCness in any dimension n ≥ 2, even though the converse is not true in any dimension n ≥ 4. The authors are convinced that CWCness implies + χWCness, but do not have a rigorous proof of this at the moment. In such a case, + χ WCness would be an effectively computable property useful to detect cases in which the cubical complex canonically associated with a DWC picture is not CWC.
The plan is the following: Sect. 2 recalls the background needed to understand the rest of the paper. Section 3 introduces the concept of strong Euler wellcomposedness. Section 4 shows that strong Euler well-composedness implies digital well-composedness. Section 5 shows that the converse is not true. Finally, Sect. 6 concludes the paper.

Background
First, let us introduce the concept of n-dimensional digital sets (also called nD pictures), taken from the field of digital geometry.
Definition 1 (nDpicture) Let n ≥ 1 be an integer and Z n the set of points with integer coordinates in R n . An nD picture is a pair I = (Z n , F I ), where F I is a subset of Z n . The set F I is called the foreground of I and the set Z n \F I the background of I . The complement of I is defined as the nD picture bI = (Z n , Z n \F I ).
We say that a property P of nD pictures is self-dual if an nD picture I has property P whenever the picture bI has property P.
In Boutry et al. (2015b), the concept of block was introduced to extend the notion of DWCness to any dimension. Given a point z ∈ Z n and a family of vectors . , e n } is the canonical basis of Z n ), the k-block associated with the pair (z, F) is the set defined as: Thus, a 0-block is a point, a 1-block is a set of two points in Z n on an unit edge, a 2-block is a set of four points on a unit square, and so on. A subset B ⊂ Z n is called a block if there exists a couple (z, F) ∈ Z n × P(B) (where P(B) represents the set of all the subsets of B), such that B = B(z, F).
Definition 2 (antagonists) Two points p, q belonging to a block B are said to be antagonists in B if their distance is equal to the maximum distance using the L 1norm 2 between two points in B, that is, Remark 1 The antagonist of a point p in a block B containing p exists and is unique.
Notice that when two points (x 1 , . . . , x n ) and (y 1 , . . . , y n ) in Z n are antagonists in a k-block with k ∈ 0, n then there is a set Definition 3 (critical configuration) Let I = (Z n , F I ) be an nD picture and B a kblock with k ∈ 2, n . We say that I contains a critical configuration in the block B if The above concept of critical configuration is used to define the notion of DWCness, based on local patterns, in any dimension.
Definition 4 (digital well-composedness) An nD picture is said to be digitally wellcomposed (DWC) if it does not contain any critical configuration in any block.
Notice that the above definition of digital well-composedness is self-dual. Roughly speaking, an nD cubical complex Q is a special kind of regular cell complex made up of a collection of n-dimensional cubes glued together by their boundaries (faces). If a k-dimensional cube (k-cell) μ ∈ Q is a face of an -dimensional cube ( -cell) σ ∈ Q and k < then μ is said to be a proper face of σ and σ a proper coface of μ. A maximal cell of Q is not a proper face of any other cell of Q. The next definition states how an nD cubical complex can always be associated with an nD picture.
Definition 5 (cubical complex canonically associated with an nDpicture) The cubical complex Q(I ) canonically associated with an nD picture I = (Z n , F I ) is the nD cubical complex whose maximal cells are n-dimensional unit cubes centered at each point in F I and whose (n − 1)-faces are (n − 1)-dimensional unit cubes parallel to the coordinate hyperplanes. Figure 2 shows, from left to right, the cubical complexes canonically associated with a 2D picture and a 3D picture that each have two foreground points.
Notice that each cell in the cubical complex Q(I ) is uniquely determined by the coordinates of its barycenter. This way, each n-dimensional cube can be encoded by its barycenter, which is a point p ∈ Z n ; its (n − 1)-faces by points under the form p± 1 2 e i , with e i ∈ B = {e 1 , . . . , e n }; in general, its k-faces can be encoded by points under the form p + i∈{i 1 ,...,i n−k } λ i e i , where {i 1 , . . . , i n−k } is a set of n − k different indices in 1, n and λ i ∈ {± 1 2 }. That is, k-cells are represented by points with k integer coordinates and n − k coordinates that are odd multiples of 1 2 . Remark 2 In the sequel, we will identify a k-cell of Q(I ) with its barycenter, if no confusion may arise. Besides, from now on, when needed and for the sake of simplicity, a point p in R n will be expressed as Cartesian products of its coordinates: Besides, when a coordinate is repeated k times, we will write ( p 1 , k . . ., p 1 ) = ( p 1 ) k . These notations could be combined. For example: The boundary surface of an nD cubical complex Q, denoted by ∂ Q, is the (n − 1)D cubical complex composed by the (n − 1)-dimensional cubes that are proper faces of exactly one maximal cell of Q, together with all their faces. See Fig. 3 for toy examples.
The underlying space of an nD cubical complex Q, i.e., the union of the ndimensional cubes of Q as subspaces of R n , will be denoted by |Q|. An nD cubical complex Q is said to be (continuously) well-composed (CWC) if |∂ Q| is an (n − 1)D manifold, that is, each point of |∂ Q| has a neighborhood in |∂ Q| homeomorphic to R n−1 .

Introducing the concept of strong Euler well-composedness
In this section, we introduce a new concept of Euler well-composedness that is more restrictive than the one given in Boutry et al. (2020a).
Definition 6 (Euler characteristic) Let S be a finite set of cells. Let a k denote the number of k-cells of S. The Euler characteristic of S is defined as: Recall that the Euler characteristic of a regular cell complex depends only on its underlying space's homotopy type (Hatcher 2002, p. 146).
Although the following concepts could be defined on regular cell complexes without problem, we will define them in terms of nD cubical complexes, since that will be our context. We need now to extend the notion of χ -critical vertex given in Boutry et al. (2020a) to the notion of χ -critical cell.
For example, in all the cases of Fig. 4 except for case (c), the vertex v is a χ -critical vertex for Q(I ). Nevertheless, in case (c), the edge e is χ -critical for Q(I ). (1) The result below extends Remark 3 to k-cells with k ≥ 0.

Lemma 1 Let Q(I ) be a cubical complex canonically associated with an nD picture I and let σ be a k-cell of Q(I ) with k < n, then:
Proof We will proceed by induction. If k = 0, then Eq.
(2) coincides with Eq. (1). Let k > 0. Using the notation given in Remark 2, we can assume, without loss of generality, that Let I 0 be the picture such that Then σ = (0) × σ and σ is a (k − 1)-cell of Q(J ). Now,

Now, assuming by induction that χ Lk
concluding the proof.
It follows from Lemma 1 that a cell σ ∈ ∂ Q(I ) is χ -critical for Q(I ) if and only if: Notice that, following the same arguments as in the proof of Lemma 1, we can express the star and the link of any k-cell σ of Q(I ) (0 < k < n) in terms of the star and the link of a vertex v of Q(J ), where J is an (n − k)-dimensional "slice" of I and we have that

Remark 4
Let Q(I ) be the cubical complex canonically associated with an nD picture I , n ≥ 2. Then, for any vertex v ∈ ∂ Q(I ), there exist 2 k n k k-cells in St Q(I )∪Q(bI ) (v). Hence, Moreover, if σ is an r -cell of ∂ Q(I ) then for 0 ≤ k ≤ n − r the number of Then, Definition 9 (strong Euler well-composedness) An nD cubical complex is Euler wellcomposed (χ WC) if it has no χ -critical vertices (Boutry et al. 2020a). It is strongly Euler well-composed ( + χ WC) if it has no χ -critical cells.
Observe that the definition of + χ WCness is more restrictive than the definition of χ WCness given in Boutry et al. (2020a) in the sense that we do not only check if there are χ -critical vertices (or 0-cells) but we also check if there are χ -critical k-cells for any k ∈ Z. With the following lemma, we can conclude that + χWCness and DWCness are equivalent when we deal with cubical complexes canonically associated with nD pictures for n = 2, 3.

Lemma 2 Let Q(I ) be the cubical complex canonically associated with an nD picture I for n = 2, 3. Then Q(I ) has no χ -critical cells if and only if I is DWC.
Proof We have verified by computer search that there are no counterexamples to this lemma.
With the following result, we can conclude that the definition of sχ WCness given in Boutry et al. (2020a) is weaker than the definition of + χWCness given in this paper for nD pictures with n ≥ 4, that is, sχ WCness does not imply + χWCness for nD pictures with n ≥ 4.

Fig. 5
An example of a 4D picture whose canonically associated cubical complex has the χ -critical cell 1 2 , 1 2 , 1 2 , 0 . The five red points constitute the foreground of the picture. Observe that the 4D picture of Fig. 1 can be obtained from this 4D picture by a reflection in the hyperplane x 2 = 1 (Color figure online)
Therefore, σ is a χ -critical (n − 3)-cell for Q(I ) (with n − 3 ≥ 1), so Q(I ) is not + χWC. Now, let us prove that none of the vertices of ∂ Q(I ) are χ -critical for Q(I ) or Q(bI ).
First, let us see that χ St Q(I ) (v) = 0. Let x n be the last coordinate of v (then x n = ± 1 2 ). Let  (y 1 , . . . , y n−1 , x n ) for each σ = (y 1 , . . . , y n−1 , 0) ∈ A. Then, χ({ f (σ )}) = −χ({σ }) for any σ ∈ A since the dimension of f (σ ) is one less than the dimension of σ . Therefore, is isometric to one of the following sets: An intuition of this last assertion can be obtained by looking at Fig. 6 where each colored point represents a set of 2 n−3 vertices of ∂ Q(I ) that have the same first three coordinates, and for every vertex v in that set the point's color indicates which set A i the set St Q(I )∪Q (bI ) Finally, by Remark 4, Definition 10 (self-dual strong Euler well-composedness) The cubical complex Q(I ) canonically associated with an nD picture I is self-dual strongly Euler well-composed Proof Let us assume that then, using Remark 4, we conclude that: Nevertheless, the converse is not true.

Lemma 5 The fact that χ St ∂ Q(I ) (v) = (−1) n−1 for any vertex v ∈ ∂ Q(I ) does not imply that Q(I ) is χ WC nor that I is DWC.
Proof Case (b) of Fig. 4 is a simple counterexample. In that case, we have that Fig. 4 is not DWC.
In the next section, we will prove our main result, that is, + χ WCness implies DWCness in any dimension n ≥ 2 although the converse is not true when n ≥ 4. Therefore, in principle, we do not need the concept of self-dual + χWCness for our purpose. We end this section with the open question of whether self-dual strong Euler well-composedness is in fact equivalent to strong Euler well-composedness.

Strong Euler well-composedness implies digital well-composedness
Let us now see one of the two main results of the paper, stating that + χWCness implies DWCness for any nD picture with n ≥ 2.

Theorem 1 Strong Euler well-composedness implies digital well-composedness in nD for n ≥ 2.
Proof Let us prove that not DWCness implies not + χ WCness. Let I = (Z n , F I ) be an nD picture with n ≥ 2, and let k be an integer in 0, n − 2 . Let { p, p } be two antagonists in an (n − k)-block B that yields a critical configuration for I .
Let us assume, first, that F I ∩ B = {p, p }, that is, it is a critical configuration. Then

Digital well-composedness does not imply (strong) Euler well-composedness
Let us see next, an example of an nD picture (n ≥ 4) that is digital well-composed but not Euler well-composed, showing that DWCness does not imply χ WCness and, therefore, DWCness does not imply + χ WCness.

Theorem 2 DWCness does not imply χ WCness for any dimension n ≥ 4.
Proof Let us fix n ≥ 4. We will give an example of an nD picture I n = (Z n , F I n ) (see Fig. 7) such that I n is DWC but Q(I n ) is not χ WC. Let To prove that I n is DWC we only have to check that it does not contain any critical configuration. This has been checked in Boutry et al. (2020a) when n = 4 and the same reasoning can be extended to nD for n > 4. Now, observe that the set of n-cubes of Q(I n ) encoded by F I n are incident to the vertex v = 1 2 n ∈ ∂ Q(I ). Then, to prove that Q(I n ) is not χ WC, it is enough to Let us see that the counterexample works in 4D. In that case, v = ( 1 2 , 1 2 , 1 2 , 1 2 ) and the hypercubes in St Q(I 4 ) (v) are encoded by the points (0, 0, 0, 0), (0, 0, 0, 1), (0, 0, 1, 1), (0, 1, 1, 1), (1, 1, 1, 1), (1, 1, 1, 0), (1, 1, 0, 0) and (1, 0, 0, 0). Then, it is easy to check that χ St Q(I 4 ) (v) = 1 − 8 + 24 − 24 + 8 = 1 = 0, so Q(I 4 ) is not χ WC. Another way to see that Theorem 2 holds when n = 4 is that St Q(I 4 )∪Q(bI 4 ) (v)\St Q(I 4 ) (v) = A B where A is composed by the eight 3-cells centered at the barycenters of the eight edges that joint two gray points of Fig. 7

Conclusions and future works
In this paper, we have provided a new flavour of well-composedness, called strong Euler well-composedness, that is more restrictive than the definition of Euler wellcomposedness given in Boutry et al. (2020a). We have proven two fundamental properties: first, strong Euler well-composedness implies digital well-composedness in any dimension n ≥ 2; second, the converse is not true: digital well-composedness does not imply strong Euler well-composedness as soon as we are in dimension n ≥ 4.
As a future work, we plan to prove that the definition of + χWCness provided in this paper is robust to cubical barycentric subdivisions. Observe that a cubical barycentric subdivision of Q(I ) is the nD cubical complex canonically associated with the linear interpolation of the nD picture I in all the possible directions e i , being {e 1 , . . . , e n } the canonical basis of Z n . This is another reason why we believe that it is a better choice to define well-composedness based on χ -critical cells and not only on χ -critical vertices as it was done in Boutry et al. (2020a).
We also plan to prove that if we apply the reparation method given in Gonzalez-Diaz et al. (2015, 2017, Boutry et al. (2019) to any χ -critical cell, then P S (I ) (i.e., the simplicial subdivision of the "repaired complex" P(I )) is + χWC, going a step forward to our ultimate goal that is to prove that P(I ) is a CWC regular cell complex.