Correction to: Found Comput Math https://doi.org/10.1007/s10208-022-09574-8

1 Introduction

We are grateful to the research group comprising Lihong Zhi, Nan Li, Zhihong Yang and Zijia Li for alerting us to an error in [5]: they discovered that the Macaulay2 software package accompanying that paper did not output the origin as a separate stratum when called with the projective Whitney cusp as input. Our goal in this note is to explain and fix the error, which originated from a misinterpretation of the algebraic criterion [3, Remark 4.11] that underlies the algorithms of [5]. The statement of the criterion—taken from [3, Remark 4.11] and reproduced below—paraphrases [7, Proposition 1.3.8].

Lemma 0.1

Let Z be an analytic variety with conormal map \(\kappa _Z:\textbf{Con}(Z) \twoheadrightarrow Z\), and let \(S\subset Z\) be a smooth analytic subset. The pair \((Z_{\textrm{reg}},S)\) satisfies Whitney’s Condition (B) if and only if we have the containment

$$\begin{aligned} \mathscr {I}[\textbf{Con}(Z)\cap \textbf{Con}(S)] \subset \overline{\mathscr {I}}[\kappa _Z^{-1}(S)] \end{aligned}$$
(1)

of ideal sheaves, where the right side is an integral closure.

Fix a projective variety \(X \subseteq \mathbb {P}^n\) and an irreducible subvariety Y of its singular locus \(X_\text {sing}\). The proof of [5, Theorem 4.3] uses Lemma 0.1 in the case where \(Z = X\) and \(S = Y - A\), with A being a certain proper subvariety of Y that contains \(Y_\text {sing}\). It turns out, however, that the Lemma only holds in this case if \(S=Y-A\) is closed (namely, if A is empty). To produce the correct variant of (1) when S is open, we are compelled to return to the original statement of [7, Proposition 1.3.8].

1.1 Outline

In Sect. 1, we derive a version of Lemma 0.1 for the case where S is open directly from [7] in Sect. 1. We rectify our proof of [5, Theorem 4.3] in Sect. 2, and describe the concomitant modifications to [5] in Sect. 3. These corrections have been fully incorporated in the arXiv version of our paper [6].

2 The Correct Interpretation

We work throughout in a polynomial ring R which will be either be the coordinate ring of \(\mathbb {P}^n\) or of \(\mathbb {P}^n\times (\mathbb {P}^n)^*\).

1.1 Notation, etc. The following conventions are adopted in the sequel:

  1. (1)

    When considering a closed subscheme Z of either ambient space, we will denote its defining ideal sheaf by \(\mathscr {I}[Z]\) — although this is simply an R-ideal, the notation serves to emphasize that this ideal may (and often will) fail to be radical.

  2. (2)

    In contrast, the radical ideal associated to a variety V in either of our ambient spaces will be written \(I_V\). We also write \(V_\textrm{sing}\) for the singular locus, and \(V_\textrm{reg}=V-V_\textrm{sing}\) for the regular points.

  3. (3)

    We write \(\overline{\mathscr {I}}[Z]\) to indicate the integral closure of \({\mathscr {I}}[Z]\).

  4. (4)

    Given a subvariety \(W \subset V\) and the conormal map \(\kappa _V:\textbf{Con}(V) \twoheadrightarrow V\) of V, the ideal sheaf of the closed scheme \(\overline{\kappa _V^{-1}(V-W)}\) is denoted \(\mathscr {I}[\kappa _V^{-1}(V-W)]\); this equals the intersection of all primary components of \(\mathscr {I}[\kappa _V^{-1}(V)]\) that are not supported on \(\kappa _V^{-1}(W)\).

  5. (5)

    Finally, we recall that for a polynomial ideal \(I \lhd R\) with primary decomposition \(I=Q_1 \cap \cdots \cap Q_r\), the set \(\text {Assoc}(I)\) of I’s associated primes consists of prime ideals given by taking the radical of each primary component \(\{ \sqrt{Q_1}, \dots ,\sqrt{Q_r} \}\).

1.2  An Algorithmic Criterion for Condition (B) The following result is [7, Prop 1.3.8], specialized to our situation and using the above notation.Footnote 1

Lemma 1.1

