Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dialectic

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dialectic

Mathematical Logic

  • 0.3.2
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc