# Changeset 6178:508217f008d5

Ignore:
Timestamp:
09/05/07 07:26:14 (6 years ago)
Branch:
default
Message:

merge

Location:
sage
Files:
6 edited

Unmodified
Removed
• ## sage/interfaces/magma.py

 r6074 return ans #def new(self, x): #    if isinstance(x, MagmaElement) and x.parent() == self: return N def ideal(self, L): """ """ P = iter(L).next().parent() Pn = P._magma_().name() k = P.base_ring() if k.degree() > 1: i = str(k.gen()) o = self("BaseRing(%s).1"%Pn).name() self.eval("%s := %s"%(i,o)) mlist = self(L) return self("ideal<%s|%s>"%(Pn,mlist.name())) class MagmaFunctionElement(FunctionElement):
• ## sage/rings/polynomial/multi_polynomial_ideal.py

 r5650 import sage.interfaces.magma magma = sage.interfaces.magma.magma mlist = magma(self.gens()) return magma("ideal<%s|%s>"%(self.ring()._magma_().name(),mlist.name())) return magma.ideal(self.gens()) def _magma_groebner_basis(self): R = self.ring() mgb = self._magma_().GroebnerBasis() B = Sequence([R(str(mgb[i+1])) for i in range(len(mgb))], R, check=False, immutable=True) mgb = [str(mgb[i+1]) for i in range(len(mgb))] if R.base_ring().degree() > 1: a = str(R.base_ring().gen()) mgb = [e.replace("\$.1",a) for e in mgb] B = Sequence([R(e) for e in mgb], R, check=False, immutable=True) self.__magma_groebner_basis = B return B
• ## sage/rings/polynomial/multi_polynomial_ring_generic.pyx

 r5871 def _magma_init_(self): B = self.base_ring()._magma_init_() """ Return a string representation of self MAGMA can understand. """ try: # we need that for GF(q) arithmetic B = self.base_ring()._magma_().name() except (RuntimeError,TypeError): B = self.base_ring()._magma_init_() R = 'PolynomialRing(%s, %s, %s)'%(B, self.ngens(),self.term_order().magma_str()) return R
• ## sage/rings/ring.pxd

 r4588 cdef public object __polynomial_ring cdef public object __vector_space cdef public object __interface cdef class Algebra(Ring):
• ## sage/rings/ring.pyx

 r5594 def _magma_init_(self): return 'GF(%s)'%self.order() """ Return string representation of self that MAGMA can understand. """ if self.degree() == 1: return 'GF(%s)'%self.order() B = self.base_ring() p = self.polynomial() return "ext< %s | %s >"%(B._magma_init_(),p._magma_init_()) def __cmp__(self, other):
• ## sage/structure/sage_object.pyx

 r5137 X._check_valid() return X except AttributeError: except (AttributeError, TypeError): try: self.__interface = {}
Note: See TracChangeset for help on using the changeset viewer.