source: git/kernel/ideals.h @ 1a68d1d

spielwiese
Last change on this file since 1a68d1d was 1a68d1d, checked in by Frank Seelisch <seelisch@…>, 14 years ago
added method for insertion of polys in ideal with check for duplicates git-svn-id: file:///usr/local/Singular/svn/trunk@12367 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 5.4 KB
Line 
1#ifndef IDEALS_H
2#define IDEALS_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT - all basic methods to manipulate ideals
9*/
10#include "structs.h"
11
12#ifdef PDEBUG
13ideal idDBInit (int size, int rank, const char *f, int l);
14#define idInit(A,B) idDBInit(A,B,__FILE__,__LINE__)
15#else
16/*- creates an ideal -*/
17ideal idInit (int size, int rank=1);
18#endif
19/*- deletes an ideal -*/
20#define idDelete(h) id_Delete(h, currRing)
21void id_Delete (ideal* h, ring r);
22void id_ShallowDelete (ideal* h, ring r);
23  /*- initialise an ideal -*/
24ideal idMaxIdeal (int deg);
25  /*- initialise the maximal ideal (at 0) -*/
26void idSkipZeroes (ideal ide);
27  /*gives an ideal the minimal possible size*/
28void idNorm(ideal id);
29void idDelMultiples(ideal id);
30void idDelEquals(ideal id);
31void idDelLmEquals(ideal id);
32void idDelDiv(ideal id);
33BOOLEAN idIsConstant(ideal id);
34
35#ifdef PDEBUG
36void idDBTest(ideal h1, int level, const char *f,const int l);
37#define idTest(A) idDBTest(A, PDEBUG, __FILE__,__LINE__)
38#define idPrint(id) idShow(id)
39#else
40#define idTest(A)  (TRUE)
41#define idPrint(A) ((void)0)
42#endif
43
44ideal id_Copy (ideal h1,const ring r);
45#ifdef PDEBUG
46ideal idDBCopy(ideal h1,const char *f,int l);
47#define idCopy(A) idDBCopy(A,__FILE__,__LINE__)
48#else
49#define idCopy(A) id_Copy(A,currRing)
50#endif
51  /*adds two ideals without simplifying the result*/
52ideal idSimpleAdd (ideal h1,ideal h2);
53  /*adds the quotient ideal*/
54ideal idAdd (ideal h1,ideal h2);
55  /* h1 + h2 */
56void idInsertPoly (ideal h1,poly h2);
57  /* h1 + h2 */
58void idInsertPolyNoDuplicates (ideal h1,poly h2);
59  /* h1 + h2 */
60ideal idMult (ideal h1,ideal h2);
61  /*hh := h1 * h2*/
62
63BOOLEAN idIs0 (ideal h);
64
65long idRankFreeModule(ideal m, ring lmRing, ring tailRing);
66inline long idRankFreeModule(ideal m, ring r = currRing)
67{return idRankFreeModule(m, r, r);}
68// returns TRUE, if idRankFreeModule(m) > 0
69BOOLEAN idIsModule(ideal m, ring r = currRing);
70BOOLEAN idHomIdeal (ideal id, ideal Q=NULL);
71BOOLEAN idHomModule(ideal m, ideal Q,intvec **w);
72BOOLEAN idTestHomModule(ideal m, ideal Q, intvec *w);
73
74ideal idMinBase (ideal h1);
75  /*returns a minimized set of generators of h1*/
76int pLowVar (poly p);
77  /*-the minimal index of used variables - 1-*/
78ideal idDehomogen (ideal id1,poly p,number n);
79  /*dehomogenized the generators of the ideal id1 with the leading
80  monomial of p replaced by n*/
81void pShift (poly * p,int i);
82  /*- verschiebt die Indizes der Modulerzeugenden um i -*/
83void    idInitChoise (int r,int beg,int end,BOOLEAN *endch,int * choise);
84void    idGetNextChoise (int r,int end,BOOLEAN *endch,int * choise);
85int     idGetNumberOfChoise(int t, int d, int begin, int end, int * choise);
86
87int     binom (int n,int r);
88
89ideal   idFreeModule (int i);
90
91ideal   idSect (ideal h1,ideal h2);
92ideal   idMultSect(resolvente arg, int length);
93
94//ideal   idSyzygies (ideal h1, tHomog h,intvec **w);
95ideal   idSyzygies (ideal h1, tHomog h,intvec **w, BOOLEAN setSyzComp=TRUE,
96                    BOOLEAN setRegularity=FALSE, int *deg = NULL);
97ideal   idLiftStd  (ideal h1, matrix *m, tHomog h=testHomog, ideal *syz=NULL);
98
99ideal   idLift (ideal mod, ideal sumod,ideal * rest=NULL,
100             BOOLEAN goodShape=FALSE, BOOLEAN isSB=TRUE,BOOLEAN divide=FALSE,
101             matrix *unit=NULL);
102
103void idLiftW(ideal P,ideal Q,int n,matrix &T, ideal &R, short *w= NULL );
104
105intvec * idMWLift(ideal mod,intvec * weights);
106
107ideal   idQuot (ideal h1,ideal h2,
108                BOOLEAN h1IsStb=FALSE, BOOLEAN resultIsIdeal=FALSE);
109
110ideal   idPower(ideal gid,int deg);
111
112//ideal   idElimination (ideal h1,poly delVar);
113ideal   idElimination (ideal h1,poly delVar, intvec *hilb=NULL);
114
115poly idMinor(matrix a, int ar, unsigned long which, ideal R=NULL);
116
117ideal   idMinors(matrix a, int ar, ideal R=NULL);
118
119void   idCompactify(ideal id);
120
121ideal idMinEmbedding(ideal arg,BOOLEAN inPlace=FALSE, intvec **w=NULL);
122
123ideal   idHead(ideal h);
124
125ideal   idHomogen(ideal h, int varnum);
126
127BOOLEAN idIsSubModule(ideal id1,ideal id2);
128
129ideal   idVec2Ideal(poly vec);
130
131ideal   idMatrix2Module(matrix mat);
132
133matrix  idModule2Matrix(ideal mod);
134
135matrix  idModule2formatedMatrix(ideal mod,int rows, int cols);
136
137ideal   idSubst(ideal i, int n, poly e);
138
139ideal   idJet(ideal i,int d);
140ideal   idJetW(ideal i,int d, intvec * iv);
141int idMinDegW(ideal M,intvec *w);
142ideal   idSeries(int n,ideal M,matrix U=NULL,intvec *w=NULL);
143
144BOOLEAN idIsZeroDim(ideal i);
145matrix  idDiff(matrix i, int k);
146matrix  idDiffOp(ideal I, ideal J,BOOLEAN multiply=TRUE);
147
148intvec *idSort(ideal id,BOOLEAN nolex=TRUE);
149ideal   idModulo (ideal h1,ideal h2, tHomog h=testHomog, intvec ** w=NULL);
150int     idElem(const ideal F);
151matrix  idCoeffOfKBase(ideal arg, ideal kbase, poly how);
152// transpose a module
153ideal   idTransp(ideal a);
154// version of "ideal idTransp(ideal)" which works within a given ring.
155ideal id_Transp(ideal a, const ring rRing = currRing);
156
157intvec *idQHomWeight(ideal id);
158
159void    idNormalize(ideal id);
160
161ideal idXXX (ideal  h1, int k);
162
163poly id_GCD(poly f, poly g, const ring r);
164
165ideal idChineseRemainder(ideal *x, number *q, int rl);
166//ideal idChineseRemainder(ideal *x, intvec *iv); /* currently unused */
167ideal idFarey(ideal x, number N);
168
169ideal id_TensorModuleMult(const int m, const ideal M, const ring rRing = currRing); // image of certain map for BGG
170
171#ifndef NDEBUG
172/* Shows an ideal -- only for debugging */
173void idShow(const ideal id, const ring lmRing = currRing, const ring tailRing = currRing, const int debugPrint = 0);
174#endif
175#endif
Note: See TracBrowser for help on using the repository browser.