Thank you,
this seems to help.

David

On Oct 29, 6:54 pm, William Stein <wst...@gmail.com> wrote:
> On Thu, Oct 29, 2009 at 11:02 AM, David Holmes <26davi...@googlemail.com> 
> wrote:
>
> > Hi,
> > I apologise if this question has already been answered, I was unable
> > to find a solution when i searched.
>
> > I am trying to use sage to compute with divisors on hyperelliptic
> > curves (not only of genus 2). I know how to do this in magma, but it
> > seems from the manual that the riemann-roch computations in sage are
> > buggy, so I am attempting to write code in sage that will use magma
> > when needed. For example, I type
>
> > sage: R.<x>=QQ[]
> > sage: f = x^8+4673*x^5+12
> > sage: magma(HyperellipticCurve(f))
>
> > which works fine.
> > Then I want to use the "DivisorGroup" command in magma, but I can find
> > no way to get sage to apply this.
>
> > If I open the magma command line in sage I can do these calculations,
> > but for example if I define a polynomial "f" in sage, then I want to
> > use it in the magma command line within sage, "f" is now an undefined
> > variable - how do i write to and from the magma command line within
> > sage (if this is possible)?
>
> You might find the following demo session in the Sage command line
> helpful.  It illustrate the difference between different ways of using
> Magma from Sage:
>
> flat:~ wstein$ sage
> ----------------------------------------------------------------------
> | Sage Version 4.2, Release Date: 2009-10-24                         |
> | Type notebook() for the GUI, and license() for information.        |
> ----------------------------------------------------------------------
> Loading Sage library. Current Mercurial branch is: heegner
> sage: magma.eval("f := 5;");
> sage: R.<x> = GF(7)[]
> sage: g = magma(x^4 + 3);
> sage: g.name()
> '_sage_[3]'
> sage: %magma
>
>   --> Switching to Magma <--
>
> ''
> magma: _sage_[3]
> x^4 + 3
> magma: f
> 5
> magma: h := 15;
>
> magma:
>
>   --> Exiting back to Sage <--
>
> sage: magma('h')
> 15
> sage: !magma
> Magma V2.15-11    Thu Oct 29 2009 11:53:43 on flat     [Seed = 2954042946]
> Type ? for help.  Type <Ctrl>-D to quit.
>
> > f
> > ;
> >> f
>
>    ^
> User error: Identifier 'f' has not been declared or assigned
>
> sage: magma_console()
> Magma V2.15-11    Thu Oct 29 2009 11:54:17 on flat     [Seed = 3189575714]
> Type ? for help.  Type <Ctrl>-D to quit.
>
> > f;
> >> f;
>
>    ^
> User error: Identifier 'f' has not been declared or assigned
>
> William
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to