On Jan 16, 2008 10:34 AM, Kiran Kedlaya <[EMAIL PROTECTED]> wrote: > > Before proceeding, let me thank William for answering my original > question. In the case I was interested in, the number of return values > does not vary in any funny way, so I can use nvals to get what I want > back out. > > But in the example of IsIsomorphic, there seems to be a problem. If I > start Magma and type > > > E := EllipticCurve([2,1]); > > F := EllipticCurve([5,1]); > > bool, phi := IsIsomorphic(E,F); > > then the identifier phi remains undefined! And in Sage, if I type > > sage: E = magma.EllipticCurve([2,1]); > sage: F = magma.EllipticCurve([5,1]) > sage: bool, phi = magma.IsIsomorphic(E, F, nvals=2) > > this generates an error: > > <type 'exceptions.RuntimeError'>: Error evaluation Magma code. > IN:_sage_[9], _sage_[10] := IsIsomorphic(_sage_[4],_sage_[8]); > OUT: > >> _sage_[9], _sage_[10] := IsIsomorphic(_sage_[4],_sage_[8]); > ^ > Runtime error in :=: Illegal undefined assignment for LHS index > assignment > > In a perfect world, the above would run and produce bool == False, phi > == None. Sigh.
Yet another example of the Magma semantics being a pain. They don't even use a notion of None. Argh. Anyway, it might be possible to program around the above problem via some complicated Magma trickiery. Definitely report it as a bug to the Sage tracer. William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---