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

Related tags

prop
Overview

Prop

Propositional logic with types in Rust.

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

Abbreviations:

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

Motivation

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.

Design

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
  • 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).

Examples

use prop::*;

fn proof(f: Imply, 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(f: Imply, Not>) -> Imply {
   imply::rev_modus_tollens(f)
}

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 example, path Semantics can be used to boost performance of brute force theorem proving in Classical Propositional Logic on Type-hierarchy-like problems. For more information, see the blog post Improving Brute Force Theorem Proving.

For more information, see the Path Semantics Project.

Issues
Owner
AdvancedResearch
A research branch of the Piston project (https://www.piston.rs/)
AdvancedResearch
C to Rust translator

Corrode: Automatic semantics-preserving translation from C to Rust This program reads a C source file and prints an equivalent module in Rust syntax.

Jamey Sharp 2.1k Jun 11, 2021
This is an implementation defining standard for client-side-validation

Client-side-validation Foundation Libraries This is an implementation defining standard of client-side-validation representing a set of its Foundation

LNP/BP Association 3 May 14, 2021
A cross-platform serial port library in Rust.

Introduction serialport-rs is a general-purpose cross-platform serial port library for Rust. It provides a blocking I/O interface and port enumeration

Bryant Mairs 123 May 27, 2021
A high level diffing library for rust based on diffs

Similar: A Diffing Library Similar is a dependency free crate for Rust that implements different diffing algorithms and high level interfaces for it.

Armin Ronacher 402 Jun 12, 2021
A library to compile USDT probes into a Rust library

sonde sonde is a library to compile USDT probes into a Rust library, and to generate a friendly Rust idiomatic API around it. Userland Statically Defi

Ivan Enderlin 25 Mar 28, 2021
Runtime dependency injection in Rust

This library provides an easy to use dependency injection container with a focus on ergonomics and configurability at the cost of runtime performance. For a more performance-oriented container, look for a compile-time dependency injection library.

TehPers 11 May 18, 2021
Apache Arrow in WebAssembly

WASM Arrow This package compiles the Rust library of Apache Arrow to WebAssembly. This might be a viable alternative to the pure JavaScript library. R

Dominik Moritz 37 Jun 12, 2021
Cross-platform Window library in Rust for Tauri. [WIP]

Cross-platform application window creation library in Rust that supports all major platforms like Windows, macOS, Linux, iOS and Android. Built for you, maintained for Tauri.

Tauri 35 Jun 10, 2021
A stack-allocated box that stores trait objects.

This crate allows saving DST objects in the provided buffer. It allows users to create global dynamic objects on a no_std environment without a global allocator.

Aleksey Sidorov 3 May 27, 2021
Rust implementation of the legacy Master Server Query Protocol

msq-rs Rust library implementation of the legacy Master Server Query Protocol. Documentation crates.io Repository Release Notes Usage Add this to your

mtcw 4 May 24, 2021
[DEPRECATED] password manager thing

NOTE: this is pretty much abandoned, I recommend Bitwarden now. There is an export command in the CLI that produces CSV suitable for import into Bitwa

null 307 Apr 6, 2021
Modeling is a tools to analysis different languages by Ctags

Modeling Modeling is a tools to analysis different languages by Ctags process: generate to opt call ctags with opt analysis ctags logs output resulse

Inherd OS Team (硬核开源小组) 4 Jun 10, 2021
An opinionated, practical color management library for games and graphics.

colstodian An opinionated color management library built on top of kolor. Introduction colstodian is a practical color management library for games an

Gray Olson 15 Jun 1, 2021
Rust experiments involving Haskell-esque do notation, state, failure and Nom parsers!

Introduction As a long time Haskell developer recently delving into Rust, something I've really missed is monads and do notation. One thing monadic do

Kerfuffle 21 May 23, 2021