Loading...
Searching...
No Matches
nforder.h File Reference

Go to the source code of this file.

## Data Structures

class | nforder

## Enumerations

enum | order_flags_log { one_is_one , is_maximal_known , is_maximal }

## Functions

void | basis_elt (bigintmat *m, int i)
nforder * | onestep (nforder *o, number p, coeffs c)
nforder * | pmaximal (nforder *o, number p)
nforder * | round2 (nforder *o)
bigintmat * | radicalmodpbase (nforder *o, number p, coeffs c)
number | multring (bigintmat *nbase, nforder *o, number p)
void | nforder_delete (nforder *o)

## Enumeration Type Documentation

## order_flags_log

enum order_flags_log

Enumerator
one_is_one |
is_maximal_known |
is_maximal |

Definition at line 17 of file nforder.h.

{
one_is_one, //if 1 is the first basis element
is_maximal_known,
is_maximal
};
is_maximal
@ is_maximal
Definition nforder.h:20
one_is_one
@ one_is_one
Definition nforder.h:18
is_maximal_known
@ is_maximal_known
Definition nforder.h:19

## Function Documentation

## basis_elt()

void basis_elt | ( | bigintmat * | m,
|  | int | i )

Definition at line 422 of file nforder.cpp.

{
if (((m->rows() == 1) && (i <= m->cols())) || ((m->cols() == 1) && (i <= m->rows()))) {
// Falls m Zeilen- oder Spaltenvektor ist, setze alle Einträge auf 0 und Eintrag i auf 1 (Koeff-Vektor des i-ten Basiselements)
number t1 = n_Init(0,m->basecoeffs());
for (int j=0; ((j<m->rows()) || (j<m->cols())); j++) {
m->set(j, t1);
}
n_Delete(&t1,m->basecoeffs());
number t2 = n_Init(1,m->basecoeffs());
m->set(i-1, t2);
n_Delete(&t2,m->basecoeffs());
}
else
Werror("Error in basis_elt. Not a vector.");
}
m
int m
Definition cfEzgcd.cc:128
i
int i
Definition cfEzgcd.cc:132
n_Delete
static FORCE_INLINE void n_Delete(number *p, const coeffs r)
delete 'p'
Definition coeffs.h:461
n_Init
static FORCE_INLINE number n_Init(long i, const coeffs r)
a number representing i in the given coeff field/ring r
Definition coeffs.h:541
j
int j
Definition facHensel.cc:110
Werror
void Werror(const char *fmt,...)
Definition reporter.cc:189

## multring()

number multring | ( | bigintmat * | nbase,
|  | nforder * | o,
|  | number | p )

Definition at line 553 of file nforder.cpp.

{
coeffs R = o->basecoeffs();
number divi;
int n = o->getDim();
bigintmat *inv = new bigintmat(n, n, R);
divi = nbase->pseudoinv(inv);
// Zusammenbau der "langen" Matrix
bigintmat *lon = new bigintmat(n, 0, R);
bigintmat *oldlon;
bigintmat *mm = new bigintmat(n, n, R);
bigintmat *temp = new bigintmat(n, 1, R);
bigintmat *nochnetemp = new bigintmat(n, n, R);
for (int i=1; i<=n; i++) {
nbase->getcol(i, temp);
o->multmap(temp, mm);
bimMult(inv, mm, nochnetemp);
mm->copy(nochnetemp);
mm->inpTranspose();
oldlon = lon;
lon = new bigintmat(n, (i)*n, o->basecoeffs());
lon->concatcol(oldlon, mm);
delete oldlon;
}
lon->skaldiv(divi);
bigintmat * red;
if (1) {
bigintmat * cmp = lon->modhnf(p, o->basecoeffs());
red = cmp;
} else {
lon->hnf();
red = new bigintmat(n, n, o->basecoeffs());
lon->getColRange((n-1)*n+1, n, red);
}
delete lon;
red->inpTranspose();
number divisor = red->pseudoinv(nbase);
nbase->hnf();
delete inv;
delete mm;
delete temp;
delete red;
delete nochnetemp;
n_Delete(&divi, o->basecoeffs());
return divisor;
}
bimMult
bigintmat * bimMult(bigintmat *a, bigintmat *b)
Definition bigintmat.cc:253
p
int p
Definition cfModGcd.cc:4086
bigintmat
Matrices of numbers.
Definition bigintmat.h:51
bigintmat::hnf
void hnf()
transforms INPLACE to HNF
Definition bigintmat.cc:1655
bigintmat::modhnf
bigintmat * modhnf(number p, coeffs c)
computes HNF(this | p*I)
Definition bigintmat.cc:1824
bigintmat::skaldiv
void skaldiv(number b)
Macht Ganzzahldivision aller Matrixeinträge mit b.
Definition bigintmat.cc:1851
bigintmat::copy
bool copy(bigintmat *b)
Kopiert Einträge von b auf Bigintmat.
Definition bigintmat.cc:1254
bigintmat::getcol
void getcol(int j, bigintmat *a)
copies the j-th column into the matrix a - which needs to be pre-allocated with the correct size.
Definition bigintmat.cc:742
bigintmat::pseudoinv
number pseudoinv(bigintmat *a)
Speichert in Matrix a die Pseudoinverse, liefert den Nenner zurück.
Definition bigintmat.cc:1410
bigintmat::getColRange
void getColRange(int j, int no, bigintmat *a)
copies the no-columns staring by j (so j...j+no-1) into the pre-allocated a
Definition bigintmat.cc:773
bigintmat::concatcol
void concatcol(bigintmat *a, bigintmat *b)
Definition bigintmat.cc:1093
bigintmat::inpTranspose
void inpTranspose()
transpose in place
Definition bigintmat.cc:48
nforder::multmap
void multmap(bigintmat *a, bigintmat *m)
Definition nforder.cpp:404
nforder::basecoeffs
coeffs basecoeffs() const
Definition nforder.h:76
nforder::getDim
int getDim()
Definition nforder.cpp:235
coeffs
The main handler for Singular numbers which are suitable for Singular polynomials.
R
#define R
Definition sirandom.c:27

