# HG changeset patch
# User Peter Bruin <P.Bruin@warwick.ac.uk>
# Date 1385329546 0
# Node ID 47d71c5b0a4126bbe24905bc8785f4f112a352be
# Parent 9a9096a3c9a32d1957a7c89ab04ebd8caba217c7
Trac 11868: remove workarounds for bug related to global GEN variables
diff --git a/sage/libs/pari/gen.pyx b/sage/libs/pari/gen.pyx
a
|
b
|
|
7474 | 7474 | |
7475 | 7475 | sage: x = polygen(QQ) |
7476 | 7476 | sage: K.<t> = NumberField(x^3 - x + 1) |
7477 | | sage: pari(K).nfhilbert(t, t+2) # not tested, known bug #11868 |
| 7477 | sage: pari(K).nfhilbert(t, t + 2) |
7478 | 7478 | -1 |
7479 | 7479 | sage: pari(K).nfhilbert(pari(t), pari(t+2)) |
7480 | 7480 | -1 |
7481 | 7481 | sage: P = K.ideal(t^2 + t - 2) # Prime ideal above 5 |
| 7482 | sage: pari(K).nfhilbert(t, t + 2, P.pari_prime()) |
| 7483 | -1 |
7482 | 7484 | sage: pari(K).nfhilbert(pari(t), pari(t+2), P.pari_prime()) |
7483 | 7485 | -1 |
7484 | 7486 | sage: P = K.ideal(t^2 + 3*t - 1) # Prime ideal above 23, ramified |
| 7487 | sage: pari(K).nfhilbert(t, t + 2, P.pari_prime()) |
| 7488 | 1 |
7485 | 7489 | sage: pari(K).nfhilbert(pari(t), pari(t+2), P.pari_prime()) |
7486 | 7490 | 1 |
7487 | 7491 | """ |
diff --git a/sage/rings/number_field/number_field.py b/sage/rings/number_field/number_field.py
a
|
b
|
|
7699 | 7699 | a = self(a) |
7700 | 7700 | b = self(b) |
7701 | 7701 | if P is None: |
7702 | | # We MUST convert a and b to pari before calling the function |
7703 | | # to work around Trac #11868 -- Jeroen Demeyer |
7704 | | return pari(self).nfhilbert(pari(a), pari(b)) |
| 7702 | return pari(self).nfhilbert(a, b) |
7705 | 7703 | |
7706 | 7704 | from sage.rings.morphism import is_RingHomomorphism |
7707 | 7705 | if is_RingHomomorphism(P): |
… |
… |
|
7728 | 7726 | raise ValueError, "P (=%s) should be an ideal of self (=%s) in hilbert_symbol, not of %s" % (P, self, P.number_field()) |
7729 | 7727 | if not P.is_prime(): |
7730 | 7728 | raise ValueError, "Non-prime ideal P (=%s) in hilbert_symbol" % P |
7731 | | # We MUST convert a and b to pari before calling the function |
7732 | | # to work around Trac #11868 -- Jeroen Demeyer |
7733 | | return pari(self).nfhilbert(pari(a), pari(b), P.pari_prime()) |
| 7729 | return pari(self).nfhilbert(a, b, P.pari_prime()) |
7734 | 7730 | |
7735 | 7731 | def hilbert_conductor(self,a,b): |
7736 | 7732 | """ |
diff --git a/sage/schemes/elliptic_curves/ell_point.py b/sage/schemes/elliptic_curves/ell_point.py
a
|
b
|
|
431 | 431 | sage: P._pari_() |
432 | 432 | [Mod(1, 11), Mod(2, 11)] |
433 | 433 | |
434 | | We need to explicitly call ``pari()`` because of :trac:`11868`:: |
435 | | |
436 | | sage: pari(E).elladd(pari(O), pari(P)) |
| 434 | We no longer need to explicitly call ``pari(O)`` and ``pari(P)`` |
| 435 | after :trac:`11868`:: |
| 436 | |
| 437 | sage: pari(E).elladd(O, P) |
437 | 438 | [Mod(1, 11), Mod(2, 11)] |
438 | 439 | """ |
439 | 440 | if self[2]: |