Dear all,

I have implemented a finite matrix group as explained in 
"http://www.sagemath.org/doc/reference/sage/groups/libgap_wrapper.html";, 
starting from some matrix generators, i.e. in the example 
"libgap.Group(generators)" instead of "libgap.CyclicGroup(3)". Everything 
works fine: I call an element and get its matrix representation printed. 
However, I can not get the element easily as a Matrix instance, what I want 
to do to take its Smith normal form. The only way I have found to work so 
far is, being ``element`` an instance of the Element class,

     sage: Matrix(self.base_ring(), self.gap().sage())

which works, but something tells me there is an easier way. Is there?

Second, how do I cast a gap integer into a safe integer? For example, the 
following fails:

    sage: a =libgap.DimensionOfMatrixGroup(group)
    sage: print a
    >>> 2 
    sage: ZZ(a)
    >>>   [...] TypeError: unable to coerce <type 
'sage.libs.gap.element.GapElement_Integer'> to an integer

Is there a proper way, or a workaround?

Anyway, I think libgap is one of the best contributions to sage possible. 
Thanks so much, Volker!

Cheers,
Jesús Torrado

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to