Macaulay2 » Documentation
Packages » WhitneyStratifications :: mapStratify
next | previous | forward | backward | up | index | toc

mapStratify -- Computes a Whitney stratification of a polynomial map $f:X\to Y$ between real or complex varieties.



For a polynomial map $f:X\to Y$ this command computes a Whitney stratification of $f$, that is a Whitney stratification of $X$ and of $Y$ (in the same output format as the whitneyStatify command), such that for each (open, connected) strata $M$ of $X$ there is an (open, connected) strata $N$ of $Y$ such that $f(M) \subset N$ and such that the restriction of $f$ to $M$ is a submersion. When $f$ is a proper map this stratification turns $f$ into a locally trivial fiber bundle by Thom's isotopy lemma. More generally when $f$ is a dominant map between varieties of the same dimension a stratification which further stratifies by non-properness locus is also implemented (as described in Section 3.3 of [2], M. Helmer, V. Nanda, Effective Whitney Stratification of Real Algebraic Varieties . Arxiv: 2307.05427). This can be used to, for example, solve the real root classification problem (see Section 5 of [2]), that is to stratify the parameter space of a parametric system of polynomials with generically finitely many complex solutions into regions where the number of real solutions is fixed.

We illustrate this on the quadratic equation $ax^2+bx+c$ by stratifying the parameter space, $(a,b,c)\in \RR^3$, into regions where the number of real roots is constant.

Here we stratify the projection map $X\to \RR^3$ where $X=V(ax^2+bx+c)$.

i1 : R=QQ[a,b,c,x]

o1 = R

o1 : PolynomialRing
i2 : I=ideal(a*x^2+b*x+c)

o2 = ideal(a*x  + b*x + c)

o2 : Ideal of R
i3 : S=QQ[(gens(R))_(toList(0..2))]

o3 = S

o3 : PolynomialRing
i4 : gens S

o4 = {a, b, c}

o4 : List
i5 : F={R_0,R_1,R_2}

o5 = {a, b, c}

o5 : List
i6 : ms=mapStratify(F,I,ideal(0_S),isProper=>false)

o6 = {MutableHashTable{...4...}, MutableHashTable{...4...}}

o6 : List
i7 : peek last ms

o7 = MutableHashTable{0 => {ideal (c, b, a)}          }
                      1 => {ideal (b, a)}
                      3 => {ideal 0}
                      2 => {ideal a, ideal(b  - 4a*c)}

For this and other root classification examples the option isProper=>false should be used, as the corresponding projection maps are in general not proper. Note that the top dimensional strata in this case are the four connected components of $\RR^3-V(a(b^2-4ac))$, and so on for the lower dimensional strata.

Another root classification example, this time we find the regions of the parameter space $\{(a,b)\in \RR^2\}$ where the number of real roots to the system $x^2-y^2+b = -ax+x^2+by=0$ is constant; this is Example 1.2 in Reference [2].

i8 : R=QQ[a,b,x,y];
i9 : I=ideal(x^2-y^2+b, -a*x+x^2+b*y);

o9 : Ideal of R
i10 : S=QQ[(gens(R))_(toList(0..1))];
i11 : F={R_0,R_1};
i12 : ms=mapStratify(F,I,ideal(0_S),isProper=>false)

o12 = {MutableHashTable{...3...}, MutableHashTable{...3...}}

o12 : List
i13 : peek last ms

o13 = MutableHashTable{2 => {ideal 0}                                                            }
                       0 => {ideal (b, a), ideal (b + 4, a), ideal (27b - 4, 729a  + 128)}
                                             6     4 2     2 4    6    4       2 3     5      4
                       1 => {ideal b, ideal(a  - 3a b  + 3a b  - b  + a b - 20a b  - 8b  - 16b )}

Another broad class of interesting examples is parameterized projective varieties, as the projection map to the parameter space is induced by the projection $\PP^n\times \CC^m\to \CC^m$ and is hence always proper. Again we seek to understand how the topology of the variety changes with parameters. The following example is a special case of an example from the study of Feynman integrals in mathematical physics (in particular is arises from the "one loop bubble" for the case of equal masses). Note that for any fixed value of parameters M1, P, the resulting polynomial Gh is homogeneous.

i14 : R=QQ[M1,P,X_0..X_2];
i15 : U = (X_1+X_2);
i16 : F =U*(M1*X_1+M1*X_2)-P*X_1*X_2;
i17 : Gh = U*X_0+F;
i18 : Xh=ideal (X_0*X_1*X_2*Gh);

o18 : Ideal of R
i19 : F={M1,P};
i20 : S=QQ[(gens(R))_(toList(0..1))];
i21 : ms=mapStratify(F,Xh,ideal(0_S));
i22 : peek last ms

o22 = MutableHashTable{0 => {ideal (P, M1)}                    }
                       1 => {ideal P, ideal M1, ideal(4M1 - P)}
                       2 => {ideal 0}

Finally we remark that the option: StratsToFind, may be used with this function, but should only be used with care. The default setting is StratsToFind=>"all", and this is the only value of the option which is guaranteed to compute the complete stratification, the other options may fail to find all strata but are provided to allow the user to obtain partial information on larger examples which may take too long to run on the default "all" setting. The other possible values are StratsToFind=>"singularOnly", and StratsToFind=>"most". The option StratsToFind=>"singularOnly" is the fastest, but also the most likely to return incomplete answers, and hence the output of this command should be treated as a partial answer only. The option StratsToFind=>"most" will most often get the full answer, but can miss strata, so again the output should be treated as a partial answer. In the example below all options return the complete answer, but only the output with StratsToFind=>"all" should be considered complete; StratsToFind=>"all" is run when no option is given.

i23 : time ms=mapStratify(F,Xh,ideal(0_S),StratsToFind=>"singularOnly")
 -- used 2.78042s (cpu); 1.89249s (thread); 0s (gc)

o23 = {MutableHashTable{...5...}, MutableHashTable{...3...}}

o23 : List
i24 : peek last ms

o24 = MutableHashTable{0 => {ideal (P, M1)}                    }
                       1 => {ideal P, ideal M1, ideal(4M1 - P)}
                       2 => {ideal 0}
i25 : time ms=mapStratify(F,Xh,ideal(0_S),StratsToFind=>"most")
 -- used 7.49167s (cpu); 4.97046s (thread); 0s (gc)

o25 = {MutableHashTable{...5...}, MutableHashTable{...3...}}

o25 : List
i26 : peek last ms

o26 = MutableHashTable{0 => {ideal (P, M1)}                    }
                       1 => {ideal P, ideal M1, ideal(4M1 - P)}
                       2 => {ideal 0}
i27 : time ms=mapStratify(F,Xh,ideal(0_S),StratsToFind=>"all")
 -- used 8.49118s (cpu); 5.37249s (thread); 0s (gc)

o27 = {MutableHashTable{...5...}, MutableHashTable{...3...}}

o27 : List
i28 : peek last ms

o28 = MutableHashTable{0 => {ideal (P, M1)}                    }
                       1 => {ideal P, ideal M1, ideal(4M1 - P)}
                       2 => {ideal 0}

Ways to use mapStratify :

For the programmer

The object mapStratify is a method function with options.