Opened 8 years ago

Closed 8 years ago

Use coercion instead of pushout in matrix actions

Reported by: Owned by: vdelecroix major sage-6.6 coercion Jeroen Demeyer Travis Scrimshaw N/A 9da3db6 9da3db64750114e4c230a83e96e2ab6544c3e104

Description (last modified by vdelecroix)

There is no coercion between QQ and finite rings

```sage: cm = get_coercion_model()
sage: cm.get_action(Zmod(2), QQ, operator.mul) is None
True
```

This is right.

But we do have an action of matrices on vectors

```sage: M = MatrixSpace(Zmod(2),2)
sage: V = VectorSpace(QQ,2)
sage: cm.get_action(M,V,operator.mul)
Left action by
Full MatrixSpace of 2 by 2 dense matrices over Ring of integers modulo 2 on
Vector space of dimension 2 over Rational Field
```

or

```sage: M = MatrixSpace(QQ,2)
sage: V = VectorSpace(Zmod(2),2)
sage: cm.get_action(M,V,operator.mul)
Left action by
Full MatrixSpace of 2 by 2 dense matrices over Rational Field on
Vector space of dimension 2 over Ring of integers modulo 2
```

And this is wrong!

see also: #12865

comment:1 Changed 8 years ago by vdelecroix

Description: modified (diff)

comment:2 Changed 8 years ago by jdemeyer

Summary: Wrong coercion between QQ and finite rings → Remove action of Z/nZ matrices on QQ vectors

comment:3 Changed 8 years ago by jdemeyer

Summary: Remove action of Z/nZ matrices on QQ vectors → Use coercion instead of pushout in matrix actions

comment:4 Changed 8 years ago by jdemeyer

Authors: → Jeroen Demeyer

comment:5 Changed 8 years ago by jdemeyer

Branch: → u/jdemeyer/use_coercion_instead_of_pushout_in_matrix_actions → 437c4e8e481084a2b6414ce2878e2ae12cb98160 new → needs_review

New commits:

 ​437c4e8 `Use coercion instead of pushout for matrix actions`

comment:6 Changed 8 years ago by tscrim

Reviewers: → Travis Scrimshaw

LGTM, but could you add a linebreak to the doctest you added? Thanks.

comment:7 Changed 8 years ago by git

Commit: 437c4e8e481084a2b6414ce2878e2ae12cb98160 → 9da3db64750114e4c230a83e96e2ab6544c3e104

Branch pushed to git repo; I updated commit sha1. New commits:

 ​9da3db6 `Add line breaks in long doctest`

comment:8 Changed 8 years ago by tscrim

Status: needs_review → positive_review

comment:9 Changed 8 years ago by vbraun

Branch: u/jdemeyer/use_coercion_instead_of_pushout_in_matrix_actions → 9da3db64750114e4c230a83e96e2ab6544c3e104 → fixed positive_review → closed
Note: See TracTickets for help on using tickets.