This package is for ordinal numbers. Ordered numbers are a concept from set theory that extends the natural numbers to compare the "length" of aligned sets. This library implements ordered numbers: sum, difference (left-hand inverse), product, quotient (left-hand inverse), truncation, division, remainder, comparison of sizes, square root, etc. If I have enough power, I will also create "log", "n-square root" and "factorial". If requested, I will make others. (my Email:alphagameplayerpro$gmail.com (please replace $ to @))
And,
```
omega = ordinal_number.OMEGA
```
at the beginning of the program. That way, it is intuitive and the output of repr() can be executed as is.
References
http://www.behounek.online/logic/papers/ordcalc/index.html
https://proofwiki.org/wiki/Division_Theorem_for_Ordinals#Existence_of_%7F'%22%60UNIQ-MathJax-9-QINU%60%22'%7F_and_%7F'%22%60UNIQ- MathJax-10-QINU%60%22'%7F
https://manabitimes.jp/math/1318 (Japanese site)
examples
improt ordinal-number as ord
omega = ord.OMEGA
#__add__
omega+1+omega+omega+1
#>>> omega*2+1
#__sub__ A-B := (X such that B+X=A) if not exists, return None
(omrga**2*2+omega*2+1)-omega**2
#>>> omega**2+omega*2+1
(omega*2+1)-omega**2
#>>> None
#__mul__
(omega+1)*(omega+1)
#>>> omega**2+omega+1
#__truediv__ A/B := (X such that B*X=A) if not exists, return None
(omega**2+omega+1)/(omega+1)
#>>> omega+1
(omega**2+omega+1)/omega
#>>> None
#__floordiv__ A//B := (X such that B*X+Y=A ,0<=Y<B)
(omega**2+omega+1)//(omega+1)
#>>> omega+1
(omega**2+omega+1)//omega
#>>> omega+1
#__truediv__ A%B := (Y such that B*X+Y=A ,0<=Y<B)
(omega**2+omega+1)%(omega+1)
#>>> 0
(omega**2+omega+1)%omega
#>>> 1
#__pow__
(omega+1)**2
#>>> omega**2+omega+1
2**omega
#>>> omega
omega**2
#>>> omega
#sqrt(self)
(omega**2+omega+1).sqrt()
#>>> omega+1
Metadata
Release files for ordinal-number 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ordinal_number-0.2.tar.gz | 5.3 kB | Without provenance | Details for ordinal_number-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ordinal_number-0.2-py3-none-any.whl | Python 3 | none | any | Details for ordinal_number-0.2-py3-none-any.whl |
Total release size: 10.6 kB
Release files / ordinal_number-0.2.tar.gz
| Download URL | ordinal_number-0.2.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3542d20d4f1513c1f86d585aaef35003c045ec955d690525cd3ef681c3ef23b
|
|
BLAKE2b-256 checksum How to use checksums |
971d09eb4c581582bbe1e48377885f98b65e7519ecac03f06be3f97e82f16b00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Release files / ordinal_number-0.2-py3-none-any.whl
| Download URL | ordinal_number-0.2-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a17b454bef3b255d0ef2a0dfa3b1da938c544d6cd128da70e891517ae390f92
|
|
BLAKE2b-256 checksum How to use checksums |
d259b3132450577f8596ffae8c6579d4262ddcf5216021ec55d3020c98f89982
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.2
|
Security for ordinal-number 0.2
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.