Macaulay2 Engine
Loading...
Searching...
No Matches
monomial-ideal.h
Go to the documentation of this file.
1#ifndef _monomial_ideal_h_
2# define _monomial_ideal_h_
3
48
49# include "engine-includes.hpp"
50
51// TODO: fix this
52# if defined(__cplusplus)
53class Matrix;
54class EngineMonomial;
55class MonomialIdeal;
56class RingElement;
57# else
58typedef struct Matrix Matrix;
59typedef struct EngineMonomial EngineMonomial;
60typedef struct MonomialIdeal MonomialIdeal;
61typedef struct RingElement RingElement;
62# endif
63
74
75# if defined(__cplusplus)
76extern "C" {
77# endif
78
79const MonomialIdeal* /* or null */ IM2_MonomialIdeal_make(const Matrix *m, int n);
80/* drg: connected rawMonomialIdeal*/
81/* Given a matrix 'm' over an allowed base ring (as above), create the
82 monomial ideal consisting of all of the lead monomials of the columns
83 of 'm' which have their lead term in row 'n'. If 'n' is out of range,
84 or the ring is not allowed, NULL is returned. */
85
86const Matrix /* or null */ *IM2_MonomialIdeal_to_matrix(const MonomialIdeal *I);
87/* drg: connected rawMonomialIdealToMatrix */
88/* Return a one row matrix over the base ring of I consisting
89 of the monomials in I */
90
92
93unsigned int rawMonomialIdealHash(const MonomialIdeal *I);
94/* connected to 'hash', sequential, as it is mutable */
95
97 const MonomialIdeal *I2);
98/* drg: connected === */
99// 1 = true, 0 = false, -1 = error
100
102/* drg: connected rawNumgens*/
103/* Returns the number of minimal generators of I */
104
105const MonomialIdeal /* or null */ *rawRadicalMonomialIdeal(
106 const MonomialIdeal *I);
107/* drg: connected rawRadicalMonomialIdeal*/
108/* The radical of the monomial ideal, that is, the monomial ideal
109 generated by the square-free parts of the each monomial of I. */
110
111const MonomialIdeal /* or null */ *IM2_MonomialIdeal_intersect(
112 const MonomialIdeal *I,
113 const MonomialIdeal *J);
114/* drg: connected rawIntersect*/
115
116const MonomialIdeal /* or null */ *rawColonMonomialIdeal1(
117 const MonomialIdeal *I,
118 const EngineMonomial *a);
119/* drg: connected rawColon*/
120/* If I = (m1, ..., mr),
121 Form the monomial ideal (I : a) = (m1:a, ..., mr:a) */
122
123const MonomialIdeal /* or null */ *rawColonMonomialIdeal2(
124 const MonomialIdeal *I,
125 const MonomialIdeal *J);
126/* drg: connected rawColon*/
127/* Form the monomial ideal (I : J) = intersect(I:m1, ..., I:mr),
128 where J = (m1,...,mr) */
129
130const MonomialIdeal /* or null */ *rawSaturateMonomialIdeal1(
131 const MonomialIdeal *I,
132 const EngineMonomial *a);
133/* drg: connected rawSaturateMonomialIdeal*/
134/* Form I:a^\infty. IE, set every variable which occurs in 'a' to '1' in
135 every generator of I. */
136
137const MonomialIdeal /* or null */ *rawSaturateMonomialIdeal2(
138 const MonomialIdeal *I,
139 const MonomialIdeal *J);
140/* drg: connected rawSaturateMonomialIdeal*/
141/* Form (I : J^\infty) = intersect(I:m1^\infty, ..., I:mr^\infty),
142 where J = (m1,...,mr). */
143
144const MonomialIdeal /* or null */ *IM2_MonomialIdeal_borel(
145 const MonomialIdeal *I);
146/* drg: connected rawStronglyStableClosure*/
147/* This should really be named: ..._strongly_stable.
148 Form the smallest monomial ideal J containing I which is strongly stable,
149 that is that:
150 If m is in J, then p_ij(m) is in J,
151 where p_ij(m) = x_j * (m/x_i), for j <= i, s.t. x_i | m. (Here the
152 variables in the ring are x1, ..., xn */
153
155/* drg: connected rawIsStronglyStable*/
156/* This should really be named: ..._is_strongly_stable.
157 Determine if I is strongly stable (see IM2_MonomialIdeal_borel for the
158 definition of strongly stable */
159
161/* drg: connected rawCodimension*/
162/* Return the codimension of I IN THE AMBIENT POLYNOMIAL RING. */
163
164const MonomialIdeal /* or null */ *
165rawMonomialMinimalPrimes(const MonomialIdeal *I, int codim_limit, int count);
166/* drg: connected */
167/* RENAME THIS ROUTINE */
168/* Return a monomial ideal whose generators correspond to the
169 minimal primes of I of codim <= codim_limit. If a minimal prime
170 of I has the form (x_i1, ..., x_ir), then the corresponding monomial
171 is x_i1 ... x_ir, i.e. the support of
172 the monomial generates the monomial minimal prime.
173 If 'count' is positive, only collect this number.
174*/
175
176const MonomialIdeal /* or null */ *rawMaximalIndependentSets(
177 const MonomialIdeal *I,
178 int count);
179/* drg: connected rawMaximalIndependentSets */
180/* Returns a monomial ideal where each generator encodes a maximal independent
181 set of variables of I. If 'count' is positive, only collect this number. A
182 maximal independent set is encoded as a squarefree monomial of the product
183 of all of the independent variables in the set. */
184
185const RingElement /* or null */ *IM2_MonomialIdeal_Hilbert(
186 const MonomialIdeal *I);
187/* connected to rawHilbert */
188/* This routine computes the numerator of the Hilbert series
189 for coker I. NULL is returned if the ring is not appropriate for
190 computing Hilbert series, or the computation was interrupted. */
191
193/* connected, same name */
194
195const MonomialIdeal /* or null */ *rawAlexanderDual(const MonomialIdeal *I,
196 const M2_arrayint top,
197 int strategy);
198/* connected, same name */
199/* 0 is the default, 1 is an alternate strategy */
200
201# if defined(__cplusplus)
202}
203# endif
204
205#endif /* _monomial_ideal_h_ */
206
207// Local Variables:
208// indent-tabs-mode: nil
209// End:
Engine-side immutable monomial value type wrapping a varpower- encoded exponent vector.
Definition monomial.hpp:61
Engine-side monomial ideal: a decision tree of Nmi_nodes storing the (typically minimal) generators b...
Definition monideal.hpp:136
Front-end-visible "ring element" value: an engine ring_elem paired with the Ring* that gives it meani...
Definition relem.hpp:67
Engine-wide include prelude — a single point of truth for portability shims.
#define Matrix
Definition factory.cpp:14
char M2_bool
Definition m2-types.h:82
M2_string IM2_MonomialIdeal_to_string(const MonomialIdeal *I)
const MonomialIdeal * rawSaturateMonomialIdeal2(const MonomialIdeal *I, const MonomialIdeal *J)
const MonomialIdeal * rawColonMonomialIdeal2(const MonomialIdeal *I, const MonomialIdeal *J)
int IM2_MonomialIdeal_codim(const MonomialIdeal *I)
unsigned int rawMonomialIdealHash(const MonomialIdeal *I)
M2_arrayint rawMonomialIdealLCM(const MonomialIdeal *I)
const MonomialIdeal * rawMonomialMinimalPrimes(const MonomialIdeal *I, int codim_limit, int count)
int IM2_MonomialIdeal_n_gens(const MonomialIdeal *I)
M2_bool IM2_MonomialIdeal_is_borel(const MonomialIdeal *I)
const MonomialIdeal * rawAlexanderDual(const MonomialIdeal *I, const M2_arrayint top, int strategy)
const MonomialIdeal * rawSaturateMonomialIdeal1(const MonomialIdeal *I, const EngineMonomial *a)
const MonomialIdeal * rawRadicalMonomialIdeal(const MonomialIdeal *I)
const MonomialIdeal * IM2_MonomialIdeal_borel(const MonomialIdeal *I)
const MonomialIdeal * IM2_MonomialIdeal_intersect(const MonomialIdeal *I, const MonomialIdeal *J)
const MonomialIdeal * rawMaximalIndependentSets(const MonomialIdeal *I, int count)
const MonomialIdeal * rawColonMonomialIdeal1(const MonomialIdeal *I, const EngineMonomial *a)
const MonomialIdeal * IM2_MonomialIdeal_make(const Matrix *m, int n)
const RingElement * IM2_MonomialIdeal_Hilbert(const MonomialIdeal *I)
int IM2_MonomialIdeal_is_equal(const MonomialIdeal *I1, const MonomialIdeal *I2)
const Matrix * IM2_MonomialIdeal_to_matrix(const MonomialIdeal *I)