system-lk
is a propositional theorem prover in Swift, based on Wang's Algorithm. I wrote system-lk
to better understand the inference rules in sequent calculus after reading @joom's WangsAlgorithm.
Mert Dumenci mert@dumenci.me
// Construct a `Sequent`.
let lawOfTheExcludedMiddle = Sequent(
antecedents: [],
consequents: [
.Disjunction(
.Atomic("x"),
.Negation(.Atomic("x"))
)
]
)
// Prove it using `prove`.
let proof = prove(sequent: lawOfTheExcludedMiddle)
Check out WangsAlgorithm for a much more complete version of this project. system-lk
is heavily inspired by WangsAlgorithm
, and doesn't implement half of its features: LaTeX proof output, parser for sequents, etc.