Skip to content

regression in free modules -- who broke my __mul__ #5131

@williamstein

Description

@williamstein

If A is a free module and r a ring element then rA and Ar used to work fine. But somebody broke them.

In the good ol days:

wstein@sage:/disk/scratch/mabshoff-sage-releases/sage-0.10.0$ ./sage
[...]
sage: A = ZZ^3
sage: A
 _5 = Ambient free module of rank 3 over the principal ideal domain Integer Ring
sage: 2*A
 _6 = 
Free module of degree 3 and rank 3 over Integer Ring
Echelon basis matrix:
[2 0 0]
[0 2 0]
[0 0 2]

Now:

sage: A = ZZ^3
sage: 2*A
Traceback (most recent call last):
...
TypeError: unsupported operand parent(s) for '*': 'Integer Ring' and '<class 'sage.modules.free_module.FreeModule_ambient_pid'>'

Component: linear algebra

Author: Travis Scrimshaw

Branch/Commit: 1f0cd92

Reviewer: Jan Keitel

Issue created by migration from https://trac.sagemath.org/ticket/5131

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions