This is the way objects from the pari library are converted to Sage.
pari has an (imperfect) system of attributing types to objects, and
the conversion code branches on the value of its pari type, calling
suitable conversion code in each case.

So this seems like a sensible way to go for GAP conversion.

John

2010/1/10 Dima Pasechnik <dimp...@gmail.com>:
> Javier,
>
> [...]
>>
>> So, it wasn't that hard (for matrices) after all.
> Good!
>> I don't know whether/
>> how this can be applied to the E(9) thing unless there is an
>> IsSomething gap method that can be used for them.
> Sure, there is
> IsCyclotomic
> and IsIntegralCyclotomic
> for cyclotomics, resp., cyclotomic integers:
>
> gap> IsIntegralCyclotomic(E(9));
> true
> gap> Field(E(9));
> CF(9)
>
>
> and
>
> IsFFE for finite field elements:
>
> gap> IsFFE(Z(5));
> true
> gap> Field(Z(5));
> GF(5)
>
> for more general fields and for rings it's also doable...
>
> Cheers,
> Dima
>>
>> I'll prepare some doctests and upload a first patch.
>>
>> Cheers
>> J
>
> --
> 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
> URL: http://www.sagemath.org
>
>
-- 
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
URL: http://www.sagemath.org

Reply via email to