This file is indexed.

/usr/include/singular/singular/polys/simpleideals.h is in libsingular4-dev-common 1:4.1.0-p3+ds-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
#ifndef SIMPLEIDEALS_H
#define SIMPLEIDEALS_H
/****************************************
*  Computer Algebra System SINGULAR     *
****************************************/
/*
* ABSTRACT - all basic methods to manipulate ideals
*/
#include <omalloc/omalloc.h>
#include <polys/monomials/ring.h>
#include <polys/matpol.h>

/// The following sip_sideal structure has many different uses
/// thoughout Singular. Basic use-cases for it are:
/// * ideal/module: nrows = 1, ncols >=0 and rank:1 for ideals, rank>=0 for modules
/// * matrix: nrows, ncols >=0, rank == nrows! see mp_* procedures
/// NOTE: the m member point to memory chunk of size (ncols*nrows*sizeof(poly)) or is NULL
struct sip_sideal
{
  poly*  m;
  long rank;
  int nrows;
  int ncols;
  #define IDELEMS(i) ((i)->ncols)
  #define MATCOLS(i) ((i)->ncols)
  #define MATROWS(i) ((i)->nrows)
  #define MATELEM(mat,i,j) ((mat)->m)[MATCOLS((mat)) * ((i)-1) + (j)-1]

};
/* the settings of rank, nrows, ncols, m ,   entries:
 * for IDEAL_CMD:     1    1    n    size n   poly              (n>=0)
 * for MODUL_CMD:     r    1    n    size n   vector of rank<=r (n>=0, r>=0)
 * for MATRIX_CMD     r    r    c    size r*c poly              (r>=0, c>=0)
 * for MAP_CMD:    char*   1    n    size n   poly              (n>=0)
 */

struct sip_smap
{
  poly *m;
  char *preimage;
  int nrows;
  int ncols;
};

//typedef struct sip_smap *         map;

struct sideal_list;
typedef struct sideal_list *      ideal_list;

struct sideal_list
{
  ideal_list next;
  ideal      d;
#ifdef KDEBUG
  int nr;
#endif
};

extern omBin sip_sideal_bin;

/// creates an ideal / module
ideal idInit (int size, int rank=1);

/*- deletes an ideal -*/
void id_Delete (ideal* h, ring r);
void id_ShallowDelete (ideal* h, ring r);
void idSkipZeroes (ideal ide);
  /*gives an ideal the minimal possible size*/

/// number of non-zero polys in F
int     idElem(const ideal F);
/// normialize all polys in id
void    id_Normalize(ideal id, const ring r);

int id_MinDegW(ideal M,intvec *w, const ring r);

#ifdef PDEBUG
void id_DBTest(ideal h1, int level, const char *f,const int l, const ring lR, const ring tR );
#define id_TestTail(A, lR, tR) id_DBTest(A, PDEBUG, __FILE__,__LINE__, lR, tR)
#define id_Test(A, lR) id_DBTest(A, PDEBUG, __FILE__,__LINE__, lR, lR)
#else
#define id_TestTail(A, lR, tR)  do {} while (0)
#define id_Test(A, lR) do {} while (0)
#endif

ideal id_Copy (ideal h1,const ring r);

  /*adds two ideals without simplifying the result*/
ideal id_SimpleAdd (ideal h1,ideal h2, const ring r);
  /*adds the quotient ideal*/
ideal id_Add (ideal h1,ideal h2,const ring r);
  /* h1 + h2 */

ideal id_Power(ideal given,int exp, const ring r);
BOOLEAN idIs0 (ideal h);

long id_RankFreeModule(ideal m, ring lmRing, ring tailRing);
static inline long id_RankFreeModule(ideal m, ring r)
{return id_RankFreeModule(m, r, r);}

ideal   id_FreeModule (int i, const ring r);
int     idElem(const ideal F);
int id_PosConstant(ideal id, const ring r);
ideal id_Head(ideal h,const ring r);
ideal id_MaxIdeal (const ring r);
ideal id_MaxIdeal(int deg, const ring r);
ideal id_CopyFirstK (const ideal ide, const int k,const ring r);
void id_DelMultiples(ideal id, const ring r);
void id_Norm(ideal id, const ring r);
void id_DelEquals(ideal id, const ring r);
void id_DelLmEquals(ideal id, const ring r);
void id_DelDiv(ideal id, const ring r);
BOOLEAN id_IsConstant(ideal id, const ring r);

/// sorts the ideal w.r.t. the actual ringordering
/// uses lex-ordering when nolex = FALSE
intvec *id_Sort(const ideal id, const BOOLEAN nolex, const ring r);

/// transpose a module
ideal id_Transp(ideal a, const ring rRing);

void id_Compactify(ideal id, const ring r);
ideal  id_Mult (ideal h1,ideal  h2, const ring r);
ideal id_Homogen(ideal h, int varnum,const ring r);
BOOLEAN id_HomIdeal (ideal id, ideal Q, const ring r);
BOOLEAN id_HomModule(ideal m, ideal Q, intvec **w, const ring R);
BOOLEAN id_IsZeroDim(ideal I, const ring r);
ideal id_Jet(ideal i,int d, const ring R);
ideal id_JetW(ideal i,int d, intvec * iv, const ring R);
ideal  id_Subst(ideal id, int n, poly e, const ring r);
matrix id_Module2Matrix(ideal mod, const ring R);
matrix id_Module2formatedMatrix(ideal mod,int rows, int cols, const ring R);
ideal id_Matrix2Module(matrix mat, const ring R);
ideal id_Vec2Ideal(poly vec, const ring R);

int id_ReadOutPivot(ideal arg, int* comp, const ring r);

int     binom (int n,int r);

  /*- verschiebt die Indizes der Modulerzeugenden um i -*/
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);

#ifdef PDEBUG
void idShow(const ideal id, const ring lmRing, const ring tailRing, const int debugPrint = 0);
#define id_Print(id, lR, tR) idShow(id, lR, tR)
#else
#define id_Print(A, lR, tR) do {} while (0)
#endif



/// insert h2 into h1 depending on the two boolean parameters:
/// - if zeroOk is true, then h2 will also be inserted when it is zero
/// - if duplicateOk is true, then h2 will also be inserted when it is
///   already present in h1
/// return TRUE iff h2 was indeed inserted
BOOLEAN id_InsertPolyWithTests (ideal h1, const int validEntries,
                                const poly h2, const bool zeroOk,
                                const bool duplicateOk, const ring r);


intvec * id_QHomWeight(ideal id, const ring r);


ideal id_ChineseRemainder(ideal *xx, number *q, int rl, const ring r);

void id_Shift(ideal M, int s, const ring r);
#endif