Skip to main content

About mod-table

mod-table prints the addition and multiplication tables for the ring of integers modulo n, denoted ℤ/nℤ - and ℤ/nℤ is a field if and only if n is prime.

Installing mod-table

    python3 -m pip install modTable --upgrade

It's recommended to install into a local venv, or if installing systemwide as the super-user to make a venv in /usr/local/venv, and install it there. For some helpful hints about how to do this see the addendum in the lsseq repo.

Testing mod-table

Running mod-table on the command line should show you this.

$ mod-table 5
ℤ/5ℤ
 + |  0  1  2  3  4 
--------------------
 0 |  0  1  2  3  4 
 1 |  1  2  3  4  0 
 2 |  2  3  4  0  1 
 3 |  3  4  0  1  2 
 4 |  4  0  1  2  3 

 * |  0  1  2  3  4 
--------------------
 0 |  0  0  0  0  0 
 1 |  0  1  2  3  4 
 2 |  0  2  4  1  3 
 3 |  0  3  1  4  2 
 4 |  0  4  3  2  1 

$ mod-table 6
ℤ/6ℤ
 + |  0  1  2  3  4  5 
-----------------------
 0 |  0  1  2  3  4  5 
 1 |  1  2  3  4  5  0 
 2 |  2  3  4  5  0  1 
 3 |  3  4  5  0  1  2 
 4 |  4  5  0  1  2  3 
 5 |  5  0  1  2  3  4 

 * |  0  1  2  3  4  5 
-----------------------
 0 |  0  0  0  0  0  0 
 1 |  0  1  2  3  4  5 
 2 |  0  2  4  0  2  4 
 3 |  0  3  0  3  0  3 
 4 |  0  4  2  0  4  2 
 5 |  0  5  4  3  2  1 

See how ℤ/6ℤ can't be a field because 2, 3 and 4 don't have multiplicative inverses. That is, there's no other number that when multiplied by 2, 3 or 4 gives 1.

But in ℤ/5ℤ all the non-zero numbers have multiplicative inverses, so it is a field!

Time to play - Enjoy!

Metadata

Release files for modTable 2.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modTable 2.0.1
File Size Uploaded Provenance Actions
modtable-2.0.1.tar.gz 4.3 kB Without provenance Details for modtable-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modTable 2.0.1
File Interpreter ABI Platform Actions
modTable-2.0.1-py3-none-any.whl Python 3 none any Details for modTable-2.0.1-py3-none-any.whl

Total release size: 9.7 kB

Release files / modtable-2.0.1.tar.gz

Download URL modtable-2.0.1.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
bb421060211bc5404aa0618ae4ac36d82267275267fe8f6495d66fb9fe8e1556
BLAKE2b-256 checksum
How to use checksums
4cb8f94465d506415b8597d3357e3f8aa124b4acdb5f358957118578225da754
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.20

Release files / modTable-2.0.1-py3-none-any.whl

Download URL modTable-2.0.1-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af0287cb7f26f74fb54ce23504286b1a6cea662ebd05e9adfaf774308ec49bba
BLAKE2b-256 checksum
How to use checksums
f41a4e48ccebed4737bf41e0e62c319d613ae68dd74eef122f65b9b9eaccfb53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.20

Security for modTable 2.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page