sublation 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sublation-0.1.0/LICENSE +21 -0
- sublation-0.1.0/MANIFEST.in +4 -0
- sublation-0.1.0/PKG-INFO +135 -0
- sublation-0.1.0/README.md +77 -0
- sublation-0.1.0/requirements.txt +33 -0
- sublation-0.1.0/setup.cfg +47 -0
- sublation-0.1.0/setup.py +3 -0
- sublation-0.1.0/src/sublation/__init__.py +4 -0
- sublation-0.1.0/src/sublation/core.py +61 -0
- sublation-0.1.0/src/sublation/py.typed +0 -0
- sublation-0.1.0/src/sublation.egg-info/PKG-INFO +135 -0
- sublation-0.1.0/src/sublation.egg-info/SOURCES.txt +15 -0
- sublation-0.1.0/src/sublation.egg-info/dependency_links.txt +1 -0
- sublation-0.1.0/src/sublation.egg-info/requires.txt +38 -0
- sublation-0.1.0/src/sublation.egg-info/top_level.txt +1 -0
- sublation-0.1.0/tests/test_core.py +34 -0
sublation-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Germano Castanho
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
sublation-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sublation
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Non-boolean truth structures for dialectical reasoning, an alternative to boolean binarism, inspired by Hegelian logic.
|
|
5
|
+
Home-page: https://github.com/germanocastanho/sublation-package
|
|
6
|
+
Author: Germano Castanho
|
|
7
|
+
Author-email: germanocastanho@proton.me
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: build==1.5.0
|
|
21
|
+
Requires-Dist: certifi==2026.6.17
|
|
22
|
+
Requires-Dist: cffi==2.1.0
|
|
23
|
+
Requires-Dist: charset-normalizer==3.4.9
|
|
24
|
+
Requires-Dist: cryptography==49.0.0
|
|
25
|
+
Requires-Dist: docutils==0.23
|
|
26
|
+
Requires-Dist: id==1.6.1
|
|
27
|
+
Requires-Dist: idna==3.18
|
|
28
|
+
Requires-Dist: iniconfig==2.3.0
|
|
29
|
+
Requires-Dist: jaraco-classes==3.4.0
|
|
30
|
+
Requires-Dist: jaraco-context==6.1.2
|
|
31
|
+
Requires-Dist: jaraco-functools==4.6.0
|
|
32
|
+
Requires-Dist: jeepney==0.9.0
|
|
33
|
+
Requires-Dist: keyring==25.7.0
|
|
34
|
+
Requires-Dist: markdown-it-py==4.2.0
|
|
35
|
+
Requires-Dist: mdurl==0.1.2
|
|
36
|
+
Requires-Dist: more-itertools==11.1.0
|
|
37
|
+
Requires-Dist: nh3==0.3.6
|
|
38
|
+
Requires-Dist: packaging==26.2
|
|
39
|
+
Requires-Dist: pluggy==1.6.0
|
|
40
|
+
Requires-Dist: pycparser==3.0
|
|
41
|
+
Requires-Dist: pygments==2.20.0
|
|
42
|
+
Requires-Dist: pyproject-hooks==1.2.0
|
|
43
|
+
Requires-Dist: pytest==9.1.1
|
|
44
|
+
Requires-Dist: readme-renderer==45.0
|
|
45
|
+
Requires-Dist: requests==2.34.2
|
|
46
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
47
|
+
Requires-Dist: rfc3986==2.0.0
|
|
48
|
+
Requires-Dist: rich==15.0.0
|
|
49
|
+
Requires-Dist: secretstorage==3.5.0
|
|
50
|
+
Requires-Dist: setuptools==83.0.0
|
|
51
|
+
Requires-Dist: twine==6.2.0
|
|
52
|
+
Requires-Dist: urllib3==2.7.0
|
|
53
|
+
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
55
|
+
Requires-Dist: build; extra == "dev"
|
|
56
|
+
Requires-Dist: twine; extra == "dev"
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
# 🧠 Sublation
|
|
60
|
+
|
|
61
|
+
Classical boolean logic forces every proposition into exactly one of two states. That works well for most software, but it can't represent situations where a claim and its negation are both partially warranted, or where neither is warranted yet. As a solution, `Sublation` models truth as a relationship between a **thesis** and an **antithesis**, and derives a **synthesis** from how they interact — allowing states like contradiction and becoming to be detected rather than defined away.
|
|
62
|
+
|
|
63
|
+
# ✨ Main Features
|
|
64
|
+
|
|
65
|
+
- **Thesis** and **Antithesis** classes to represent claims and their negations.
|
|
66
|
+
- **Synthesis** class to represent the interaction between a thesis and an antithesis.
|
|
67
|
+
- Methods to detect **negation**, **contradiction**, **becoming**, and **sublation**.
|
|
68
|
+
|
|
69
|
+
# ✅ Prerequisites
|
|
70
|
+
|
|
71
|
+
- Python 3.12+ installed on your machine
|
|
72
|
+
- Astral Uv package manager (optional)
|
|
73
|
+
- Dependencies listed in `requirements.txt`
|
|
74
|
+
|
|
75
|
+
# ⚙️ Installation
|
|
76
|
+
|
|
77
|
+
### For regular use:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Clone the repository
|
|
81
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
82
|
+
cd sublation-package/
|
|
83
|
+
|
|
84
|
+
# Create a venv (optional)
|
|
85
|
+
python3 -m venv .venv
|
|
86
|
+
source .venv/bin/activate
|
|
87
|
+
|
|
88
|
+
# Install dependencies
|
|
89
|
+
pip install -r requirements.txt
|
|
90
|
+
|
|
91
|
+
# Install sublation package
|
|
92
|
+
pip install -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### For development:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Clone the repository
|
|
99
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
100
|
+
cd sublation-package/
|
|
101
|
+
|
|
102
|
+
# Create a venv (optional)
|
|
103
|
+
python3 -m venv .venv
|
|
104
|
+
source .venv/bin/activate
|
|
105
|
+
|
|
106
|
+
# Install dependencies
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
|
|
109
|
+
# Install sublation package
|
|
110
|
+
pip install -e ".[dev]"
|
|
111
|
+
|
|
112
|
+
# Run full test suite
|
|
113
|
+
pytest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
# 🚀 Quick Start
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from sublation import Thesis, Antithesis, Synthesis
|
|
120
|
+
|
|
121
|
+
t = Thesis(True)
|
|
122
|
+
a = Antithesis(True)
|
|
123
|
+
s = Synthesis(t, a)
|
|
124
|
+
|
|
125
|
+
s.contradiction() # True — the tension is real and detectable
|
|
126
|
+
s.becoming() # False — this is not a quiet resolution
|
|
127
|
+
s.sublation() # True — it doesn't collapse into falsehood
|
|
128
|
+
|
|
129
|
+
# The next round
|
|
130
|
+
t2 = s.as_thesis()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
# 📜 Libre Software
|
|
134
|
+
|
|
135
|
+
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. This project is licensed under the MIT License. You are free to use, modify, and distribute this software. For more information, please refer to the [LICENSE](LICENSE) file.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# 🧠 Sublation
|
|
2
|
+
|
|
3
|
+
Classical boolean logic forces every proposition into exactly one of two states. That works well for most software, but it can't represent situations where a claim and its negation are both partially warranted, or where neither is warranted yet. As a solution, `Sublation` models truth as a relationship between a **thesis** and an **antithesis**, and derives a **synthesis** from how they interact — allowing states like contradiction and becoming to be detected rather than defined away.
|
|
4
|
+
|
|
5
|
+
# ✨ Main Features
|
|
6
|
+
|
|
7
|
+
- **Thesis** and **Antithesis** classes to represent claims and their negations.
|
|
8
|
+
- **Synthesis** class to represent the interaction between a thesis and an antithesis.
|
|
9
|
+
- Methods to detect **negation**, **contradiction**, **becoming**, and **sublation**.
|
|
10
|
+
|
|
11
|
+
# ✅ Prerequisites
|
|
12
|
+
|
|
13
|
+
- Python 3.12+ installed on your machine
|
|
14
|
+
- Astral Uv package manager (optional)
|
|
15
|
+
- Dependencies listed in `requirements.txt`
|
|
16
|
+
|
|
17
|
+
# ⚙️ Installation
|
|
18
|
+
|
|
19
|
+
### For regular use:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Clone the repository
|
|
23
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
24
|
+
cd sublation-package/
|
|
25
|
+
|
|
26
|
+
# Create a venv (optional)
|
|
27
|
+
python3 -m venv .venv
|
|
28
|
+
source .venv/bin/activate
|
|
29
|
+
|
|
30
|
+
# Install dependencies
|
|
31
|
+
pip install -r requirements.txt
|
|
32
|
+
|
|
33
|
+
# Install sublation package
|
|
34
|
+
pip install -e .
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### For development:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
# Clone the repository
|
|
41
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
42
|
+
cd sublation-package/
|
|
43
|
+
|
|
44
|
+
# Create a venv (optional)
|
|
45
|
+
python3 -m venv .venv
|
|
46
|
+
source .venv/bin/activate
|
|
47
|
+
|
|
48
|
+
# Install dependencies
|
|
49
|
+
pip install -r requirements.txt
|
|
50
|
+
|
|
51
|
+
# Install sublation package
|
|
52
|
+
pip install -e ".[dev]"
|
|
53
|
+
|
|
54
|
+
# Run full test suite
|
|
55
|
+
pytest
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
# 🚀 Quick Start
|
|
59
|
+
|
|
60
|
+
```python
|
|
61
|
+
from sublation import Thesis, Antithesis, Synthesis
|
|
62
|
+
|
|
63
|
+
t = Thesis(True)
|
|
64
|
+
a = Antithesis(True)
|
|
65
|
+
s = Synthesis(t, a)
|
|
66
|
+
|
|
67
|
+
s.contradiction() # True — the tension is real and detectable
|
|
68
|
+
s.becoming() # False — this is not a quiet resolution
|
|
69
|
+
s.sublation() # True — it doesn't collapse into falsehood
|
|
70
|
+
|
|
71
|
+
# The next round
|
|
72
|
+
t2 = s.as_thesis()
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
# 📜 Libre Software
|
|
76
|
+
|
|
77
|
+
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. This project is licensed under the MIT License. You are free to use, modify, and distribute this software. For more information, please refer to the [LICENSE](LICENSE) file.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
build==1.5.0
|
|
2
|
+
certifi==2026.6.17
|
|
3
|
+
cffi==2.1.0
|
|
4
|
+
charset-normalizer==3.4.9
|
|
5
|
+
cryptography==49.0.0
|
|
6
|
+
docutils==0.23
|
|
7
|
+
id==1.6.1
|
|
8
|
+
idna==3.18
|
|
9
|
+
iniconfig==2.3.0
|
|
10
|
+
jaraco-classes==3.4.0
|
|
11
|
+
jaraco-context==6.1.2
|
|
12
|
+
jaraco-functools==4.6.0
|
|
13
|
+
jeepney==0.9.0
|
|
14
|
+
keyring==25.7.0
|
|
15
|
+
markdown-it-py==4.2.0
|
|
16
|
+
mdurl==0.1.2
|
|
17
|
+
more-itertools==11.1.0
|
|
18
|
+
nh3==0.3.6
|
|
19
|
+
packaging==26.2
|
|
20
|
+
pluggy==1.6.0
|
|
21
|
+
pycparser==3.0
|
|
22
|
+
pygments==2.20.0
|
|
23
|
+
pyproject-hooks==1.2.0
|
|
24
|
+
pytest==9.1.1
|
|
25
|
+
readme-renderer==45.0
|
|
26
|
+
requests==2.34.2
|
|
27
|
+
requests-toolbelt==1.0.0
|
|
28
|
+
rfc3986==2.0.0
|
|
29
|
+
rich==15.0.0
|
|
30
|
+
secretstorage==3.5.0
|
|
31
|
+
setuptools==83.0.0
|
|
32
|
+
twine==6.2.0
|
|
33
|
+
urllib3==2.7.0
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
[metadata]
|
|
2
|
+
name = sublation
|
|
3
|
+
version = 0.1.0
|
|
4
|
+
description = Non-boolean truth structures for dialectical reasoning, an alternative to boolean binarism, inspired by Hegelian logic.
|
|
5
|
+
long_description = file: README.md
|
|
6
|
+
long_description_content_type = text/markdown
|
|
7
|
+
author = Germano Castanho
|
|
8
|
+
author_email = germanocastanho@proton.me
|
|
9
|
+
url = https://github.com/germanocastanho/sublation-package
|
|
10
|
+
license = MIT
|
|
11
|
+
license_files = LICENSE
|
|
12
|
+
classifiers =
|
|
13
|
+
Development Status :: 3 - Alpha
|
|
14
|
+
Intended Audience :: Science/Research
|
|
15
|
+
License :: OSI Approved :: MIT License
|
|
16
|
+
Programming Language :: Python :: 3
|
|
17
|
+
Programming Language :: Python :: 3.12
|
|
18
|
+
Programming Language :: Python :: 3.13
|
|
19
|
+
Programming Language :: Python :: 3.14
|
|
20
|
+
Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
21
|
+
|
|
22
|
+
[options]
|
|
23
|
+
package_dir =
|
|
24
|
+
= src
|
|
25
|
+
packages = find:
|
|
26
|
+
python_requires = >=3.12
|
|
27
|
+
install_requires = file: requirements.txt
|
|
28
|
+
|
|
29
|
+
[options.packages.find]
|
|
30
|
+
where = src
|
|
31
|
+
exclude =
|
|
32
|
+
tests
|
|
33
|
+
tests.*
|
|
34
|
+
|
|
35
|
+
[options.package_data]
|
|
36
|
+
sublation = py.typed
|
|
37
|
+
|
|
38
|
+
[options.extras_require]
|
|
39
|
+
dev =
|
|
40
|
+
pytest>=7.0
|
|
41
|
+
build
|
|
42
|
+
twine
|
|
43
|
+
|
|
44
|
+
[egg_info]
|
|
45
|
+
tag_build =
|
|
46
|
+
tag_date = 0
|
|
47
|
+
|
sublation-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from typing import Optional
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Thesis:
|
|
5
|
+
def __init__(self, thesis: bool = True, antithesis: Optional[bool] = None):
|
|
6
|
+
self.thesis = thesis
|
|
7
|
+
self.antithesis = (not thesis) if antithesis is None else antithesis
|
|
8
|
+
self.synthesis = None
|
|
9
|
+
|
|
10
|
+
def negation(self) -> bool:
|
|
11
|
+
return not self.thesis
|
|
12
|
+
|
|
13
|
+
def contradiction(self) -> bool:
|
|
14
|
+
return self.thesis and self.antithesis
|
|
15
|
+
|
|
16
|
+
def becoming(self) -> bool:
|
|
17
|
+
return self.thesis and not self.antithesis
|
|
18
|
+
|
|
19
|
+
def sublation(self) -> bool:
|
|
20
|
+
return self.thesis or self.antithesis
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Antithesis:
|
|
24
|
+
def __init__(self, antithesis: bool = False, thesis: Optional[bool] = None):
|
|
25
|
+
self.antithesis = antithesis
|
|
26
|
+
self.thesis = (not antithesis) if thesis is None else thesis
|
|
27
|
+
self.synthesis = None
|
|
28
|
+
|
|
29
|
+
def negation(self) -> bool:
|
|
30
|
+
return not self.antithesis
|
|
31
|
+
|
|
32
|
+
def contradiction(self) -> bool:
|
|
33
|
+
return self.antithesis and self.thesis
|
|
34
|
+
|
|
35
|
+
def becoming(self) -> bool:
|
|
36
|
+
return self.antithesis and not self.thesis
|
|
37
|
+
|
|
38
|
+
def sublation(self) -> bool:
|
|
39
|
+
return self.thesis or self.antithesis
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Synthesis:
|
|
43
|
+
def __init__(self, thesis: Thesis, antithesis: Antithesis):
|
|
44
|
+
self.thesis = thesis.thesis
|
|
45
|
+
self.antithesis = antithesis.antithesis
|
|
46
|
+
self.synthesis = self.sublation()
|
|
47
|
+
|
|
48
|
+
def negation(self) -> bool:
|
|
49
|
+
return not self.thesis
|
|
50
|
+
|
|
51
|
+
def contradiction(self) -> bool:
|
|
52
|
+
return self.thesis and self.antithesis
|
|
53
|
+
|
|
54
|
+
def becoming(self) -> bool:
|
|
55
|
+
return self.thesis and not self.antithesis
|
|
56
|
+
|
|
57
|
+
def sublation(self) -> bool:
|
|
58
|
+
return self.thesis or self.antithesis
|
|
59
|
+
|
|
60
|
+
def as_thesis(self) -> Thesis:
|
|
61
|
+
return Thesis(thesis=self.thesis, antithesis=self.antithesis)
|
|
File without changes
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sublation
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Non-boolean truth structures for dialectical reasoning, an alternative to boolean binarism, inspired by Hegelian logic.
|
|
5
|
+
Home-page: https://github.com/germanocastanho/sublation-package
|
|
6
|
+
Author: Germano Castanho
|
|
7
|
+
Author-email: germanocastanho@proton.me
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: build==1.5.0
|
|
21
|
+
Requires-Dist: certifi==2026.6.17
|
|
22
|
+
Requires-Dist: cffi==2.1.0
|
|
23
|
+
Requires-Dist: charset-normalizer==3.4.9
|
|
24
|
+
Requires-Dist: cryptography==49.0.0
|
|
25
|
+
Requires-Dist: docutils==0.23
|
|
26
|
+
Requires-Dist: id==1.6.1
|
|
27
|
+
Requires-Dist: idna==3.18
|
|
28
|
+
Requires-Dist: iniconfig==2.3.0
|
|
29
|
+
Requires-Dist: jaraco-classes==3.4.0
|
|
30
|
+
Requires-Dist: jaraco-context==6.1.2
|
|
31
|
+
Requires-Dist: jaraco-functools==4.6.0
|
|
32
|
+
Requires-Dist: jeepney==0.9.0
|
|
33
|
+
Requires-Dist: keyring==25.7.0
|
|
34
|
+
Requires-Dist: markdown-it-py==4.2.0
|
|
35
|
+
Requires-Dist: mdurl==0.1.2
|
|
36
|
+
Requires-Dist: more-itertools==11.1.0
|
|
37
|
+
Requires-Dist: nh3==0.3.6
|
|
38
|
+
Requires-Dist: packaging==26.2
|
|
39
|
+
Requires-Dist: pluggy==1.6.0
|
|
40
|
+
Requires-Dist: pycparser==3.0
|
|
41
|
+
Requires-Dist: pygments==2.20.0
|
|
42
|
+
Requires-Dist: pyproject-hooks==1.2.0
|
|
43
|
+
Requires-Dist: pytest==9.1.1
|
|
44
|
+
Requires-Dist: readme-renderer==45.0
|
|
45
|
+
Requires-Dist: requests==2.34.2
|
|
46
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
47
|
+
Requires-Dist: rfc3986==2.0.0
|
|
48
|
+
Requires-Dist: rich==15.0.0
|
|
49
|
+
Requires-Dist: secretstorage==3.5.0
|
|
50
|
+
Requires-Dist: setuptools==83.0.0
|
|
51
|
+
Requires-Dist: twine==6.2.0
|
|
52
|
+
Requires-Dist: urllib3==2.7.0
|
|
53
|
+
Provides-Extra: dev
|
|
54
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
55
|
+
Requires-Dist: build; extra == "dev"
|
|
56
|
+
Requires-Dist: twine; extra == "dev"
|
|
57
|
+
Dynamic: license-file
|
|
58
|
+
|
|
59
|
+
# 🧠 Sublation
|
|
60
|
+
|
|
61
|
+
Classical boolean logic forces every proposition into exactly one of two states. That works well for most software, but it can't represent situations where a claim and its negation are both partially warranted, or where neither is warranted yet. As a solution, `Sublation` models truth as a relationship between a **thesis** and an **antithesis**, and derives a **synthesis** from how they interact — allowing states like contradiction and becoming to be detected rather than defined away.
|
|
62
|
+
|
|
63
|
+
# ✨ Main Features
|
|
64
|
+
|
|
65
|
+
- **Thesis** and **Antithesis** classes to represent claims and their negations.
|
|
66
|
+
- **Synthesis** class to represent the interaction between a thesis and an antithesis.
|
|
67
|
+
- Methods to detect **negation**, **contradiction**, **becoming**, and **sublation**.
|
|
68
|
+
|
|
69
|
+
# ✅ Prerequisites
|
|
70
|
+
|
|
71
|
+
- Python 3.12+ installed on your machine
|
|
72
|
+
- Astral Uv package manager (optional)
|
|
73
|
+
- Dependencies listed in `requirements.txt`
|
|
74
|
+
|
|
75
|
+
# ⚙️ Installation
|
|
76
|
+
|
|
77
|
+
### For regular use:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Clone the repository
|
|
81
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
82
|
+
cd sublation-package/
|
|
83
|
+
|
|
84
|
+
# Create a venv (optional)
|
|
85
|
+
python3 -m venv .venv
|
|
86
|
+
source .venv/bin/activate
|
|
87
|
+
|
|
88
|
+
# Install dependencies
|
|
89
|
+
pip install -r requirements.txt
|
|
90
|
+
|
|
91
|
+
# Install sublation package
|
|
92
|
+
pip install -e .
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### For development:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
# Clone the repository
|
|
99
|
+
git clone https://github.com/germanocastanho/sublation-package
|
|
100
|
+
cd sublation-package/
|
|
101
|
+
|
|
102
|
+
# Create a venv (optional)
|
|
103
|
+
python3 -m venv .venv
|
|
104
|
+
source .venv/bin/activate
|
|
105
|
+
|
|
106
|
+
# Install dependencies
|
|
107
|
+
pip install -r requirements.txt
|
|
108
|
+
|
|
109
|
+
# Install sublation package
|
|
110
|
+
pip install -e ".[dev]"
|
|
111
|
+
|
|
112
|
+
# Run full test suite
|
|
113
|
+
pytest
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
# 🚀 Quick Start
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
from sublation import Thesis, Antithesis, Synthesis
|
|
120
|
+
|
|
121
|
+
t = Thesis(True)
|
|
122
|
+
a = Antithesis(True)
|
|
123
|
+
s = Synthesis(t, a)
|
|
124
|
+
|
|
125
|
+
s.contradiction() # True — the tension is real and detectable
|
|
126
|
+
s.becoming() # False — this is not a quiet resolution
|
|
127
|
+
s.sublation() # True — it doesn't collapse into falsehood
|
|
128
|
+
|
|
129
|
+
# The next round
|
|
130
|
+
t2 = s.as_thesis()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
# 📜 Libre Software
|
|
134
|
+
|
|
135
|
+
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. This project is licensed under the MIT License. You are free to use, modify, and distribute this software. For more information, please refer to the [LICENSE](LICENSE) file.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
requirements.txt
|
|
5
|
+
setup.cfg
|
|
6
|
+
setup.py
|
|
7
|
+
src/sublation/__init__.py
|
|
8
|
+
src/sublation/core.py
|
|
9
|
+
src/sublation/py.typed
|
|
10
|
+
src/sublation.egg-info/PKG-INFO
|
|
11
|
+
src/sublation.egg-info/SOURCES.txt
|
|
12
|
+
src/sublation.egg-info/dependency_links.txt
|
|
13
|
+
src/sublation.egg-info/requires.txt
|
|
14
|
+
src/sublation.egg-info/top_level.txt
|
|
15
|
+
tests/test_core.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
build==1.5.0
|
|
2
|
+
certifi==2026.6.17
|
|
3
|
+
cffi==2.1.0
|
|
4
|
+
charset-normalizer==3.4.9
|
|
5
|
+
cryptography==49.0.0
|
|
6
|
+
docutils==0.23
|
|
7
|
+
id==1.6.1
|
|
8
|
+
idna==3.18
|
|
9
|
+
iniconfig==2.3.0
|
|
10
|
+
jaraco-classes==3.4.0
|
|
11
|
+
jaraco-context==6.1.2
|
|
12
|
+
jaraco-functools==4.6.0
|
|
13
|
+
jeepney==0.9.0
|
|
14
|
+
keyring==25.7.0
|
|
15
|
+
markdown-it-py==4.2.0
|
|
16
|
+
mdurl==0.1.2
|
|
17
|
+
more-itertools==11.1.0
|
|
18
|
+
nh3==0.3.6
|
|
19
|
+
packaging==26.2
|
|
20
|
+
pluggy==1.6.0
|
|
21
|
+
pycparser==3.0
|
|
22
|
+
pygments==2.20.0
|
|
23
|
+
pyproject-hooks==1.2.0
|
|
24
|
+
pytest==9.1.1
|
|
25
|
+
readme-renderer==45.0
|
|
26
|
+
requests==2.34.2
|
|
27
|
+
requests-toolbelt==1.0.0
|
|
28
|
+
rfc3986==2.0.0
|
|
29
|
+
rich==15.0.0
|
|
30
|
+
secretstorage==3.5.0
|
|
31
|
+
setuptools==83.0.0
|
|
32
|
+
twine==6.2.0
|
|
33
|
+
urllib3==2.7.0
|
|
34
|
+
|
|
35
|
+
[dev]
|
|
36
|
+
pytest>=7.0
|
|
37
|
+
build
|
|
38
|
+
twine
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
sublation
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from sublation import Antithesis, Synthesis, Thesis
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_matches_original_signature_defaults():
|
|
5
|
+
assert Thesis().thesis is True
|
|
6
|
+
assert Thesis().antithesis is False
|
|
7
|
+
assert Antithesis().thesis is True
|
|
8
|
+
assert Antithesis().antithesis is False
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_contradiction_is_detectable():
|
|
12
|
+
t = Thesis(True)
|
|
13
|
+
a = Antithesis(True)
|
|
14
|
+
s = Synthesis(t, a)
|
|
15
|
+
assert s.contradiction() is True
|
|
16
|
+
assert s.becoming() is False
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def test_empty_antithesis_resolves_without_tension():
|
|
20
|
+
t = Thesis(True)
|
|
21
|
+
a = Antithesis(False)
|
|
22
|
+
s = Synthesis(t, a)
|
|
23
|
+
assert s.contradiction() is False
|
|
24
|
+
assert s.becoming() is True
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def test_synthesis_chains_into_new_thesis():
|
|
28
|
+
t1 = Thesis(True)
|
|
29
|
+
a1 = Antithesis(False)
|
|
30
|
+
s1 = Synthesis(t1, a1)
|
|
31
|
+
t2 = s1.as_thesis()
|
|
32
|
+
assert isinstance(t2, Thesis)
|
|
33
|
+
assert t2.thesis == s1.thesis
|
|
34
|
+
assert t2.antithesis == s1.antithesis
|