It is recommended to install Reason on Linux. Instruction below assumes Debian-based distribution, but you may adjust it to your favourite Linux distribution.
Clone the Reason repository by git clone --recursive https://github.com/warpdynamicsltd/reason.git.
This will clone Reason with dependency repositories
repositories/larkrepositories/vampire
To install reason package in your local Python environment
with the most up to date versions of dependencies, you should follow the steps below:
- Most likely you will need to install:
sudo apt install -y build-essential cmake clang zlib1g-dev libgmp-dev python3 curl opam
- Go to the root folder of Reason repository.
- Build binary for Vampire by
This will run
./vampire-install.sh
cmakeover Vampire codes and nextmaketo build it from sources and copy vampire binary toreason/assets/bin. - Build binary for Kernel by
This will run
./kernel-install.sh
dune buildoverkerneldirectory and copy kernel binary toreason/assets/bin. - One possible way to install
reasonpackage in your local Python environment:- Install
uvpackage manager by e.g.curl -LsSf https://astral.sh/uv/install.sh | sh. - Run
uv syncon the level of the project root directory. - Run
uv pip install -e . - Run
uv run task testto run tests to verify if your installation is successful.
- Install
If you know what you are doing you may skip some steps from 1 - 3 and e.g. install lark by pip install lark
and/or get vampire binary compiled somewhere else and copy it manually to reason/assets/bin.
use ∅;
axiom ∀(x, y) x = y ⟷ (∀(z) z ∈ x ⟷ z ∈ y);
axiom ∀(x) ~(x ∈ ∅);
axiom ∀(x, z) z ∈ {x} ⟷ z = x;
axiom ∀(x, y, z) z ∈ x ∪ y ⟷ z ∈ x ∨ z ∈ y;
axiom ∀(x, y, z) z ∈ x ∩ y ⟷ z ∈ x ∧ z ∈ y;
axiom ∀(x, y) x ⊂ y ⟷ (∀(z) z ∈ x → z ∈ y);
axiom ∀(x) ~(x = ∅) → (∃(y) y ∈ x ∧ y ∩ x = ∅);
let {a, b} = {a} ∪ {b};
let (a, b) = {a, {a, b}};
theorem ~(a ∈ b ∧ b ∈ a)
proof
take a, b;
assume a ∈ b;
assume b ∈ a;
pick x where x = {a, b};
~(a ∩ x = ∅);
b ∩ x = ∅;
then ~(a ∈ b);
qed;You can run the above proof with:
reason examples/basic/example.rsnThe output of the above should end with something similar to the following.
QUOD ERAT DEMONSTRANDUM
proved in 0.045 seconds
To learn more about reason study more examples in Examples directory.