Path: blob/master/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.h
4156 views
/* ============================================================================12hypellfrob.h: header for hypellfrob.cpp34This file is part of hypellfrob (version 2.1.1).56Copyright (C) 2007, 2008, David Harvey78This program is free software; you can redistribute it and/or modify9it under the terms of the GNU General Public License as published by10the Free Software Foundation; either version 2 of the License, or11(at your option) any later version.1213This program is distributed in the hope that it will be useful,14but WITHOUT ANY WARRANTY; without even the implied warranty of15MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the16GNU General Public License for more details.1718You should have received a copy of the GNU General Public License along19with this program; if not, write to the Free Software Foundation, Inc.,2051 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.2122============================================================================ */232425#include <NTL/ZZ.h>26#include <NTL/ZZX.h>27#include <NTL/mat_ZZ.h>282930namespace hypellfrob {313233/*34Computes frobenius matrix for given p, to precision p^N, for the35hyperelliptic curve y^2 = Q(x), on the standard basis of cohomology.3637PRECONDITIONS:38p must be a prime > (2g+1)(2N-1).39N >= 1.40Degree of Q should be 2g+1 for some g >= 1.41Q must be monic. The reduction of Q mod p must have no multiple roots.4243RETURN VALUE:441 on success, in which case "output" holds the resulting 2g * 2g matrix.450 if any of the above conditions are not satisfied. (EXCEPTION: matrix()46will not check that p is prime. That's up to you.)4748*/49int matrix(NTL::mat_ZZ& output, const NTL::ZZ& p, int N, const NTL::ZZX& Q,50int force_ntl = 0);515253};5455// ----------------------- end of file565758