Home Online Manual
Top
Back: evaluateFormalDivisor
Forward: negativeformaldivisor
FastBack:
FastForward:
Up: divisors_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.5.4.13 formaldivisorplus

Procedure from library divisors.lib (see divisors_lib).

Usage:
formaldivisorplus(A ,B); A + B; A = formaldivisor, B = formaldivisor.

Assume:
A and B are formal divisors on X.

Return:
a formal divisor on X

Theory:
The procedure will add the formal sums.

Example:
 
LIB "divisors.lib";
ring r=31991,(x,y,z),dp;
ideal I = y^2*z - x*(x-z)*(x+3*z);
qring Q = std(I);
divisor A = makeDivisor(ideal(x,z),ideal(1));
divisor B = makeDivisor(ideal(x,y),ideal(1));
divisor C = makeDivisor(ideal(x-z,y),ideal(1));
formaldivisor fE= makeFormalDivisor(list(list(-5,A),list(2,B)));
formaldivisor fE2= makeFormalDivisor(list(list(-5,A),list(2,C)));
formaldivisorplus(fE,fE2);
==> [1]:
==>    [1]:
==>       -10
==>    [2]:
==>       (z,x) - (1)
==> 
==> [2]:
==>    [1]:
==>       2
==>    [2]:
==>       (y,x) - (1)
==> 
==> [3]:
==>    [1]:
==>       2
==>    [2]:
==>       (y,x-z) - (1)
==>