Let \(X \subset \mathbb {P}^n\) be a projective variety with conormal map \(\kappa _X:\textbf{Con}(X) \twoheadrightarrow X\), and consider a subvariety Y of X satisfying \(Y \subset X_{\textrm{sing}}\). Let \(I_p\) be the maximal ideal of a point \(p\in Y_{\textrm{reg}}\) considered in the coordinate ring of \(\mathbb {P}^n\times (\mathbb {P}^n)^*\). Then Condition (B) holds for the pair \((X_{\textrm{reg}},Y_{\textrm{reg}})\) at p if and only if we have a containment

$$\begin{aligned} \text {Assoc}\left( \mathscr {I}[\textbf{Con}(X)\cap \textbf{Con}(Y)]+I_p\right) \supset \text {Assoc}\left( \overline{\mathscr {I}}[\kappa _X^{-1}(Y)]+I_p\right) \end{aligned}$$

of associated primes.

If \(A \subset Y\) is a closed proper subvariety that contains \(Y_\text {sing}\) but not the point p, then the above criterion for \((X_{\textrm{reg}},Y_{\textrm{reg}})\) gives an identical criterion for the pair \((X_{\textrm{reg}},Y-A)\) at p. Our goal here is to derive from this local result a global algorithmic criterion for checking whether or not \((X_\text {reg},Y-A)\) satisfies Condition (B) at all points \(y \in Y-A\). In the statement below, \({\mathscr {I}}[\kappa _X^{-1}(Y-A)]\), respectively \(\overline{\mathscr {I}}[\kappa _X^{-1}(Y-A)]\), denotes the intersection of all primary components of \({\mathscr {I}}[\kappa _X^{-1}(Y)]\), respectively \(\overline{\mathscr {I}}[\kappa _X^{-1}(Y)]\), which are not supported on \(\kappa _X^{-1}(A)\).

Lemma 1.2

Let XY be as defined in the statement of Lemma 1.1 and let \(A\subsetneq Y\) be a subvariety with \(Y_\textrm{sing }\subset A\). Then Condition (B) holds for all points in the pair \((X_\textrm{reg}, Y-A)\) if and only if we have the containment

$$\begin{aligned} \text {Assoc}\left( \mathscr {I}[\textbf{Con}(X)\cap \textbf{Con}(Y)] + \mathscr {I}[\kappa _X^{-1}(Y-A)] \right) \supset \text {Assoc}\left( \overline{\mathscr {I}}[\kappa _X^{-1}(Y-A)]\right) \end{aligned}$$
(2)

of associated primes.

Proof

