# Singular

#### D.4.9.1 integralBasis

Procedure from library `integralbasis.lib` (see integralbasis_lib).

Usage:
integralBasis(f, intVar); f irreducible polynomial in two variables, intVar integer indicating that the intVar-th variable of the ring is the integral element.
The base ring must be a ring in two variables, and the polynomial f must be monic as polynomial in the intVar-th variable.
Optional parameters in list choose (can be entered in any order):
Parameters for selecting the algorithm:
- "global" -> computes the integral basis by computing the normalization of R/<f>, where R is the base ring.
- "local" -> computes the integral basis by computing the normalization of R/<f> localized at each component of the singular locus of R/<f>, and then putting everything together.
This is the default option.
Other parameters:
- "isIrred" -> assumes that the input polynomial f is irreducible, and therefore will not check this. If this option is given but f is not irreducible, the output might be wrong.
- list("inputJ", ideal inputJ) -> takes as initial test ideal the ideal inputJ. This option is only for use in other procedures. Using this option, the result might not be the integral basis.
(When this option is given, the global option will be used.)
- list("inputC", ideal inputC) -> takes as initial conductor the ideal inputC. This option is only for use in other procedures. Using this option, the result might not be the integral basis.
(When this option is given, the global option will be used.)

Return:
a list, say l, of size 2.
l[1] is an ideal I and l[2] is a polynomial D such that the integral basis is b_0 = I[1] / D, b_1 = I[2] / D, ..., b_{n-1} = I[n] / D.
That is, the integral closure of k[x] in the algebraic function field k(x,y) is
k[x] b_0 + k[x] b_1 + ... + k[x] b_{n-1},
where we assume that x is the transcendental variable, y is the integral element (indicated by intVar), f gives the integral equation and n is the degree of f as a polynomial in y.

Theory:
We compute the integral basis of the integral closure of k[x] in k(x,y) by computing the normalization of the affine ring k[x,y]/<f> and converting the k[x,y]-module generators into a k[x]-basis.

Example:
 ```LIB "integralbasis.lib"; printlevel = printlevel+1; ring s = 0,(x,y),dp; poly f = y5-y4x+4y2x2-x4; list l = integralBasis(f, 2); ==> The number of components of the Singular Locus is 1 l; ==> [1]: ==> _[1]=x3 ==> _[2]=x3y ==> _[3]=x2y2 ==> _[4]=xy3 ==> _[5]=y4+4x2y ==> [2]: ==> x3 // The integral basis of the integral closure of Q[x] in Q(x,y) consists // of the elements of l[1] divided by the polynomial l[2]. printlevel = printlevel-1; ```