OKUTSU-MONTES REPRESENTATIONS OF PRIME IDEALS OF ONE-DIMENSIONAL INTEGRAL CLOSURES

This is a survey on Okutsu-Montes representations of prime ideals of certain one-dimensional integral closures. These representations facilitate the computational resolution of several arithmetic tasks concerning prime ideals of global fields.


Introduction
In 1923, Øystein Ore found a method to construct the prime ideals of a number field, dividing a given prime number p, in terms of a defining equation f (x) ∈ Z[x], provided that this equation satisfies certain p-regularity condition [Ore23]. The idea was to detect first a p-adic factorization of f (x) according to the sides of certain Newton polygon N (f ), and then, to detect a further factorization of each of these factors according to the different irreducible polynomials that divide certain residual polynomials R λ (f ) with coefficients in a finite field, for λ running on the slopes of the different sides of N (f ).
He raised then the question of the existence of an iterative procedure to compute the prime ideals in the p-irregular case, based on the consideration of similar Newton polygons N i (f ) and residual polynomials R λ,i (f ) of higher order i ≥ 1.
Saunders MacLane attacked this problem in 1936 from the point of view of valuations. Given any discrete valuation v on a field k, he parametrized all discrete valuations of the rational function field k(x) that extend v. Then, given an irreducible polynomial f (x) ∈ k[x], he characterized all valuations of the field k[x]/(f (x)) that extend v, as limits of infinite families of valuations of k[x] whose value on f (x) grows to infinity. Finally, he gave a criterion to decide when a valuation of k [x] was sufficiently close to a valuation of k[x]/(f (x)), to uniquely represent it [McL36], [McL36b].
In 1999, Jesús Montes developed an algorithm that carries out Ore's program [Mon99]. The algorithm follows MacLane's pattern, but the introduction of the right concept of residual polynomial of higher order R λ,i (f ) makes the whole theory constructive and well adapted to computational applications. The algorithm is highly recursive: each computation in order i requires auxiliary computations in all previous orders 1, . . . , i − 1. This led Montes, for purely computational reasons, to optimize the algorithm so that it keeps working at certain order i as long as possible and it does not pass to work at order i + 1 until this is absolutely unavoidable. It turns out that the optimized algorithm has an output with unexpected canonical properties, linked to invariants of extensions of local fields that had been studied by Kousaku Okutsu in 1982 [Oku82].
The algorithm of Montes computes what we call Okutsu-Montes representations of prime ideals of one-dimensional integral closures. These computational representations single out the prime ideals and they carry on essential data of the corresponding extensions of local fields. Moreover, these objects have proved to be an efficient and malleable tool for a computational resolution of several arithmetic tasks concerning prime ideals of integral closures of subrings of global fields.
In this survey notes I explain the structure of Montes algorithm and describe some of its applications, with special emphasis on the computation of integral closures. Most of this material is joint work with Jordi Guàrdia and Jesús Montes. This survey grew out from the notes of a seminar delivered at the MSRI in Berkeley, California, as part of the workshop Computation of integral closures, that took place during the week of 26th to 30th of July 2010. We thank the organizer, David Eisenbud, for giving us the opportunity to present these results, and the participants for the charming atmosphere and the fruitful exchange of ideas that contributed to a substantial improvement of the final write up.
1. Overview 1.1. Local fields. Let K be a local field with perfect residue class field. Let O be its ring of integers, m the maximal ideal, π ∈ m a generator of m, and v : K * −→ Q, the canonical extension of the discrete valuation of K to an algebraic closure, normalized by v(K * ) = Z. Let K sep ⊂ K be the separable closure of K in K.
Let us sketch the application of Montes algorithm [HN08], [GMN08] (HN stands for "higher Newton"). The design of the algorithm will be described in more detail in Section 2.
Output: A family t 1 , . . . , t g of f -complete and optimal types, parameterizing the monic irreducible factors F 1 (x), . . . , For K a finite extension of the field Q p of p-adic numbers, recent estimations for the complexity of this algorithm have been obtained by Veres [Ver09], Ford-Veres [FV10], and Pauli [Pau10]. The finer estimation is O(n 2+ǫ δ 2+ǫ ) operations of integers less than p, where δ = v(disc(f )).
Let F (x) be one of these irreducible factors, θ ∈ K sep a root of F , L = K(θ) the corresponding finite separable extension of K, and O L its ring of integers.
Let t be the type corresponding to F . For simplicity, we represent as a sequence of monic irreducible separable polynomials in O[x] satisfying certain recursive conditions. For the moment let us just mention that It turns out that the polynomial φ r+1 (x) is an Okutsu approximation to F (x); this means that it is sufficiently close to F (x) for certain purposes (see Section 3). Thus, Montes algorithm is a kind of polynomial factorization algorithm. Actually, a rather peculiar one, in two senses: (1) It is based on a series of generalizations of Hensel lemma, so that successive factorizations of f (x) are detected, but never carried out. Only certain auxiliary polynomials over finite extensions of the residue class field are factorized.

