Characteristic Polynomials of P-Adic Matrices
Total Page:16
File Type:pdf, Size:1020Kb
Characteristic polynomials of p-adic matrices Xavier Caruso David Roe Tristan Vaccon Université Rennes 1 University of Pittsburg Université de Limoges [email protected] [email protected] [email protected] ABSTRACT and O˜(n2+ω/2) operations. Second, while the lack of divi- N We analyze the precision of the characteristic polynomial sion implies that the result is accurate modulo p as long as Z χ(A) of an n × n p-adic matrix A using differential pre- M ∈ Mn( p), they still do not yield the optimal precision. cision methods developed previously. When A is integral A faster approach over a field is to compute the Frobe- N nius normal form of M, which is achievable in running time with precision O(p ), we give a criterion (checkable in time ω O˜(nω)) for χ(A) to have precision exactly O(pN ). We also O˜(n ) [15]. However, the fact that it uses division fre- give a O˜(n3) algorithm for determining the optimal preci- quently leads to catastrophic losses of precision. In many sion when the criterion is not satisfied, and give examples examples, no precision remains at the end of the calcula- when the precision is larger than O(pN ). tion. Instead, we separate the computation of the precision CCS Concepts of χM from the computation of an approximation to χM . Given some precision on M, we use [3, Lem. 3.4] to find the •Computing methodologies → Algebraic algorithms; best possible precision for χM . The analysis of this preci- Keywords sion is the subject of much of this paper. With this precision known, the actual calculation of χM may proceed by lifting Algorithms, p-adic precision, characteristic polynomial, eigen- M to a temporarily higher precision and then using a suffi- value ciently stable algorithm (see Remark 5.3). One benefit of this approach is that we may account for 1. INTRODUCTION diffuse precision: precision that is not localized on any sin- The characteristic polynomial is a fundamental invariant gle coefficient of χM . For example, let 0 ≤ α1 ≤ α2 ≤ of a matrix: its roots give the eigenvalues, and the trace and ···≤ αn, consider a diagonal matrix D with diagonal entries α1 αn determinant can be extracted from its coefficients. In fact, (p ,...,p ), let P,Q ∈ GLn(Zp) and set M = PDQ. The n−k k the best known division-free algorithm for computing deter- valuation of the coefficient of X in χM will be i=1 αi, N and if α − > 0 and M is known with precision O(p ) then minants over arbitrary rings [10] does so using the charac- n 1 P teristic polynomial. Over p-adic fields, computing the char- the constant term of χM will be known with precision larger N acteristic polynomial is a key ingredient in algorithms for than O(p ) (see [4, Prop. 3.2]). counting points of varieties over finite fields (see [7, 8, 11]. As long as none of the eigenvalues of M are congruent to When computing with p-adic matrices, the lack of infinite −1 modulo p, then none of the coefficients of the charac- memory implies that the entries may only be approximated teristic polynomial of 1 + M will have precision larger than N N at some finite precision O(p ). As a consequence, in design- O(p ). But χ1+M (X)= χM (X−1), so the precision content ing algorithms for such matrices one must analyze not only of these two polynomials should be equivalent. The solution arXiv:1702.01653v1 [math.NT] 6 Feb 2017 the running time of the algorithm but also the accuracy of is that the extra precision in χ1+M is diffuse and not visible the result. on any individual coefficient. We formalize this phenomenon N Let M ∈ Mn(Qp) be known at precision O(p ). The sim- using lattices; see Section 2.1 for further explanation, and plest approach for computing the characteristic polynomial [2, §3.2.2] for a specific example of the relationship between of M is to compute det(X − M) either using recursive row χM and χ1+M . expansion or various division free algorithms [10,14]. There are two issues with these methods. First, they are slower Previous contributions. than alternatives that allow division, requiring O(n!), O(n4) Since the description of Kedlaya’s algorithm in [11], the com- putation of characteristic polynomials over p-adic numbers has become a crucial ingredient in many counting-points al- gorithms. For example, [7, 8] use p-adic cohomology and Publication rights licensed to ACM. ACM acknowledges that this contribution was the characteristic polynomial of Frobenius to compute zeta authored or co-authored by an employee, contractor or affiliate of a national govern- ment. As such, the Government retains a nonexclusive, royalty-free right to publish or functions of hyperelliptic curves. reproduce this article, or to allow others to do so, for Government purposes only. In most of these papers, the precision analysis usually ISSAC '17, July 25-28, 2017, Kaiserslautern, Germany deals with great details on how to obtain the matrices (e.g. c 2017 ACM. ISBN ***-*-****-****-0/17/07. $15.00 of action of Frobenius) that are involved in the point-counting DOI: http://dx.doi.org/10.1145/*******.******* schemes. However, the computation of their characteristic polynomials is often a little bit less thoroughly studied: some and χ the characteristic polynomial map, χM ∈ K[X] for the refer to fast algorithms (using division), while others apply characteristic polynomial of M and dχM for the differential division-free algorithms. of χ at M, as a linear map from Mn(K) to the space of In [4], the authors have begun the application of the the- polynomials of degree less than n. Wefixan ω ∈ R such that ory of differential precision of [3] to the stable computation the multiplication of two matrices over a ring is in O(nω ) of characteristic polynomials. They have obtained a way to operations in the ring. Currently, the smallest known ω is express the optimal precision on the characteristic polyno- less than 2.3728639 thanks to [13]. We will denote by In mial, but have not given practical algorithms to attain this the identity matrix of rank n in Mn(K). When there is no optimal precision. ambiguity, we will drop this In for scalar matrices, e.g. for λ ∈ K and M ∈ Mn(K), λ − M denotes λIn − M. Finally, The contribution of this paper. we write σ1(M),...,σn(M) for the elementary divisors of Thanks to the application the framework of differential pre- M, sorted in increasing order of valuation. cision of [3] in [4], we know that the precision of the char- acteristic polynomial χM of a matrix M ∈ Mn(Qp) is de- 2. THEORETICAL STUDY termined by the comatrix Com(X − M). In this article, we provide: 2.1 The theory of p-adic precision 1. Proposition 2.7: a factorization of Com(X − M) as a We recall some of the definitions and results of [3] as a product of two rank-1 matrices (when M has a cyclic foundation for our discussion of the precision for the charac- vector), computable in O˜(nω) operations by Theorem teristic polynomial of a matrix. We will be concerned with 4.1 two K-manifolds in what follows: the space Mn(K) of n × n matrices with entries in K and the space Kn[X] of monic 2. Corollary 2.4: a simple, O˜(nω) criterion to decide degree n polynomials over K. Given a matrix M ∈ Mn(K), whether χM is defined at precision higher than the the most general kind of precision structure we may attach precision of M (when M ∈ Mn(Zp)). to M is a lattice H in the tangent space at M. However, rep- 3. Theorem 3.11: a O˜(n3) algorithm with operations in resenting an arbitrary lattice requires n2 basis vectors, each 2 Zp to compute the optimal precision on each coefficient with n entries. We therefore frequently work with certain of χM (when M is given with uniform precision on its classes of lattices, either jagged lattices where we specify a entries). precision for each matrix entry or flat lattices where every N ω entry is known to a fixed precision O(p ). Similarly, pre- 4. Proposition 5.6: a O˜(n ) algorithm to compute the cision for monic polynomials can be specified by giving a optimal precision on each eigenvalue of M lattice in the tangent space at f(X) ∈ Kn[X], or restricted Organization of the article. to jagged or flat precision in the interest of simplicity. Let χ : Mn(K) → Kn[X] be the characteristic polynomial In Section 2, we review the differential theory of precision map. Our analysis of the precision behavior of χ rests upon developed in [3] and apply it to the specific case of the char- the computation of its derivative dχ, using [3, Lem. 3.4]. For acteristic polynomial, giving conditions under which the dif- a matrix M ∈ Mn(K), we identify the tangent space V at ferential will be surjective (and thus provide a good measure M with Mn(K) itself, and the tangent space W at χM with of precision). We also give a condition based on reduction the space K<n[X] of polynomials of degree less than n. Let modulo p that determines whether the characteristic poly- Com(M) denote the comatrix of M (when M ∈ GLn(K), nomial will have a higher precision that the input matrix, −1 we have Com(M) = det(M)M ) and dχM the differential and show that the image of the set of integral matrices has at M.