Bill Page <bill.p...@newsynthesis.org> writes: > What version of Sage are you using? What patches applied (if any)?
4.0.2, combinat branch, patches 6318 applied. >> It might make sense to expand FriCASElement a little. Currently we have: >> >> P = self._check_valid() >> name = str(self) >> if name == 'Integer': >> from sage.rings.all import ZZ >> return ZZ >> elif name == 'DoubleFloat': >> from sage.rings.all import RDF >> return RDF >> elif name.startswith('Fraction('): >> name = name.lstrip('Fraction(') >> name = name.rstrip(')') >> return P(name)._sage_domain().fraction_field() >> >> raise NotImplementedError >> >> Types that often occur in FriCAS, might have an equivalent in sage, and >> come to my mind right now are: >> >> Polynomial(YourFavoriteRing) [polynomials with arbitrary many >> variables] >> Expression(Integer) [probably SymbolicRing] >> PrimeField(yourFavouritePrime) [probably >> Integers(yourFavouritePrime)] >> IntegerMod(yourFavouriteNaturalNumber) [probably >> Integers(yourFavouriteNaturalNumber)] >> AlgebraicNumber [probably QQbar] >> Float [RR with given precision] >> Complex(YourFavoriteCommutativeRing) [no idea] ... > Yes, I think that would be an excellent idea. Well, I just realized that the axiom interface was done differently: you used INFORM from axiom there. That worked reasonably well, as far as I remember. And now I also remember that some time ago I thought that the best way to have a (fricas) package SageForm, that converts InputForm into something appropriate for sage. Doing the conversion separately for the type (as above) and the element itself seems a bit like doing things twice, doesn't it? Martin --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---