E. Nart
(2) Besides computing an approximation to each irreducible factor F , the output of the algorithm provides as well a lot of arithmetic information about the finite extension L/K determined by F .
The type t is structured in r + 1 levels, and r is called the order of t. At each level i, t stores several combinatorial and arithmetic invariants linked to Newton polygons of higher order of f (x). These invariants contain essential information about F (x) and the extension L/K.
The type t determines as well an easy computation of the integral closure of O inside L. In fact, let n = deg F = [L : K]; for each integer 0 ≤ m < n, we express m in a unique way as: where φ 0 (x) := x. We consider the following polynomial of degree m: As shown above, the data of t allow us to compute ν m := ⌊j 1 v(φ 1 (θ)) + · · · + j r v(φ r (θ))⌋.
Thus, we may say that Montes algorithm provides the computation of all the integral closures of O in the different extensions determined by the irreducible factors of the input polynomial f (x), almost as a by-product. We need only to include in the algorithm an efficient computation of the polynomials g m (x).
1.2. Applications to global fields. Let us illustrate the applications to number fields. For function fields of curves the results are completely analogous, but no implementation has been made yet.
Let K = Q[x]/(f (x)) be now the number field defined by a monic irreducible polynomial f (x) with integer coefficients and degree n. Let θ ∈ Q be a root of f (x) and Z K the ring of integers of K.
For any prime number p, the prime ideals of K dividing p are in one-toone correspondence with the monic irreducible factors of f (x) over Z p [x]. In fact, for any such a prime ideal p we consider a topological embedding where K p is the completion of K with respect to the p-adic topology. Then, the corresponding irreducible factor of f (x) is the minimal polynomial of ι p (θ) over Q p . We denote this monic irreducible factor by F p (x).
Hence, by applying Montes algorithm to f (x) over Z p , one obtains what we call an Okutsu-Montes representation (OM representation) of all prime ideals of K dividing p : The polynomials φ i have all integer coefficients. It turns out that the invariants contained in the type t p are the essential data that are necessary for a computational treatment of the prime ideal. For instance, the following tasks in the group of fractional ideals can be based on the data (and operators) of the OM representations of the prime ideals: (1) Compute the p-adic valuation, v p : K * −→ Z.
(2) Compute the prime ideal factorization of a fractional ideal.
(3) Compute a two-element representation of a fractional ideal.
(4) Add, multiply and invert fractional ideals. (5) Compute the reduction map, Z K −→ Z K /p, and a section of this map (a lifting map). (6) Solve Chinese remainder problems. (7) Compute a p-integral basis of K.
We have implemented a '+Ideals' package in Magma that contains routines for all these tasks [GMN10], [GMN10b].
Recall that a p-integral basis is a Q-basis of K, made of integral elements α 1 , . . . , α n ∈ Z K , that satisfy any of the following equivalent conditions: (a) α 1 ⊗ 1, . . . , α n ⊗ 1 are a Z p -basis of Z K ⊗ Z Z p . (b) α 1 ⊗ 1, . . . , α n ⊗ 1 are an F p -basis of Z K ⊗ Z F p . (c) p does not divide the index (Z K : α 1 , . . . , α n Z ). Since Z K ⊗ Z F p has dimension n as an F p -vector space, in practice it suffices to check that α 1 , . . . , α n determine F p -linearly independent elements in this F p -algebra.
It is well-known how to compute a p-integral basis of K from the local Z p -bases of all local rings Z Kp , for p | p. One needs only to compute multipliers β p ∈ Z K satisfying: These multipliers are easily computed from the data of the OM represen tations [GMN10, Section 4.2]. If {B p } p|p are the local bases, then p|p β p B p is a p-integral basis of K (cf. Section 4.1). Finally, an integral basis of K (a Z-basis of Z K ) is computed as follows: (1) Factorize the discriminant disc(f ) of the polynomial f (x).
(2) For each prime p | disc(f ), compute a p-integral basis of K in Hermite Normal Form.
(3) Glue these data into a global basis by a simple application of the Chinese Remainder Theorem.
1. The standard packages that manipulate number fields need to compute an integral basis as a preliminary step. This makes them totally useless for many number fields of large degree, or number fields defined by an equation with large coefficients, because of the impossibility to factorize the discriminant. The routines based on the OM representations of the prime ideals do not require the factorization of disc(f ) and they work very efficiently for "big" number fields [GMN10b]. We do not claim too much originality on this fact. Many researchers who need to work with number fields of large degree develop their own routines to deal with concrete problems, avoiding the computation of the maximal order. But we do claim on efficiency: our routines run extremely fast in practice.
Of course, the bottleneck is again integer factorization: we can deal only with fractional ideals whose norm may be factorized.

