Skip to content

LogicalPy

PyPI version License Code style: black Python versions Test coverage

LogicalPy is a Python library providing basic functionalities for manipulating propositional logic.

Description

The library allows to work with classical propositional logic formulae. The main features include:

  • The construction of logical formulae either directly or from a string
  • The visualisation of truth tables
  • The implementation of semantic notions: satisfiability, entailment...
  • The conversion to normal forms (NNF, CNF, or DNF)
  • The implementation of a Hilbert-style proof system
  • Automated theorem proving with the resolution procedure

The library also supports LaTeX code generation for most of its functionalities.

Installation

With pip:

pip install logicalpy

Note that the library needs a Python version higher than 3.9.

Usage

For getting started, see the usage section.

For a complete project reference, see the API Reference.

Contributing

If you want to contribute to this project, you can open an issue to report a bug or request a feature, or make a pull request. See CONTRIBUTING.md for detailed contribution guidelines.

License

This project is licensed under the MIT license.