source: git/kernel/ideals.h @ dd5534

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