2.
The routines based on the OM representations have a completely different nature than the classical ones. It often occurs, when dealing with some problem, that once a direct connexion with the data contained in the OM representations is found, the outcoming routine is much faster than the routine that would be inspired in the classical ones.
3. We do not know how to test if an ideal is principal. To this end it would be necessary to combine the OM representations with some kind of LLL reduction routine (preferably not based on the lattice Z K ).
Question. Is there a theoretical reason that makes it hopeless to design such a test without factorizing the discriminant?
4. Suppose the discriminant of the defining equation f (x) may be factorized. Then, how do our routines behave with respect to the classical ones? Let us discuss this comparison at two levels.
(1) The OM routines compute an integral basis much faster than the ordinary routines of Magma or Pari. We saw that the computation of the local bases is almost a by-product of Montes algorithm.
(2) Once the maximal order of K has been computed, the OM routines still run (slightly) faster than the ordinary ones of Magma or Pari, for number fields whose degree is not too small (say n ≥ 16). One reason for this is that the OM techniques avoid the use of linear algebra. The standard methods compute Z-basis of the prime ideals, expressed in coordinates with respect to the integral basis. We get in this way n × n matrices, and the linear algebra procedures to manipulate them (like the computation of Hermite Normal Forms) dominate the complexity for n large.

5.
Suppose the discriminant of the defining equation f (x) may be factorized. We mentioned already that we also need the HNF routine to patch the different p-integral bases of K, for the primes p dividing disc(f ), into a global integral basis. This HNF routine is the bottleneck for the whole process, if n is large.

E. Nart
We extend v to a discrete valuation v 1 of the field K(x), by letting it act on K[x] as follows: v 1 0≤s a s x s := min{v(a s ) | 0 ≤ s}.
Also, we denote F 0 := F, and we consider the 0-th residual operator : Note that for monic polynomials, R 0 is the ordinary reduction map.
Our aim is to describe the monic irreducible factors of a given monic . The starting point of the algorithm is Hensel lemma. From a factorization of R 0 (f )(y) into a product of monic irreducible polynomials in F 0 [y]: into a product of monic (not necessarily irreducible) polynomials satis- We start then to construct a tree T of types. Actually, T is the disjoint union of k connected trees, one for each irreducible factor of R 0 (f ). The initial node of each connected tree is a type of order zero, which we are going to describe now.
Let us fix one of the irreducible factors of R 0 (f ), that we denote from now on by ψ 0 (y) ∈ F 0 [y]. The subindex 0 emphasizes that we are working at order zero. We choose (non-canonically) a monic lift of ψ 0 and we denote This object is the type of order zero that corresponds to the initial node of the tree.
be the (unknown) monic factor of f (x) attached by Hensel lemma to ψ 0 ; recall that R 0 (F t ) = ψ ℓ0 0 , for certain integer ℓ 0 > 0. Our initial node, labelled by ψ 0 , is supposed to sprout several branches corresponding to types of order one, obtained by adding a different polynomial φ 2 for each branch, in a process to be explained in Section 2.4 in more detail. Clearly, if ℓ 0 = 1 then F t is already irreducible and the initial node is already a leave of the tree T (an end node that has no further branching).
A type of order zero supports certain invariants of the irreducible factors of F t (x): (2) Note that ψ 0 (z 0 ) = 0 and F 1 = F 0 [z 0 ]. This seemingly innocuous object t has hidden powers. It determines a Newton polygon operator of the first order: where 2 R 2 is the set of subsets of the plane R 2 . Also, for every negative rational number λ ∈ Q − , the type t determines a residual polynomial operator of the first order: Let us describe all these operators in some detail.

