Ticket #10515 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Removed bug in MatrixGroup.list()

Reported by: stumpc5 Owned by: joyner
Priority: major Milestone: sage-4.6.2
Component: group theory Keywords: matrix group
Cc: Work issues:
Report Upstream: N/A Reviewers: Gagan Sekhon
Authors: Christian Stump, Aly Deines Merged in: sage-4.6.2.alpha3
Dependencies: Stopgaps:

Description

the list method for MatrixGroup worked only for ZZ and GF(p), but not for QQ. This one line patch should do the job.

We had:

sage: gens = [matrix(ZZ,2,[1,0,0,1])]
sage: MatrixGroup(gens).list()
[[1 0]
[0 1]]

sage: gens = [matrix(GF(5),2,[1,0,0,1])]
sage: MatrixGroup(gens).list()
[[1 0]
[0 1]]

sage: gens = [matrix(QQ,2,[1,0,0,1])]
sage: MatrixGroup(gens).list()
...
AttributeError: 'RationalField_with_category' object has no attribute 'multiplicative_generator'

Now, the third works as well:

sage: gens = [matrix(QQ,2,[1,0,0,1])]
sage: MatrixGroup(gens).list()
[[1 0]
[0 1]]

Attachments

trac_10515_matrix_group_list_cs.patch Download (698 bytes) - added by stumpc5 2 years ago.
Patch removing bug in listing elements in a matrix group
trac_10515_matrix_group_list_cs.2.patch Download (1.2 KB) - added by aly.deines 2 years ago.
added doctests
trac_10515_matrix_group_list_cs.3.patch Download (1.3 KB) - added by jdemeyer 2 years ago.
Fixed commit message, apply only this

Change History

Changed 2 years ago by stumpc5

Patch removing bug in listing elements in a matrix group

comment:1 Changed 2 years ago by stumpc5

  • Status changed from new to needs_review

Changed 2 years ago by aly.deines

added doctests

comment:2 Changed 2 years ago by gagansekhon

  • Status changed from needs_review to positive_review

comment:3 Changed 2 years ago by gagansekhon

  • Authors changed from Christian Stump to Christian Stump, Gagan Sekhon

comment:4 Changed 2 years ago by jdemeyer

  • Reviewers set to Gagan Sekhon
  • Milestone set to sage-4.6.2
  • Authors changed from Christian Stump, Gagan Sekhon to Christian Stump, Aly Deines

Gagan: perhaps you meant to add yourself as reviewer instead of author?

comment:5 Changed 2 years ago by jdemeyer

  • Status changed from positive_review to closed
  • Resolution set to fixed
  • Merged in set to sage-4.6.2.alpha3

Changed 2 years ago by jdemeyer

Fixed commit message, apply only this

Note: See TracTickets for help on using tickets.