Metadata-Version: 2.1
Name: pyZFC
Version: 0.2.0
Summary: (ZFC) set-theoretic definition of natural numbers.
Author-email: Yuanhao 'Nyoeghau' Chen <nyoeghau@nyoeghau.com>
License: # MIT License        
        Copyright (c) 2022 Yuanhao Chen <nyoeghau@nyoeghau.com>        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.        
Project-URL: Homepage, https://github.com/edward-martyr/ZFC
Project-URL: Source, https://github.com/edward-martyr/ZFC
Project-URL: Bug Tracker, https://github.com/edward-martyr/ZFC/issues
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Development Status :: 3 - Alpha
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: lint
Requires-Dist: black (==22.6.0) ; extra == 'lint'
Requires-Dist: flake8 (==4.0.1) ; extra == 'lint'
Requires-Dist: isort (==5.10.1) ; extra == 'lint'
Requires-Dist: mypy (==0.971) ; extra == 'lint'
Provides-Extra: unittest
Requires-Dist: coverage[toml] ; extra == 'unittest'

# ZFC: set-theoretic definition of natural numbers in Python

<p align="center">
    <a href="https://github.com/edward-martyr/ZFC/actions?query=workflow%3Abuild"><img src="https://github.com/edward-martyr/ZFC/workflows/build/badge.svg?branch=master" alt="build"></a>
    <a href="https://github.com/edward-martyr/ZFC/actions?query=workflow%3Alint"><img src="https://github.com/edward-martyr/ZFC/workflows/lint/badge.svg?branch=master" alt="lint"></a>
    <a href="https://codecov.io/gh/edward-martyr/ZFC"><img src="https://img.shields.io/codecov/c/github/edward-martyr/ZFC?token=WZSLMLQV72" alt="coverage"></a>
</p>
<p align="center">
    <a href="https://pypi.org/project/pyZFC/"><img src="https://img.shields.io/pypi/v/pyZFC.svg" alt="pypi"></a>
    <a href="https://img.shields.io/pypi/pyversions/pyZFC"><img src="https://img.shields.io/pypi/pyversions/pyZFC" alt="support-version"></a>
    <a href="https://github.com/edward-martyr/ZFC/blob/master/LICENSE.txt"><img src="https://img.shields.io/github/license/edward-martyr/ZFC" alt="license"></a>
    <a href="https://github.com/edward-martyr/ZFC/commits/master"><img src="https://img.shields.io/github/last-commit/edward-martyr/ZFC" alt="commit"></a>
</p>

## Installation

```shell
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.,

```math
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.

```Python console
>>> 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.
```