The Newton polygon operator. Let m
has a canonical φ 1 -expansion: Then, N 1 (g) is the lower convex hull of the set of all points (s, v 1 (a s )) in R 2 . We are only interested in the principal part of this polygon, N − 1 (g) ⊂ N 1 (g), made of all sides with negative slope. The length ℓ(N ) of a polygon N is, by definition, the abscissa of the right end point of N .
We denote: By construction, the type t of order zero extracted from the factorization of f (x) modulo m, had ord t (f ) = ℓ 0 > 0. Since our polynomial f (x) is monic, the last point of N 1 (f ) has ordinate zero. The typical shape of N 1 (f ) is as shown below.
e e e e e e The polygon N := N − 1 (f ) has a residual coefficient c s at each integer abscissa, ord φ1 f ≤ s ≤ ord t (f ), defined as follows: In the latter case, c s = 0 because deg a s < m 1 = f 0 , so that R 0 (a s )(y) cannot be divided by the minimal polynomial ψ 0 (y) of z 0 over F 0 .
2.2. The residual polynomial operators. We keep the notation N = N − 1 (f ). Denote by Slopes(N ) the set of slopes of N . Given any λ ∈ Q − , we consider: The following picture illustrates both possibilities. In this picture L λ is the line of slope λ having first contact with N from below. In any case, S λ (N ) is a segment of R 2 with end points having integer coordinates. Any such segment has a degree. If λ = −h λ /e λ with h λ , e λ positive coprime integers, the degree of S λ (N ) is defined as: where ℓ := ℓ(S λ (N )) is the length of the projection of S λ (N ) to the horizontal axis.
• • • r r r r r r r r r r r r r r r r Note that S λ (N ) splits into d minimal subsegments whose end points have integer coordinates.
We define the residual polynomial of the first order of f (x), with respect to λ, as: where s is the abscissa of the left end point of S λ (N ). Since c s c s+de λ = 0, the degree of R λ,1 (f ) is always equal to d, and the polynomial R λ,1 (f )(y) is never divisible by y. For Theorem of the product [HN08, Theorem 1.13]. For any pair of S + T Notation. Given a field F and two polynomials ϕ(y), ψ(y) ∈ F [y], we write ϕ(y) ∼ ψ(y) to indicate that there exists a constant c ∈ F * such that ϕ(y) = cψ(y).
Theorem of the polygon [HN08, , whose Newton poly- Theorem of the residual polynomial [HN08, Theorem 1.19]. With the same notation, let λ ∈ Slopes(N ) and let This theorem is a kind of Hensel lemma in order one.
2.4. Initial branching of types. The theorems of Ore detect a (never The different (unknown) factors F λ,ψ are parameterized by certain types of order one. We can think that the root node ψ 0 of our tree, sprouts several branches with end nodes labelled by the different triples (φ 1 (x), λ, ψ(y)).
Each node determines a type of order one, At the end of the paragraph we show how to construct φ λ,ψ . The positive integer e λ f ψ m 1 is the minimal degree of a polynomial satisfying R λ,1 (φ λ,ψ ) ∼ ψ; hence, by the Theorem of the product, any such poly- If ℓ ψ = 1, the same argument shows that F λ,ψ is irreducible; in this case, the node t λ,ψ becomes a leave of the tree of types, and φ λ,ψ is an approximation to F λ,ψ .
If ℓ ψ > 1 we need to analyze the node t λ,ψ to detect further factorizations of F λ,ψ , or show that it is irreducible. To this end, it will be necessary to extend the fundamental results of Ore to order two. Once we focus our attention on a fixed type t λ,ψ , we rename: The type of order one, t := t λ,ψ = [φ 1 , φ 2 ], keeps the data at level zero described in (2), and supports several data and operators at level one: λ 1 = −h 1 /e 1 , h 1 , e 1 positive coprime integers, By the Theorem of the product, all irreducible factors F of the new polynomial F t := F λ,ψ , satisfy: for some positive integers ℓ 0 (F ), ℓ 1 (F ). These properties motivate the use of the term type. A type is an object that collects some arithmetic features of irreducible polynomials. The polynomials that have these properties are of a certain "type". The last polynomial of a type is some sort of minimal object having these features; it is also called a representative of the type. Let us show how these representatives are constructed.
Construction of the polynomials φ λ,ψ . Let us denote for a while: The polynomial φ λ,ψ (x) we are looking for can be taken of the form: The condition on a ek (x) is easy to fulfill: if ǫ k = 0 we take a ek (x) = 0, whereas for we simply take arbitrary liftings of the u i to O (which we denote by the same symbol u i ∈ O), and take The Newton polygon of φ λ,ψ is: • • • r r r r r r r r r r r r r r r r r r r r r r r r r r Remark. The definition of type, as presented here, is slightly different from the original definition given in [HN08], where the types carry exactly the same data and operators but no representative is chosen. Thus, a type in this survey is what in the language of [HN08] would be "a type plus the choice of a representative".
2.5. Types of order r.
Definition. A type of order zero is a list [φ 1 ] that consists of a single monic polynomial φ 1 (x) ∈ O[x], which is irreducible modulo m.
As we saw in the preceding sections, such an object determines operators N 1 , R λ,1 (for λ a negative rational number) that satisfy three fundamental results, collected in Section 2.3.
Definition. Let r ≥ 1 be an integer, and t = [φ 1 , . . . , φ r+1 ] a family of monic irreducible separable polynomials in O[x]. We say that t is a type of order r if it satisfies the following properties: (1) [φ 1 , . . . , φ r ] is a type of order r − 1.
(2) N r (φ r+1 ) is one-sided with negative slope (say) λ. ( If t satisfies these conditions, we add two fundamental invariants at level r: Altogether, the type supports the following invariants and operators at level r: In order to have a coherent definition, it is necessary to show that if t satisfies these properties, then t determines a Newton polygon operator of order r + 1, and residual polynomial operators of order r + 1, for each λ ∈ Q − : satisfying analogous results to the three fundamental theorems of Ore. The first (and essential) step is to construct a discrete valuation v r+1 of K(x). Let us describe how it acts on polynomials. Given g(x) ∈ K[x] \ {0}, we compute N := N − r (g) and we take any point (x, y) ∈ N such that y + x|λ r | is minimal. Then, we define: v r+1 (g) := e r (y + x|λ r |).
The following picture illustrates the situation. The line L λr is the line of slope λ r having first contact with N from below. Note that v r+1 depends only on v r , φ r and λ r . In MacLane's terminology, φ r is a key polynomial over v r and v r+1 /e r is the augmented valuation attached to the pair (φ r , v r (φ r ) + |λ|) [McL36, Section 4].
Once we have the discrete valuation v r+1 , we can define a Newton polygon operator of order r + 1 as before. If g(x) = 0≤s a s (x)φ r+1 (x) s is the φ r+1 -expansion of a polynomial g(x), then N r+1 (g) := N φr+1,vr+1 (g) is defined as the lower convex hull of the set of points (s, u s ), where u s := v r+1 (a s φ s r+1 ). Note that the ordinates of the points incorporate v r+1 (φ s r+1 ), which is a positive integer. This is necessary to keep the property: ℓ(N − r+1 (g)) = ord ψr (R r (g)). In order one (for r = 0), we had v 1 (φ 1 ) = 0, because φ 1 is monic; thus, the definition of N 1 is coherent with the general definition of the Newton polygons N r for all r ≥ 1.
The residual operators of order r + 1 are defined in a completely analogous way, except for the fact that the residual coefficients of N := N − r+1 (g) need to be twisted by certain powers of z r . More precisely, for each integer abscissa s in the projection of N over the horizontal axis, we define c s := 0, if (s, u s ) lies above N, z ts r R r (a s )(z r ) ∈ F * r+1 , if (s, u s ) lies on N. The exponent t s is defined to be: is any integer satisfying: h −1 r h r ≡ 1 (mod e r ), and s r (a s ) is the abscissa of the left end point of the segment S λr (N r (a s )). With some effort, one is able to prove results completely analogous to the three fundamental results of Ore; that is, Theorems of the product, of the polygon and of the residual polynomial in order r [HN08, Sections 2 and 3].
Definition. Let t be a type of order r. For any g(x) ∈ O[x] we define ord t (g) := ord ψr R r (g) = ℓ(N − r+1 (g)). Also, we say that t is g-complete if ord t (g) = 1.
By the Theorem of the product, this operator ord t behaves well with respect to products: ord t (gh) = ord t (g) + ord t (h), for any pair of polynomials g(x), h(x) ∈ O[x].
2.6. Back to the factorization algorithm. Along the factorization algorithm with input polynomial f (x) ∈ O[x], we construct types such that ord t (f ) is positive. This means that there is some irreducible fac- , for which ord t (F ) > 0, and this implies that F has the features captured by the type t: We denote by F t (x) ∈ O[x] the (unknown) product of all monic irreducible factors F of f such that ord t (F ) > 0; this notation is coherent with the previous way to consider F t as an (unknown) factor of f (x) detected by Hensel lemma or the results of Ore.
If t is f -complete, then F t is already irreducible, and the node corresponding to t is a leave of the tree of types. If t is not f -complete, that is, ord t (f ) > 1, it is clear that the extension of Ore's results to order r determines a completely analogous branching of the node of the tree T that corresponds to t.
As we did in Section 2.4, a node at level r is labelled by the triple (φ r , λ r , ψ r ) of fundamental invariants at level r. The type determined by this node is obtained by gathering all levels of all nodes that belong to the unique path joining our node to the root node of the tree.
The polynomial φ λ,ψ that is a representative of the type is constructed by applying in a recursive way the procedure described at the end of Section 2.4. However, at order r > 1 one has to care about the powers of z r that twist the residual coefficients of the polygons [HN08, Section 2.3].

Special features of the Theorem of the polygon in order r.
Proposition. Suppose ord t (f ) > 0 and let θ ∈ K sep be a root of F t . Then, for any polynomial g( and equality holds if and only if ord t (g) = 0.
Hence, v r+1 /e 1 · · · e r may be considered an approximation of the valuation v on the finite extension K(θ)/K. The formula for the value of v(φ r+1 (θ)) given by the Theorem of the polygon gives an interpretation of the slopes of N − r+1 (f ) as a measure of the inequality of (3), for the polynomial φ r+1 . More precisely, for any root θ ∈ K sep of the factor F λ of F t determined by some λ ∈ Slopes(N − r+1 (f )), the Theorem of the polygon states that: v(φ r+1 (θ)) = v r+1 (φ r+1 ) + |λ| e 1 · · · e r , or equivalently: 2.8. Computation of the residue class fields of the extensions determined by the irreducible factors. If the type t of order r is f -complete, then the field F r+1 is a computational representation of the residue class field of the (unknown) irreducible factor F singled out by t.
If θ ∈ K sep is a root of F , L = K(θ) and F L is the residue class field, there is an explicit isomorphism: where γ i (x) ∈ K(x) are certain rational functions that can be expressed as a product of a power of π and powers of the φ polynomials of t with integer (positive or negative) exponents [HN08, Section 2.4 and (36)]: The computation of these rationals functions would be inefficient, so that along the flow of the algorithm only the integer exponents n i are computed and stored, which is sufficient for all the applications where the residue class field F L is involved.
where the superscript ( ) ∼ indicates "integral closure". Now, for each t ∈ T , we define: If all leaves of T are f -complete, then equality holds. Corollary.
(1) The factorization algorithm ends after a finite number of steps.
(2) It computes ind(f ) as a by-product.
It is not absolutely true that ind t (f ) is always positive. However, if for some node t we have ind(N − r (f )) = 0, then this polygon is one-sided and the projection of this side either to the horizontal or to the vertical axis has length one; hence, t is either complete, or it becomes complete after a unibranch step.
Montes algorithm is optimized in such a way that all nodes of the tree of types, except for the leaves, are strongly optimal. Hence, by the very definition, all nodes of the tree, including the leaves, are optimal.
Let us sketch the ideas of the optimization process. Suppose a node of the tree, t = [φ 1 , . . . , φ r ] of order r − 1, is strongly optimal and noncomplete. Then, in principle, several branches sprout from t, labelled by triples (φ r , λ, ψ), where λ is one of the slopes of N − r (f ) and ψ is one of the irreducible factors of R λ,r (f ). For each one of these branches let us write, where e λ , h λ are positive coprime integers. Denote by φ λ,ψ the (r + 1)-th φ-polynomial of degree m λ,ψ constructed by the general method, as explained in Section 2.6. The type t λ,ψ := [φ 1 , . . . , φ r , φ λ,ψ ] would correspond to a new node of order r if no optimization were applied. Now there are three different possibilities for each branch: (a) The type t λ,ψ is complete. In this case, t λ,ψ is a leave of the tree. (b) The type t λ,ψ is not complete, and e λ f ψ > 1. Then, t λ,ψ is strongly optimal and it corresponds to a new node of order r of the tree. (c) The type t λ,ψ is not complete, and e λ f ψ = 1. In this case, t λ,ψ is not strongly optimal.
• • • •¨¨¨¨r r r r r r r r r r r r Suppose t λ,ψ falls in case (c). Then, the polynomial φ λ,ψ is a better representative of the original type t than φ r ; thus, we consider the order r − 1 type, t ′ = [φ 1 , . . . , φ r−1 , φ λ,ψ ], and we submit it to further branching, but taking into account only slopes strictly less than λ (instead of strictly less than 0) in the Newton polygon N t ′ ,r (f ). The branches that arose from t ′ are supposed to sprout as well from the initial node labeled with (φ r−1 , λ r−1 , ψ r−1 ). Each one of these new branches falls in case (a), (b) or (c) and we follow the same procedure accordingly.

E. Nart
We call this replacement of the order r type t λ,ψ by the order r − 1 type t ′ , a refinement step [GMN08, Section 3]. Since all computations (v r , N r , R r , . . . ) are of a recursive nature, to proceed in order r − 1 instead of order r causes a considerable improvement of the complexity.
Note that the leaves of the tree, as nodes of complete branches, are not necessarily strongly optimal (in case (a) e λ f ψ can be indistinctly equal to or greater than one). There will appear non-strongly optimal leaves, for instance, if there are irreducible factors of f (x) that are one an Okutsu approximation to the other. In any case, the optimized algorithm always outputs f -complete and optimal types. Curiosly enough, this optimization motivated by pure practical reasons, provides the output of Montes algorithm with unexpected canonical properties.
The concept of Okutsu appoximation and the canonical properties of the output data of Montes algorithm will be discussed in Section 3.

Okutsu frames and optimal types
As in the last section, we fix a local field K with perfect residue field. Let O be the ring of integers, m the maximal ideal, and π ∈ m a uniformizer. Let v : K * −→ Q, be the canonical extension of the discrete valuation of K to an algebraic closure, with the usual normalization v(K * ) = Z. Let K sep ⊂ K be the separable closure of K in K. For any η ∈ K we denote deg η := [K(η) : K].
All results of this section are extracted from [GMN09], which is a revision and extension of the original paper by Okutsu [Oku82].
3.1. Okutsu frames. Let us fix a monic irreducible separable polynomial F (x) ∈ O[x], of degree n. Let θ ∈ K sep be a root of F (x), L = K(θ), and O L the ring of integers.
Definition. The sequence [F 1 , . . . , F R ] is called an Okutsu frame of F , and R is called the Okutsu depth of F .
Although the polynomials F i are not uniquely determined, we must consider an Okutsu frame as an essentially canonical object attached to F .
Definition. An η ∈ K sep such that deg η = n and v(θ − η) > µ R is called an Okutsu approximation to θ.
A monic irreducible separable polynomial G(x) ∈ O[x] is called an Okutsu approximation to F if deg G = n and v(G(θ)) > (n/m R )v(F R (θ)).
(2) η ∈ K sep is an Okutsu approximation to θ if and only if the minimal polynomial of η over K is an Okutsu approximation to F (  0)) > 1. Suppose that depth(F ) = 0 and take G = π n F (x/π). Let E(x) be an Eisenstein polynomial of degree n. The polynomial E determines a totally ramified extension and the polynomial G determines an unramified extension. However, the exercises show that G and E have both [x] as Okutsu frame. Hence, it has to be clear that an Okutsu frame is an object attached to an irreducible polynomial and it is by no means an invariant of the finite extension determined by this polynomial.

Okutsu invariants of finite extensions of K.
In spite of what has been said, an Okutsu frame accompanied by an Okutsu approximation do contain a lot of information about the extension L/K and its subextensions.
All results of this section are extracted from [GMN09, Section 2.1]. We fix throughout the section an Okutsu frame [F 1 , . . . , F R ] of F .
for some 1 ≤ i ≤ R + 1. Let N = K(α), M/K a finite Galois extension containing L and N , and G = Gal(M/K). Consider the subgroups: i ⊂ M be the respective fixed fields. Finally, let N tr be the maximal tamely ramified subextension of N/K. Then, (1) The numbers e(K i /K), f (K i /K), do not depend on the chosen Okutsu frame.
(3) The extension K 1 /K is unramified and we have a chain of tamely ramified subfields of L: is an Okutsu approximation to F , it admits a root α ∈ K sep such that the field K R+1 := K(α) satisfies: In particular, µ R is Krasner's radius of F (x): One might speculate that the fields K i in Corollary (3) may not be subfields of L, but they eventually detect the presence of subfields of L with given ramification index and residual degree. Jürgen Klüners provided us with an example showing that is not the case either.
. This polynomial is separable, irreducible, and it determines a primitive extension L of Q 2 . Actually, the roots of F are the squares of the roots of the strongly Eisenstein polynomial x 4 + 2x + 2, whose Galois group is well-known. Now, it is easy to check that [x, x 2 − 2] is an Okutsu frame of F , with Okutsu invariants µ 1 = 1/2, µ 2 = 5/8. Thus, the quadratic field K 2 = Q 2 ( √ 2) does not correspond to any quadratic subfield of L. Even more, the normal closure of L/Q 2 has a unique quadratic subextension, which is unramified, so that K 2 (which is totally ramified) cannot be connected to any quadratic subfield of this normal closure either.
3.3. Okutsu frames and integral closures. The next theorem shows a relevant property of the polynomials F i (x) that constitute an Okutsu frame of F (x).

Okutsu frames and optimal types.
Theorem. Let f (x) ∈ O[x] be a monic and separable polynomial, t = [φ 1 , . . . , φ r+1 ] an f -complete optimal type of order r ≥ 0, and F (x) ∈ O[x] the monic irreducible factor of f (x) singled out by t. Then, (1) The Okutsu depth of F is if e r f r > 1 or r = 0, r − 1, if e r f r = 1 and r > 0.

Remarks.
(1) The optimized Montes algorithm outputs an essentially canonical representation of the irreducible factors.
(2) The two last theorems justify the construction of local bases in terms of the output of Montes algorithm, as presented at the end of Section 1.1. (3) The numerical invariants h i , e i , f i , λ i , for 1 ≤ i ≤ R, and the discrete valuations v 1 , . . . , v R+1 are invariants of F (x). (4) In spite of the philosophy of Montes algorithm, that detects factorization but never computes it, the last polynomials of the output types are approximations to the irreducible factors, with a controlled precision. Therefore, the algorithm provides a factorization of the input polynomial indeed.
In a recent work with J. Guàrdia and S. Pauli [GNP10], we develop a single-factor lifting algorithm that improves each one of these approximations up to a prescribed precision. This algorithm has quadratic convergence.
not necessarily (globally) integral, the element α m,p belongs to Z K and, even more, it satisfies (5) v q (α m,p ) ≥ e(q/p), ∀ q ∈ P, q = p.
In fact, this is an immediate consequence of (4), because ν m,p ≤ ν np−1,p = exp(F p ), for all m, p. Let us check that {α m,p } m,p is an F p -linearly independent family in Z K ⊗ Z F p . Suppose that for certain integers a m,p we have m,p a m,p α m,p ∈ pZ K = p∈P p e(p/p) .
Let us fix one of the primes p ∈ P. By (5), m a m,p α m,p ∈ p e(p/p) , so that m a m,p ι p (α m,p ) ∈ (pZ Kp ) e(p/p) = pZ Kp .
Since the ι p (α m,p ) are a Z p -basis of Z Kp , all a m,p are multiples of p.
The computation of the multipliers β p in terms of the data of the OM representations of the prime ideals is explained in [GMN10, Sections 3.2 and 4.2]. This computation requires to improve the approximations φ p till v p (φ p (θ)) has a sufficiently large value. As mentioned at the end of the last section, this can be carried out with the single-factor lifting algorithm [GNP10].

Method of the quotients.
This section is extracted from [GMN09a]. Let t = [φ 1 , . . . , φ i ] be a type of order i − 1 corresponding to one of the nodes of the tree T along the flow of Montes algorithm. Before computing N − i (f ), we know a priori the length of this polygon: ℓ := ℓ(N − i (f )) = ord ψi−1 R i−1 (f ). Hence, we need only to compute the first ℓ + 1 coefficients of the φ i -adic expansion of f (x): f (x) = φ i (x)Q i,1 (x) + a 0 (x), Q i,1 (x) = φ i (x)Q i,2 (x) + a 1 (x), . . . . . .
The polynomials Q i,1 (x), . . . , Q i,ℓ (x) are called the quotients of i-th order of f (x) with respect to t. There are two relevant facts concerning these polynomials: (1) They are obtained at cost zero along the computation of the coefficients of the φ i -development of f (x) that are necessary to build up the principal polygon N − i (f ). (2) The element Q i,j (θ)/p ⌊Hi,j ⌋ is integral, for an easy computable rational number H i,j . More precisely, where Y j is the ordinate of the point of abscissa j lying on N i (f ).
Then, p∈P B p is a p-integral basis of K.
The advantage of this method with respect to the standard method is twofold: (1) We replace the computation of the powers φ i (x) ji by a single polynomial Q i,j (x) that was obtained at zero cost.
(2) We replace the whole construction of the multiplier β p by the consideration of the polynomial Q r+1,1 , which is obtained at the cost of only one division with remainder: f (x) = φ p (x)Q r+1,1 (x) + a 0 (x). The disadvantage is that the polynomials g m (x) considered in the standard method have degree m, while those of the quotients method have, by nature, large degree.
In practice, the method of the quotients has a better average performance, and it is more regular, in the sense that in the examples where the standard method is faster, the difference of the times of execution is very small, while there are peak cases in which the quotients method is extremely faster than the standard one.
In the +Ideals package we compute integral closures by using the method of the quotients.