Loading...
Searching...
No Matches
ideals.h
Go to the documentation of this file.
#ifndef IDEALS_H
#define IDEALS_H
/****************************************
* Computer Algebra System SINGULAR *
****************************************/
/*
* ABSTRACT - all basic methods to manipulate ideals
*/
#include "polys/monomials/ring.h"
#include "polys/monomials/p_polys.h"
#include "polys/simpleideals.h"
#include "kernel/structs.h" // for tHomog
//typedef struct sip_sideal * ideal;
//typedef struct sip_smap * map;
typedef ideal * resolvente;
static inline ideal idCopyFirstK (const ideal ide, const int k)
{
return id_CopyFirstK(ide, k, currRing);
}
void idKeepFirstK(ideal ide, const int k);
void idDelEquals(ideal id);
/// delete an ideal
#define idDelete(H) id_Delete((H),currRing)
/// initialise the maximal ideal (at 0)
//ideal id_MaxIdeal(int deg, const ring r);
#define idMaxIdeal(D) id_MaxIdeal(D,currRing)
/// index of generator with leading term in ground ring (if any); otherwise -1
//int id_PosConstant(ideal id, const ring r)
#define idPosConstant(I) id_PosConstant(I,currRing)
//BOOLEAN id_IsConstant(ideal id, const ring r);
#define idIsConstant(I) id_IsConstant(I,currRing)
#define idSimpleAdd(A,B) id_SimpleAdd(A,B,currRing)
ideal id_Copy (ideal h1, const ring r);
#define idPrint(id) id_Print(id, currRing, currRing)
#define idTest(id) id_Test(id, currRing)
#if 0
// ifdef PDEBUG // Sorry: the following was lost........ :((((((((
ideal idDBCopy(ideal h1,const char *f,int l,const ring r);
#define id_DBCopy(A,r) idDBCopy(A,__FILE__,__LINE__,r)
inline ideal idCopy(ideal A)
{
return id_DBCopy(A,currRing); // well, just for now... ok? Macros can't have default args values :(
}
#else
inline ideal idCopy(ideal A)
{
return id_Copy(A, currRing);
}
#endif
/// h1 + h2
inline ideal idAdd (ideal h1, ideal h2)
{
return id_Add(h1, h2, currRing);
}
BOOLEAN idInsertPoly (ideal h1,poly h2); /* h1 + h2 */
BOOLEAN idInsertPolyOnPos (ideal I,poly p,int pos); /* inserts p in I on pos */
inline BOOLEAN idInsertPolyWithTests (ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk)
{
return id_InsertPolyWithTests (h1, validEntries, h2, zeroOk, duplicateOk, currRing);
}
/* h1 + h2 */
/// hh := h1 * h2
static inline ideal idMult (ideal h1, ideal h2)
{
return id_Mult(h1, h2, currRing);
}
BOOLEAN idIs0 (ideal h);
static inline BOOLEAN idHomIdeal (ideal id, ideal Q=NULL)
{
return id_HomIdeal(id, Q, currRing);
}
static inline BOOLEAN idHomModule(ideal m, ideal Q,intvec **w)
{
return id_HomModule(m, Q, w, currRing);
}
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w);
ideal idMinBase (ideal h1, ideal *SB=NULL);
/*returns a minimized set of generators of h1*/
void idInitChoise (int r,int beg,int end,BOOLEAN *endch,int * choise);
void idGetNextChoise (int r,int end,BOOLEAN *endch,int * choise);
int idGetNumberOfChoise(int t, int d, int begin, int end, int * choise);
int binom (int n,int r);
inline ideal idFreeModule (int i)
{
return id_FreeModule (i, currRing);
}
// GB algorithm for syz computations:
enum GbVariant
{
GbDefault=0,
// internal variants:
GbStd,
GbSlimgb,
GbSba,
// and the library functions:
GbGroebner,
GbModstd,
GbFfmod,
GbNfmod,
GbStdSat,
GbSingmatic
// and test variants
};
ideal idSect (ideal h1,ideal h2, GbVariant a=GbDefault);
ideal idMultSect(resolvente arg, int length, GbVariant a=GbDefault);
//ideal idSyzygies (ideal h1, tHomog h,intvec **w);
ideal idSyzygies (ideal h1, tHomog h,intvec **w, BOOLEAN setSyzComp=TRUE,
BOOLEAN setRegularity=FALSE, int *deg = NULL, GbVariant a=GbDefault);
ideal idLiftStd (ideal h1, matrix *m, tHomog h=testHomog, ideal *syz=NULL, GbVariant a=GbDefault, ideal h11=NULL);
ideal idLift (ideal mod, ideal submod,ideal * rest=NULL,
BOOLEAN goodShape=FALSE, BOOLEAN isSB=TRUE,BOOLEAN divide=FALSE,
matrix *unit=NULL, GbVariant a=GbDefault);
void idLiftW(ideal P,ideal Q,int n,matrix &T, ideal &R, int *w= NULL );
ideal idQuot (ideal h1,ideal h2,
BOOLEAN h1IsStb=FALSE, BOOLEAN resultIsIdeal=FALSE);
// ideal idPower(ideal gid,int deg);
//ideal idElimination (ideal h1,poly delVar);
ideal idElimination (ideal h1,poly delVar, intvec *hilb=NULL, GbVariant a=GbDefault);
ideal idElimination2 (ideal h1,poly delVar, bigintmat *hilb=NULL, GbVariant a=GbDefault);
#ifdef WITH_OLD_MINOR
poly idMinor(matrix a, int ar, unsigned long which, ideal R = NULL);
#endif
ideal idMinors(matrix a, int ar, ideal R = NULL);
ideal idMinEmbedding(ideal arg,BOOLEAN inPlace=FALSE, intvec **w=NULL);
ideal idMinEmbedding_with_map(ideal arg,intvec **w, ideal &trans);
ideal idMinEmbedding_with_map_v(ideal arg,intvec **w, ideal &trans, int*red_comp);
ideal idHead(ideal h);
// ideal idHomogen(ideal h, int varnum);
BOOLEAN idIsSubModule(ideal id1,ideal id2);
static inline ideal idVec2Ideal(poly vec)
{
return id_Vec2Ideal(vec, currRing);
}
ideal idSeries(int n,ideal M,matrix U=NULL,intvec *w=NULL);
static inline BOOLEAN idIsZeroDim(ideal i)
{
return id_IsZeroDim(i, currRing);
}
matrix idDiff(matrix i, int k);
matrix idDiffOp(ideal I, ideal J,BOOLEAN multiply=TRUE);
static inline intvec *idSort(ideal id,BOOLEAN nolex=TRUE)
{
return id_Sort(id, nolex, currRing);
}
ideal idModulo (ideal h1,ideal h2, tHomog h=testHomog, intvec ** w=NULL,
matrix *T=NULL, GbVariant a=GbDefault);
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how);
// intvec *idQHomWeight(ideal id);
poly id_GCD(poly f, poly g, const ring r);
ideal id_Farey(ideal x, number N, const ring r);
ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing); // image of certain map for BGG
ideal id_Satstd(const ideal I, ideal J, const ring r);
ideal id_Sat_principal(const ideal I, ideal J, const ring r);
ideal idSaturate_intern(ideal I, ideal J, int &ki, BOOLEAN isIdeal, BOOLEAN isSB);
ideal idSaturate(ideal I, ideal J, int &ki, BOOLEAN isIdeal=TRUE);
ideal idSaturateGB(ideal I, ideal J, int &ki, BOOLEAN isIdeal=TRUE);
ideal id_Homogenize(ideal I, int var_num, const ring r);
ideal id_HomogenizeW(ideal I, int var_num, intvec *w,const ring r);
GbVariant syGetAlgorithm(char *n, const ring r, const ideal M);
#endif
BOOLEAN
int BOOLEAN
Definition auxiliary.h:88
TRUE
#define TRUE
Definition auxiliary.h:101
FALSE
#define FALSE
Definition auxiliary.h:97
mod
CF_NO_INLINE FACTORY_PUBLIC CanonicalForm mod(const CanonicalForm &, const CanonicalForm &)
N
const CanonicalForm CFMap CFMap & N
Definition cfEzgcd.cc:56
l
int l
Definition cfEzgcd.cc:100
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
k
int k
Definition cfEzgcd.cc:99
x
Variable x
Definition cfModGcd.cc:4090
p
int p
Definition cfModGcd.cc:4086
g
g
Definition cfModGcd.cc:4098
f
FILE * f
Definition checklibs.c:9
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
intvec
Definition intvec.h:24
w
const CanonicalForm & w
Definition facAbsFact.cc:51
divide
CanonicalForm divide(const CanonicalForm &ff, const CanonicalForm &f, const CFList &as)
Definition facAlgFuncUtil.cc:496
vec
fq_nmod_poly_t * vec
Definition facHensel.cc:108
idHead
ideal idHead(ideal h)
idMinors
ideal idMinors(matrix a, int ar, ideal R=NULL)
compute all ar-minors of the matrix a the caller of mpRecMin the elements of the result are not in R ...
Definition ideals.cc:2031
binom
int binom(int n, int r)
Definition simpleideals.cc:1212
idCoeffOfKBase
matrix idCoeffOfKBase(ideal arg, ideal kbase, poly how)
Definition ideals.cc:2668
idElimination
ideal idElimination(ideal h1, poly delVar, intvec *hilb=NULL, GbVariant a=GbDefault)
Definition ideals.cc:1884
GbVariant
GbVariant
Definition ideals.h:119
GbGroebner
@ GbGroebner
Definition ideals.h:126
GbModstd
@ GbModstd
Definition ideals.h:127
GbStdSat
@ GbStdSat
Definition ideals.h:130
GbSlimgb
@ GbSlimgb
Definition ideals.h:123
GbFfmod
@ GbFfmod
Definition ideals.h:128
GbNfmod
@ GbNfmod
Definition ideals.h:129
GbDefault
@ GbDefault
Definition ideals.h:120
GbStd
@ GbStd
Definition ideals.h:122
GbSingmatic
@ GbSingmatic
Definition ideals.h:131
GbSba
@ GbSba
Definition ideals.h:124
idDiff
matrix idDiff(matrix i, int k)
Definition ideals.cc:2189
idTestHomModule
BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w)
Definition ideals.cc:2120
idMinBase
ideal idMinBase(ideal h1, ideal *SB=NULL)
Definition ideals.cc:51
id_Homogenize
ideal id_Homogenize(ideal I, int var_num, const ring r)
Definition ideals.cc:3608
idDelEquals
void idDelEquals(ideal id)
Definition ideals.cc:3211
idMultSect
ideal idMultSect(resolvente arg, int length, GbVariant a=GbDefault)
Definition ideals.cc:472
id_HomogenizeW
ideal id_HomogenizeW(ideal I, int var_num, intvec *w, const ring r)
Definition ideals.cc:3653
idGetNextChoise
void idGetNextChoise(int r, int end, BOOLEAN *endch, int *choise)
Definition simpleideals.cc:1154
idElimination2
ideal idElimination2(ideal h1, poly delVar, bigintmat *hilb=NULL, GbVariant a=GbDefault)
Definition ideals.cc:1640
idVec2Ideal
static ideal idVec2Ideal(poly vec)
Definition ideals.h:173
idSaturateGB
ideal idSaturateGB(ideal I, ideal J, int &ki, BOOLEAN isIdeal=TRUE)
Definition ideals.cc:3603
idIsSubModule
BOOLEAN idIsSubModule(ideal id1, ideal id2)
Definition ideals.cc:2099
idSaturate
ideal idSaturate(ideal I, ideal J, int &ki, BOOLEAN isIdeal=TRUE)
Definition ideals.cc:3599
id_GCD
poly id_GCD(poly f, poly g, const ring r)
Definition ideals.cc:3000
idLift
ideal idLift(ideal mod, ideal submod, ideal *rest=NULL, BOOLEAN goodShape=FALSE, BOOLEAN isSB=TRUE, BOOLEAN divide=FALSE, matrix *unit=NULL, GbVariant a=GbDefault)
represents the generators of submod in terms of the generators of mod (Matrix(SM)*U-Matrix(rest)) = M...
Definition ideals.cc:1111
idInsertPoly
BOOLEAN idInsertPoly(ideal h1, poly h2)
insert h2 into h1 (if h2 is not the zero polynomial) return TRUE iff h2 was indeed inserted
Definition simpleideals.cc:832
id_Copy
ideal id_Copy(ideal h1, const ring r)
copy an ideal
Definition simpleideals.cc:542
idIsZeroDim
static BOOLEAN idIsZeroDim(ideal i)
Definition ideals.h:180
idIs0
BOOLEAN idIs0(ideal h)
returns true if h is the zero ideal
Definition simpleideals.cc:960
id_TensorModuleMult
ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing)
Definition simpleideals.cc:2067
idInsertPolyOnPos
BOOLEAN idInsertPolyOnPos(ideal I, poly p, int pos)
insert p into I on position pos
Definition simpleideals.cc:851
idLiftStd
ideal idLiftStd(ideal h1, matrix *m, tHomog h=testHomog, ideal *syz=NULL, GbVariant a=GbDefault, ideal h11=NULL)
Definition ideals.cc:982
idHomModule
static BOOLEAN idHomModule(ideal m, ideal Q, intvec **w)
Definition ideals.h:96
idMinEmbedding
ideal idMinEmbedding(ideal arg, BOOLEAN inPlace=FALSE, intvec **w=NULL)
Definition ideals.cc:2853
idInsertPolyWithTests
BOOLEAN idInsertPolyWithTests(ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk)
Definition ideals.h:75
idDiffOp
matrix idDiffOp(ideal I, ideal J, BOOLEAN multiply=TRUE)
Definition ideals.cc:2202
idKeepFirstK
void idKeepFirstK(ideal ide, const int k)
keeps the first k (>= 1) entries of the given ideal (Note that the kept polynomials may be zero....
Definition ideals.cc:3179
idSect
ideal idSect(ideal h1, ideal h2, GbVariant a=GbDefault)
Definition ideals.cc:315
idSyzygies
ideal idSyzygies(ideal h1, tHomog h, intvec **w, BOOLEAN setSyzComp=TRUE, BOOLEAN setRegularity=FALSE, int *deg=NULL, GbVariant a=GbDefault)
Definition ideals.cc:836
idSaturate_intern
ideal idSaturate_intern(ideal I, ideal J, int &ki, BOOLEAN isIdeal, BOOLEAN isSB)
Definition ideals.cc:3495
idLiftW
void idLiftW(ideal P, ideal Q, int n, matrix &T, ideal &R, int *w=NULL)
Definition ideals.cc:1347
idHomIdeal
static BOOLEAN idHomIdeal(ideal id, ideal Q=NULL)
Definition ideals.h:91
idMult
static ideal idMult(ideal h1, ideal h2)
hh := h1 * h2
Definition ideals.h:84
idCopy
ideal idCopy(ideal A)
Definition ideals.h:60
idAdd
ideal idAdd(ideal h1, ideal h2)
h1 + h2
Definition ideals.h:68
resolvente
ideal * resolvente
Definition ideals.h:18
syGetAlgorithm
GbVariant syGetAlgorithm(char *n, const ring r, const ideal M)
Definition ideals.cc:3698
idMinEmbedding_with_map_v
ideal idMinEmbedding_with_map_v(ideal arg, intvec **w, ideal &trans, int *red_comp)
Definition ideals.cc:2874
idMinEmbedding_with_map
ideal idMinEmbedding_with_map(ideal arg, intvec **w, ideal &trans)
Definition ideals.cc:2863
id_Farey
ideal id_Farey(ideal x, number N, const ring r)
Definition ideals.cc:3103
idGetNumberOfChoise
int idGetNumberOfChoise(int t, int d, int begin, int end, int *choise)
Definition simpleideals.cc:1180
id_Satstd
ideal id_Satstd(const ideal I, ideal J, const ring r)
Definition ideals.cc:3363
idCopyFirstK
static ideal idCopyFirstK(const ideal ide, const int k)
Definition ideals.h:20
idQuot
ideal idQuot(ideal h1, ideal h2, BOOLEAN h1IsStb=FALSE, BOOLEAN resultIsIdeal=FALSE)
Definition ideals.cc:1539
idInitChoise
void idInitChoise(int r, int beg, int end, BOOLEAN *endch, int *choise)
Definition simpleideals.cc:1132
idModulo
ideal idModulo(ideal h1, ideal h2, tHomog h=testHomog, intvec **w=NULL, matrix *T=NULL, GbVariant a=GbDefault)
Definition ideals.cc:2463
idSort
static intvec * idSort(ideal id, BOOLEAN nolex=TRUE)
Definition ideals.h:188
idSeries
ideal idSeries(int n, ideal M, matrix U=NULL, intvec *w=NULL)
Definition ideals.cc:2172
id_Sat_principal
ideal id_Sat_principal(const ideal I, ideal J, const ring r)
Definition ideals.cc:3415
idFreeModule
ideal idFreeModule(int i)
Definition ideals.h:111
length
static BOOLEAN length(leftv result, leftv arg)
Definition interval.cc:257
T
STATIC_VAR jList * T
Definition janet.cc:30
h
STATIC_VAR Poly * h
Definition janet.cc:971
matrix
ip_smatrix * matrix
Definition matpol.h:43
NULL
#define NULL
Definition omList.c:12
p_polys.h
currRing
VAR ring currRing
Widely used global variable which specifies the current polynomial ring for Singular interpreter and ...
Definition polys.cc:13
ring.h
id_Add
ideal id_Add(ideal h1, ideal h2, const ring r)
h1 + h2
Definition simpleideals.cc:906
id_Vec2Ideal
ideal id_Vec2Ideal(poly vec, const ring R)
Definition simpleideals.cc:1528
id_Sort
intvec * id_Sort(const ideal id, const BOOLEAN nolex, const ring r)
sorts the ideal w.r.t. the actual ringordering uses lex-ordering when nolex = FALSE
Definition simpleideals.cc:695
id_HomIdeal
BOOLEAN id_HomIdeal(ideal id, ideal Q, const ring r)
Definition simpleideals.cc:1033
id_FreeModule
ideal id_FreeModule(int i, const ring r)
the free module of rank i
Definition simpleideals.cc:1235
id_IsZeroDim
BOOLEAN id_IsZeroDim(ideal I, const ring r)
Definition simpleideals.cc:1964
id_InsertPolyWithTests
BOOLEAN id_InsertPolyWithTests(ideal h1, const int validEntries, const poly h2, const bool zeroOk, const bool duplicateOk, const ring r)
insert h2 into h1 depending on the two boolean parameters:
Definition simpleideals.cc:878
id_Mult
ideal id_Mult(ideal h1, ideal h2, const ring R)
h1 * h2 one h_i must be an ideal (with at least one column) the other h_i may be a module (with no co...
Definition simpleideals.cc:919
id_CopyFirstK
ideal id_CopyFirstK(const ideal ide, const int k, const ring r)
copies the first k (>= 1) entries of the given ideal/module and returns these as a new ideal/module (...
Definition simpleideals.cc:266
id_HomModule
BOOLEAN id_HomModule(ideal m, ideal Q, intvec **w, const ring R)
Definition simpleideals.cc:1724
simpleideals.h
R
#define R
Definition sirandom.c:27
A
#define A
Definition sirandom.c:24
M
#define M
Definition sirandom.c:25
Q
#define Q
Definition sirandom.c:26
structs.h
tHomog
tHomog
Definition structs.h:31
testHomog
@ testHomog
Definition structs.h:34