File: ringpoly.gd

package info (click to toggle)
gap 4r4p9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 27,120 kB
  • ctags: 6,735
  • sloc: ansic: 96,692; sh: 3,254; makefile: 319; perl: 11; awk: 6
file content (203 lines) | stat: -rw-r--r-- 7,925 bytes parent folder | download | duplicates (4)
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
#############################################################################
##
#W  ringpoly.gd                 GAP Library                      Frank Celler
##
#H  @(#)$Id: ringpoly.gd,v 4.28 2002/10/07 01:42:34 gap Exp $
##
#Y  Copyright (C)  1996,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1999 School Math and Comp. Sci., University of St.  Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file contains  the categories, attributes, properties and operations
##  for polynomial rings.
##
Revision.ringpoly_gd :=
    "@(#)$Id: ringpoly.gd,v 4.28 2002/10/07 01:42:34 gap Exp $";


#############################################################################
##
#C  IsPolynomialRing( <pring> )
##
##  is the category of polynomial rings
##
DeclareCategory( "IsPolynomialRing", IsRing );


#############################################################################
##
#C  IsUnivariatePolynomialRing( <pring> )
##
## is the category of polynomial rings with one indeterminate.
DeclareCategory( "IsUnivariatePolynomialRing", IsPolynomialRing );

#############################################################################
##
#C  IsFiniteFieldPolynomialRing( <pring> )
##
##  is the category of polynomial rings over a finite field
##  (see Chapter~"Finite Fields").
##
DeclareCategory( "IsFiniteFieldPolynomialRing", IsPolynomialRing );


#############################################################################
##
#C  IsAbelianNumberFieldPolynomialRing( <pring> )
##
##  is the category of polynomial rings over a field of cyclotomics
##  (see the chapters~"Cyclotomic Numbers" and "Abelian Number Fields").
##
DeclareCategory( "IsAbelianNumberFieldPolynomialRing", IsPolynomialRing );

#############################################################################
##
#C  IsAlgebraicExtensionPolynomialRing( <pring> )
##
##  is the category of polynomial rings over a field that has been formed as
##  an `AlgebraicExtension' of a base field.
##  (see chapter~"Algebraic extensions of fields").
##
DeclareCategory( "IsAlgebraicExtensionPolynomialRing", IsPolynomialRing );


#############################################################################
##
#C  IsRationalsPolynomialRing( <pring> )
##
##  is the category of polynomial rings over the rationals
##  (see Chapter~"Rational Numbers").
##
DeclareCategory( "IsRationalsPolynomialRing",
    IsAbelianNumberFieldPolynomialRing );


#############################################################################
##
#A  CoefficientsRing( <pring> )
##
##  returns the ring of coefficients of the polynomial ring <pring>, that is
##  the ring over which <pring> was defined.
DeclareAttribute( "CoefficientsRing", IsPolynomialRing );

#2
##  {\GAP} implements a polynomial ring with countably many indeterminates.
##  These indeterminates can be referred to by positive integers. If only a
##  number <num> of indeterminates is required they default to `[1..<num>]'.
##
##  It is possible to assign names to indeterminates. These names only
##  provide a means for printing the indeterminates in a nice way, but have
##  not necessary any relations to variable names. Indeterminates that have
##  not been assigned a name will be printed as ``{`x_<nr>'}''.
##
##  It is possible to assign
##  the *same* name to *different* indeterminates (though it is probably not
##  a good idea to do so). Asking *twice* for an indeterminate with the name
##  <nam> will produce *two different* indeterminates!
##
##  When asking for indeterminates with certain
##  names, {\GAP} usually will take the first indeterminates that are not
##  yet named, name these accordingly and return them. Thus when asking for
##  named indeterminates, no relation between names and indeterminate
##  numbers can be guaranteed. The attribute
##  `IndeterminateNumberOfLaurentPolynomial(<indet>)' will return
##  the number of the indeterminate <indet>.


