Skip to content

Commit bac8f3c

Browse files
committed
fixing some optional-magma doctests
1 parent af66993 commit bac8f3c

File tree

6 files changed

+12
-15
lines changed

6 files changed

+12
-15
lines changed

src/sage/matrix/matrix_mod2_dense.pyx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,14 +1393,15 @@ cdef class Matrix_mod2_dense(matrix_dense.Matrix_dense): # dense or sparse
13931393

13941394
def _magma_init_(self, magma):
13951395
"""
1396-
Return a string of ``self`` in ``Magma`` form. Does not return
1397-
``Magma`` object but string.
1396+
Return a string of ``self`` in ``Magma`` form.
1397+
1398+
This does not return a ``Magma`` object but a string.
13981399
13991400
EXAMPLES::
14001401
14011402
sage: A = random_matrix(GF(2),3,3)
14021403
sage: A._magma_init_(magma) # optional - magma
1403-
'Matrix(GF(2),3,3,StringToIntegerSequence("0 1 0 0 1 1 0 0 0"))'
1404+
'Matrix(GF(2),3,3,StringToIntegerSequence("..."))'
14041405
sage: A = random_matrix(GF(2),100,100)
14051406
sage: B = random_matrix(GF(2),100,100)
14061407
sage: magma(A*B) == magma(A) * magma(B) # optional - magma

src/sage/modular/btquotients/btquotient.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
from collections import deque
4343

4444
from sage.arith.misc import gcd, xgcd, kronecker_symbol, fundamental_discriminant
45+
from sage.interfaces.magma import magma
4546
from sage.matrix.constructor import Matrix
4647
from sage.matrix.matrix_space import MatrixSpace
4748
from sage.misc.cachefunc import cached_method
@@ -2307,7 +2308,7 @@ def get_extra_embedding_matrices(self):
23072308
[1 0 2 0]
23082309
[0 0 2 0]
23092310
[0 0 0 0]
2310-
[1 0 2 2]
2311+
[1 2 2 0]
23112312
]
23122313
"""
23132314
if not self._use_magma or len(self._extra_level) == 0:
@@ -2700,7 +2701,7 @@ def get_splitting_field(self):
27002701
27012702
sage: X = BruhatTitsQuotient(5,11,use_magma=True) # optional - magma
27022703
sage: X.get_splitting_field() # optional - magma
2703-
Number Field in a with defining polynomial X1^2 + 11
2704+
Number Field in a with defining polynomial x^2 + 11
27042705
"""
27052706
if not self._use_magma:
27062707
raise NotImplementedError('Sage does not know yet how to work with the kind of orders that you are trying to use. Try installing Magma first and set it up so that Sage can use it.')

src/sage/rings/polynomial/multi_polynomial_ideal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ def _groebner_basis_magma(self, deg_bound=None, prot=False, magma=magma_default)
408408
sage: I = sage.rings.ideal.Cyclic(R, 6)
409409
sage: gb = I.groebner_basis('magma:GroebnerBasis', deg_bound=4)
410410
sage: len(gb)
411-
5
411+
7
412412
"""
413413
R = self.ring()
414414
if not deg_bound:

src/sage/rings/polynomial/pbori/pbori.pyx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4927,14 +4927,9 @@ class BooleanPolynomialIdeal(MPolynomialIdeal):
49274927
sage: I = F.ideal()
49284928
sage: I.groebner_basis(algorithm='magma', prot='sage') # optional - magma
49294929
Leading term degree: 1. Critical pairs: 148.
4930-
Leading term degree: 2. Critical pairs: 144.
4931-
Leading term degree: 3. Critical pairs: 462.
4932-
Leading term degree: 1. Critical pairs: 167.
4933-
Leading term degree: 2. Critical pairs: 147.
4934-
Leading term degree: 3. Critical pairs: 101 (all pairs of current degree eliminated by criteria).
4935-
<BLANKLINE>
4930+
...
49364931
Highest degree reached during computation: 3.
4937-
Polynomial Sequence with 35 Polynomials in 36 Variables
4932+
Polynomial Sequence with ... Polynomials in 36 Variables
49384933
49394934
TESTS:
49404935

src/sage/rings/polynomial/polynomial_rational_flint.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2162,7 +2162,7 @@ cdef class Polynomial_rational_flint(Polynomial):
21622162
Transitive group number 183 of degree 12
21632163
21642164
sage: f.galois_group(algorithm='magma') # optional - magma
2165-
Transitive group number 5 of degree 4
2165+
Transitive group number 183 of degree 12
21662166
21672167
TESTS:
21682168

src/sage/schemes/hyperelliptic_curves/hyperelliptic_generic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ def _magma_init_(self, magma):
669669
Hyperelliptic Curve over Finite Field in a of size 3^2
670670
defined by y^2 + x^10*y = x^3 + x + 2
671671
sage: D = magma(C); D # needs sage.rings.finite_rings
672-
Hyperelliptic Curve defined by y^2 + (x^10)*y = x^3 + x + 2 over GF(3^2)
672+
Hyperelliptic Curve defined by y^2 + x^10*y = x^3 + x + 2 over GF(3^2)
673673
sage: D.sage() # needs sage.rings.finite_rings
674674
Hyperelliptic Curve over Finite Field in a of size 3^2
675675
defined by y^2 + x^10*y = x^3 + x + 2

0 commit comments

Comments
 (0)