source: git/libpolys/polys/ext_fields/algext.h @ 18dab28

spielwiese
Last change on this file since 18dab28 was 6ccdd3a, checked in by Frank Seelisch <seelisch@…>, 13 years ago
renamed algring; comments; transext.* added
  • Property mode set to 100644
File size: 4.3 KB
Line 
1#ifndef ALGEXT_H
2#define ALGEXT_H
3/****************************************
4*  Computer Algebra System SINGULAR     *
5****************************************/
6/* $Id$ */
7/*
8* ABSTRACT: numbers in an algebraic extension field K[a] / < f(a) >
9*           Assuming that we have a coeffs object cf, then these numbers
10*           are polynomials in the polynomial ring K[a] represented by
11*           cf->extRing.
12*           IMPORTANT ASSUMPTIONS:
13*           1.) So far we assume that cf->extRing is a valid polynomial
14*               ring in exactly one variable, i.e., K[a], where K is allowed
15*               to be any field (representable in SINGULAR and which may
16*               itself be some extension field, thus allowing for extension
17*               towers).
18*           2.) Moreover, this implementation assumes that
19*               cf->extRing->minideal is not NULL but an ideal with at
20*               least one non-zero generator which may be accessed by
21*               cf->extRing->minideal->m[0] and which represents the minimal
22*               polynomial f(a) of the extension variable 'a' in K[a].
23*           3.) As soon as an std method for polynomial rings becomes
24*               availabe, all reduction steps modulo f(a) should be replaced
25*               by a call to std. Moreover, in this situation one can finally
26*               move from K[a] / < f(a) > to
27*                  K[a_1, ..., a_s] / I, with I some zero-dimensional ideal
28*                                        in K[a_1, ..., a_s] given by a lex
29*                                        Gröbner basis.
30*               The code in algext.h and algext.cc is then capable of
31*               computing in K[a_1, ..., a_s] / I.
32*/
33
34#include <coeffs/coeffs.h>
35
36struct ip_sring;
37typedef struct ip_sring * ring;
38
39struct sip_sideal;
40typedef struct sip_sideal * ideal;
41
42/// struct for passing initialization parameters to naInitChar
43typedef struct { ring r; ideal i; } AlgExtInfo;
44
45/// Get a mapping function from src into the domain of this type (n_algExt)
46nMapFunc naSetMap(const coeffs src, const coeffs dst);
47
48/// Initialize the coeffs object
49BOOLEAN  naInitChar(coeffs cf, void* infoStruct);
50
51/* Private hidden interface
52BOOLEAN  naGreaterZero(number a, const coeffs cf);
53BOOLEAN  naGreater(number a, number b, const coeffs cf);
54BOOLEAN  naEqual(number a, number b, const coeffs cf);
55BOOLEAN  naIsOne(number a, const coeffs cf);
56BOOLEAN  naIsMOne(number a, const coeffs cf);
57BOOLEAN  naIsZero(number a, const coeffs cf);
58number   naInit(int i, const coeffs cf);
59int      naInt(number &a, const coeffs cf);
60number   naNeg(number a, const coeffs cf);
61number   naInvers(number a, const coeffs cf);
62number   naPar(int i, const coeffs cf);
63number   naAdd(number a, number b, const coeffs cf);
64number   naSub(number a, number b, const coeffs cf);
65number   naMult(number a, number b, const coeffs cf);
66number   naDiv(number a, number b, const coeffs cf);
67void     naPower(number a, int exp, number *b, const coeffs cf);
68number   naCopy(number a, const coeffs cf);
69void     naWrite(number &a, const coeffs cf);
70number   naRePart(number a, const coeffs cf);
71number   naImPart(number a, const coeffs cf);
72number   naGetDenom(number &a, const coeffs cf);
73number   naGetNumerator(number &a, const coeffs cf);
74number   naGcd(number a, number b, const coeffs cf);
75number   naLcm(number a, number b, const coeffs cf);
76number   naSize(number a, const coeffs cf);
77void     naDelete(number * a, const coeffs cf);
78void     naCoeffWrite(const coeffs cf);
79number   naIntDiv(number a, number b, const coeffs cf);
80const char * naRead(const char *s, number *a, const coeffs cf);
81static BOOLEAN naCoeffIsEqual(const coeffs cf, n_coeffType n, void * param);
82*/
83
84#ifdef LDEBUG
85#define naTest(a) naDBTest(a,__FILE__,__LINE__,cf)
86BOOLEAN  naDBTest(number a, const char *f, const int l, const coeffs r);
87#else
88#define naTest(a)
89#endif
90
91/* our own type */
92#define naID n_algExt
93
94/* polynomial ring in which our numbers live */
95#define naRing cf->extRing
96
97/* coeffs object in which the coefficients of our numbers live;
98 * methods attached to naCoeffs may be used to compute with the
99 * coefficients of our numbers, e.g., use naCoeffs->nAdd to add
100 * coefficients of our numbers */
101#define naCoeffs cf->extRing->cf
102
103/* minimal polynomial */
104#define naMinpoly naRing->minideal->m[0]
105
106#endif
107/* ALGEXT_H */
Note: See TracBrowser for help on using the repository browser.