Opened 14 years ago

Closed 13 years ago

# abelian_group_element / dual_abelian_group_element classes need rewrite

Reported by: Owned by: boothby boothby major sage-duplicate/invalid/wontfix basic arithmetic

### Description

Implementation uses slow algorithms, where O(1) algorithms are easy.

### comment:1 Changed 14 years ago by boothby

• Priority changed from minor to major
• Type changed from enhancement to defect

Problems are more serious than I originally thought. I would now describe AbelianGroup? and AbelianGroupElement? as "severely broken".

```sage: A = AbelianGroup(1,[0],names="a")
sage: a = A.gens()[0]
sage: B = A.subgroup([a,a,a,a]); B
Multiplicative Abelian Group isomorphic to Z x Z x Z x Z, which is the
subgroup of
Multiplicative Abelian Group isomorphic to Z
generated by [a, a, a, a]

```

Z4 is a subgroup of Z???

```sage: a^-1
Exception (click to the left for traceback):
...
TypeError: unsupported operand type(s) for %: 'int' and 'PlusInfinity'
sage: ~a
Exception (click to the left for traceback):
...
AttributeError: 'AbelianGroup_class' object has no attribute 'fraction_field'
```

You can't compute the inverse of a group element?

### comment:2 Changed 14 years ago by mabshoff

• Milestone set to sage-2.9.1

### comment:3 Changed 14 years ago by mabshoff

#1849 is a rewrite of this code, so please check what is going on over there.

Cheers,

Michael

### comment:4 Changed 14 years ago by wdj

Unfortunately, there is still (in sage 3.0) a serious lack of functionality for infinite abelian groups. I don't see an easy fix for this bug. Currently, it is AbelianSemiGroupExceptWhenFiniteThenItIsAbelianGroup_class:-)

### comment:5 Changed 13 years ago by mabshoff

• Milestone changed from sage-3.1.1 to sage-duplicate/invalid
• Resolution set to duplicate
• Status changed from new to closed

I am closing this ticket as a duplicate of #1849.

Cheers,

Michael

Note: See TracTickets for help on using tickets.