1 | /////////////////////////////////////////////////////////////////////////////// |
---|
2 | version="$Id: intBasis.lib,v 1.0 2010/05/19 Exp$"; |
---|
3 | category="Commutative Algebra"; |
---|
4 | info=" |
---|
5 | LIBRARY: integralBasis.lib Integral basis in algebraic function field |
---|
6 | AUTHORS: Santiago Laplagne, slaplagn@dm.uba.ar |
---|
7 | |
---|
8 | MAIN PROCEDURES: |
---|
9 | integralBasis(f, vari); Integral basis of an algebraic function field |
---|
10 | "; |
---|
11 | |
---|
12 | LIB "normal.lib"; |
---|
13 | |
---|
14 | proc integralBasis(poly f, int vari) |
---|
15 | "USAGE: integralBasis(f, vari); f polynomial in two variables, vari integer indicating |
---|
16 | that the vari-th variable of the ring is the integral element |
---|
17 | ASSUME: The basering must be a ring in two variables. |
---|
18 | The polynomial f must be irreducible and monic as polynomial in the |
---|
19 | variable indicated by vari.@* |
---|
20 | NOTE: The procedure might fail or give a wrong output if the assumptions |
---|
21 | do not hold. |
---|
22 | RETURN: a list, say L, of size 2. |
---|
23 | @format L[1] is an ideal I and L[2] is a polynomial D such that the integral basis is |
---|
24 | b_0 = I[1] / D, b_1 = I[2] / D, ..., b_{n-1} = I[n] / D.@* |
---|
25 | That is, the integral closure of k[x] in the algebraic function |
---|
26 | field L(x,y) is @* |
---|
27 | k[x] b_0 + k[x] b_1 + ... + k[x] b_{n-1},@* |
---|
28 | where we assume that x is the trascendental variable, y is the integral |
---|
29 | element (indicated by vari), f gives the integral equation and n is |
---|
30 | the degree of f as a polynomial in y.@* |
---|
31 | @end format |
---|
32 | THEORY: We compute the integral basis of the integral closure of k[x] in k(x,y) |
---|
33 | by computing the normalization of the affine ring k[x,y]/<f> and |
---|
34 | converting the k[x,y]-module generators into a k[x]-basis.@* |
---|
35 | KEYWORDS: integral basis; normalization. |
---|
36 | SEE ALSO: normal. |
---|
37 | EXAMPLE: example integralBasis; shows an example |
---|
38 | " |
---|
39 | { |
---|
40 | int i, j; |
---|
41 | def R = basering; |
---|
42 | |
---|
43 | // The degree of f with respect to the variable vari |
---|
44 | int n = size(coeffs(f, var(vari))) - 1; |
---|
45 | |
---|
46 | // If the integral variable is the first, then the universal denominator |
---|
47 | // must be a polynomial in the second variable (and viceversa). |
---|
48 | string conduStr; |
---|
49 | if(vari == 1){ |
---|
50 | conduStr = "var2"; |
---|
51 | } else { |
---|
52 | conduStr = "var1"; |
---|
53 | } |
---|
54 | |
---|
55 | // We compute the normalization of the affine ring k[x,y]/f(y) |
---|
56 | ideal I = f; |
---|
57 | list nor = normal(I, conduStr); |
---|
58 | ideal normalGen = nor[2][1]; |
---|
59 | poly D = normalGen[size(normalGen)]; // The universal denominator |
---|
60 | |
---|
61 | //Debug information |
---|
62 | // "The denominator is: ", D; |
---|
63 | // "It must be a polynomial in the ", var(3-vari), " variable."; |
---|
64 | |
---|
65 | // We define a new ring where the integral variable is the first variable |
---|
66 | // (needed for reduction) and has the appropiate ordering. |
---|
67 | list rl = ringlist(R); |
---|
68 | rl[2] = list(var(vari), var(3-vari)); |
---|
69 | rl[3] = list(list("C", 0), list("lp", intvec(1,1))); |
---|
70 | def S = ring(rl); |
---|
71 | setring S; |
---|
72 | |
---|
73 | // We map the elements in the previous ring to the new one |
---|
74 | poly f = imap(R, f); |
---|
75 | ideal normalGen = imap(R, normalGen); |
---|
76 | |
---|
77 | // We create the system of generatos y^i*f_j. |
---|
78 | list l; |
---|
79 | ideal red = groebner(f); |
---|
80 | for(j = 1; j <= size(normalGen); j++){ |
---|
81 | l[j] = reduce(normalGen[j], red); |
---|
82 | } |
---|
83 | for(i = 1; i <= n-1; i++){ |
---|
84 | for(j = 1; j <= size(normalGen); j++){ |
---|
85 | l[size(l)+1] = reduce(var(1)^i*normalGen[j], red); |
---|
86 | } |
---|
87 | } |
---|
88 | |
---|
89 | // To eliminate the redundant elements, we look at the polynomials as |
---|
90 | // elements of a free module where the coordinates are the coefficients |
---|
91 | // of the polynomials regarded as polynomials in y. |
---|
92 | // The groebner basis of the module generated by these elements |
---|
93 | // gives the desired basis. |
---|
94 | matrix vecs[n + 1][size(l)]; |
---|
95 | matrix coeffi[n + 1][2]; |
---|
96 | |
---|
97 | for(i = 1; i<= size(l); i++){ |
---|
98 | coeffi = coeffs(l[i], var(1)); |
---|
99 | vecs[1..nrows(coeffi), i] = coeffi[1..nrows(coeffi), 1]; |
---|
100 | } |
---|
101 | module M = vecs; |
---|
102 | M = std(M); |
---|
103 | |
---|
104 | // We go back to the original ring. |
---|
105 | setring R; |
---|
106 | module M = imap(S, M); |
---|
107 | |
---|
108 | // We go back from the module to the ring in two variables |
---|
109 | ideal G; |
---|
110 | poly g; |
---|
111 | for(i = 1; i <= size(M); i++){ |
---|
112 | g = 0; |
---|
113 | for(j = 0; j <= n; j++){ |
---|
114 | g = g + M[i][j+1] * var(vari)^j; |
---|
115 | } |
---|
116 | G[i] = g; |
---|
117 | } |
---|
118 | |
---|
119 | // The first element in the output is the ideal of numerators. |
---|
120 | // The second element is the denominator. |
---|
121 | list outp = G, D; |
---|
122 | |
---|
123 | return(outp); |
---|
124 | } |
---|
125 | |
---|
126 | example |
---|
127 | { "EXAMPLE:"; |
---|
128 | printlevel = printlevel+1; |
---|
129 | echo = 2; |
---|
130 | ring s = 0,(x,y),dp; |
---|
131 | poly f = y5-y4x+4y2x2-x4; |
---|
132 | list l = integralBasis(f, 2); |
---|
133 | l; |
---|
134 | // The integral basis of the integral closure of Q[x] in Q(x,y) consists |
---|
135 | // of the elements of l[1] divided by the polynomial l[2]. |
---|
136 | echo = 0; |
---|
137 | printlevel = printlevel-1; |
---|
138 | } |
---|