Dialectic
Mathematical logic implementation using python.
Install
pip install dialectic
Usage
from dialectic import Atomic
a = Atomic('a')
b = Atomic('b')
invert = ~a
conjunction = (a & b)
disjunction = (a | b)
implication = (a > b)
equality = (a == b)
implication.validate({a, b})
from dialectic import parse_sentences
parsed_set = parse_sentences([implication, a])
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()