Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.96 KB

README.md

File metadata and controls

35 lines (21 loc) · 1.96 KB

transfinite

PyPI version

Transfinite ordinal arithmetic and factorisation up to the first epsilon number.

Installation

Works with Python 3. Can be installed via pip using:

pip install transfinite

Usage

For a basic introduction to ordinal arithmetic, look at Wikipedia or see the notebook here.

Here's a quick demonstration of the library in Jupyter's qtconsole (note that the variable w is the first transfinite number). First, some ordinal arithmetic:

alt tag

The Ordinal class implements several methods which can be used to check properties of the ordinal:

Ordinal factorisation into prime ordinals is also implemented. Any composite ordinal a can be written as a product of two or more prime ordinals less than a:

alt tag

Note that finite ordinals are not factorised using this method.