a few changes

parent be6c581d
CPPFLAGS=--pedantic -Wall --std=c++11 -O3
CPPFLAGS=--pedantic -Wall --std=c++11 -g
LDLIBS=-lntl -lgmpxx -lgmp -lm
all: rrspace class_grp_arith tests
......
......@@ -83,12 +83,12 @@ smooth). In this case, please use another model of the curve.
The set of rational functions `{f_1/h, ..., f_D/h}` is a basis of the
Riemann-Roch space.
2. `class_grp_arith`: this program takes as input two elements of the divisor
class group of a curve `C` of genus `g` and it returns a representation of the sum. Here, we
are given a curve, together with a degree 1 divisor on `C`. A class of divisors
(modulo principal divisors) is represented by an effective divisor `D1` of degree
`g`: it represents the class of divisors equivalent to the degree-0 divisor `D1 -
g*O`.
2. `class_grp_arith`: this program takes as input two elements of the divisor
class group of a curve `C` of genus `g` and it returns a representation of the
sum. Here, we are given a curve, together with a degree 1 divisor on `C`. A
class of divisors (modulo principal divisors) is represented by an effective
divisor `D1` of degree `g`: it represents the class of divisors equivalent to
the degree-0 divisor `D1 - g*O`.
`class_grp_arith` reads its input on the standard input, and it returns an
effective divisor of degree at most `g` on the standard output.
......
......@@ -175,7 +175,7 @@ Sum(const EffectiveDivisor& D1, const EffectiveDivisor& D2) {
ZZ_pX new_f = D1.get_f()*D2.get_f();
ZZ_pX new_g = (D1.get_g()*a2*(D2.get_f()/gcd) +
D2.get_g()*a1*(D1.get_f()/gcd)) % (new_f/gcd);
new_g = NewtonHenselStep(*D1.curve().get_pdefpol(), new_g, new_f/gcd);
// new_g = NewtonHenselStep(*D1.curve().get_pdefpol(), new_g, new_f/gcd);
new_g = new_g % new_f;
assert(new_g % D1.get_f() == D1.get_g());
assert(new_g % D2.get_f() == D2.get_g());
......
1009
[ 4 [0 0 1 1008] [] [1008] [] [1] ]
{ < [0 768 952 607 467 1] [0 377 661 970 690] > < [0 0 1] [0 1] > }
......@@ -32,6 +32,11 @@ int main() {
ZZ_p::init(ZZ(p));
cin >> eq_curve;
Curve C(&eq_curve);
// // Singular divisor for nodal curves
// EffectiveDivisor E(C);
// cin >> E;
Divisor D(C);
cin >> D;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment