next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
TestIdeals :: TestIdeals

TestIdeals -- a package for calculations of singularities in positive characteristic


TestIdeals is a package for basic computations of F-singularities. It is focused on computing test ideals and related objects. It does this via frobeniusRoot, which computes I[1/pe], as introduced by Blickle-Mustata-Smith (this is equivalent to the image of an ideal under the Cartier operator in a polynomial ring).

Notable functions:

Consider, for instance, the test ideal of the cone over an elliptic curve.
i1 : R = ZZ/5[x,y,z]/(z*y^2 - x*(x - z)*(x + z));
i2 : testIdeal(R)

o2 = ideal (z, y, x)

o2 : Ideal of R

The following example was studied by Anurag Singh when showing that F-regularity does not deform.
i3 : S = ZZ/3[A,B,C,D,T];
i4 : M = matrix{{A^2 + T^4, B, D}, {C, A^2, B^3 - D}};

             2       3
o4 : Matrix S  <--- S
i5 : I = ideal(T) + minors(2, M);

o5 : Ideal of S
i6 : isFRegular(S/I)

o6 = true


The authors would like to thank David Eisenbud, Daniel Grayson, Anurag Singh, Greg Smith, and Mike Stillman for useful conversations and comments on the development of this package.


Certification a gold star

Version 1.01 of this package was accepted for publication in volume 9 of the journal The Journal of Software for Algebra and Geometry on 19 July 2019, in the article The TestIdeals package for Macaulay2. That version can be obtained from the journal or from the Macaulay2 source code repository,, commit number fa98bdf2587243ef3e7e3042cac7cd9fc90fb6fc.


This documentation describes version 1.01 of TestIdeals.

Source code

The source code from which this documentation is derived is in the file TestIdeals.m2. The auxiliary files accompanying it are in the directory TestIdeals/.


  • Functions and commands
    • adicDigit -- compute a digit of the non-terminating expansion of a number in the unit interval in a given base
    • adicExpansion -- compute adic expansion
    • adicTruncation -- truncation of a non-terminating adic expansion
    • ascendIdeal -- find the smallest ideal containing a given ideal which is compatible with a given Cartier linear map
    • ascendModule -- find the smallest submodule of free module containing a given submodule which is compatible with a given Cartier linear map
    • canonicalIdeal -- produce an ideal isomorphic to the canonical module of a ring
    • compatibleIdeals -- find all prime ideals compatible with a Frobenius near-splitting
    • decomposeFraction -- decompose a rational number
    • descendIdeal -- finds the maximal F-pure Cartier submodule of an ideal viewed as a Cartier module
    • floorLog -- floor of a logarithm
    • FPureModule -- compute the submodule of the canonical module stable under the image of the trace of Frobenius
    • frobenius -- compute a Frobenius power of an ideal or a matrix
    • frobeniusPower -- compute a (generalized) Frobenius power of an ideal
    • frobeniusPreimage -- finds the ideal of elements mapped into a given ideal, under all $p^{-e}$-linear maps
    • frobeniusRoot -- compute a Frobenius root
    • frobeniusTraceOnCanonicalModule -- find an element of a polynomial ring that determines the Frobenius trace on the canonical module of a quotient of that ring
    • isCohenMacaulay -- whether a ring is Cohen-Macaulay
    • isFInjective -- whether a ring is F-injective
    • isFPure -- whether a ring is F-pure
    • isFRational -- whether a ring is F-rational
    • isFRegular -- whether a ring or pair is strongly F-regular
    • multiplicativeOrder -- multiplicative order of an integer modulo another
    • parameterTestIdeal -- compute the parameter test ideal of a Cohen-Macaulay ring
    • QGorensteinGenerator -- find an element representing the Frobenius trace map of a Q-Gorenstein ring
    • testElement -- find a test element of a ring
    • testIdeal -- compute a test ideal in a Q-Gorenstein ring
    • testModule -- find the parameter test module of a reduced ring
  • Symbols
    • AscentCount -- an option for ascendIdeal
    • AssumeCM -- an option to assume a ring is Cohen-Macaulay
    • AssumeDomain -- an option to assume a ring is a domain
    • AssumeNormal -- an option to assume a ring is normal
    • AssumeReduced -- an option to assume a ring is reduced
    • AtOrigin -- an option used to specify whether to only work locally
    • CanonicalIdeal -- an option to specify that a certain ideal be used as the canonical ideal
    • CanonicalStrategy -- an option for isFInjective
    • CurrentRing -- an option to specify that a certain ring is used
    • DepthOfSearch -- an option to specify how hard to search for something
    • FrobeniusPowerStrategy -- an option for frobeniusPower
    • FrobeniusRootStrategy -- an option for various functions
    • GeneratorList -- an option to specify that a certain list of elements is used to describe a Cartier action
    • Katzman -- a valid value for the option CanonicalStrategy
    • MaxCartierIndex -- an option to specify the maximum number to consider when computing the Cartier index of a divisor
    • MonomialBasis -- a valid value for the option FrobeniusRootStrategy
    • Naive -- a valid value for the option FrobeniusPowerStrategy
    • NoZeroC -- an option for decomposeFraction
    • QGorensteinIndex -- an option to specify the index of the canonical divisor, if known
    • Safe -- a valid value for the option FrobeniusPowerStrategy
    • Substitution -- a valid value for the option FrobeniusRootStrategy