![]() |
#include <misc/auxiliary.h>
#include <omalloc/omalloc.h>
#include <reporter/reporter.h>
#include <coeffs/coeffs.h>
#include <coeffs/numbers.h>
#include <coeffs/longrat.h>
#include <polys/monomials/ring.h>
#include <polys/monomials/p_polys.h>
#include <polys/simpleideals.h>
#include <polys/PolyEnumerator.h>
#include <factory/factory.h>
#include <polys/clapconv.h>
#include <polys/clapsing.h>
#include <polys/prCopy.h>
#include <polys/ext_fields/algext.h>
#include <polys/ext_fields/transext.h>
Go to the source code of this file.
Macros | |
#define | TRANSEXT_PRIVATES 1 |
ABSTRACT: numbers in an algebraic extension field K[a] / < f(a) > Assuming that we have a coeffs object cf, then these numbers are polynomials in the polynomial ring K[a] represented by cf->extRing. More... | |
#define | naTest(a) naDBTest(a,__FILE__,__LINE__,cf) |
#define | naRing cf->extRing |
#define | naCoeffs cf->extRing->cf |
#define | naMinpoly naRing->qideal->m[0] |
Functions | |
BOOLEAN | naDBTest (number a, const char *f, const int l, const coeffs r) |
BOOLEAN | naGreaterZero (number a, const coeffs cf) |
forward declarations More... | |
BOOLEAN | naGreater (number a, number b, const coeffs cf) |
BOOLEAN | naEqual (number a, number b, const coeffs cf) |
BOOLEAN | naIsOne (number a, const coeffs cf) |
BOOLEAN | naIsMOne (number a, const coeffs cf) |
BOOLEAN | naIsZero (number a, const coeffs cf) |
number | naInit (long i, const coeffs cf) |
long | naInt (number &a, const coeffs cf) |
number | naNeg (number a, const coeffs cf) |
this is in-place, modifies a More... | |
number | naInvers (number a, const coeffs cf) |
number | naAdd (number a, number b, const coeffs cf) |
number | naSub (number a, number b, const coeffs cf) |
number | naMult (number a, number b, const coeffs cf) |
number | naDiv (number a, number b, const coeffs cf) |
void | naPower (number a, int exp, number *b, const coeffs cf) |
number | naCopy (number a, const coeffs cf) |
void | naWriteLong (number a, const coeffs cf) |
void | naWriteShort (number a, const coeffs cf) |
number | naGetDenom (number &a, const coeffs cf) |
number | naGetNumerator (number &a, const coeffs cf) |
number | naGcd (number a, number b, const coeffs cf) |
int | naSize (number a, const coeffs cf) |
void | naDelete (number *a, const coeffs cf) |
void | naCoeffWrite (const coeffs cf, BOOLEAN details) |
const char * | naRead (const char *s, number *a, const coeffs cf) |
static BOOLEAN | naCoeffIsEqual (const coeffs cf, n_coeffType n, void *param) |
static void | p_Monic (poly p, const ring r) |
returns NULL if p == NULL, otherwise makes p monic by dividing by its leading coefficient (only done if this is not already 1); this assumes that we are over a ground field so that division is well-defined; modifies p More... | |
static poly | p_GcdHelper (poly &p, poly &q, const ring r) |
see p_Gcd; additional assumption: deg(p) >= deg(q); must destroy p and q (unless one of them is returned) More... | |
static poly | p_Gcd (const poly p, const poly q, const ring r) |
static poly | p_ExtGcdHelper (poly &p, poly &pFactor, poly &q, poly &qFactor, ring r) |
poly | p_ExtGcd (poly p, poly &pFactor, poly q, poly &qFactor, ring r) |
assumes that p and q are univariate polynomials in r, mentioning the same variable; assumes a global monomial ordering in r; assumes that not both p and q are NULL; returns the gcd of p and q; moreover, afterwards pFactor and qFactor contain appropriate factors such that gcd(p, q) = p * pFactor + q * qFactor; leaves p and q unmodified More... | |
void | heuristicReduce (poly &p, poly reducer, const coeffs cf) |
void | definiteReduce (poly &p, poly reducer, const coeffs cf) |
static coeffs | nCoeff_bottom (const coeffs r, int &height) |
number | napNormalizeHelper (number b, const coeffs cf) |
number | naLcmContent (number a, number b, const coeffs cf) |
void | naNormalize (number &a, const coeffs cf) |
number | naConvFactoryNSingN (const CanonicalForm n, const coeffs cf) |
CanonicalForm | naConvSingNFactoryN (number n, BOOLEAN, const coeffs cf) |
number | naMap00 (number a, const coeffs src, const coeffs dst) |
number | naMapZ0 (number a, const coeffs src, const coeffs dst) |
number | naMapP0 (number a, const coeffs src, const coeffs dst) |
number | naCopyTrans2AlgExt (number a, const coeffs src, const coeffs dst) |
number | naMap0P (number a, const coeffs src, const coeffs dst) |
number | naMapPP (number a, const coeffs src, const coeffs dst) |
number | naMapUP (number a, const coeffs src, const coeffs dst) |
number | naGenMap (number a, const coeffs cf, const coeffs dst) |
number | naGenTrans2AlgExt (number a, const coeffs cf, const coeffs dst) |
nMapFunc | naSetMap (const coeffs src, const coeffs dst) |
Get a mapping function from src into the domain of this type (n_algExt) More... | |
static int | naParDeg (number a, const coeffs cf) |
static number | naParameter (const int iParameter, const coeffs cf) |
return the specified parameter as a number in the given alg. field More... | |
int | naIsParam (number m, const coeffs cf) |
if m == var(i)/1 => return i, More... | |
static void | naClearContent (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf) |
static void | naClearDenominators (ICoeffsEnumerator &numberCollectionEnumerator, number &c, const coeffs cf) |
void | naKillChar (coeffs cf) |
char * | naCoeffString (const coeffs r) |
number | naChineseRemainder (number *x, number *q, int rl, BOOLEAN sym, CFArray &inv_cache, const coeffs cf) |
number | naFarey (number p, number n, const coeffs cf) |
BOOLEAN | naInitChar (coeffs cf, void *infoStruct) |
Initialize the coeffs object. More... | |
Variables | |
static const n_coeffType | ID = n_algExt |
Our own type! More... | |
#define TRANSEXT_PRIVATES 1 |
ABSTRACT: numbers in an algebraic extension field K[a] / < f(a) > Assuming that we have a coeffs object cf, then these numbers are polynomials in the polynomial ring K[a] represented by cf->extRing.
IMPORTANT ASSUMPTIONS: 1.) So far we assume that cf->extRing is a valid polynomial ring in exactly one variable, i.e., K[a], where K is allowed to be any field (representable in SINGULAR and which may itself be some extension field, thus allowing for extension towers). 2.) Moreover, this implementation assumes that cf->extRing->qideal is not NULL but an ideal with at least one non-zero generator which may be accessed by cf->extRing->qideal->m[0] and which represents the minimal polynomial f(a) of the extension variable 'a' in K[a]. 3.) As soon as an std method for polynomial rings becomes availabe, all reduction steps modulo f(a) should be replaced by a call to std. Moreover, in this situation one can finally move from K[a] / < f(a) > to K[a_1, ..., a_s] / I, with I some zero-dimensional ideal in K[a_1, ..., a_s] given by a lex Gröbner basis. The code in algext.h and algext.cc is then capable of computing in K[a_1, ..., a_s] / I.
Definition at line 749 of file algext.cc.
number naChineseRemainder | ( | number * | x, |
number * | q, | ||
int | rl, | ||
BOOLEAN | sym, | ||
CFArray & | inv_cache, | ||
const coeffs | cf | ||
) |
Definition at line 1369 of file algext.cc.
|
static |
Definition at line 1123 of file algext.cc.
|
static |
Definition at line 1324 of file algext.cc.
|
static |
Definition at line 693 of file algext.cc.
Definition at line 1346 of file algext.cc.
Definition at line 400 of file algext.cc.
number naConvFactoryNSingN | ( | const CanonicalForm | n, |
const coeffs | cf | ||
) |
Definition at line 769 of file algext.cc.
CanonicalForm naConvSingNFactoryN | ( | number | n, |
BOOLEAN | , | ||
const coeffs | cf | ||
) |
Definition at line 909 of file algext.cc.
Definition at line 246 of file algext.cc.
Definition at line 789 of file algext.cc.
Definition at line 991 of file algext.cc.
Definition at line 1006 of file algext.cc.
Definition at line 371 of file algext.cc.
: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0
forward declarations
Definition at line 391 of file algext.cc.
: TRUE iff (n != 0 and (LC(n) > 0 or deg(n) > 0)) in K(t_1, ..., t_n): TRUE iff (LC(numerator(n) is a constant and > 0) or (LC(numerator(n) is not a constant) in Z/2^kZ: TRUE iff 0 < n <= 2^(k-1) in Z/mZ: TRUE iff the internal mpz is greater than zero in Z: TRUE iff n > 0
Definition at line 352 of file algext.cc.
Initialize the coeffs object.
first check whether cf->extRing != NULL and delete old ring???
Definition at line 1389 of file algext.cc.
Definition at line 358 of file algext.cc.
Definition at line 837 of file algext.cc.
Definition at line 336 of file algext.cc.
Definition at line 328 of file algext.cc.
if m == var(i)/1 => return i,
Definition at line 1112 of file algext.cc.
Definition at line 658 of file algext.cc.
Definition at line 867 of file algext.cc.
Definition at line 957 of file algext.cc.
Definition at line 889 of file algext.cc.
Definition at line 970 of file algext.cc.
Definition at line 980 of file algext.cc.
Definition at line 877 of file algext.cc.
return the specified parameter as a number in the given alg. field
Definition at line 1097 of file algext.cc.
Definition at line 644 of file algext.cc.
Definition at line 507 of file algext.cc.
Get a mapping function from src into the domain of this type (n_algExt)
Q or Z –> Q(a)
Z –> Q(a)
Z/p –> Q(a)
Q –> Z/p(a)
Z –> Z/p(a)
Z/p –> Z/p(a)
Z/u –> Z/p(a)
default
Definition at line 1036 of file algext.cc.
Definition at line 727 of file algext.cc.
Definition at line 584 of file algext.cc.
Definition at line 602 of file algext.cc.
Definition at line 271 of file algext.cc.
assumes that p and q are univariate polynomials in r, mentioning the same variable; assumes a global monomial ordering in r; assumes that not both p and q are NULL; returns the gcd of p and q; moreover, afterwards pFactor and qFactor contain appropriate factors such that gcd(p, q) = p * pFactor + q * qFactor; leaves p and q unmodified
Definition at line 229 of file algext.cc.
|
inlinestatic |
Definition at line 196 of file algext.cc.
Definition at line 178 of file algext.cc.
see p_Gcd; additional assumption: deg(p) >= deg(q); must destroy p and q (unless one of them is returned)
Definition at line 158 of file algext.cc.
returns NULL if p == NULL, otherwise makes p monic by dividing by its leading coefficient (only done if this is not already 1); this assumes that we are over a ground field so that division is well-defined; modifies p
assumes that p and q are univariate polynomials in r, mentioning the same variable; assumes a global monomial ordering in r; assumes that not both p and q are NULL; returns the gcd of p and q; leaves p and q unmodified
Definition at line 133 of file algext.cc.
|
static |