Skip to content

Commit 5a93c1b

Browse files
author
Matthias Koeppe
committed
Massive modularization fixes
1 parent c28114a commit 5a93c1b

13 files changed

+291
-223
lines changed

src/sage/rings/number_field/S_unit_solver.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -982,11 +982,12 @@ def minimal_vector(A, y, prec=106):
982982
ALLLinv = ALLL.inverse()
983983
ybrace = [ abs(R(a-a.round())) for a in y * ALLLinv if (a-a.round()) != 0]
984984

985+
v = ALLL.rows()[0]
985986
if len(ybrace) == 0:
986-
return (ALLL.rows()[0].norm())**2 / c1
987+
return v.dot_product(v) / c1
987988
else:
988989
sigma = ybrace[len(ybrace)-1]
989-
return ((ALLL.rows()[0].norm())**2 * sigma) / c1
990+
return v.dot_product(v) * sigma / c1
990991

991992

992993
def reduction_step_complex_case(place, B0, list_of_gens, torsion_gen, c13):

src/sage/rings/number_field/galois_group.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,18 @@ class GaloisGroup_v1(SageObject):
4646
EXAMPLES::
4747
4848
sage: from sage.rings.number_field.galois_group import GaloisGroup_v1
49-
sage: K = QQ[2^(1/3)]
50-
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K); G
49+
sage: K = QQ[2^(1/3)] # optional - sage.symbolic
50+
sage: pK = K.absolute_polynomial() # optional - sage.symbolic
51+
sage: G = GaloisGroup_v1(pK.galois_group(pari_group=True), K); G # optional - sage.symbolic
5152
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
5253
See https://github.com/sagemath/sage/issues/28782 for details.
5354
Galois group PARI group [6, -1, 2, "S3"] of degree 3 of the
5455
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
55-
sage: G.order()
56+
sage: G.order() # optional - sage.symbolic
5657
6
57-
sage: G.group()
58+
sage: G.group() # optional - sage.symbolic
5859
PARI group [6, -1, 2, "S3"] of degree 3
59-
sage: G.number_field()
60+
sage: G.number_field() # optional - sage.symbolic
6061
Number Field in a with defining polynomial x^3 - 2 with a = 1.259921049894873?
6162
"""
6263

@@ -96,11 +97,11 @@ def __eq__(self, other):
9697
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
9798
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
9899
See https://github.com/sagemath/sage/issues/28782 for details.
99-
sage: L = QQ[sqrt(2)]
100-
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L)
101-
sage: H == G
100+
sage: L = QQ[sqrt(2)] # optional - sage.symbolic
101+
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L) # optional - sage.symbolic
102+
sage: H == G # optional - sage.symbolic
102103
False
103-
sage: H == H
104+
sage: H == H # optional - sage.symbolic
104105
True
105106
sage: G == G
106107
True
@@ -125,11 +126,11 @@ def __ne__(self, other):
125126
sage: G = GaloisGroup_v1(K.absolute_polynomial().galois_group(pari_group=True), K)
126127
...DeprecationWarning: GaloisGroup_v1 is deprecated; please use GaloisGroup_v2
127128
See https://github.com/sagemath/sage/issues/28782 for details.
128-
sage: L = QQ[sqrt(2)]
129-
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L)
130-
sage: H != G
129+
sage: L = QQ[sqrt(2)] # optional - sage.symbolic
130+
sage: H = GaloisGroup_v1(L.absolute_polynomial().galois_group(pari_group=True), L) # optional - sage.symbolic
131+
sage: H != G # optional - sage.symbolic
131132
True
132-
sage: H != H
133+
sage: H != H # optional - sage.symbolic
133134
False
134135
sage: G != G
135136
False

src/sage/rings/number_field/maps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def _repr_type(self):
7979

8080
def is_injective(self):
8181
r"""
82-
EXAMPLES::
82+
EXAMPLES::
8383
8484
sage: x = polygen(ZZ, 'x')
8585
sage: K.<a> = NumberField(x^4 + 3*x + 1)
@@ -91,7 +91,7 @@ def is_injective(self):
9191

9292
def is_surjective(self):
9393
r"""
94-
EXAMPLES::
94+
EXAMPLES::
9595
9696
sage: x = polygen(ZZ, 'x')
9797
sage: K.<a> = NumberField(x^4 + 3*x + 1)

0 commit comments

Comments
 (0)