Set \(Y'=Y-A\). We know from Lemma 1.1 that Condition (B) holds for \((X_\text {reg},Y')\) at a point \(p\in Y'\) if and only if we have the containment

$$\begin{aligned} \text {Assoc}\left( \mathscr {I}[\textbf{Con}(X)\cap \textbf{Con}(Y)]+I_p\right) \supset \text {Assoc}\left( \overline{\mathscr {I}}[\kappa _X^{-1}(Y)]+I_p\right) . \end{aligned}$$
(3)

We now claim that requiring such a containment for each p in \(Y'\), is equivalent to the containment in (2).

Since p is not in A by assumption, we have that \(\kappa _A^{-1}(p)\) is not contained in any primary components supported on \(\kappa ^{-1}(A)\) and hence, when summing with \(I_p\), we can replace \(\mathscr {I}[\kappa _X^{-1}(Y-A)]\) on the left side of (2) by \(\mathscr {I}[\kappa _X^{-1}(Y)]\). Similarly, when summing with \(I_p\), the integral closure on the right side may as well be replaced by \(\overline{\mathscr {I}}[\kappa _X^{-1}(Y)]\).

Recall that \(\mathscr {I}[\kappa _X^{-1}(Y-A)]\) is the ideal sheaf of the scheme \(\overline{\kappa _X^{-1}(Y-A)}\); thus, if we have containment (3) for every \(p\in Y'\), then we automatically have the corresponding containment for the Zariski closures, hence we obtain (2).

Conversely, suppose that (2) holds and consider any \(p\notin A\). All associated primes of \(\overline{\mathscr {I}}[\kappa _X^{-1}(Y-A)]+I_p\) arise from summing \(I_p\) with associated primes of \(\overline{\mathscr {I}}[\kappa _X^{-1}(Y-A)]\). Since all these primes are also contained in the left hand set, and since we have

$$\begin{aligned} \mathscr {I}[\kappa _X^{-1}(Y-A)] +I_p=\mathscr {I}[\kappa _X^{-1}(Y)]+I_p=I_{\textbf{Con}(X)}+I_p \end{aligned}$$

we obtain the desired containment (3). \(\square \)

3 Rectifying the Argument

Let R be the coordinate ring of \(\mathbb {P}^n \times (\mathbb {P}^n)^*\), and consider a projective variety \(X \subset \mathbb {P}^n\) with conormal map \(\kappa _X:\textbf{Con}(X) \twoheadrightarrow X\). For any subvariety \(Y \subset X\), the ideal sheaf \(\mathscr {I}[\kappa _X^{-1}(Y)]\) constitutes an honest homogeneous ideal \(I_Y + I_{\textbf{Con}(X)}\) of R, and it therefore makes sense from an algorithmic perspective to perform a primary decomposition [1, Chapter 4.8] of this ideal. Given such a homogeneous ideal \(I \lhd R\), we will denote the associated projective subvariety of \(\mathbb {P}^n \times (\mathbb {P}^n)^*\) by \(\textbf{V}(I)\). Here is the corrected version of [5, Theorem 4.3].

Theorem 2.1

Let \(X\subset \mathbb {P}^n\) be a pure dimensional projective variety and Y a nonempty irreducible subvariety of its singular locus \(X_\textrm{sing}\). Consider a primary decomposition (of R-ideals)

$$\begin{aligned} {\mathscr {I}}[{\kappa _X^{-1}(Y)}]= \bigcap _{i=1}^s Q_i, \end{aligned}$$

and let \(\sigma \subset {\left\{ {1,2,\ldots ,s}\right\} }\) be the set of indices i for which \({\textrm{dim}}\, \kappa _X(\textbf{V}(Q_i)) < {\textrm{dim}}\, Y\). Define

$$\begin{aligned} A := \left[ \bigcup _{i \in \sigma }\kappa _X(\textbf{V}(Q_i))\right] \cup Y_\textrm{sing}. \end{aligned}$$
(4)

Then the pair \((X_{\textrm{reg}},Y-A)\) satisfies Condition (B).

Proof

By the remarks following [9, Thm 3.12], we have

$$\begin{aligned} {\mathscr {I}}[\kappa _X^{-1}(Y-A)]=\bigcap _{i \in \rho _A} Q_i, \end{aligned}$$
(5)

where \(\rho _A \subset {\left\{ {1,\ldots ,s}\right\} }\) is the collection of all i for which \(\kappa _X(\textbf{V}(Q_i)) - A\) is nonempty. Since Y is irreducible and \(\kappa _X(Q_i)\) is a subvariety of Y for each i, we have \(i \in \rho _A\) if and only if \(\kappa _X(\textbf{V}(Q_i))= Y\). Therefore, \(\rho _A\) is the complement of \(\sigma \) in \({\left\{ {1,\ldots ,s}\right\} }\) (note that \(Y_\textrm{sing}\) is a proper subvariety of Y so \(\kappa _X(\textbf{V}(Q_i)) - Y_\textrm{sing}\) is nonempty for any \(i\in \rho _A\) and the remaining factors are those where \(i\in \sigma \)). By Whitney’s result on the existence of stratifications [10, Theorem 19.2], there is a proper subvariety \(B \subsetneq Y\) containing \(Y_\text {sing}\) so that \((X_\text {reg},Y-B)\) satisfies Condition (B). Thus, Lemma 1.2 guarantees the containment

$$\begin{aligned} \text {Assoc}(\mathscr {I}[\textbf{Con}(X)\cap \textbf{Con}(Y)] +\mathscr {I}[ \kappa _X^{-1}(Y-B)])\supset \text {Assoc}(\overline{\mathscr {I}}[\kappa _X^{-1}(Y-B)]). \end{aligned}$$
(6)

Applying (5) with A replaced by B, we note that \(\rho _B\) must contain \(\rho _A\) because we have \(\kappa _X(\textbf{V}(Q_i))=Y\) for every \(i \in \rho _A\), and \(Y - B\) is nonempty for \(B \subsetneq Y\). Setting

$$\begin{aligned} C := B \cup \left[ \bigcup _{i\in \rho _B-\rho _A}\kappa _X(\textbf{V}(Q_i))\right] , \end{aligned}$$

we note that Condition (B) automatically holds for \((X_\text {reg},Y-C)\) since B is contained in C, whence by Lemma 1.2 we have

$$\begin{aligned} \text {Assoc}( \mathscr {I}[\textbf{Con}(X)\cap \textbf{Con}(Y)]+\mathscr {I}[ \kappa _X^{-1}(Y-C)] )\supset \text {Assoc}(\overline{\mathscr {I}}[\kappa _X^{-1}(Y-C)]). \end{aligned}$$
(7)

The argument which gave us \(\rho _A \subseteq \rho _B\) also yields \(\rho _A \subseteq \rho _C\). We now claim that the opposite containment also holds, whence \(\rho _A = \rho _C\). To see this, note that C contains \(\kappa _X(\textbf{V}(Q_i))\) for all the \(i \in \rho _B-\rho _A\), i.e., for all the i satisfying \(\kappa _X(\textbf{V}(Q_i))\subsetneq Y\). Thus, if \(i\in \rho _C\) then \(\kappa _X(\textbf{V}(Q_i))= Y\) and hence \(\rho _C\subseteq \rho _A\), which establishes the claim. Hence by construction, \({\mathscr {I}}[\kappa _X^{-1}(Y-C)]\) and \({\mathscr {I}}[\kappa _X^{-1}(Y-A)]\) are identical since both equal \(\bigcap _{i \in \rho _A} Q_i\). Using (7), one final appeal to Lemma 1.2 confirms that the pair \((X_\textrm{reg},Y-A)\) satisfies Condition (B), as desired. \(\square \)

Besides being far simpler than the flawed proof of [5, Theorem 4.3], the argument given above has the advantage of adapting readily to the scenario where Y is pure-dimensional but not necessarily irreducible. In this case, one defines \(\rho _A\) to consist precisely of those \(i \in {\left\{ {1,\ldots ,s}\right\} }\) for which \(\kappa _X(\textbf{V}(Q_i))\) equals an irreducible component of Y, all of which are equidimensional. Similarly any valid choice of B must be a proper subvariety of some irreducible component of Y and hence satisfy \({\textrm{dim}}\,(B)<{\textrm{dim}}\,(Y)\). The proof then proceeds identically.

Example 2.2

Consider the projectivized Whitney Cusp \(\widetilde{X} \subset \mathbb {P}^3\) given by

$$\begin{aligned} \widetilde{X}=\textbf{V}\left( x_{0}x_{1}^{3}+x_{0}^{2}x_{2}^{2}-x_{1}^{2}x_{3}^{2}\right) . \end{aligned}$$

The singular locus \( \widetilde{X}_\textrm{Sing}\) equals \(\textbf{V}(x_0,x_1)\cup \textbf{V}(x_1,x_2), \) and the usual (affine) Whitney cusp \(X\subset \mathbb {C}^3\) is obtained by setting \(x_0 = 1\). The singular locus of X is the line \(Y:=\textbf{V}(x_1,x_2)\); note we slightly abuse notation and write Y for both the affine and projective variety defined by \(x_1=x_2=0\). Now, we have a primary decomposition

$$\begin{aligned} {\mathscr {I}}[\kappa _X^{-1}(Y)]=\bigcap _{i=1}^9 Q_i, \text { where:} \end{aligned}$$
figure a

Thus, applying Theorem 2.1 and setting \(x_0=1\) establishes Condition (B) for the pair \(X_\textrm{reg}=X-Y\) and \(Y'=Y-\textbf{V}(x_1,x_2,x_3)\), which in turn gives the following strata: \(X_\textrm{reg}\), \(Y'\), and \(\textbf{V}(x_1,x_2,x_3)\).

4 Changes to Algorithms, Performance and Complexity

The changes to the algorithms of [5] are minimal — one simply replaces the Decompose subroutine from [5, Section 5.2] by the one presented below.

figure b

Similarly, the algorithm DecomposeFlag from [5, Section 6.1] should be updated to the following.

figure c

All other parts of WhitStrat and related algorithms from [5] remain unchanged, and [5, Proposition 5.1] which guarantees correctness follows immediately from Theorem 2.1. All the proofs in Sects. 5, 6 and 7 of [5] should be updated so that appeals to [5, Theorem 4.3] are replaced by invocations of Theorem 2.1.

3.1  Updated Runtimes In Table 1, we illustrate the impact of updating Decompose on the run times of our algorithm. The corrected version is slightly, but not substantially, slower than the previous version. In terms of memory usage, the updated code used between 0.0005 and 0.270 GB of RAM (which is similar to the old implementation), with all but the last entry in the table requiring no more than 0.0007 GB. The updated version of our Macualay2 program is available at the link below:

http://martin-helmer.com/Software/WhitStrat/WhitneyStratifications.m2

Table 1 Run times of corrected algorithm implemented in the Whitney Stratifications Macaulay2 package working over \(\mathbb {Q}\) on an Intel Xeon E3-1245 v5 CPU with 32 GB of RAM

3.2  Complexity Here we fix the complexity estimates of [5, Section 8]. We will write \({\textbf {GB}}(n,\delta )\) to indicate the complexity of performing Gröbner basis computations on an ideal generated by polynomials in n variables of degree at most \(\delta \). The time complexity of computing Gröbner bases and the degrees of the output polynomials both lie in \(\mathcal {O}(\delta ^{2^n})\) — see [8]. The main change here must be made to the bounds on the number of components appearing in line 3 of the new version of Decompose and on their degrees. It is known that the computation of a primary decomposition has worst case complexity proportional to that of Gröbner basis computation, see for instance [2] and the references therein.

Let \(X \subset \mathbb {P}^{n-1}\) be a projective variety with homogeneous ideal \(I_X \lhd \mathbb {C}[x_1, \dots , x_{n}]\), and assume that \(I_X\) is generated by polynomials of degree at most \(\delta \). We write \(\mu \) to indicate the dimension of the singular locus \(X_\text {sing}\). By [5, Proposition 8.1], we know that

  1. (1)

    \(\deg X_\text {sing} < \delta ^n\), and

  2. (2)

    for any subvariety \(Y \subset X_\text {sing}\) we have \(\deg (V_\mu )\le \delta ^{3n^2}\),

where \(V_\mu \subset \mathbb {C}^{n-1} \times \mathbb {C}^{n-1}\) denotes the restriction of the scheme defined by \(I_Y + I_{\textbf{Con}(X)}\) to an affine patch. In the new version of Decompose, we loop over all primary components of an ideal. Note that the desired quantities are bounded by an expression which is polynomial in \(\delta ^{2^n}\). When updating [5, Proposition 8.3] we are led to consider various ideals in \(\mathbb {C}[x_1,\dots , x_n]\) and \(\mathbb {C}[x_1, \dots , x_n,\xi _1,\dots , \xi _n]\). For an arbitrary polynomial ideal J with generators of degree at most d in N variables (we will have either \(N=n\) or \(N=2n\)) we therefore bound both the degree and number of primary components of J by \(d^{\ell 2^N}\), for some fixed positive integer \(\ell \) that is independent of the input. An analysis of the primary decomposition algorithm of [4], see also [2], yields a (not sharp) upper bound \(\ell \le 36N^2\). The proposition below replaces [5, Proposition 8.3] and it is proved in an identical fashion after making the adjustments noted above.

Proposition 3.1

The following quantities are bounded by

$$\begin{aligned} \delta ^{(3\ell )^\mu n^{2\mu }2^{n\mu }} \end{aligned}$$

when Decompose is called from WhitStrat during the any step of the algorithm:

  1. (1)

    the number of primary components of J;

  2. (2)

    the degrees of the generating polynomials of J and K.

Finally, we state the updated overall complexity bound for the algorithm which replaces [5, Theorem 8.4], the proof is again identical to that of [5, Theorem 8.4] but using the updated bounds given above, and is hence omitted.

Theorem 3.2

Let X be a complex projective subvariety of \(\mathbb {P}^n\) whose defining polynomials have degree at most \(\delta \) and whose singular locus has dimension \(\mu \). The time complexity of running WhitStrat on X is bounded in

$$\begin{aligned} \mathcal {O}\left( (\mu +2)^2\cdot (D+2)\cdot \textbf{GB}(n,D)\right) , \end{aligned}$$

where \(D = \delta ^{(3\ell )^\mu n^{2\mu }2^{n\mu }}\) and \(\textbf{GB}(n,D)\) is the cost of computing Gröbner bases.

Our eventual complexity bound remains polynomial in the complexity of Gröbner basis computation, and hence the general performance trends are similar.