Changes between Version 2 and Version 3 of Ticket #16247


Ignore:
Timestamp:
04/27/14 05:37:38 (6 years ago)
Author:
darij
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #16247 – Description

    v2 v3  
    11We have `LeftModules` and `RightModules` functorial constructions, and they should be used. `Modules` implements left and right multiplication to be *the same*, which causes misleading and counterintuitive non-associativity issues.
    22
    3 I'm currently running the (short) doctests of src/sage with a commit that adds a warning every time Modules(A) is called for A noncommutative. I'll post the results once it's done. So far:
    4 {{{
    5 ----------------------------------------------------------------------
    6 sage -t src/sage/groups/finitely_presented.py  # 2 doctests failed
    7 sage -t src/sage/matrix/matrix_sparse.pyx  # 4 doctests failed
    8 sage -t src/sage/matrix/matrix0.pyx  # 5 doctests failed
    9 sage -t src/sage/matrix/matrix2.pyx  # 1 doctest failed
    10 sage -t src/sage/matrix/matrix_space.py  # 2 doctests failed
    11 Doctests interrupted: 231/2069 files tested
    12 ----------------------------------------------------------------------
    13 }}}
     3I've run the (short) doctests of src/sage with a commit that adds a warning every time Modules(A) is called for A noncommutative. Here are the relevant results:
     4
     5https://www.dropbox.com/s/oieg1ig0dliz63s/noncomm.txt
     6
    147It seems that matrices over noncommutative rings are the main culprit here -- or, rather, matrix spaces being cast as modules over the base rings. They should be bimodules! The reason why this doesn't blow up in the user's face (well, as far as I can tell) is that (I guess) the matrix space classes override the `*` operator to do the right thing (oops!) instead of use the defaults from the `Modules` category.
    158
     
    2114    It's also not guaranteed that all multiplications are
    2215    done from the right side.
    23     doctest:...: UserWarning: You are constructing a free module
    24     over a noncommutative ring. Sage does not have a concept
    25     of left/right and both sided modules, so be careful.
    26     It's also not guaranteed that all multiplications are
    27     done from the right side.
    2816}}}
    2917(We do have left/right/bi-modules now.)