## nforder_delete()

void nforder_delete | ( | nforder * | o | ) |

Definition at line 132 of file nforder.cpp.

{
if (o->ref_count_decref()>0) {
return;
}
delete o;
}
nforder::ref_count_decref
int ref_count_decref()
Definition nforder.h:51

## onestep()

nforder * onestep | ( | nforder * | o,
|  | number | p,
|  | coeffs | c )

Definition at line 608 of file nforder.cpp.

{
// Berechne F_p-Basis von I_p/pI_p
bigintmat *basis;
basis = radicalmodpbase(o, p, c);
// Bestimme Basis vom Ring der Multiplikatoren (speicher diese in basis), und Nenner davon (in divisor)
number divisor = multring(basis, o, p);
// Erzeuge neue Ordnung, der o zu Grunde liegt, mit Basis basis und Nenner divisor
if (basis->isOne() && n_IsOne(divisor, c)) {
delete basis;
n_Delete(&divisor, c);
return o;
}
nforder *no = new nforder(o, basis, divisor, c);
delete basis;
n_Delete(&divisor, c);
return no;
}
bigintmat::isOne
int isOne()
is matrix is identity
Definition bigintmat.cc:1295
nforder
Definition nforder.h:24
n_IsOne
static FORCE_INLINE BOOLEAN n_IsOne(number n, const coeffs r)
TRUE iff 'n' represents the one element.
Definition coeffs.h:474
radicalmodpbase
bigintmat * radicalmodpbase(nforder *o, number p, coeffs c)
Definition nforder.cpp:446
multring
number multring(bigintmat *nbase, nforder *o, number p)
Definition nforder.cpp:553

## pmaximal()

nforder * pmaximal | ( | nforder * | o,
|  | number | p )

Definition at line 632 of file nforder.cpp.

{
coeffs c = o->basecoeffs();
nforder *no = o;
nforder *otemp;
// TODO: check if p^2 still divides disc (maybe in onestep)
// simplify the tower
do {
otemp = no;
no = onestep(otemp, p, c);
if (no==otemp)
break;
nforder_delete (otemp);
otemp = no->simplify();
nforder_delete (no);
no = otemp;
} while (1);
return no;
}
nforder::simplify
nforder * simplify()
Definition nforder.cpp:275
nforder_delete
void nforder_delete(nforder *o)
Definition nforder.cpp:132
onestep
nforder * onestep(nforder *o, number p, coeffs c)
Definition nforder.cpp:608

## radicalmodpbase()

bigintmat * radicalmodpbase | ( | nforder * | o,
|  | number | p,
|  | coeffs | c )

Definition at line 446 of file nforder.cpp.

