Download User`s Guide to the PARI library - PARI/GP Development Headquarters
Transcript
GEN famat_sqr(GEN f) returns f 2 . GEN famat_inv(GEN f) returns f −1 . GEN famat_inv_shallow(GEN f) shallow version of famat_inv. GEN to_famat(GEN x, GEN k) given an element x and an exponent k, returns the famat xk . GEN to_famat_shallow(GEN x, GEN k) same, as a shallow function. Note that it is trivial to break up a famat into its two constituent columns: gel(f,1) and gel(f,2) are the elements and exponents respectively. Conversely, mkmat2 builds a (shallow) famat from two t_COLs of the same length. The last two functions makes an assumption about the elements: they must be regular algebraic numbers (not famats) over a given number field: GEN famat_reduce(GEN f) given a famat f , returns a famat g without repeated elements or 0 exponents, such that the expanded forms of f and g would be equal. Shallow function. GEN ZM_famat_limit(GEN f, GEN limit) given a famat f with t_INT entries, returns a famat g with all factors larger than limit multiplied out as the last entry (with exponent 1). GEN famat_to_nf(GEN nf, GEN f) You normally never want to do this! This is a simplified form of nffactorback, where we do not check the user input for consistency. The description of famat_to_nf says that you do not want to use this function. Then how do we recover genuine number field elements? Well, in most cases, we do not need to: most of the functions useful in this context accept famats as inputs, for instance nfsign, nfsign_arch, ideallog and bnfisunit. Otherwise, we can generally make good use of a quotient operation (modulo a fixed conductor, modulo `-th powers); see the end of Section 12.1.19. Caveat. Receiving a famat input, bnfisunit assumes that it is an algebraic integer, since this is expensive to check, and normally easy to ensure from the user’s side; do not feed it ridiculous inputs. GEN famatsmall_reduce(GEN f) as famat reduce, but for exponents given by a t_VECSMALL. 12.1.10 Ideal arithmetic. Conversion to HNF. GEN idealhnf(GEN nf, GEN x) returns the HNF of the ideal defined by x: x may be an algebraic number (defining a principal ideal), a maximal ideal (as given by idealprimedec or idealfactor), or a matrix whose columns give generators for the ideal. This last format is complicated, but useful to reduce general modules to the canonical form once in a while: • if strictly less than N = [K : Q] generators are given, x is the ZK -module they generate, • if N or more are given, it is assumed that they form a Z-basis (that the matrix has maximal rank N ). This acts as mathnf since the ZK -module structure is (taken for granted hence) not taken into account in this case. Extended ideals are also accepted, their principal part being discarded. GEN idealhnf0(GEN nf, GEN x, GEN y) returns the HNF of the ideal generated by the two algebraic numbers x and y. 217