Mathematical Logic
Project description
Dialectic
Mathematical logic implementation using python.
Install
pip install dialectic
Usage
from dialectic import Atomic
# Atomic objects
a = Atomic('a')
b = Atomic('b')
# Invert
invert = ~a
# Conjunction
conjunction = (a & b)
# Disjunction
disjunction = (a | b)
# Implication
implication = (a > b)
# Equality (iff)
equality = (a == b)
# Validation with given sentence set
implication.validate({a, b})
# Parsing a sentence list
from dialectic import parse_sentences
parsed_set = parse_sentences([implication, a])
# Inference
from dialectic import Inference
is_valid = Inference((a > b), [b]).is_valid_argument()
is_tautology = Inference((a | ~a)).is_tautology()
is_contradictory = Inference((a & ~a)).is_contradictory()
is_contingent = Inference((a & b)).is_contingent()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dialectic-0.3.2.tar.gz
(2.6 kB
view hashes)
Built Distribution
Close
Hashes for dialectic-0.3.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b4255b6332d92dd8ac2a6264df084acbc5aca40f21474ebd176c1384b770ca8 |
|
MD5 | c21d5c4fa41723f0ab30d4c36df2e651 |
|
BLAKE2b-256 | 6746c8a0a74eaff09cd363a19c7e5978d0f8f0a30887e167f30321cc3714d273 |