sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 462 forks source link

magma -- boolean ring conversions #4236

Closed williamstein closed 15 years ago

williamstein commented 16 years ago
1) This should work (?)

sage: B.<x,y> = BooleanPolynomialRing()
sage: B*[x*y + 1, x + y]
sage: I = B*[x*y + 1, x + y]
sage: I._magma_()

Ideal of Affine Algebra of rank 2 over GF(2)
Lexicographical Order
Variables: x, y
Quotient relations:
[
x^2 + x,
y^2 + y
]
Generating basis:
[
x*y + 1,
x + y
]

sage: Im = I._magma_()
sage: Im.GroebnerBasis()
TypeError: Error evaluation Magma code.
IN:_sage_[21] := GroebnerBasis(_sage_[20]);
OUT:
>> _sage_[21] := GroebnerBasis(_sage_[20]);
                             ^
Runtime error in 'GroebnerBasis': Bad argument types
Argument types given: RngMPolRes

Reported by Martin Albrecht

Component: interfaces

Issue created by migration from https://trac.sagemath.org/ticket/4236

williamstein commented 15 years ago
comment:2

This does not seem like a bug in the Sage/Magma interface. It seems like a misunderstanding of Magma itself, which doesn't have a GroebnerBasis function that takse as input an ideal in a boolean ring. Magma simply doesn't do that. It only has Groebner for ideals in polynomial rings. There are some functions on ideals in boolean rings, but not many. I.e., above

sage: Im.IsMaximal()
true
sage: Im.PrimaryDecomposition()

[
Affine Algebra of rank 2 over GF(2)
Lexicographical Order
Variables: x, y
Quotient relations:
[
x^2 + x,
y^2 + y
]
Generating basis:
[
x + 1,
y + 1
]
]
malb commented 15 years ago
comment:3

We could make Magma better than Magma by

This is equivalent to computing the GB in the quotient directly.

malb commented 15 years ago
comment:5

This is fixed with #6177