Modules

sage.categories.modules.Modules

The category of all modules over a base ring \(R\).

An \(R\)-module \(M\) is a left and right \(R\)-module over a commutative ring \(R\) such that:

\[r*(x*s) = (r*x)*s \qquad \forall r,s \in R \text{ and } x \in M\]

INPUT:

  • base_ring – a ring \(R\) or subcategory of Rings()
  • dispatch – a boolean (for internal use; default: True)

When the base ring is a field, the category of vector spaces is returned instead (unless dispatch == False).

Warning

Outside of the context of symmetric modules over a commutative ring, the specifications of this category are fuzzy and not yet set in stone (see below). The code in this category and its subcategories is therefore prone to bugs or arbitrary limitations in this case.

EXAMPLES:

sage: Modules(ZZ)
Category of modules over Integer Ring
sage: Modules(QQ)
Category of vector spaces over Rational Field

sage: Modules(Rings())
Category of modules over rings
sage: Modules(FiniteFields())
Category of vector spaces over finite enumerated fields

sage: Modules(Integers(9))
Category of modules over Ring of integers modulo 9

sage: Modules(Integers(9)).super_categories()
[Category of bimodules over Ring of integers modulo 9 on the left and Ring of integers modulo 9 on the right]

sage: Modules(ZZ).super_categories()
[Category of bimodules over Integer Ring on the left and Integer Ring on the right]

sage: Modules == RingModules
True

sage: Modules(ZZ['x']).is_abelian()   # see #6081
True

Todo

  • Clarify the distinction, if any, with BiModules(R, R). In particular, if \(R\) is a commutative ring (e.g. a field), some pieces of the code possibly assume that \(M\) is a symmetric `R`-`R`-bimodule:

    \[r*x = x*r \qquad \forall r \in R \text{ and } x \in M\]
  • Make sure that non symmetric modules are properly supported by all the code, and advertise it.

  • Make sure that non commutative rings are properly supported by all the code, and advertise it.

  • Add support for base semirings.

  • Implement a FreeModules(R) category, when so prompted by a concrete use case: e.g. modeling a free module with several bases (using Sets.SubcategoryMethods.Realizations()) or with an atlas of local maps (see e.g. trac ticket #15916).