Opened 14 years ago

Closed 13 years ago

#1170 closed defect (fixed)

[with patch, positive review] Behaviour of the order function for infinite groups

Reported by: ljpk Owned by: was
Priority: minor Milestone: sage-3.1.2
Component: linear algebra Keywords:
Cc: Merged in:
Authors: Reviewers:
Report Upstream: Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

When one tries to use the order function on group elements of infinite order, one gets an error:

gl=GL(2,ZZ) g=gl.gens()[2] g.order()

In MAGMA, one (often) gets the answer 0 if one calls the Order function on elements of infinite order.

Attachments (1)

1170-matrix-group-order.patch (2.0 KB) - added by cremona 13 years ago.

Download all attachments as: .zip

Change History (5)

Changed 13 years ago by cremona

comment:1 Changed 13 years ago by cremona

  • Summary changed from Behaviour of the order function for infinite groups to [with patch, needs review] Behaviour of the order function for infinite groups

The patch fixes this: for consistency with other groups, +Infinity is returned as the order for group elements of infinite order. A doctest has been added.

The patch should apply to 3.1.2.alpha4 and later, and all doctests in sage.groups pass.

Review, Lloyd?

comment:2 Changed 13 years ago by AlexGhitza

  • Summary changed from [with patch, needs review] Behaviour of the order function for infinite groups to [with patch, positive review] Behaviour of the order function for infinite groups

comment:3 Changed 13 years ago by mabshoff

One small nitpick which I corrected in the patch I applied: The # in the doctests need to be escaped, i.e.

See trac \#1170

I am not sure if this applies in case the docstring is not raw, but let's do it so that downroad we do not get bitten by it.

Cheers,

Michael

comment:4 Changed 13 years ago by mabshoff

  • Resolution set to fixed
  • Status changed from new to closed

Merged in Sage 3.1.2.rc0

Note: See TracTickets for help on using tickets.