Ask Your Question
1

View source code of "Modules"

asked 2018-07-08 08:33:49 -0600

yoyostein gravatar image

How do I view the source code of "Modules" (those additional packages/functions that are written by users)?

To explain in detail, for example I want to know how a function .basis() or .rank() works. How do I check out the source code?

Thanks a lot.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-07-08 10:29:37 -0600

vdelecroix gravatar image

To check the source code, use ?? as in

sage: Modules??
Init signature: Modules(self, base, name=None)
Source:        
class Modules(Category_module):
    r"""
    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:

    .. MATH::

        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::
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-07-08 08:33:49 -0600

Seen: 36 times

Last updated: Jul 08