16 releases (breaking)

new 0.13.0 Jan 22, 2022
0.11.0 Jan 21, 2022
0.7.0 Sep 16, 2021
0.6.0 May 13, 2021

#102 in Math

Download history 16/week @ 2021-10-12 8/week @ 2021-11-09 1/week @ 2021-11-16 2/week @ 2021-11-23 10/week @ 2021-11-30 9/week @ 2021-12-07 1/week @ 2021-12-14 2/week @ 2021-12-28 8/week @ 2022-01-04 36/week @ 2022-01-11 89/week @ 2022-01-18

135 downloads per month

MIT license

1.5K SLoC


Propositional logic with types in Rust.

A library in Rust for theorem proving with Intuitionistic Propositional Logic. Supports theorem proving in Classical Propositional Logic.


  • IPL: Intuitionistic/Constructive Propositional Logic
  • PL: Classical Propositional Logic
  • PSI: Path Semantical Intuitionistic/Constructive Propositional Logic
  • PSL: Path Semantical Classical Propositional Logic


Path Semantics extends dependent types with normal paths and is also used to extend Classical Propositional Logic with multiple levels of propositions. It is also used to explore higher dimensional mathematics. A popular research subject in Path Semantics is Avatar Extensions.

When researching, in some cases it is useful to figure out whether a proof is provable in classical logic, but not in constructive logic. This requires comparing proofs easily.

This library uses a lifting mechanism for making it easier to produce proofs in classical logic and compare them to proofs in constructive logic.


This library contains:

  • Prop: Propositions that might or might not be decidable (constructive logic)
  • DProp: Decidable propositions (classical logic)
  • LProp: Like Prop, but with path semantics (path semantical constructive logic)
  • DLProp: Like DProp, but with path semantics (path semantical classical logic)
  • Automatic lifting of Excluded Middle to decidable propositions
  • Double Negation for proofs of Prop
  • A model of Path Semantical Quality in IPL
  • Formalization of the core axiom of Path Semantics
  • Tactics organized in modules by constructs (e.g. and or imply)

Due to first-order logic requiring dependent types, which is not yet supported in Rust, this library is limited to zeroth-order logic (propositional logic).


use prop::*;

fn proof<A: Prop, B: Prop>(f: Imply<A, B>, a: A) -> B {
    imply::modus_ponens(f, a)

Notice that there is no DProp used here, which means that it is a constructive proof.

use prop::*;

fn proof<A: DProp, B: DProp>(f: Imply<Not<A>, Not<B>>) -> Imply<B, A> {

Here, DProp is needed because rev_modus_tollens needs Excluded Middle. This limits the proof to decidable propositions.

Path Semantics

Path Semantics is an extremely expressive language for mathematical programming. It uses a single core axiom, which models semantics of symbols.

Basically, mathematical languages contain a hidden symmetry due to use of symbols. Counter-intuitively, symbols are not "inherently" in logic.

One way to put it, is that the symbols "themselves" encode laws of mathematics. The hidden symmetry can be exploited to prove semantics and sometimes improve performance of automated theorem provers.

For more information, see the Path Semantics Project.

No runtime deps


  • pure_platonism
  • pure_seshatism