Metadata-Version: 2.4
Name: sublation
Version: 0.3.1
Summary: Non-boolean truth structures for dialectical reasoning, an alternative to boolean binarism, inspired by Hegelian logic.
Author-email: Germano Castanho <germanocastanho@proton.me>
License-Expression: MIT
Project-URL: Homepage, https://github.com/germanocastanho/sublation-lib
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: hypothesis>=6.0; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# 🧠 Sublation

Inspired by Hegel's dialectical logic, this library formalizes dialectical logic as a case of four-valued reasoning (true / false / contradictory / indeterminate), grounded in Belnap–Dunn logic (FDE) and the bilattice structure behind paraconsistent annotated logics such as Eτ.

# ✨ Main Features

- **Thesis** and **Antithesis** classes to represent claims and their negations.
- **Synthesis** class to represent the interaction between a thesis and an antithesis.
- Methods to detect **negation**, **contradiction**, **becoming**, and **sublation**.
- **TruthValue** class to represent evidence for (`mu`) and against (`lam`) a claim.

# ✅ Prerequisites

- Python 3.12+ installed on your machine
- No runtime dependencies; dev extras declared in `pyproject.toml`

# ⚙️ Local Installation

### For regular use:

```bash
# Clone the repository
git clone https://github.com/germanocastanho/sublation-lib
cd sublation-lib/

# Create a venv (optional)
python3 -m venv .venv
source .venv/bin/activate

# Install sublation package
pip install -e .
```

Or just `pip install sublation`!

### For development:

```bash
# Clone the repository
git clone https://github.com/germanocastanho/sublation-lib
cd sublation-lib/

# Create a venv (optional)
python3 -m venv .venv
source .venv/bin/activate

# Install sublation package with dev extras
pip install -e ".[dev]"

# Run full test suite
pytest
```

# 🚀 Getting Started

```python
from sublation import Thesis, Antithesis, Synthesis

t = Thesis(True)
a = Antithesis(True)
s = Synthesis(t, a)

s.contradiction()       # True  — the tension is real and detectable
s.becoming()            # False — this is not a quiet resolution
s.sublation()           # True  — it doesn't collapse into falsehood

# The next round
t2 = s.as_thesis()
```

# 📜 Libre Software

If you have ideas for improvements or new features, please open an issue or submit a pull request. Make sure to follow the existing code style and include tests for any new functionality. Licensed under the MIT License, so you are free to use, modify, and distribute this software. Please refer to the [LICENSE](LICENSE) for more!