#############################################################################
##
#O  Indeterminate( <R>,[<nr>] )
#O  Indeterminate( <R>,[<avoid>] )
#O  Indeterminate( <R>,<name>[,<avoid>] )
#O  Indeterminate( <fam>,<nr> )
##
##  returns indeterminate number <nr> over the ring <R>. If <nr> is not
##  given it defaults to 1. If the number is not specified a list <avoid> of
##  indeterminates may be given. The function will return an indeterminate
##  that is guaranteed to be different from all the indeterminates in
##  <avoid>. The third usage returns an indeterminate called <name> (also
##  avoiding the indeterminates in <avoid> if given).
DeclareOperation( "Indeterminate", [IsRing,IsPosInt] );


#############################################################################
##
#F  X( <R> )
##
DeclareSynonym( "X", Indeterminate );


#############################################################################
##
#O  UnivariatePolynomialRing( <R> [,<nr>] )
#O  UnivariatePolynomialRing( <R> [,<avoid>] )
#O  UnivariatePolynomialRing( <R>,<name> [,<avoid>] )
##
##  returns a univariate polynomial ring in the indeterminate <nr> over the
##  base ring <R>. if <nr> is not given it defaults to 1.  If the number is
##  not specified a list <avoid> of indeterminates may be given. The
##  function will return a ring in an indeterminate that is guaranteed to be
##  different from all the indeterminates in <avoid>. The third usage
##  returns a ring in an indeterminate called <name> (also avoiding the
##  indeterminates in <avoid> if given).
DeclareOperation( "UnivariatePolynomialRing", [IsRing] );

#############################################################################
##
#A  IndeterminatesOfPolynomialRing( <pring> )
##
##  returns a list of the indeterminates of the polynomial ring <pring>
DeclareAttribute( "IndeterminatesOfPolynomialRing", IsPolynomialRing );



#############################################################################
##
#O  PolynomialRing( <ring>, <rank>, [<avoid>] ) 
#O  PolynomialRing( <ring>, <names>, [<avoid>] ) 
#O  PolynomialRing( <ring>, <indets> ) 
#O PolynomialRing( <ring>, <indetnums> )
##
##  creates a polynomial ring over <ring>. If a positive integer <rank> is
##  given, this creates the polynomial ring in <rank> indeterminates.  These
##  indeterminates will have the internal index numbers 1 to <rank>.  The
##  second usage takes a list <names> of strings and returns a polynomial
##  ring in indeterminates labelled by <names>.  These indeterminates have
##  ``new'' internal index numbers as if they had been created by calls to
##  `Indeterminate'.  (If the argument <avoid> is given it contains
##  indeterminates that should be avoided, in this case internal index
##  numbers are incremented to skip these variables).
##  In the third version, a
##  list of indeterminates <indets> is given. This creates the polynomial
##  ring in the indeterminates <indets>. Finally, the fourth version
##  specifies indeterminates by their index number.
##
##  To get the indeterminates of a polynomial ring use
##  `IndeterminatesOfPolynomialRing'. (Indeterminates created independently
##  with `Indeterminate' will usually differ, though they might be given the
##  same name and display identically -- see section~"Indeterminates"). 
##
DeclareOperation( "PolynomialRing",
    [ IsRing, IsObject ] );


#############################################################################
##
#O  MinimalPolynomial( <R>, <elm>[ ,<ind>] )
##
##  returns the *minimal polynomial* of <elm> over the ring <R>,
##  expressed in the indeterminate number <ind>.
##  If <ind> is not given, it defaults to 1.
##
##  The minimal polynomial is the monic polynomial of smallest degree with
##  coefficients in <R> that has value zero at <elm>.
##
DeclareOperation( "MinimalPolynomial",
    [ IsRing, IsMultiplicativeElement and IsAdditiveElement,
    IsPosInt] );


#############################################################################
##
#E