{
number dimen = n_Init(o->getDim(), o->basecoeffs());
int n = o->getDim();
bigintmat *m, *bas;
// Berechnet F_p-Basis von I_p/pI_p (Radical mod p)
// Dazu:
if (n_Greater(p, dimen, c)) {
// Falls Primzahl größer gleich Dimension der Ordnung, so berechne Kern der Spurmatrix modulo p.
// also works it p is no prime.
m = o->traceMatrix();
bas = new bigintmat(n, 1, o->basecoeffs());
} else {
// Sonst: Berechne Kern der Abbildung x -> x^(p^j) mod p, wobei j>0 mit p^j >= dimension
int j = 1;
// ex als number, oder reicht long long int?
// Finde j von oben und berechne p^j
number ex = n_Init(1, o->basecoeffs());
number temp;
while (n_Greater(dimen, ex, o->basecoeffs())) {
temp = n_Mult(ex, p, o->basecoeffs());
n_Delete(&ex, o->basecoeffs());
ex = temp;
j++;
}
// Berechne Abbildungsmatrix der oben genannten Abbildung und speichere diese in m (genauere Erklärung dazu: Siehe multmap())
m = new bigintmat(n, n, o->basecoeffs());
bas = new bigintmat(n, 1, o->basecoeffs());
bigintmat *prod = new bigintmat(n, 1, o->basecoeffs());
number klauf;
number eins = n_Init(1, o->basecoeffs());
for (int i=1; i<=n; i++) {
basis_elt(bas, i);
prod->copy(bas);
klauf = n_Init(1, o->basecoeffs());
for (; n_Greater(ex, klauf, o->basecoeffs());) {
o->elMult(prod, bas);
prod->mod(p);
temp = n_Add(klauf, eins, o->basecoeffs());
n_Delete(&klauf, o->basecoeffs());
klauf = temp;
}
n_Delete(&klauf, o->basecoeffs());
m->setcol(i, prod);
}
delete prod;
n_Delete(&ex, o->basecoeffs());
n_Delete(&eins, o->basecoeffs());
}
bigintmat *kbase = new bigintmat(n, n, o->basecoeffs());
// Speichere Basiselemente von Kern der Matrix m (Spurmatrix oder Abbildungsmatrix, je nach if-else-Fall) (von Z/pZ -> Z/pZ) in kbase (ersten kdim Spalten bilden Basis)
int kdim = kernbase(m, kbase, p, c);
// Schreibe für jedes i=1,, .., dimension p*(i-tes Basiselement) als Spalten in Matrix gen, dahinter die oben errechnete Basis vom Kern
// Wir erhalten (als Spalten) ein Erzeugendensystem vom Kern von Z->Z/pZ: x->x^(p^j)
bigintmat *gen = new bigintmat(n, n+kdim, o->basecoeffs());
for (int i=1; i<=n; i++) {
basis_elt(bas, i);
bas->skalmult(p, c);
gen->setcol(i, bas);
}
for (int i=1; i<=kdim; i++) {
kbase->getcol(i, bas);
gen->setcol(i+n, bas);
}
// HNF auf EZS anwenden liefert (als letzten dimension Spalten) eine Basis des Kerns
gen->hnf();
bigintmat *tmp = new bigintmat(n, 1, o->basecoeffs());
bigintmat *nbase = new bigintmat(n, n, o->basecoeffs());
// Schreibe diese als Spalten in nbase und gib nbase zurück
for (int i=1; i<=n; i++) {
gen->getcol(gen->cols()-n+i, tmp);
nbase->setcol(i, tmp);
}
n_Delete(&dimen, o->basecoeffs());
delete m;
delete bas;
delete kbase;
delete gen;
delete tmp;
return nbase;
}
kernbase
int kernbase(bigintmat *a, bigintmat *c, number p, coeffs q)
a basis for the nullspace of a mod p: only used internally in Round2. Don't use it.
Definition bigintmat.cc:2585
bigintmat::cols
int cols() const
Definition bigintmat.h:144
bigintmat::setcol
void setcol(int j, bigintmat *m)
Setzt j-te Spalte gleich übergebenem Vektor (Matrix) m.
Definition bigintmat.cc:821
bigintmat::skalmult
bool skalmult(number b, coeffs c)
Multipliziert zur Matrix den Skalar b hinzu.
Definition bigintmat.cc:933
nforder::elMult
void elMult(bigintmat *a, bigintmat *b)
Definition nforder.cpp:321
nforder::traceMatrix
bigintmat * traceMatrix()
Definition nforder.cpp:196
n_Mult
static FORCE_INLINE number n_Mult(number a, number b, const coeffs r)
return the product of 'a' and 'b', i.e., a*b
Definition coeffs.h:639
n_Add
static FORCE_INLINE number n_Add(number a, number b, const coeffs r)
return the sum of 'a' and 'b', i.e., a+b
Definition coeffs.h:653
n_Greater
static FORCE_INLINE BOOLEAN n_Greater(number a, number b, const coeffs r)
ordered fields: TRUE iff 'a' is larger than 'b'; in Z/pZ: TRUE iff la > lb, where la and lb are the l...
Definition coeffs.h:517
prod
fq_nmod_poly_t prod
Definition facHensel.cc:100
basis_elt
void basis_elt(bigintmat *m, int i)
Definition nforder.cpp:422

## round2()

nforder * round2 | ( | nforder * | o | ) |