Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.h
4156 views
1
/* ============================================================================
2
3
hypellfrob.h: header for hypellfrob.cpp
4
5
This file is part of hypellfrob (version 2.1.1).
6
7
Copyright (C) 2007, 2008, David Harvey
8
9
This program is free software; you can redistribute it and/or modify
10
it under the terms of the GNU General Public License as published by
11
the Free Software Foundation; either version 2 of the License, or
12
(at your option) any later version.
13
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
18
19
You should have received a copy of the GNU General Public License along
20
with this program; if not, write to the Free Software Foundation, Inc.,
21
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22
23
============================================================================ */
24
25
26
#include <NTL/ZZ.h>
27
#include <NTL/ZZX.h>
28
#include <NTL/mat_ZZ.h>
29
30
31
namespace hypellfrob {
32
33
34
/*
35
Computes frobenius matrix for given p, to precision p^N, for the
36
hyperelliptic curve y^2 = Q(x), on the standard basis of cohomology.
37
38
PRECONDITIONS:
39
p must be a prime > (2g+1)(2N-1).
40
N >= 1.
41
Degree of Q should be 2g+1 for some g >= 1.
42
Q must be monic. The reduction of Q mod p must have no multiple roots.
43
44
RETURN VALUE:
45
1 on success, in which case "output" holds the resulting 2g * 2g matrix.
46
0 if any of the above conditions are not satisfied. (EXCEPTION: matrix()
47
will not check that p is prime. That's up to you.)
48
49
*/
50
int matrix(NTL::mat_ZZ& output, const NTL::ZZ& p, int N, const NTL::ZZX& Q,
51
int force_ntl = 0);
52
53
54
};
55
56
// ----------------------- end of file
57
58