Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.rings.number_field: Modularization fixes, doctest cosmetics, # needs #36044

Merged
merged 11 commits into from
Aug 13, 2023
5 changes: 3 additions & 2 deletions src/sage/rings/number_field/S_unit_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -982,11 +982,12 @@ def minimal_vector(A, y, prec=106):
ALLLinv = ALLL.inverse()
ybrace = [ abs(R(a-a.round())) for a in y * ALLLinv if (a-a.round()) != 0]

v = ALLL.rows()[0]
if len(ybrace) == 0:
return (ALLL.rows()[0].norm())**2 / c1
return v.dot_product(v) / c1
else:
sigma = ybrace[len(ybrace)-1]
return ((ALLL.rows()[0].norm())**2 * sigma) / c1
return v.dot_product(v) * sigma / c1


def reduction_step_complex_case(place, B0, list_of_gens, torsion_gen, c13):
Expand Down
20 changes: 11 additions & 9 deletions src/sage/rings/number_field/galois_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ class GaloisGroup_v1(SageObject):

EXAMPLES::

sage: # needs sage.symbolic
sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
sage: K = QQ[2^(1/3)]
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
sage: pK = K.absolute_polynomial()
sage: G = GaloisGroup_v1(pK.galois_group(pari_group=True), K); G
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the
Expand Down Expand Up @@ -96,11 +98,11 @@ def __eq__(self, other):
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
sage: L = QQ[sqrt(2)]
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L)
sage: H == G
sage: L = QQ[sqrt(2)] # needs sage.symbolic
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L) # needs sage.symbolic
sage: H == G # needs sage.symbolic
False
sage: H == H
sage: H == H # needs sage.symbolic
True
sage: G == G
True
Expand All @@ -125,11 +127,11 @@ def __ne__(self, other):
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
See https://github.com/sagemath/sage/issues/28782 for details.
sage: L = QQ[sqrt(2)]
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L)
sage: H != G
sage: L = QQ[sqrt(2)] # needs sage.symbolic
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L) # needs sage.symbolic
sage: H != G # needs sage.symbolic
True
sage: H != H
sage: H != H # needs sage.symbolic
False
sage: G != G
False
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/number_field/homset.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ def _element_constructor_(self, x, base_map=None, base_hom=None, check=True):
are only approximate::

sage: K.<a> = QuadraticField(-7)
sage: f = K.hom([CC(sqrt(-7))], check=False)
sage: f = K.hom([CC(sqrt(-7))], check=False) # needs sage.symbolic
sage: x = polygen(K)
sage: L.<b> = K.extension(x^2 - a - 5)
sage: L.Hom(CC)(f(a + 5).sqrt(), f, check=False)
sage: L.Hom(CC)(f(a + 5).sqrt(), f, check=False) # needs sage.symbolic
Relative number field morphism:
From: Number Field in b with defining polynomial x^2 - a - 5 over its base field
To: Complex Field with 53 bits of precision
Expand Down
4 changes: 2 additions & 2 deletions src/sage/rings/number_field/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _repr_type(self):

def is_injective(self):
r"""
EXAMPLES::
EXAMPLES::

sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^4 + 3*x + 1)
Expand All @@ -91,7 +91,7 @@ def is_injective(self):

def is_surjective(self):
r"""
EXAMPLES::
EXAMPLES::

sage: x = polygen(ZZ, 'x')
sage: K.<a> = NumberField(x^4 + 3*x + 1)
Expand Down
Loading
Loading