#18158: wrap more libgap objects as `GapElement_List`
-------------------------------------+-------------------------------------
       Reporter:  vdelecroix         |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-7.2
      Component:  interfaces         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  Vincent Delecroix  |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/vdelecroix/18158                 |  dbf8aeac7bdcb1c458711b9c4d2f57a6d4fbac1c
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------
Description changed by vdelecroix:

Old description:

> Some objects in GAP are not PList but does support indexation
> {{{
> gap> S := SymmetricGroup(5);;
> gap> irr := Irr(S)[3];;
> gap> irr[1];
> 5
> }}}
> or
> {{{
> gap> gens := GeneratorsOfGroup(SL(2,GF(5)));;
> gap> m := gens[1];;
> gap> m[1];
> [ Z(5), 0*Z(5) ]
> gap> m[2];
> [ 0*Z(5), Z(5)^3 ]
> }}}
>
> We change the way gap lists are detected and hence more objects are now
> wrapped as `GapElement_List`. In particular the examples above previously
> failed inside Sage.

New description:

 Some objects in GAP are not PList but does support indexation.
 {{{
 gap> gens := GeneratorsOfGroup(SL(2,GF(5)));;
 gap> m := gens[1];;
 gap> m[1];
 [ Z(5), 0*Z(5) ]
 gap> m[2];
 [ 0*Z(5), Z(5)^3 ]
 }}}
 Sage currently fails to recognize them as lists
 {{{
 sage: gens = libgap.GeneratorsOfGroup(SL(2,GF(5)))
 sage: m = gens[0]
 sage: m[0]
 Traceback (most recent call last):
 ...
 TypeError: 'sage.libs.gap.element.GapElement' object has no attribute
 '__getitem__'
 }}}

 In this branch:

  - We change the way gap lists are detected and hence more objects are now
 wrapped as `GapElement_List`. In particular we make possible the access to
 elements in the above example.

  - we move the methods `vector` and `matrix` to `GapElement_List`

--

--
Ticket URL: <http://trac.sagemath.org/ticket/18158#comment:17>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to