Skip to content

A symbolic implementation of propositional logic - ruthlessly edited by devin.jl

License

Notifications You must be signed in to change notification settings

devinallen/PAQ.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

263 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Documentation dev Codecov License

Documentation Continuous Integration

Introduction

If you like propositional logic, then you've come to the right place!

P∧Q has an intuitive interface that enables you to manipulate logical expressions symbolically. Propositions have multiple representations which can be easily converted and extended. Several utilities have been provided for convenience, visualization, and solving propositions.

Showcase

julia> import Pkg

julia> Pkg.add(url = "https://github.com/jakobjpeters/PAQ.jl")

julia> using PAQ

julia> ¬⊥
tautology (generic function with 1 method)

julia> @atoms p q
2-element Vector{Atom{Symbol}}:
 p
 q

julia> r = ¬p
Literal:
 ¬p

julia> s = Clause(and, p, ¬q)
Clause:
 p  ¬q

julia> @p t = ((q  r)  a)(a => ⊤)
Normal:
 (q)  (¬p)

julia> u = s  t
Normal:
 (p  ¬q)  (q  ¬p)

julia> TruthTable(p  ¬p, r, p  q, u)
┌────────┬──────┬──────┬─────────┬────────────────────────────┐
│ p  ¬p │ p    │ q    │ ¬p      │ p  q, (p  ¬q)  (q  ¬p) │
│ Tree   │ Atom │ Atom │ Literal │ Tree, Normal               │
├────────┼──────┼──────┼─────────┼────────────────────────────┤
│ ⊥      │ ⊤    │ ⊤    │ ⊥       │ ⊥                          │
│ ⊥      │ ⊥    │ ⊤    │ ⊤       │ ⊤                          │
├────────┼──────┼──────┼─────────┼────────────────────────────┤
│ ⊥      │ ⊤    │ ⊥    │ ⊥       │ ⊤                          │
│ ⊥      │ ⊥    │ ⊥    │ ⊤       │ ⊥                          │
└────────┴──────┴──────┴─────────┴────────────────────────────┘

Related Projects

PAQ.jl is currently best suited for learning and visualizing propositional logic. The user interface is well-documented and has numerous quality of life features that make it easy to create, manipulate, and query about propositions. Further, propositions can be converted, visualized, and output in several different forms.

Features such as a fast satisfiability algorithm, proofs, and other logics are still in development. In the meantime, check out the these excellent projects.

Top Picks

Computer Algebra Systems

Constraint Solvers

Wrappers

Wrappers

Honorable Mentions

Kanren

About

A symbolic implementation of propositional logic - ruthlessly edited by devin.jl

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 100.0%