Macaulay2 Engine
Loading...
Searching...
No Matches
assprime.hpp File Reference

AssociatedPrimes — codimension and minimal-codimension associated primes of a monomial ideal. More...

#include "monideal.hpp"

Go to the source code of this file.

Classes

class  AssociatedPrimes

Detailed Description

AssociatedPrimes — codimension and minimal-codimension associated primes of a monomial ideal.

Note
AI-generated documentation. Verify against the source before relying on it.

Declares AssociatedPrimes, a class that operates on a MonomialIdeal (the constructor calls I->radical() so the input need not be pre-radicalised). Its state enum has two values, do_codim (cheap, just tracks min_codim) and do_primes (expensive, enumerates the associated primes of minimal codimension), and codimension() flips the state to do_primes on the way out so the same instance can be stepped through to associated_primes(count) without restarting (where count = -1 means "no limit"). Results come back as a MonomialIdeal whose generators are squarefree monomials, each encoding one prime by the variables that occur in it.

The header also declares min_primes(maxcodim, count) and max_indep_sets(count), but these are vestigial: no definition exists in assprime.cpp and no caller invokes them — the live implementations live on MinimalPrimes in [[monideal-minprimes]]. The actual computation (ass_prime_generator) walks the Nmi_node tree of the input ideal: for each leading monomial m not yet covered, it picks each variable x_i in m not already committed, adds it to the prime under construction (codim+1), recurses, then marks x_i = -1 ("excluded from any further prime"). This is the combinatorial split ass(I) = ass(I + (x_i)) U ass(I, x_i = 1) with no Groebner bases or coefficient arithmetic.

See also
monideal.hpp
monideal-minprimes.hpp

Definition in file assprime.hpp.