Skip to main content

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


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 details)

Uploaded Source

Built Distribution

dialectic-0.3.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file dialectic-0.3.2.tar.gz.

File metadata

  • Download URL: dialectic-0.3.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.4

File hashes

Hashes for dialectic-0.3.2.tar.gz
Algorithm Hash digest
SHA256 cd5e2e7bc1126f6e1a6aff862703bb47e226d620706520731582114b87b3c06a
MD5 1ffdaa6ccdf4db13bc662fc9da615025
BLAKE2b-256 a4abf15c34969769539de7fcf2e85de2722a62f7a102fbbf39ef121e42f0366e

See more details on using hashes here.

File details

Details for the file dialectic-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: dialectic-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.7.4

File hashes

Hashes for dialectic-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b4255b6332d92dd8ac2a6264df084acbc5aca40f21474ebd176c1384b770ca8
MD5 c21d5c4fa41723f0ab30d4c36df2e651
BLAKE2b-256 6746c8a0a74eaff09cd363a19c7e5978d0f8f0a30887e167f30321cc3714d273

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page