Skip to main content

ZFC: set-theoretic definition of natural numbers in Python

build lint coverage

pypi support-version license commit

Installation

pip install pyZFC

Introduction and examples

NaturalNumber is the class of natural numbers defined as von Neumann ordinals in the ZFC set theory.

0 is defined as the empty set {}, and the rest of the natural numbers are defined recursively as n + 1 = n ∪ {n}, i.e.,

0 = {},
1 = {0},
2 = {0, 1},
3 = {0, 1, 2},
...

Following the definition, you can do all kinds of set operations on natural numbers, e.g., checking whether a NaturalNumber contains another.

>>> from zfc import NaturalNumber

>>> NaturalNumber(1) in NaturalNumber(2)
True

>>> NaturalNumber(1) & NaturalNumber(2)
1  # the intersection of 1={0} and 2={0,1} is {0}, which is exactly 1.

Metadata

Release files for pyZFC 0.2.0

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

Source distribution (sdist)

Source distribution for pyZFC 0.2.0
File Size Uploaded Provenance Actions
pyZFC-0.2.0.tar.gz 6.7 kB Without provenance Details for pyZFC-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 12.1 kB

Release files / pyZFC-0.2.0.tar.gz

Download URL pyZFC-0.2.0.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
26664b32643f681393c595062d69919e8d2ef5de55cc68b4a69eeddf30f0147e
BLAKE2b-256 checksum
How to use checksums
5ee3ed3419b75adacde5557daa2960f0e1a6121e4760d73d5a1319b8861c8545
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Release files / pyZFC-0.2.0-py3-none-any.whl

Download URL pyZFC-0.2.0-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3663de07afbd0c67baa5c1f807c51f98830b9ddf6b694de1521b7f58c1220eca
BLAKE2b-256 checksum
How to use checksums
5808036477e81b7a1b8012b8b2c153ea357e1028a63fede0b9e08380a7be7ffe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for pyZFC 0.2.0

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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

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