Getting started
dēdūxit [deːˈduːk.sɪt] Latin, verb: "it has derived", the perfect of dēdūcō, to lead down, derive.
deduxit is a collection of logic suites. It decides whether a sequent
is provable, and shows the proof or says why there is none. It is a
command, deduxit, and a Rust library, the crate deduxit. Its suites
are linear logic (classical and intuitionistic, first-order and cyclic,
and the Lambek calculus) and propositional logic (classical,
intuitionistic and minimal, in Ordinary logic).
The web page proves step by step in the
browser with the same library. It began as linlog, a linear logic
library (up to 0.2.0), and is growing to take in more calculi.
This page is a short tour. It assumes you have installed the command (Install deduxit; nix run github:deduxit/deduxit -- prove "A |- A" runs it without installing).
This manual describes the main branch; a release's manual is the
docs/ directory of its tag.
Your first proof
A sequent A, A -o B |- B says: from A and "A implies B", using
each exactly once, derive B. -o is linear implication. Ask deduxit
to prove it:
$ deduxit prove "A, A -o B |- B"
provable (MLL, classical, focus engine)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~B, B
──────────────────── ⊗
⊢ ~A, A ⊗ ~B, B
The first line is the verdict. In brackets are the fragment of linear logic the sequent uses (MLL: only the multiplicative connectives), the logic (classical linear logic by default) and the engine that searched. Below it is the proof, a derivation tree read from the leaves down. Every proof deduxit reports has passed its proof checker.
The tree is written one-sided, the standard form for classical linear
logic: every formula moves to the right of ⊢, and a formula on the
left becomes its negation ~. So ⊢ ~A, A is the axiom A ⊢ A. To see
the tree with the sides you wrote, add --classical-sides two:
$ deduxit prove --classical-sides two "A, A -o B |- B"
provable (MLL, classical, focus engine)
───── ax ───── ax
A ⊢ A B ⊢ B
──────────────── ⊸L
A, A ⊸ B ⊢ B
Quote the sequent, so that the shell passes it as one word. The ASCII
connectives are * (tensor, ⊗), par (⅋), & (with), + (plus, ⊕),
-o (⊸), ~ (negation), ! and ?; The syntax lists
them all.
Your first unprovable sequent
In linear logic every hypothesis must be used exactly once. So A, B |- A has no proof:
$ deduxit prove "A, B |- A"
unprovable (MLL, classical, focus engine): B on the left has no B on the right to meet in an axiom; with -a (affine), an unused hypothesis is allowed
The reason says what is wrong: B is never used. The note names
-a, affine mode, where a hypothesis may go unused:
$ deduxit prove -a "A, B |- A"
provable (MLL, classical affine, focus engine)
─────── ax
⊢ ~A, A
─────────── wk
⊢ ~A, ~B, A
The wk step (weakening) drops the unused ~B.
The exit status tells a script the verdict: 0 provable, 1 unprovable, 3 unknown, 2 an error.
$ deduxit prove -q "A |- B"; echo "exit $?"
unprovable (MLL, classical, focus engine): A on the left has no A on the right to meet in an axiom
exit 1
-q prints the verdict line alone. A third answer, "unknown", comes when
a limit stopped the search first, most often the time limit of two
seconds. Its line names the flag that gives the search more room;
Decide a sequent says more.
Your first intuitionistic proof
-i reads the sequent in intuitionistic linear logic: hypotheses on
the left, exactly one formula on the right. The proof is two-sided:
$ deduxit prove -i "A, A -o B |- B"
provable (IMLL, intuitionistic, two-sided engine)
───── ax ───── ax
A ⊢ A B ⊢ B
──────────────── ⊸L
A, A ⊸ B ⊢ B
$ deduxit prove -i "A |- A * A"
unprovable (IMLL, intuitionistic, two-sided engine): A occurs 1 more time on the right than on the left, so they cannot all meet in axioms (an implication's antecedent counts on the other side)
A * A needs two copies of A, and there is one. With !A, "as many
A as you like", the sequent is provable:
$ deduxit prove -q "!A |- A * A"
provable (MELL, classical, horn engine)
Your first countermodel
--logic reads a sequent of ordinary propositional logic instead, with
-> for implication, \/ for "or" and ~ for "not". In intuitionistic
logic A \/ ~A is not valid, and deduxit shows why with a Kripke
countermodel:
$ deduxit prove --logic intuitionistic "|- A \/ ~A"
not valid (intuitionistic logic by the SAT solver): a checked countermodel refutes it
world 0 (the model's world): forces nothing; below 1
world 1: forces A
A Kripke model is a set of worlds, each forcing some atoms, and a world
forces what every world below it forces. At world 0, A is not yet
true, and ~A fails since A holds at world 1 above it. Ordinary
logic has the other logics, the truth table and the
tableau of classical logic, and the proofs.
Export the proof
--format writes the proof as LaTeX, Typst, SVG, PNG, PDF, a Rocq
certificate or JSON. --output writes it to a file, in the format its
extension names:
$ deduxit prove --format latex "A, A -o B |- B"
% provable (MLL, classical, focus engine)
\begin{prooftree}
\infer0[$\mathrm{ax}$]{\vdash A^\bot, A}
\infer0[$\mathrm{ax}$]{\vdash B^\bot, B}
\infer2[$\otimes$]{\vdash A^\bot, A \otimes B^\bot, B}
\end{prooftree}
$ deduxit prove --output proof.svg "A, A -o B |- B"
The LaTeX uses the ebproof package; --standalone writes a whole
document. Export a proof covers every format.
Check a proof
The JSON form is a proof file. deduxit check verifies it with the
checker alone, without searching:
$ deduxit prove --format json "A, A -o B |- B" > proof.json
$ deduxit check proof.json
valid proof of ⊢ ~A, A ⊗ ~B, B (classical)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~B, B
──────────────────── ⊗
⊢ ~A, A ⊗ ~B, B
Where to go next
- A task: the how-to guides, from Decide a sequent and Avoid the common mistakes to Prove step by step, Check a certificate in Rocq and Use the library.
- A flag:
deduxit <command> -hlists the common options,deduxit <command> --helpevery one. Limits, defaults and exit statuses and The syntax are the reference. - How it works: How deduxit searches and Architecture.
- The library's API: docs.rs/deduxit for
the releases, deduxit.github.io/deduxit
for
main. - For AI models: the guide
skills/deduxit/, served as llms.txt and llms-full.txt. - What changed: the changelog.
Install deduxit
The command deduxit is the package deduxit-cli. The shortest ways
in:
- download the package for your system from a release on GitHub, built for Linux, macOS and Windows (the sections below give the commands);
- with Rust 1.92 or later,
cargo install --locked deduxit-cli, from crates.io; - with Nix,
nix run github:deduxit/deduxit -- --help, which runs it without installing.
| system | install | needs |
|---|---|---|
| Debian, Ubuntu | the release's .deb | nothing |
| Fedora | the release's .rpm | nothing |
| Arch Linux | the release's package | nothing |
| any Linux | the release's archive, one static binary | nothing |
| NixOS, Nix | the flake | flakes enabled |
| macOS | the release's archive | nothing |
| Windows | the release's .zip | nothing |
| any system | cargo install --locked deduxit-cli | Rust 1.92 or later |
The files below are those of version 0.5.0; a later release names its own. For long searches on Linux, a build of your own is faster (Long searches).
Every release lists the SHA-256 sums of its files in SHA256SUMS. It
also carries an attestation of where they were built, which the GitHub
command checks: gh attestation verify FILE --repo deduxit/deduxit. The
files of 0.2.0 and earlier were attested under the repository's former
name, so for them it is gh attestation verify FILE --repo linlog-prover/linlog. The packages and binaries are not signed: each
system's section says what that means there.
Debian and Ubuntu
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit_0.5.0-1_amd64.deb
sudo apt install ./deduxit_0.5.0-1_amd64.deb
deduxit --version
arm64 instead of amd64 on an ARM machine. The package holds the
binary, /usr/bin/deduxit, and the licences under
/usr/share/doc/deduxit; it depends on nothing. To update, install the
next release's .deb the same way; to remove, sudo apt remove deduxit.
Fedora
sudo dnf install https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit-0.5.0-1.x86_64.rpm
deduxit --version
aarch64 instead of x86_64 on an ARM machine. The package is not
signed, which dnf accepts for a package named on its command line. To
update, install the next release's .rpm; to remove, sudo dnf remove deduxit.
Arch Linux
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit-0.5.0-1-x86_64.pkg.tar.zst
sudo pacman -U ./deduxit-0.5.0-1-x86_64.pkg.tar.zst
deduxit --version
The package is for x86_64; on Arch Linux ARM, take the archive below.
It is not signed. pacman checks the signatures of packages from its
repositories, but asks nothing for a file named on its command line. To update, install the next
release's package; to remove, sudo pacman -R deduxit.
Any Linux
The archive holds one statically linked binary, which runs on any distribution, with README and the licences:
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit-0.5.0-x86_64-unknown-linux-musl.tar.gz
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/SHA256SUMS
sha256sum --check --ignore-missing SHA256SUMS
tar -xzf deduxit-0.5.0-x86_64-unknown-linux-musl.tar.gz
install -D deduxit-0.5.0-x86_64-unknown-linux-musl/deduxit ~/.local/bin/deduxit
deduxit --version
aarch64 instead of x86_64 on an ARM machine; ~/.local/bin is on
the path of most distributions' shells. To update, do the same with the
next release; to remove, rm ~/.local/bin/deduxit.
NixOS and Nix
The flake's default package is the command. Flakes are on with
Determinate Systems' installer; with the official installer, add
experimental-features = nix-command flakes to ~/.config/nix/nix.conf
once.
nix run github:deduxit/deduxit -- --help # run it once, without installing
nix profile add github:deduxit/deduxit/v0.5.0#deduxit-cli # install a release into your profile
nix profile remove deduxit-cli # and to remove it
An entry added by a release's tag stays that release: to update,
remove it and add the next release's tag. One added without a tag
(github:deduxit/deduxit#deduxit-cli, the main branch, which may
be ahead of the last release) follows it with nix profile upgrade deduxit-cli. The profile names an entry after the package installed,
here deduxit-cli.
On Nix before 2.30, nix profile add is nix profile install. The
package carries the EUPL and the embedded fonts' licences under
share/doc/deduxit-cli/.
In a flake of your own, a NixOS or Home Manager configuration say, take it as an input:
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.deduxit.url = "github:deduxit/deduxit/v0.5.0";
outputs = { nixpkgs, deduxit, ... }: {
nixosConfigurations.HOST = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
environment.systemPackages = [
deduxit.packages.${pkgs.stdenv.hostPlatform.system}.default
];
})
];
};
};
}
(home.packages takes it the same way.) To update, move the input's tag
and rebuild; to remove, take it out of the list. Nix builds it from
source on first use, which takes a few minutes. The binary cache that
Development names holds the builds of main for
x86_64-linux and saves that time once you trust it.
macOS
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit-0.5.0-aarch64-apple-darwin.tar.gz
curl -LO https://github.com/deduxit/deduxit/releases/download/v0.5.0/SHA256SUMS
shasum -a 256 --check --ignore-missing SHA256SUMS
tar -xzf deduxit-0.5.0-aarch64-apple-darwin.tar.gz
mkdir -p ~/.local/bin
cp deduxit-0.5.0-aarch64-apple-darwin/deduxit ~/.local/bin/
~/.local/bin/deduxit --version
x86_64 instead of aarch64 on an Intel Mac; add ~/.local/bin to
your shell's path (echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zprofile). The binary is not signed by an Apple developer. Fetched
with curl as above it runs; fetched with a browser, macOS marks it and
refuses to open it the first time ("cannot be opened because Apple
cannot check it for malicious software"): remove the mark with xattr -d com.apple.quarantine ~/.local/bin/deduxit, or allow it once under
System Settings, Privacy & Security, "Open Anyway". To update, do the
same with the next release; to remove, rm ~/.local/bin/deduxit.
Windows
In PowerShell:
Invoke-WebRequest -OutFile deduxit.zip https://github.com/deduxit/deduxit/releases/download/v0.5.0/deduxit-0.5.0-x86_64-pc-windows-msvc.zip
(Get-FileHash deduxit.zip -Algorithm SHA256).Hash # compare with the line of SHA256SUMS
Expand-Archive deduxit.zip -DestinationPath "$env:LOCALAPPDATA\Programs"
Rename-Item "$env:LOCALAPPDATA\Programs\deduxit-0.5.0-x86_64-pc-windows-msvc" deduxit
$bin = "$env:LOCALAPPDATA\Programs\deduxit"
[Environment]::SetEnvironmentVariable("Path", [Environment]::GetEnvironmentVariable("Path", "User") + ";$bin", "User")
& "$bin\deduxit.exe" --version
aarch64 instead of x86_64 on an ARM machine. A new terminal finds
deduxit on its path. The program is not signed: if Windows shows
"Windows protected your PC" when it first starts, choose More info, then
Run anyway, or clear the download's mark beforehand with Unblock-File "$bin\deduxit.exe". To update, replace the folder with the next
release's; to remove, delete it and its entry of the user's Path
(Settings, System, About, Advanced system settings, Environment
Variables).
Any system, with Rust
cargo install builds the command from crates.io:
cargo install --locked deduxit-cli
cargo install --locked deduxit-cli # later: the newest release
cargo uninstall deduxit-cli # and to remove it
It needs Rust 1.92 or later (a release raises that only with its second
number, 0.2 to 0.3, and never to a Rust less than six months old) and a
C compiler, which links the program. Not every
distribution's own Rust reaches 1.92: Fedora's (sudo dnf install cargo gcc), Arch's (sudo pacman -S rust gcc), Ubuntu 26.04's (sudo apt install cargo build-essential) and Homebrew's (brew install rust) do;
Debian 13's (1.85; 1.96 in trixie-backports) and Ubuntu 24.04's
(1.75) do not. Elsewhere, install Rust with
rustup, after the C compiler (sudo apt install build-essential on Debian and Ubuntu, xcode-select --install on
macOS): on Linux and macOS
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
and on Windows rustup-init.exe from rustup.rs,
which needs Microsoft's C++ build tools (Visual Studio's "Desktop
development with C++", which rustup-init offers to install). rustup update keeps it current and rustup self uninstall removes it.
Long searches
The release's Linux files hold one binary linked statically against
musl, so that it runs on every distribution. musl's C library is slower
than glibc's at what a search does most. On two searches of about four
seconds (cores of one machine, 2026-11-02), the static binary took 1.26
to 1.45 times as long as a build against glibc, on one thread and on
four alike. For long searches on Linux, build the command on your
machine with cargo install or Nix, which link against glibc. For
everything else, the packages are the quicker way in.
The library
The library is the crate deduxit:
[dependencies]
deduxit = "0.5"
Its features:
| feature | on by default | what it adds | dependencies it brings |
|---|---|---|---|
parse | yes | the text syntaxes, the LLTP, TPTP and .spec readers, the generated families | none |
serialize | yes | the JSON forms, and the calculi given as rule files | serde |
interactive | yes | proving step by step | none |
latex, typst, svg, rocq | yes | the exports | none |
sat | yes | the SAT solver that decides ordinary logic by default | batsat |
protocol | yes | what each suite offers, run over JSON, and the workspace; needs parse, serialize and interactive | serde_json |
parallel | no | the search on a thread pool, not for WebAssembly | rayon |
png, pdf | no | the SVG drawings rendered as PNG and PDF | resvg with png or with krilla and krilla-svg |
The documentation's examples read and write JSON with serde_json,
which you add yourself.
Use the library shows how to call it.
The Rocq library
The Rocq certificates the command writes (--format rocq) are checked
by the NanoYalla kernel or by deduxit's own Rocq library, rocq-deduxit,
in its repository
deduxit/rocq-deduxit.
Check a certificate in Rocq says how to install each and
check a certificate.
Decide a sequent
deduxit prove decides whether a sequent is provable. Give the sequent
in quotes:
$ deduxit prove "A, A -o B |- B"
provable (MLL, classical, focus engine)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~B, B
──────────────────── ⊗
⊢ ~A, A ⊗ ~B, B
$ deduxit prove "A & B |- A + B"
provable (ALL, classical, additive engine)
─────── ax
⊢ ~A, A
─────────── ⊕₁
⊢ ~A, A ⊕ B
──────────────── ⊕₁
⊢ ~A ⊕ ~B, A ⊕ B
The first line is the verdict. In brackets are the fragment the sequent
uses, the logic and the engine that searched. The proof follows as a
derivation tree, which the proof checker has verified. The tree is
one-sided: ⊢ ~A, A is the axiom A ⊢ A. The syntax lists
the connectives, and --file FILE reads the sequent from a file
(--file - from standard input).
deduxit prove -h lists the common options by what they set (the logic,
the input, the output, the search, the limits); deduxit prove --help
lists every option.
Read the verdict
There are three verdicts, and the exit status gives each to a script:
| verdict | exit status | meaning |
|---|---|---|
provable | 0 | a proof was found and checked |
unprovable | 1 | no proof exists; the line says why |
unknown | 3 | a limit stopped the search first; the line says which and the flag to raise |
An error, such as a sequent that does not parse, exits with 2.
Read why a sequent is unprovable
An unprovable verdict gives its reason after the colon:
$ deduxit prove "|- A par B, ~A, ~B"
unprovable (MLL, classical, focus engine): the count equation fails: a provable one-sided sequent of MLL has exactly #⊗ − #⅋ − #1 + #⊥ + 2 formulas, here 0 − 1 − 0 + 0 + 2 = 1, and this one has 3
$ deduxit prove "A |- B"
unprovable (MLL, classical, focus engine): A on the left has no A on the right to meet in an axiom
$ deduxit prove "!A, A |- 1"
unprovable (MELL, classical, horn engine): A occurs 1 more time on the left than on the right outside the exponentials, and every occurrence of it below one, which copies add, is on the left, so they cannot all meet in axioms
$ deduxit prove "A, B |- A"
unprovable (MLL, classical, focus engine): B on the left has no B on the right to meet in an axiom; with -a (affine), an unused hypothesis is allowed
Most reasons count something: an atom whose occurrences cannot all
meet in axioms, or the multiplicative connectives against the formulas.
Where the counts say nothing, the reason is "the search was exhaustive".
How deduxit searches explains
each reason. deduxit check verifies a refutation without the search
(Check a proof or a refutation).
When the answer is unknown
With ! and ? a proof may copy formulas, and the search cannot try
every number of copies. So it deepens a bound on the copies until it
decides or the time limit passes, two seconds by default. Full linear
logic is undecidable, and for MELL no decision procedure is known, so
some sequents end unknown. The line says which limit ended the search
and how to raise it:
$ deduxit prove -q "!(A & B) |- A * B"
provable (LL, classical, focus engine)
$ deduxit prove -q --copies 1 "!(A & B) |- A * B"
unknown (LL, classical, focus engine): the copy bound of 1 was reached after 54.08µs; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
$ deduxit prove -q "A |- !A"
unprovable (MELL, classical, focus engine): the search was exhaustive
$ deduxit prove -q --classical-work 0 "!(A -o A * A), !(A -o B), !(B * B -o C), A |- C * ?D"
unknown (MELL, classical, focus engine): the time limit of 2s was reached at a copy bound of 97; --timeout DURATION gives the search longer
--timeout 10s gives the search ten seconds, and --timeout none no
limit. --copies N stops the deepening at N copies. --memory-limit
(one gibibyte by default) bounds the memory; Limits, defaults and exit
statuses lists every limit.
After a search that found no proof, deduxit also reads the sequent in
classical propositional logic. If some truth values of the atoms make it
false, no proof exists, and an unknown becomes unprovable. The last
sequent above is refuted so (--classical-work 0 turned this off
there):
$ deduxit prove -q "!(A -o A * A), !(A -o B), !(B * B -o C), A |- C * ?D"
unprovable (MELL, classical, focus engine): the classical reading is false where A, B and C are true and every other atom false (! and ? erased, ⊗ and & as and, ⅋ and ⊕ as or, 1 and ⊤ true, ⊥ and 0 false), and every provable sequent reads as a tautology
Get the same answer every time
An answer near the time limit depends on the machine's speed. For the
same verdict on every machine, bound the search with --work-limit N or
--copies N and lift the time limit with --timeout none.
--deterministic also makes the proof and --stats the same on every
run. --stats prints what the search did:
$ deduxit prove -q --deterministic --stats --engine focus --bias rarer --copies 3 "!(A -o B), !(B -o C), !(C -o D), !(D -o E), A |- E"
unknown (MELL, classical, focus engine): the copy bound of 3 was reached after 36.65µs; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
stable sequents visited: 10
from the memo: 0
memo entries at most: 4
splits examined: 24
copy bound reached: 3
units of work: 250
time: 36.65µs
$ deduxit prove -q --deterministic --stats --engine focus --bias rarer --timeout none "!(A -o B), !(B -o C), !(C -o D), !(D -o E), A |- E"
provable (MELL, classical, focus engine)
stable sequents visited: 15
from the memo: 0
memo entries at most: 5
splits examined: 28
copy bound reached: 4
units of work: 380
time: 60.01µs
While a search runs longer than half a second, a line on standard error says so, if standard error is a terminal. It goes when the answer comes.
Choose the logic
By default a sequent is read in classical linear logic. Flags choose another:
-a(--affine): a hypothesis may go unused. The derivation shows the step aswk, weakening.--mix: the Mix rule joins two proofs side by side.-i(--intuitionistic): intuitionistic linear logic, below.--cyclic,--lambek: the ordered logics (cyclic linear logic, the Lambek calculus).--logic classical|intuitionistic|minimal: ordinary logic (Decide ordinary logic).
$ deduxit prove -a "A, B |- A"
provable (MLL, classical affine, focus engine)
─────── ax
⊢ ~A, A
─────────── wk
⊢ ~A, ~B, A
$ deduxit prove -q -a --classical-work 0 "!(A -o A * A), A |- ?B"
unknown (MELL, classical affine, focus engine): the time limit of 2s was reached at a copy bound of 18; --timeout DURATION gives the search longer
Intuitionistic linear logic
-i reads the sequent as written: the hypotheses left of ⊢, exactly
one formula right of it, in the connectives ⊗ ⊸ & ⊕ ! and the units
1 ⊤ 0. The proof is two-sided, with the rules of intuitionistic linear
logic, and the verdict line names the intuitionistic fragment:
$ deduxit prove -i "A -o B -o C, A * B |- C"
provable (IMLL, intuitionistic, two-sided engine)
───── ax ───── ax
B ⊢ B C ⊢ C
───── ax ──────────────── ⊸L
A ⊢ A B ⊸ C, B ⊢ C
───────────────────────── ⊸L
A ⊸ (B ⊸ C), A, B ⊢ C
────────────────────── ⊗L
A ⊸ (B ⊸ C), A ⊗ B ⊢ C
$ deduxit prove -i "!A, !(A -o B) |- !B & A"
provable (ILL, intuitionistic, two-sided engine)
───── ax
A ⊢ A
────── !L ───── ax
!A ⊢ A B ⊢ B
───────────────── ⊸L ───── ax
!A, A ⊸ B ⊢ B A ⊢ A
──────────────── !L ────── !L
!A, !(A ⊸ B) ⊢ B !A ⊢ A
───────────────── !R ──────────────── !w
!A, !(A ⊸ B) ⊢ !B !A, !(A ⊸ B) ⊢ A
─────────────────────────────────────── &R
!A, !(A ⊸ B) ⊢ !B & A
A classical symbol (~, ^, par, |, ?, bot) is refused with
what to write instead. --ill-syntax one-sided reads the classical
syntax as the one-sided sequent it stands for, so ~(A * ~B), A |- B
reads as A ⊸ B, A ⊢ B:
$ deduxit prove -i "|- ~A par B"
error: cannot parse the sequent
|- ~A par B
^ unexpected "~"
intuitionistic linear logic has no negation: write a negated formula on the other side of |- (A |- B, not |- ~A, B), and ~A par B as A -o B; --ill-syntax one-sided reads the classical syntax
$ deduxit prove -i -q --ill-syntax one-sided "|- ~A par B"
unprovable (IMLL, intuitionistic, two-sided engine): A on the left has no A on the right to meet in an axiom (an implication's antecedent counts on the other side)
$ deduxit prove -i --ill-syntax one-sided "|- A par B"
error: not an intuitionistic sequent: the subformula A ⅋ B is neither an intuitionistic formula nor the negation of one: intuitionistic linear logic has ⅋ only in A ⊸ B (~A ⅋ B), and ? only under a negation
$ deduxit prove -i "A |- B, C"
error: not an intuitionistic sequent: an intuitionistic sequent has exactly one formula right of ⊢, not 2: write the hypotheses left of ⊢
Classical linear logic proves more than intuitionistic linear logic
once 0 is around:
$ deduxit prove -q "((A * top) & (B * top)) -o 0 |- (A -o C) + (B -o C)"
provable (MALL, classical, focus engine)
$ deduxit prove -i -q "((A * top) & (B * top)) -o 0 |- (A -o C) + (B -o C)"
unprovable (IMALL, intuitionistic, two-sided engine): the search was exhaustive
Show the derivation
A derivation can be much larger than the proof: it writes the whole sequent at every step and repeats every part the proof shares. So deduxit shows it only where that makes sense, and otherwise keeps the verdict and says in one line what it left out and how to get it.
On a terminal, the text tree is printed if its widest line fits the
terminal and it is at most three screens long. --tree always prints it
regardless, and --tree never leaves it out. Into a file or a pipe it
is always written. On a terminal 30 columns wide:
$ deduxit prove "A, A -o B, B -o C, C -o D |- D"
provable (MLL, classical, focus engine)
the proof tree is not shown: 7 inferences, at least 31 columns by 8 lines, for a terminal of 30 columns and at most 30 lines (3 screens); print it with --tree always, write it with --output FILE, or get the proof with --format json
In every format, a derivation estimated above --derivation-limit
(64 MiB by default; none lifts it) is not built. The line then goes to
standard error, unless the output is a terminal:
$ deduxit prove --derivation-limit 100 "A, A -o B |- B" > verdict.txt
the derivation is not written: its 3 inferences with 29 characters of sequents are estimated at 616 B, over the limit of 100 B; --format json writes the proof itself, --derivation-limit SIZE raises the limit and --derivation-limit none lifts it
$ cat verdict.txt
provable (MLL, classical, focus engine)
--compact always draws a run of one structural rule, such as the
weakenings of every unused ? formula, as one step whose label has a
star. The default, --compact auto, does so where the whole derivation
would pass --derivation-limit or not fit the terminal; --compact never draws every step. Rocq certificates always have every step.
$ deduxit prove -i --compact always '!A, !B, !C |- 1'
provable (IMELL, intuitionistic, horn engine)
─── 1R
⊢ 1
────────────── !w*
!A, !B, !C ⊢ 1
Two-sided classical derivations
A classical derivation is one-sided by default. --classical-sides two
draws it with the formulas on the sides of ⊢ they were written on, in
every format but Rocq. The rules are named by side (⊗L, ⅋R, ⊸L,
…), and a step ~L or ~R moves a negated formula across ⊢. A
sequent given as JSON, LLTP or .spec keeps no record of how it was
written, so its formulas take their one-sided form (~A ⅋ B for A -o B), its antecedents on the left.
$ deduxit prove --classical-sides two "A par B |- ~(~A * ~B)"
provable (MLL, classical, focus engine)
───── ax ───── ax
A ⊢ A B ⊢ B
──────────────── ⅋L
A ⅋ B ⊢ A, B
───────────── ~L
A ⅋ B, ~A ⊢ B
─────────────── ~L
A ⅋ B, ~A, ~B ⊢
──────────────── ⊗L
A ⅋ B, ~A ⊗ ~B ⊢
────────────────── ~R
A ⅋ B ⊢ ~(~A ⊗ ~B)
$ deduxit prove --classical-sides two --format latex "A -o B, A |- B"
% provable (MLL, classical, focus engine)
\begin{prooftree}
\infer0[$\mathrm{ax}$]{A &\vdash A}
\infer0[$\mathrm{ax}$]{B &\vdash B}
\infer2[$\multimap\mathrm{L}$]{A \multimap B, A &\vdash B}
\end{prooftree}
A first-order derivation is drawn so too, its quantifier steps named by
side (∀L, ∀R, ∃L, ∃R) and every instance written out:
$ deduxit prove --classical-sides two "|- ~(forall x. p(x)), p(a)"
provable (MLL1, classical, focus engine)
─────────── ax
p(a) ⊢ p(a)
─────────────── ∀L
∀x. p(x) ⊢ p(a)
─────────────────── ~R
⊢ ~(∀x. p(x)), p(a)
The time limit and Ctrl-C also stop building and writing a derivation.
An --output file then holds a whole output or is left as it was.
Get the outcome as JSON
--format json writes the outcome as one JSON object: the verdict, the
fragment, the mode, the engine, the statistics, and the proof or the
refutation. It is also a proof file, which deduxit check verifies
without the search:
$ deduxit prove --format json "A |- A"
{"version":1,"deduxit":"…","verdict":"proved","checked":true,"fragment":"MLL","mode":"classical","engine":"focus","statistics":{"nodes":1,"memo_hits":0,"memo_entries":1,"splits":0,"links":0,"tests":0,"copies":0,"forward_copies":0,"work":16},"sequent":{"terms":[{"D":0},{"V":0}],"roots":[0,1],"atoms":["A"],"antecedents":1},"nodes":[{"ax":[0,1]}]}
$ deduxit prove --format json "A |- A" | deduxit check --quiet
valid proof of ⊢ ~A, A (classical)
A Rust program reads the outcome back with the library (Use the library). The other formats, LaTeX, Typst, SVG, PNG, PDF and Rocq, are in Export a proof.
Avoid the common mistakes
These are the mistakes people make first, with what the command says and what to write instead. Each error exits with status 2.
Forgetting prove
The first word after deduxit is a command. To decide a sequent, the
command is prove:
$ deduxit "A |- A"
error: unrecognized subcommand 'A |- A'
tip: to decide a sequent, run deduxit prove "A |- A"
Usage: deduxit <COMMAND>
For more information, try '--help'.
Not quoting the sequent
The shell splits an unquoted sequent into words. -o then reads as the
flag --output, and a comma ends the sequent. Put the sequent in
quotes; the tip shows the command quoted:
$ deduxit prove A -o B
error: cannot parse the sequent
A
^ unexpected end of input, expected a connective, `,` or `|-`
quote the sequent: deduxit prove "|- A -o B"
$ deduxit prove A, B
error: unexpected argument 'B' found
tip: quote the sequent: deduxit prove "|- A, B"
Usage: deduxit prove [OPTIONS] [SEQUENT]
For more information, try '--help'.
Use single quotes around a sequent with !: in bash and zsh, ! in
double quotes recalls a command from the history. The tip does so:
$ deduxit prove '!A,' B
error: unexpected argument 'B' found
tip: quote the sequent: deduxit prove '|- !A, B'
Usage: deduxit prove [OPTIONS] [SEQUENT]
For more information, try '--help'.
Writing -> in linear logic
Linear implication is -o (or ⊸). -> is the implication of
ordinary logic, which --logic reads:
$ deduxit prove "A -> B |- A"
error: cannot parse the sequent
A -> B |- A
^ unexpected ">", expected the `o` of `-o`
-> is ordinary logic's arrow: write -o, or add --logic classical
Decide ordinary logic has the syntax of --logic.
Giving a file of named sequents as one sequent
A file of NAME: SEQUENT lines is a batch. Without --input-format lines, prove reads the file as one sequent:
$ printf 'id: A |- A\nmp: A, A -o B |- B\n' > s.txt
$ deduxit prove --file s.txt
error: cannot parse the sequent
id: A |- A
^ unexpected ":" at line 1, character 3, expected a connective, `,` or `|-`
to read one sequent per line, add --input-format lines
$ deduxit prove --input-format lines --file s.txt
id: provable (MLL, classical, focus engine)
mp: provable (MLL, classical, focus engine)
Decide many sequents at once has the other batch formats.
Using classical symbols under -i
Intuitionistic linear logic has no negation, no par, no ? and no
bot. Write the formula on the other side of |-, and ~A par B as A -o B; or give --ill-syntax one-sided to read the classical syntax:
$ deduxit prove -i "|- ~A par B"
error: cannot parse the sequent
|- ~A par B
^ unexpected "~"
intuitionistic linear logic has no negation: write a negated formula on the other side of |- (A |- B, not |- ~A, B), and ~A par B as A -o B; --ill-syntax one-sided reads the classical syntax
An intuitionistic sequent also has exactly one formula right of |-:
$ deduxit prove -i "A |- B, C"
error: not an intuitionistic sequent: an intuitionistic sequent has exactly one formula right of ⊢, not 2: write the hypotheses left of ⊢
Naming a format by its file extension
--format takes latex, typst, svg, png, pdf, rocq, json
and text; tex is read as latex. With --output FILE, the
extension of FILE picks the format, so --format is not needed.
Expecting a hypothesis to be optional
In linear logic every hypothesis is used exactly once, so A, B |- A is
unprovable. Affine mode, -a, lets a hypothesis go unused; the
refutation names it where that is the problem
(Getting started).
!A lets A be used any number of times.
Check a proof or a refutation
deduxit check verifies a proof file with the proof checker alone,
without searching. The proof file is what prove --format json writes.
check reads it from its argument, from --file, or from standard
input:
$ deduxit prove --format json "A |- A" > identity.json
$ deduxit check -q --file identity.json
valid proof of ⊢ ~A, A (classical)
$ deduxit prove --format json "A |- A" | deduxit check --format json
{"version":1,"verdict":"valid","mode":"classical"}
The file states its mode, and check checks in that mode. A mode flag
that names another mode is an error.
check reads what prove --logic writes too, and a derivation of LK
or LJ: it checks the derivation by the rules of its calculus, and the
translated sequent's proof or refutation where the embedding found one.
Its JSON then names the logic in place of the mode. A file that holds
nothing to check (a clausal proof's counts, a "not valid" of LJT or the
SAT solver, an unknown) gets exit status 3 (Ordinary
logic).
A derivation in a calculus you give as a rule file is checked by
check as well (Check a derivation in your own rules).
Exit status and limits
check exits with 0 for a valid proof, 1 for an invalid one, and 3 when
a limit stopped the check before a verdict. A crafted proof file can
make the check slow, so it has the time limit of prove, two seconds by
default (--timeout none lifts it), counted from the start of the
command, and --work-limit N bounds its work. In JSON, an invalid or
unknown verdict carries the library's error object.
Check a refutation
The outcome of an unprovable sequent holds its refutation, the reason
the verdict line gives. check verifies it without the search, in the
mode the file states, since a refutation is a claim about that mode
alone. Each kind of refutation has a check: an unbalanced atom, a count
with copies of one sign, the count equation, a Horn program's state
equation, a classical assignment, a saturated set and the basis of a
backward search over a Horn program's markings. The exit status is
0 for a refutation that holds and 1 for one that does not. "The search
was exhaustive" rests on the search alone and has no check, so it exits
with 3, as does a check stopped by the time limit:
$ deduxit prove -i --format json "a, a -o b, !(b -o b * c), !(b -o d) |- b * d" | deduxit check
valid refutation of a, a ⊸ b, !(b ⊸ (b ⊗ c)), !(b ⊸ d) ⊢ b ⊗ d (intuitionistic): the state equation of the Petri net has no solution, so no firing of its clauses yields the goal's atoms: weighting each a by 2, b by 1, d by 1 and the clauses used once by weights of their own, no clause that can fire raises the weighted count of the atoms, and the goal asks it raised
$ deduxit prove --affine --format json "!(a * a -o b * b * b), a, a, a |- b * b * b * b" | deduxit check
valid refutation of !((~a ⅋ ~a) ⅋ ((b ⊗ b) ⊗ b)), a, a, a ⊢ ((b ⊗ b) ⊗ b) ⊗ b (classical affine): read as a Petri net, the goal's target cannot be covered: a backward search from it saturated, and none of the 3 markings it kept is at most the initial marking
$ deduxit prove --format json "A & B |- A * B" | deduxit check; echo "exit $?"
unknown: the refutation of A & B ⊢ A ⊗ B (classical) is not checked: a refutation of kind `exhausted` rests on the search and has no check
exit 3
With --format rocq, a refutation that holds is written as its Rocq
certificate, as prove writes it (Check a certificate in
Rocq).
Draw the checked proof
check draws a valid proof in any format prove writes, and --net
draws its proof net (Draw a proof net). --no-verdict
leaves the verdict line out, and --abbreviate N shortens long
sequents in the verdict line and the error report to N characters
(none for the whole text).
Check a derivation in your own rules
deduxit check also checks a derivation against rules you give, and
deduxit interact builds one step by step: the rules are a calculus
written as a JSON rule file. You write the rules once, as a
textbook states them, and every derivation in them is checked step by
step. The verdict reads "valid in the calculus given": the derivation
keeps to your rules, and nothing checks that the rules are sound.
Check a derivation in a built-in calculus
deduxit ships these calculi: LK, LJ and LM, the sequent calculi
of classical, intuitionistic and minimal logic; LL, one-sided linear
logic; tableau, signed tableaux for classical logic; and NJ, NK,
NM and their variants, natural deduction for the three logics
(Check a proof in natural deduction). A derivation
names its calculus, and one that names a built-in calculus needs no
flag. This one derives a ∧ b ⊢ b ∧ a in LK:
$ cat > swap.json
> {"version": 15, "calculus": "LK",
> "terms": ["a", "b", ["∧", 0, 1], ["∧", 1, 0]],
> "nodes": [
> {"sequent": [[1], [1]], "rule": "ax"},
> {"sequent": [[2], [1]], "rule": "∧L₂", "at": [0], "premises": [0]},
> {"sequent": [[0], [0]], "rule": "ax"},
> {"sequent": [[2], [0]], "rule": "∧L₁", "at": [0], "premises": [2]},
> {"sequent": [[2], [3]], "rule": "∧R", "at": [0], "premises": [1, 3]}]}
$ deduxit check swap.json
valid in the calculus given (LK): a ∧ b ⊢ b ∧ a, a derivation of 5 nodes
0. b ⊢ b ax
1. a ∧ b ⊢ b ∧L₂ 0
2. a ⊢ a ax
3. a ∧ b ⊢ a ∧L₁ 2
4. a ∧ b ⊢ b ∧ a ∧R 1, 3
$ deduxit check --format json swap.json
{"version":1,"verdict":"valid","calculus":"LK"}
A derivation is a list of terms and a list of nodes:
termsholds the formulas. A term is an atom's name, or an array of a connective and the numbers of earlier terms:["∧", 0, 1]isa ∧ b.- Each node holds its sequent, the rule that concludes it, and the numbers of its premises, which come before it. The last node is the conclusion.
- A sequent lists each zone's terms by number. LK has two zones, left
and right of
⊢. atgives the position of the formula the rule acts on, here the conjunction. A rule names the formulas it needs positions for, andchecksays when a node gives too many or too few.
Write your own rules
A rule file declares the connectives, the zones of a sequent and the
rules. This one is natural deduction for implication and conjunction.
A sequent is one formula, and →I discharges a hypothesis:
$ cat > my-nj.json
> {"version": 15, "name": "my-NJ",
> "connectives": [{"name": "→", "arity": 2, "associativity": "right"},
> {"name": "∧", "arity": 2, "precedence": 1}],
> "sequent": [{"name": "formula", "discipline": "multiset", "least": 1, "most": 1}],
> "variables": {"formula": ["A", "B"]},
> "rules": [
> {"name": "→I", "premises": [{"formula": ["B"], "discharges": [{"formula": ["A"]}]}],
> "conclusion": {"formula": [["→", "A", "B"]]}},
> {"name": "→E", "premises": [{"formula": [["→", "A", "B"]]}, {"formula": ["A"]}],
> "conclusion": {"formula": ["B"]}},
> {"name": "∧I", "premises": [{"formula": ["A"]}, {"formula": ["B"]}],
> "conclusion": {"formula": [["∧", "A", "B"]]}}]}
$ cat > pair.json
> {"version": 15, "calculus": "my-NJ",
> "terms": ["a", "b", ["∧", 0, 1], ["→", 1, 2], ["→", 0, 3]],
> "scopes": [0, 1],
> "nodes": [
> {"sequent": [[0]], "hypothesis": true, "scope": 1},
> {"sequent": [[1]], "hypothesis": true, "scope": 2},
> {"sequent": [[2]], "rule": "∧I", "premises": [0, 1], "scope": 2},
> {"sequent": [[3]], "rule": "→I", "premises": [2], "scope": 1},
> {"sequent": [[4]], "rule": "→I", "premises": [3]}]}
$ deduxit check --calculus my-nj.json pair.json
valid in the calculus given (my-NJ): a → b → a ∧ b, a derivation of 5 nodes
0. a hypothesis
1. b hypothesis
2. a ∧ b ∧I 0, 1
3. b → a ∧ b →I 2
4. a → b → a ∧ b →I 3
$ cat > escape.json
> {"version": 15, "calculus": "my-NJ",
> "terms": ["a", "b", ["∧", 0, 1]],
> "scopes": [0],
> "nodes": [
> {"sequent": [[1]], "hypothesis": true, "scope": 1},
> {"sequent": [[0]], "hypothesis": true},
> {"sequent": [[2]], "rule": "∧I", "premises": [1, 0]}]}
$ deduxit check --calculus my-nj.json escape.json; echo "exit $?"
invalid in the calculus given (my-NJ): node 2 (∧I, concluding a ∧ b): a premise lies in a scope that is closed here
exit 1
A hypothesis lies in a scope, as an assumption opens a subproof, and the list indents each node by the depth of its scope. A rule that discharges takes its premise from a scope just inside its own, and every hypothesis of that scope must be one it discharges. A line inside a closed subproof cannot be used outside it, which is what the last derivation above does. A hypothesis in the outermost scope stays an assumption: the verdict then says from how many assumptions the derivation shows its conclusion.
Build a derivation step by step
deduxit interact --calculus builds a derivation from its conclusion
up, one rule at a time, in a built-in calculus or one of your own. Give
it the sequent, written with the calculus's connectives (-> reads as
→, /\ as ∧, [] as □, <> as ◇, |- as ⊢ where the
calculus has them), and type
commands on standard input. rules lists the rules that apply to a
goal and the members they act on, each member numbered across the
zones; apply applies one backwards:
$ deduxit interact --calculus LK "a /\ b |- b /\ a"
> rules 0
WL at 0
WR at 1
CL at 0
CR at 1
∧L at 0
∧L₁ at 0
∧L₂ at 0
∧R at 1
∧R split at 1, needs Γ′, Δ′
> apply 0 ∧R 1
opened goal 1: 0: a ∧ b ⊢ 1: b
opened goal 2: 0: a ∧ b ⊢ 1: a
> apply 1 ∧L₂ 0
opened goal 3: 0: b ⊢ 1: b
> apply 2 ∧L₁ 0
opened goal 4: 0: a ⊢ 1: a
> apply 3 ax
closed
> apply 4 ax
closed; no goal is open: `proof` checks the proof
> proof
valid in the calculus given (LK): a ∧ b ⊢ b ∧ a
0. b ⊢ b ax
1. a ∧ b ⊢ b ∧L₂ 0
2. a ⊢ a ax
3. a ∧ b ⊢ a ∧L₁ 2
4. a ∧ b ⊢ b ∧ a ∧R 1, 3
The calculus's checker checks each step before the session takes it,
so a step the rules do not allow is refused with the reason, and the
goal stays open. undo takes back the last step, show lists the
derivation so far, save FILE and --state FILE keep a session, and
help lists every command.
What the goal does not determine is asked for by name. ∧R split above
needs Γ′ and Δ′, the parts of the context that go to the second
premise. In natural deduction, →E concludes B from A → B and A,
and the goal B says nothing of A: give it as NAME=TEXT. --assume
gives hypotheses the derivation may use, each goal lists the lines in
force with their numbers, and assume G closes a goal by a line in
force:
$ cat > my-nj.json
> {"version": 15, "name": "my-NJ",
> "connectives": [{"name": "→", "arity": 2, "associativity": "right"},
> {"name": "∧", "arity": 2, "precedence": 1}],
> "sequent": [{"name": "formula", "discipline": "multiset", "least": 1, "most": 1}],
> "variables": {"formula": ["A", "B"]},
> "rules": [
> {"name": "→I", "premises": [{"formula": ["B"], "discharges": [{"formula": ["A"]}]}],
> "conclusion": {"formula": [["→", "A", "B"]]}},
> {"name": "→E", "premises": [{"formula": [["→", "A", "B"]]}, {"formula": ["A"]}],
> "conclusion": {"formula": ["B"]}},
> {"name": "∧I", "premises": [{"formula": ["A"]}, {"formula": ["B"]}],
> "conclusion": {"formula": [["∧", "A", "B"]]}}]}
$ deduxit interact --calculus my-nj.json --assume "a -> b" --assume a b
> apply 0 →E
error: the step needs A given: what the goal leaves open
> apply 0 →E A=a
opened goal 1: 0: a → b
lines: 1. a → b; 2. a
opened goal 2: 0: a
lines: 1. a → b; 2. a
> assume 1
closed
> assume 2
closed; no goal is open: `proof` checks the proof
> proof
valid in the calculus given (my-NJ): b
0. a → b hypothesis
1. a hypothesis
2. b →E 0, 1
A rule that discharges opens a scope for its premise: the hypotheses
it discharges are in force there and nowhere else. A variable the rule
asks to be new (fresh) gets a new atom when it is not given. The
session's exit status is 0 when it ends with a finished derivation that
checks, and 1 otherwise.
The rule file
connectives: each with anameand anarity.sortsgives the sorts of its arguments and of the term it makes, where these are not formulas: a labelled formulax : Atakes a label and a formula.symbol,fixity(prefix,infix,postfixorfunction),precedence(higher binds tighter) andassociativitysay how it is printed.sorts: the sorts besideformula, such aslabel.sequent: the zones in the order written. Each has adiscipline:set(no order, no repeats),multiset(no order) orsequence. A zone may have amarkwritten before it (⊢), thesortof its members, and boundsleastandmoston its size: LJ is LK with at most one formula right of⊢.variables: the schematic variables of each sort;contexts: the variables that stand for the rest of a zone, such asΓ.rules: each aname, itspremisesand itsconclusion. A sequent is an object keyed by zone. An entry is a variable, a context, or an array of a connective and its arguments.["!", "Γ"]is the contextΓwith!on each member. A premise'sdischargeslists the hypotheses it discharges.- Two conditions:
freshnames variables that must be atoms new to the conclusion and to every hypothesis in force (an eigenvariable, a new label);atomicnames variables that must be atoms (the axiom of G3, the closure of a tableau branch).
Every name must be declared, so a typo is an error, not a new variable.
A rule whose contexts cannot be told apart without a search is refused.
deduxit::rules::SCHEMA in the library is the format's JSON Schema, for
an editor; each release carries it as rules.schema.json. The library's documentation of rules::Calculus and
rules::Derivation gives both forms in full.
Exit status, JSON and limits
check exits with 0 for a valid derivation, 1 for an invalid one, 3
when a limit stopped the check, and 2 for a rule file that is no
calculus. --format json writes the verdict as {"version", "verdict", "calculus"}, with the library's error and its message
for an invalid or unknown verdict, as in the first example.
The check never searches, so its work grows with the derivation's size.
It keeps to --timeout, --work-limit and --memory-limit, as the
check of a proof does, and the list of nodes to --derivation-limit.
--format latex, typst and svg draw the derivation as a tree, and
--layout fitch writes it as a Fitch proof:
Draw a proof shows both.
Check a proof in natural deduction
Natural deduction is the proof system most logic courses teach first.
deduxit ships its usual rule sets for classical, intuitionistic and
minimal logic as built-in calculi, and deduxit check checks a proof
in them step by step. A proof is a derivation in JSON, as in
Check a derivation in your own rules; deduxit interact --calculus NJ builds one for you.
Check a proof
This proof derives b ∨ a from the assumption a ∨ b in NJ, natural
deduction for intuitionistic logic. ∨E takes the assumption apart: it
opens one subproof that assumes a and one that assumes b, and both
conclude b ∨ a:
$ cat > swap.json
> {"version": 15, "calculus": "NJ",
> "terms": ["a", "b", ["∨", 0, 1], ["∨", 1, 0]],
> "scopes": [0, 0],
> "nodes": [
> {"sequent": [[2]], "hypothesis": true},
> {"sequent": [[0]], "hypothesis": true, "scope": 1},
> {"sequent": [[3]], "rule": "∨I₂", "premises": [1], "scope": 1},
> {"sequent": [[1]], "hypothesis": true, "scope": 2},
> {"sequent": [[3]], "rule": "∨I₁", "premises": [3], "scope": 2},
> {"sequent": [[3]], "rule": "∨E", "premises": [0, 2, 4]}]}
$ deduxit check swap.json
valid in the calculus given (NJ): b ∨ a, a derivation of 6 nodes from 1 assumption
0. a ∨ b hypothesis
1. a hypothesis
2. b ∨ a ∨I₂ 1
3. b hypothesis
4. b ∨ a ∨I₁ 3
5. b ∨ a ∨E 0, 2, 4
Each node is a line of the proof: one formula, and the rule and the
lines it follows from, or hypothesis. A hypothesis lies in a scope,
which is a subproof, and the list indents the lines of each subproof.
scopes gives each scope's parent: here scopes 1 and 2 both lie in the
outermost scope 0. A rule that discharges a hypothesis takes its
premise from a subproof just inside its own scope, so ∨E discharges
a in scope 1 and b in scope 2. A hypothesis in the outermost scope
is an assumption, and the verdict counts them.
The proof names its calculus, so check needs no flag. --calculus
names a built-in calculus or a rule file of your own, and the proof
must name the same calculus.
Draw a proof
check writes a proof as a tree by default, and as a Fitch proof with
--layout fitch. This proof puts the one above inside →I, which
discharges the assumption a ∨ b:
$ cat > or.json
> {"version": 15, "calculus": "NJ",
> "terms": ["a", "b", ["∨", 0, 1], ["∨", 1, 0], ["→", 2, 3]],
> "scopes": [0, 1, 1],
> "nodes": [
> {"sequent": [[2]], "hypothesis": true, "scope": 1},
> {"sequent": [[0]], "hypothesis": true, "scope": 2},
> {"sequent": [[3]], "rule": "∨I₂", "premises": [1], "scope": 2},
> {"sequent": [[1]], "hypothesis": true, "scope": 3},
> {"sequent": [[3]], "rule": "∨I₁", "premises": [3], "scope": 3},
> {"sequent": [[3]], "rule": "∨E", "premises": [0, 2, 4], "scope": 1},
> {"sequent": [[4]], "rule": "→I", "premises": [5]}]}
$ deduxit check or.json --layout fitch
valid in the calculus given (NJ): a ∨ b → b ∨ a, a derivation of 7 nodes
1 │ │ a ∨ b
│ ├───
2 │ │ │ a
│ │ ├───
3 │ │ │ b ∨ a ∨I₂ 2
4 │ │ │ b
│ │ ├───
5 │ │ │ b ∨ a ∨I₁ 4
6 │ │ b ∨ a ∨E 1, 2–3, 4–5
7 │ a ∨ b → b ∨ a →I 1–6
$ deduxit check or.json --format latex --standalone --output or.tex
$ deduxit check or.json --layout fitch --format typst --standalone --output or.typ
Each line has a number, its formula, and the rule with the lines it
follows from. A subproof's lines stand together, its hypotheses first
above a short bar, and a line at its left runs down to its last line.
A rule that discharges cites the subproof by its first and last line:
→I 1–6 takes the subproof that assumes a ∨ b and ends in b ∨ a.
The lines need not be in the file's order: check puts each subproof
together, its last line the one the rule takes. A proof whose lines
cannot be put in such an order, such as one where a line inside a
subproof uses the subproof's last line, is left out with the reason,
and the verdict stands.
--format latex, typst and svg draw either layout, as the last two
commands do. In the tree each hypothesis stands alone at a leaf. The
hypotheses a rule discharges are in brackets with a number, and the
rule carries the same number: [a]¹ and [b]² above ∨E¹˒², and
[a ∨ b]³ above →I³. A Fitch proof is written for the LaTeX package
fitch and the Typst package fitchcraft.
--style fitch.hypothesis=Hyp writes Hyp as a hypothesis's
justification, as some textbooks do.
Choose the rule set
| calculus | logic | how it differs |
|---|---|---|
NJ | intuitionistic | Gentzen's rules, with ¬I, ¬E and ex falso ⊥E |
NK | classical | NJ and RAA: ⊥ derived from ¬A gives A |
NM | minimal | NJ without ⊥E, so ⊥ is a formula with no rule |
NK-DNE | classical | NJ and ¬¬E: ¬¬A gives A |
NK-LEM | classical | NJ and LEM: A ∨ ¬A from nothing |
NJ-defined | intuitionistic | NJ without ¬: write ¬A as A → ⊥ |
NK-defined | classical | NK without ¬: RAA discharges A → ⊥ |
NM-defined | minimal | NM without ¬ |
Each rule file names its sources in its description: Gentzen's
"Untersuchungen über das logische Schließen" (1935) for NJ and NK with
LEM, Prawitz's "Natural Deduction" (1965) for RAA and for ¬A as
A → ⊥, Johansson (1937) for minimal logic, Troelstra and
Schwichtenberg's "Basic Proof Theory" (2000), and Huth and Ryan's
"Logic in Computer Science" (2004) for ¬¬E.
The rules of NJ, the premises in the order a proof lists them:
| rule | premises | concludes | discharges |
|---|---|---|---|
⊤I | none | ⊤ | |
∧I | A, B | A ∧ B | |
∧E₁, ∧E₂ | A ∧ B | A, B | |
∨I₁, ∨I₂ | A, B | A ∨ B | |
∨E | A ∨ B, C, C | C | A in the second premise, B in the third |
→I | B | A → B | A |
→E | A → B, A | B | |
¬I | ⊥ | ¬A | A |
¬E | ¬A, A | ⊥ | |
↔I | B, A | A ↔ B | A in the first premise, B in the second |
↔E₁ | A ↔ B, A | B | |
↔E₂ | A ↔ B, B | A | |
⊥E | ⊥ | A |
Every elimination takes its main premise first, the formula it takes
apart. A discharge may be empty: →I concludes A → B from B alone.
The other files have these rules but for the differences in the table
above: NM has no ⊥E, and the files with -defined have no ¬, ¬I
or ¬E, whose work →I and →E do.
A proof that uses a rule its calculus lacks is invalid, exit status 1.
Here RAA proves a from ¬¬a in NK, and NJ refuses the same proof,
named as one of NJ:
$ cat > dne.json
> {"version": 15, "calculus": "NK",
> "terms": ["a", ["¬", 0], ["¬", 1], ["⊥"]],
> "scopes": [0],
> "nodes": [
> {"sequent": [[2]], "hypothesis": true},
> {"sequent": [[1]], "hypothesis": true, "scope": 1},
> {"sequent": [[3]], "rule": "¬E", "premises": [0, 1], "scope": 1},
> {"sequent": [[0]], "rule": "RAA", "premises": [2]}]}
$ deduxit check dne.json
valid in the calculus given (NK): a, a derivation of 4 nodes from 1 assumption
0. ¬¬a hypothesis
1. ¬a hypothesis
2. ⊥ ¬E 0, 1
3. a RAA 2
$ cat > dne-nj.json
> {"version": 15, "calculus": "NJ",
> "terms": ["a", ["¬", 0], ["¬", 1], ["⊥"]],
> "scopes": [0],
> "nodes": [
> {"sequent": [[2]], "hypothesis": true},
> {"sequent": [[1]], "hypothesis": true, "scope": 1},
> {"sequent": [[3]], "rule": "¬E", "premises": [0, 1], "scope": 1},
> {"sequent": [[0]], "rule": "RAA", "premises": [2]}]}
$ deduxit check dne-nj.json; echo "exit $?"
invalid in the calculus given (NJ): node 3 (RAA, concluding a): the calculus has no rule of this name
exit 1
Build a proof step by step
deduxit interact --calculus NJ builds a proof in two directions, as
on paper:
derive G RULE L…works forwards: it applies a rule to lines in force and adds the conclusion as a new line, which later steps cite.apply G RULEworks backwards from goal G. A rule that discharges a hypothesis (→I,∨E,¬I,↔I,RAA) is applied this way, and it opens its subproof: the hypothesis becomes a new line, in force only inside it.assume Gcloses a goal by the line in force equal to it, andassume G Lby line L.
Each goal lists the lines in force with their numbers, which never change. A line of an enclosing subproof is in force in the subproofs inside it, so no reiteration is needed:
$ deduxit interact --calculus NJ "(a -> b) -> (b -> c) -> a -> c"
> apply 0 →I
opened goal 1: 0: (b → c) → a → c
lines: 1. a → b
> apply 1 →I
opened goal 2: 0: a → c
lines: 1. a → b; 2. b → c
> apply 2 →I
opened goal 3: 0: c
lines: 1. a → b; 2. b → c; 3. a
> derive 3 →E 1 3
line 4: b
> derive 3 →E 2 4
line 5: c
> assume 3
closed; no goal is open: `proof` checks the proof
> proof
valid in the calculus given (NJ): (a → b) → (b → c) → a → c
0. a → b hypothesis
1. a hypothesis
2. b →E 0, 1
3. b → c hypothesis
4. c →E 3, 2
5. a → c →I 4
6. (b → c) → a → c →I 5
7. (a → b) → (b → c) → a → c →I 6
A step names what its lines leave open as NAME=TEXT. ∨I₁ from a
needs B=b to conclude a ∨ b. Backwards, ∨E must be told the
disjunction it takes apart, and it opens two subproofs:
$ deduxit interact --calculus NJ --assume "a \/ b" "b \/ a"
> apply 0 ∨E A=a B=b
opened goal 1: 0: a ∨ b
lines: 1. a ∨ b
opened goal 2: 0: b ∨ a
lines: 1. a ∨ b; 2. a
opened goal 3: 0: b ∨ a
lines: 1. a ∨ b; 3. b
> assume 1
closed
> derive 2 ∨I₂ 2 A=b
line 4: b ∨ a
> assume 2 4
closed
> derive 3 ∨I₁ 3 B=a
line 5: b ∨ a
> assume 3 5
closed; no goal is open: `proof` checks the proof
> proof swap.json
valid in the calculus given (NJ): b ∨ a; written to swap.json
proof FILE writes the proof that check reads. A line of a subproof
that is closed is out of force: citing it is refused, and so is a line
that is not the goal. undo takes back the last step, a forward one
too, and help lists every command.
What the rule sets prove
A proof exists in NJ exactly when deduxit prove --logic intuitionistic says the sequent is valid, in NK exactly when it is
classically valid, and in NM exactly when it is valid in minimal logic.
The same holds for each variant. deduxit's tests check this both ways:
every rule is valid in its logic and the classical rules and ex falso
are not valid in a weaker one, and the proofs the ordinary suite finds
for valid sequents, rewritten into each rule set, pass the check. When
a proof will not come together, deduxit prove --logic tells you
whether the sequent is valid at all, and gives a countermodel when it
is not.
Write rules as hypotheses
Many systems of rules need no calculus of their own: a vending machine,
a chemical reaction, a game, a protocol, a Petri net. Each rule turns
some resources into others, and linear logic says exactly that. Write a
rule as an implication under !, which lets it fire as often as it
applies, and the resources as hypotheses. A sequent then asks whether
the resources can be turned into the goal, and deduxit prove decides
it. This chapter shows how, and when a calculus of your own is the
better tool.
A rule system as a sequent
A machine that sells tea for one coin and cake for two:
$ deduxit prove -i --tree never "!(coin -o tea), !(coin * coin -o cake), coin, coin, coin |- tea * cake"
provable (IMELL, intuitionistic, horn engine)
$ deduxit prove -i "!(coin -o tea), !(coin * coin -o cake), coin, coin |- tea * cake"
unprovable (IMELL, intuitionistic, horn engine): the search was exhaustive
!(coin -o tea)is the rule: one coin gives one tea, as often as there are coins. Without the!the rule would fire once.coin, coin, coinare the resources: three coins, each used once.tea * cakeis the goal: a tea and a cake together.
Three coins buy both; two do not. Each resource is used exactly once,
so a coin left over makes a sequent unprovable too. -a (affine mode)
allows resources to be left unused:
$ deduxit prove -i "!(coin -o tea), coin, coin |- tea"
unprovable (IMELL, intuitionistic, horn engine): the search was exhaustive
$ deduxit prove -i -a --tree never "!(coin -o tea), coin, coin |- tea"
provable (IMELL, intuitionistic affine, horn engine)
A sequent of this shape (rules !(a * b -o c * d), resources, a goal
of atoms) is a Horn program, and deduxit decides it with the Horn
engine, which reads it as a Petri net: the rules are transitions, the
resources a marking. The engine finds a proof as a sequence of firings,
or a refutation that deduxit check can verify (Check a proof or a
refutation). The proof is an ordinary derivation of linear
logic: the drawing above reads, from the bottom up, as the rules fired.
When to write a calculus instead
Rules as hypotheses suit rules that consume and produce things. They do not suit rules about the shape of a derivation itself: a rule that discharges an assumption, a modal rule that boxes a whole context, a rule with a side condition such as a new name, or a sequent with several zones. Those are rules of a calculus, and deduxit checks and builds derivations in a calculus you give as a rule file (Check a derivation in your own rules).
| you want | write |
|---|---|
| resources turned into others, counted | rules as hypotheses, prove |
| to know whether a goal can be reached, with a refutation if not | rules as hypotheses, prove |
| the rules of a logic, a textbook's sequent calculus or natural deduction | a rule file, check --calculus, interact --calculus |
| to check a derivation someone wrote by hand | a rule file, check --calculus |
prove searches and decides; a calculus given as data is only checked
and built step by step, never searched.
Export a proof
prove and check write the proof in the format --format names:
text, the default: the verdict line, then the derivation as a text tree;latexortypst: a proof tree to paste into a paper or slides;svg,pngorpdf: a drawing of the derivation, or with--netof its proof net;rocq: a certificate that Rocq checks;json: forprovethe whole outcome, whichcheckreads back.
--output FILE writes to a file, in the format its extension names
(.txt, .json, .tex, .typ, .svg, .png, .pdf or .v).
--format overrides the extension, and --format tex is read as
latex. --standalone writes a document that compiles on its own
(LaTeX, Typst and Rocq) in place of a fragment to paste.
$ deduxit prove -i --output proof.pdf "1, A & B, B -o C |- C"
provable (IMALL, intuitionistic, two-sided engine)
A file is made only when it holds a derivation or a net, or in JSON,
which is always written. For an unprovable sequent the verdict goes to
standard error and no file is made; the exit status gives the verdict.
An SVG on standard output is likewise a drawing or nothing.
--no-verdict leaves out the verdict line.
A program calls export::latex::to_string(&derivation, &options), or
the same function of typst, svg or rocq, for the export as one
string; each format's write writes into any fmt::Write and asks a
stop between inferences (Use the library).
LaTeX and Typst
--format latex writes the derivation as a proof tree for the
ebproof package, with the connectives
of cmll and amssymb. Two-sided trees align
their turnstiles. --format typst writes it for the
curryst package. The
verdict line becomes a comment. seq print takes the same formats for
a sequent:
$ deduxit prove -i --format latex "A, A -o B |- B"
% provable (IMLL, intuitionistic, two-sided engine)
\begin{prooftree}
\infer0[$\mathrm{ax}$]{A &\vdash A}
\infer0[$\mathrm{ax}$]{B &\vdash B}
\infer2[$\multimap\mathrm{L}$]{A, A \multimap B &\vdash B}
\end{prooftree}
$ deduxit prove --format typst "A & B |- A + B"
// provable (ALL, classical, additive engine)
#prooftree(
rule(
name: $⊕_1$,
rule(
name: $⊕_1$,
rule(name: $"ax"$, $⊢ A^⊥, A$),
$⊢ A^⊥, A ⊕ B$,
),
$⊢ A^⊥ ⊕ B^⊥, A ⊕ B$,
),
)
$ deduxit seq print -i --format latex "A * B -o C |- A -o B -o C"
$(A \otimes B) \multimap C \vdash A \multimap (B \multimap C)$
$ deduxit seq print --format typst "A * B -o C |- A -o B -o C"
$⊢ (A ⊗ B) ⊗ C^⊥, A^⊥ ⅋ (B^⊥ ⅋ C)$
--standalone writes a document that compiles on its own, cropped to
the tree. pdflatex needs the ebproof, cmll, amsfonts and standalone
packages, and typst compile fetches curryst 0.6.0 on first use:
$ deduxit prove --format latex --standalone --output proof.tex "!A |- A * !A"
$ pdflatex proof.tex
Neither form chooses a font: the output takes the fonts of the document
it goes into. Names of more than one letter are set in italics
(\mathit{foo}, italic("foo")), and the characters LaTeX or Typst
treat specially are escaped. LaTeX writes Greek letters as their
commands (\alpha), and the ‿ and · of the names read from the
LLTP library as \smallsmile and \cdotp, so that pdfLaTeX compiles
them.
High trees in Typst
Typst refuses a curryst tree with binary rules more than nine
inferences high. deduxit writes a higher tree in a layout of its own: a
#context block that lists the inferences, and the Typst code that
measures and places them. It needs no package and sets a tree of any
height. --style layout=deduxit asks for it at any height, and
layout=curryst for curryst always. premise_gap, label_gap, band
and stroke set its spacing, each a number and one of the units pt,
mm, cm, in and em:
$ deduxit prove --format typst --style layout=deduxit "A & B |- A + B" | head -12
// provable (ALL, classical, additive engine)
#context {
let open = "dots"
let gap = (1.5em).to-absolute()
let name-gap = (0.2em).to-absolute()
let band = (0.8em).to-absolute()
let stroke = 0.05em
let dots = $dots.v$
let nodes = (
(1, $⊕_1$, $⊢ A^⊥ ⊕ B^⊥, A ⊕ B$),
(1, $⊕_1$, $⊢ A^⊥, A ⊕ B$),
(0, $"ax"$, $⊢ A^⊥, A$),
Drawings: SVG, PNG and PDF
--format svg draws the derivation as an SVG image. The verdict
becomes an XML comment, and the text stays selectable. --standalone
is refused, since an SVG is always a document.
$ deduxit prove -i --format svg --output proof.svg "1, A & B, B -o C |- C"
$ deduxit prove --net --output net.svg "A * B |- B * A"
$ deduxit prove --net --style svg.net=compact --output compact.svg "A * B |- B * A"
$ deduxit prove --net --output boxes.svg "!a, !c |- !(a * a) * ?c"
$ deduxit prove --net --style svg.net_look=textbook --output textbook.svg "!a, !b, !(c * d) |- !((a * a) * (d * c))"
$ deduxit prove -i --net --style svg.essential=true --output essential.svg "A -o B, B -o C |- A -o C"
$ deduxit prove -i --net --style svg.essential=true --output essential-boxes.svg "!a, !(a -o b) |- !(b * a)"
$ deduxit seq print --format svg "A |- A"
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="70.272" height="27.2" viewBox="0 0 4392 1700" font-family="'Euler Math', 'Neo Euler', serif" font-size="1000" fill="black">
<title>⊢ A⊥, A</title>
<g>
<text x="300" y="1190" textLength="1801" lengthAdjust="spacing">⊢ 𝐴</text>
<text x="2101" y="790" textLength="611" lengthAdjust="spacing" font-size="700">⊥</text>
<text x="2712" y="1190" textLength="1380" lengthAdjust="spacing">, 𝐴</text>
</g>
</svg>
$ deduxit seq print --format svg --font stix-two "A |- A"
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="62.416" height="27.2" viewBox="0 0 3901 1700" font-family="'STIX Two Math', serif" font-size="1000" fill="black">
<title>⊢ A⊥, A</title>
<g>
<text x="300" y="1190" textLength="1636" lengthAdjust="spacing">⊢ 𝐴</text>
<text x="1936" y="790" textLength="504" lengthAdjust="spacing" font-size="700">⊥</text>
<text x="2440" y="1190" textLength="1161" lengthAdjust="spacing">, 𝐴</text>
</g>
</svg>
The first two draw these:
Proof nets
With --net, the drawing is the proof net of the proof, for the
sequents --net takes (Draw a proof net). It is drawn
as the literature draws nets:
- every subformula occurrence of the conclusions is written as its formula, where it stands in its conclusion;
- the literals stand along the top, every axiom link an arc over the two it joins;
- each
⊗or⅋link joins its two premises to its conclusion, written below them, with the connective small at the joint; - the premise edges of a
⅋are dashed and blue, since a switching keeps one of them; - the sequent's formulas stand at the bottom in its order, a literal among them reached by its link's arc.
--style svg.net=compact writes only the literals and the conclusions,
every inner ⊗ and ⅋ a small circle, for a net too wide to write
every subformula.
A net with boxes is drawn the same way. Every !-box is a rectangle
around what lies in it, nested boxes nested. Its !, and an auxiliary
door for every ? outside it with a copy inside, stand on its bottom
border. The wires from the copies leave the box through its doors,
dashed and blue like a ⅋'s premise edges, since a switching keeps one
wire of a ?. Here the box of !(a ⊗ a) holds two copies of ?a⊥:
--style svg.essential=true draws the net of an intuitionistic
sequent as its essential net:
- every formula is written as the intuitionistic reading reads it (a
hypothesis
A ⊸ B, a literal as its atom); - every edge is an arrow from the hypotheses toward the goal, the input
side in blue (
svg.input); - the links are
⊸and⊗, and each implication of the goal's side is joined to its antecedent by a dotted line (svg.dominator); - a directed cycle or a path around an implication is highlighted.
An intuitionistic net with boxes is drawn as its essential net too. A
hypothesis !A (the conclusion ?~A) and its wires are blue and led
up into its copies, its rules are those of !, and a switching cycle,
which is what decides the net, is highlighted.
--style svg.net_look=textbook draws a net as the textbooks do:
- every edge is plain;
- every conclusion stands on the bottom row;
- a
!with auxiliary doors is reached by an edge down from its door; - each
?node is drawn as the nodes of the rules: a dereliction?dunder every copy (inside the copy's box), each copy's wire leaving its boxes through doors of its own, binary contractions?cjoining them below, and a weakening?w.
Each of these three is a key of its own: svg.net_look.premises=plain,
svg.net_look.conclusions=bottom and svg.net_look.why_not=rules.
svg.net_look=deduxit is the default. Here two copies of a⊥ are
derelicted in the box and contracted below it, and ?b⊥ is weakened:
Fonts
The drawings ask for the Euler Math font without embedding it. Every
text is stretched to the width Euler Math gives it, so a viewer without
the font keeps the layout. --font sets a drawing in another math font
the command carries, and lays it out for that font: stix-two (STIX
Two Math), garamond (Garamond-Math), asana (Asana Math) or
new-computer-modern (New Computer Modern Math), or euler, the
default. --style svg.font=NAME and a style file's "font": "NAME"
say the same.
PNG and PDF
--format png and --format pdf render the same drawings as a PNG
image or a PDF page, in the math font --font names (Euler Math by
default), which the command carries. A PNG is twice the drawing's size
and carries its title and description. A PDF's text is selectable. The
verdict goes to standard error, and neither format is written to a
terminal.
The PDF is an archival PDF/A-4 document (PDF 2.0). --style pdf.compatible=true makes it PDF/A-2u (PDF 1.7), for tools and
archives that take nothing newer. --style pdf.accessible=true makes
it an accessible PDF/UA-1 document (PDF/A-2a), whose drawing a screen
reader reads as a numbered list of the proof's inferences. Every
drawing carries that reading too, as the SVG's description. The
document's date is SOURCE_DATE_EPOCH when it is set, so that a build
can reproduce it byte for byte, and the current time otherwise.
Rocq
--format rocq writes the proof as a certificate that the proof
assistant Rocq checks. Check a certificate in Rocq says how.
JSON
prove --format json writes the whole outcome: the verdict, the fragment,
the mode, the engine, the statistics, and the proof, which check
reads back (Check a proof or a refutation).
A sequent, or a proof in progress
seq print writes a sequent one-sided in negation normal form, or with
-i two-sided, as intuitionistic linear logic reads it. seq json
converts it to JSON, which a .json file or --input-format json
reads back; with -i it writes the intuitionistic sequent's own form,
whose formulas have the connectives of intuitionistic linear logic
alone. seq fragment names the sequent's fragment:
$ deduxit seq print "A * B -o C |- A -o B -o C"
⊢ (A ⊗ B) ⊗ ~C, ~A ⅋ (~B ⅋ C)
$ deduxit seq print -i "A * B -o C |- A -o B -o C"
(A ⊗ B) ⊸ C ⊢ A ⊸ (B ⊸ C)
$ deduxit seq fragment -i "A & B |- 1"
IMALL
$ deduxit seq json "A |- A"
{"version":1,"terms":[{"D":0},{"V":0}],"roots":[0,1],"atoms":["A"],"antecedents":1}
$ deduxit seq json -i "A * B -o C |- A -o B -o C"
{"version":5,"terms":[{"V":0},{"V":1},{"⊗":[0,1]},{"V":2},{"⊸":[2,3]},{"⊸":[1,3]},{"⊸":[0,5]}],"atoms":["A","B","C"],"hypotheses":[4],"goal":6}
$ deduxit seq fragment "A & B |- 1"
MALL
seq print --format also takes latex, typst, svg, png and
pdf. In interact, show --latex and show --typst draw the
derivation so far, an open goal as its sequent under vertical dots, and
show --svg draws it as an SVG (Prove step by step).
Change how an output looks
--style KEY=VALUE sets one option of the format's options. They
include the labels of the rules (upright, subscript or off), the
shape of an open goal, LaTeX's turnstile alignment, ebproof's options
and preamble, Typst's import and page, the SVG's font, sizes and
colours, a PNG's scale, and the text tree's bar and gap; --help lists
them all. A prefix such as svg. names another format's option. A
dotted key reaches into an option: labels.table.RULE=LABEL relabels
one rule (by its name in a derivation, which --help lists) and leaves
the others upright.
--style-file reads them all as JSON, one object per format, which is
the form a front end keeps. --lemma and --prelude name the Rocq
lemma and its file's first lines.
$ deduxit prove -i --format latex --style labels=subscript --style align=false "A, A -o B |- B"
% provable (IMLL, intuitionistic, two-sided engine)
\begin{prooftree}
\infer0[$\mathrm{ax}$]{A \vdash A}
\infer0[$\mathrm{ax}$]{B \vdash B}
\infer2[$\multimap_{\mathrm{L}}$]{A, A \multimap B \vdash B}
\end{prooftree}
$ deduxit prove --style gap=6 --style bar="=" "A * B |- A * B"
provable (MLL, classical, focus engine)
======= ax ======= ax
⊢ ~A, A ⊢ ~B, B
======================= ⊗
⊢ ~A, ~B, A ⊗ B
================ ⅋
⊢ ~A ⅋ ~B, A ⊗ B
$ deduxit prove --style labels.table.ax=id "A |- A"
provable (MLL, classical, focus engine)
─────── id
⊢ ~A, A
$ echo '{"svg": {"background": "white"}, "png": {"scale": 3}}' > style.json
$ deduxit prove --net --style-file style.json --output net.png "A * B |- B * A"
provable (MLL, classical, focus engine)
To keep these and every other setting in one file, use the settings file.
Check a certificate in Rocq
--format rocq writes a proof as a certificate: a file for the proof
assistant Rocq whose lemma states the
sequent and whose proof Rocq checks. A proof Rocq accepts does not
depend on deduxit's own checker.
Check one with Nix
Write the certificate with --standalone, which adds the import lines,
and give it to the flake app check-certificate. It needs only Nix with
flakes enabled (see Install deduxit):
$ deduxit prove --format rocq --standalone --output proof.v "A * B |- B * A"
$ nix run github:deduxit/deduxit#check-certificate -- proof.v
Checking proof.v with Rocq 9.1.1 and NanoYalla 1.1.3.
Lemma certificate: proved, with no axiom.
The certificate holds.
The app reads the kernel from the file's import lines and compiles the
file against the versions the flake pins: Rocq and its standard library
from nixpkgs, NanoYalla 1.1.3 and rocq-deduxit 0.4.0. A release's tag
after the repository's name (github:deduxit/deduxit/TAG) takes that
release's versions. Then the app asks Rocq which axioms each lemma
rests on, since a proof left Admitted compiles too. Its exit status
is 0 when the certificate holds, 1 when Rocq refuses the file or a
lemma rests on an axiom (a classical certificate over Prop may use
the excluded middle), and 2 when the file cannot be read. To keep the
app on your path, install the package of the same name: nix profile install github:deduxit/deduxit#check-certificate.
The app reads the lemma's statement from the file, so it cannot see a
file that redefines the names its statement uses (its own Definition ll, say): such a file proves something else. Check a certificate that
deduxit wrote, or read its statement.
Without Nix, install the kernel the certificate needs and compile it with Rocq (Check one without Nix).
The kernels
A certificate is written for one of two kernels, which --kernel
names:
nanoyalla, the default for classical linear logic;deduxit, deduxit's own Rocq library (deduxit/rocq-deduxit), the default for Mix, affine and intuitionistic logic, for a sequent with a quantifier, and the only kernel for a refutation, for a Kripke countermodel of ordinary logic and for modal logic.
The verdict line becomes a comment of the certificate.
NanoYalla
For nanoyalla the certificate is a proof script that
NanoYalla
checks, the Rocq kernel of Click & coLLecT. It is a lemma stating the
one-sided sequent over the atoms as formula variables. Its proof uses
one derived rule of the kernel per inference, with an exchange before a
⊗ where the kernel's list sequents need one, and ends with Qed, so
Rocq accepts the file only if the kernel accepts the proof. The kernel
has no rule for Mix or for the weakening of affine mode, so a proof
with either has no certificate here: a line on standard error says so,
and the verdict and its exit status stand. An intuitionistic proof is
certified as the classical proof it is.
$ deduxit prove --format rocq "A * B |- B * A"
(* provable (MLL, classical, focus engine) *)
Lemma certificate (A B : formula) : ll [parr (dual A) (dual B); tens B A].
Proof.
apply (parr_r_ext []); cbn_sequent.
apply (ex_perm_r [2; 0; 1] [dual B; tens B A; dual A]).
apply (tens_r_ext [dual B]); cbn_sequent.
{
ax_expansion.
}
{
ax_expansion.
}
Qed.
rocq-deduxit
For deduxit the certificate is a lemma stating the sequent over the
library's own calculus, with the atoms as strings. It is one-sided in
the calculus of the mode (ll classical, or with Mix or weakening),
and two-sided for an intuitionistic proof (ill intuitionistic or ill affine, hypotheses and one goal). The lemma is proved by the library's
soundness theorem from the derivation written as a proof term, which
the library's checker accepts by computation. So Rocq accepts the file
only if the checker accepts the term. Every rule has its term, Mix and
weakening included:
$ deduxit prove -i --format rocq "A, A -o B |- B"
(* provable (IMLL, intuitionistic, two-sided engine) *)
Lemma certificate : ill (atom := string) intuitionistic [ivar "A"; ilmap (ivar "A") (ivar "B")] (ivar "B").
Proof.
apply (soundness_ill String.eqb String.eqb_spec intuitionistic
(ILmapL (ivar "A") (ivar "B") (IAx "A") (IAx "B"))).
vm_compute. reflexivity.
Qed.
$ deduxit prove --format rocq --kernel deduxit "A * B |- B * A"
(* provable (MLL, classical, focus engine) *)
Lemma certificate : ll (atom := string) classical [parr (covar "A") (covar "B"); tens (var "B") (var "A")].
Proof.
apply (soundness_classical String.eqb String.eqb_spec
(Par (covar "A") (covar "B") (Tensor (var "B") (var "A") (Ax "B") (Ax "A")))).
vm_compute. reflexivity.
Qed.
A first-order proof gets a certificate of the library's first-order development, in every mode:
- the predicates are applied to terms (
tapp "f" [...]); - a bound variable is a de Bruijn index (
bound 0, the innermost quantifier's), and an eigenvariable is named by its number (eigen 0); - every instance has its quantifiers' terms substituted;
- the calculus's optional rules are named by their module
(
Calculus.classical,Intuitionistic.affine).
A ∀ step names the body it opens and its eigenvariable, which occurs
nowhere in its conclusion. An ∃ step names its witness, here a
constant that no ∀ step introduces, as a domain is never empty:
$ deduxit prove --format rocq "forall x. p(x) |- exists y. p(y)"
(* provable (MLL1, classical, focus engine) *)
Lemma certificate : ll (symbol := string) Calculus.classical [fex (covar "p" [bound 0]); fex (var "p" [bound 0])].
Proof.
apply (soundness_classical String.eqb String.eqb_spec
(Exists (covar "p" [bound 0]) (eigen 0) (Exists (var "p" [bound 0]) (eigen 0) (Ax "p" [eigen 0])))).
vm_compute. reflexivity.
Qed.
Certificates of unprovability
An unprovable sequent gets a certificate too, where its refutation is
one that check verifies, a saturated set and the basis of a backward
search excepted. It is a lemma that
the mode's calculus does not derive the sequent, proved by the
library's theorem of the refutation's invariant, which the library's
test accepts by computation. These certificates are always for
rocq-deduxit.
What the certificate names depends on the refutation:
- an unbalanced atom names the atom;
- a classical assignment names its true atoms;
- the count equation names nothing;
- a count with copies of one sign, and a Horn program's state equation,
are weighted counts. Each atom weighs an integer:
1or−1on the counted atom, or the state equation's weights. The atoms no firing of the program reaches are declared dead. The library's test asks every contribution of the sequent to the weighted count of its literals to be above zero, the copies of a?formula included (with weakening, of the formulas with one output).
A sequent with a quantifier is stated over the first-order calculus, its counts weighing a predicate whole or one closed atom; its count equation has no certificate. An exhausted search has none either, which a line on standard error says:
$ deduxit prove --format rocq "A |- B"
(* unprovable (MLL, classical, focus engine): A on the left has no A on the right to meet in an axiom *)
Lemma certificate : ~ ll (atom := string) classical [covar "A"; var "B"].
Proof.
apply (unbalanced_refutation String.eqb "A" _).
vm_compute. reflexivity.
Qed.
$ deduxit prove -i --format rocq "A + B |- A"
(* unprovable (IALL, intuitionistic, additive engine): the classical reading is false where B is true and every other atom false (! erased, ⊗ and & as and, ⊕ as or, ⊸ as implies, 1 and ⊤ true, 0 false), and every provable sequent reads as a tautology *)
Lemma certificate : ~ ill (atom := string) intuitionistic [iplus (ivar "A") (ivar "B")] (ivar "A").
Proof.
apply (iclassical_refutation _ (fun a => existsb (String.eqb a) ["B"])).
vm_compute. reflexivity.
Qed.
$ deduxit prove -i --format rocq "a, a -o b, !(b -o b * c), !(b -o d) |- b * d"
(* unprovable (IMELL, intuitionistic, horn engine): the state equation of the Petri net has no solution, so no firing of its clauses yields the goal's atoms: weighting each a by 2, b by 1, d by 1 and the clauses used once by weights of their own, no clause that can fire raises the weighted count of the atoms, and the goal asks it raised *)
Lemma certificate : ~ ill (atom := string) intuitionistic [ivar "a"; ilmap (ivar "a") (ivar "b"); ioc (ilmap (ivar "b") (itens (ivar "b") (ivar "c"))); ioc (ilmap (ivar "b") (ivar "d"))] (itens (ivar "b") (ivar "d")).
Proof.
apply (iweighted_refutation (weight_of String.eqb [("a", 2%Z); ("b", 1%Z); ("d", 1%Z)])
(fun a => existsb (String.eqb a) []) true _).
vm_compute. reflexivity.
Qed.
$ deduxit prove --format rocq "A & B |- A * B"
no certificate: an exhausted search states no invariant, so only the search rules the proofs out and Rocq has nothing to check
(* unprovable (MALL, classical, focus engine): the search was exhaustive *)
A sequent of intuitionistic or minimal logic that is not valid gets a
certificate from its Kripke countermodel: the lemma ~ lj (atom := string) intuitionistic [Γ] C (or minimal), proved by the library's
kripke_refutation from the model written as data, which the library
checks by computation (A countermodel
shows one). Its statement rests on the library's
Intuitionistic/Formulas.v and Intuitionistic/Calculus.v: the
formulas of ordinary logic and the calculus LJ, with minimal logic as
LJ without its rule for false.
Certificates of modal logic
--format rocq on a modal sequent writes a
certificate for deduxit's library whichever way the verdict goes. A
valid sequent's lemma says that it is valid over the system's frames,
valid C [Γ] [Δ]: every world of every Kripke model whose relation
meets the conditions C and forces all of Γ forces one of Δ. C is
the record of the conditions the system holds, those its axioms imply
too (T is serial as well as reflexive). The proof is the derivation in
the labelled calculus written as a term, one constructor per rule, which
the library's modal_soundness takes and its checker runs on:
$ deduxit prove --system T --format rocq '[]p |- p'
(* valid in T: □p ⊢ p, a checked derivation of 3 inferences in G3T *)
Lemma certificate : valid (atom := string) {| serial := true; reflexive := true; symmetric := false; transitive := false; euclidean := false |} [box (var "p")] [var "p"].
Proof.
apply (modal_soundness String.eqb String.eqb_spec {| serial := true; reflexive := true; symmetric := false; transitive := false; euclidean := false |} "w0"
(Ref "w0" (LBox "w0" "w0" (var "p") (Ax "w0" (var "p"))))).
vm_compute. reflexivity.
Qed.
A sequent that is not valid gets ~ valid C [Γ] [Δ], proved by
modal_refutation from its countermodel, each world with the worlds it
sees as the model lists them and the atoms it forces; the library checks
the frame conditions and the forcing by computation:
$ deduxit prove --system K --format rocq '[]p |- p'; echo "exit $?"
(* not valid in K: a checked countermodel of 1 world refutes □p ⊢ p at world 0 *)
Lemma certificate : ~ valid (atom := string) {| serial := false; reflexive := false; symmetric := false; transitive := false; euclidean := false |} [box (var "p")] [var "p"].
Proof.
apply (modal_refutation String.eqb
{| arrows := [[]];
atoms := [[]] |}
{| serial := false; reflexive := false; symmetric := false; transitive := false; euclidean := false |} 0).
vm_compute. reflexivity.
Qed.
exit 1
A derivation you build step by step gets one too: proof --rocq FILE in
interact --calculus G3S4, and check --format rocq of a derivation in
such a calculus or of an outcome. A derivation whose steps share a
premise is written as a tree, each use in full, since that is the work
the library's checker does. A root that is not every formula at
one world, such as w0 : □p, w0 R w1 ⊢ w1 : p, is stated as the labelled
sequent's validity, lvalid, and proved by labelled_soundness. The
statements rest on the library's Modal/Formulas.v, Modal/Kripke.v
and, for a labelled one, Modal/Labelled.v: the formulas, the frame
conditions and forcing. The models are those whose forcing is stable
under double negation, which every model is under excluded middle, so
no certificate assumes an axiom.
Check one without Nix
NanoYalla
Install NanoYalla 1.1.3 (the nanoyalla directory of the Click &
coLLecT repository) with Rocq 9 and its standard library: run
./configure && make && make install there, or rocq compile -R . NanoYalla nanoll.v and the same for macroll.v. Then compile the
certificate with the kernel on the load path:
$ deduxit prove --format rocq --standalone --output proof.v "!A, !B |- !(A * A)"
$ rocq compile -R path/to/nanoyalla NanoYalla proof.v
Rocq prints nothing for a certificate it accepts. The kernel needs no Yalla installation, and the certificate uses no cut and no axiom.
rocq-deduxit
The library is the package rocq-deduxit, in a repository of its own,
deduxit/rocq-deduxit. It
runs on Rocq 9.0 to 9.3 with its standard library alone. Its linear
logic is under the logical path Deduxit.Linear, and intuitionistic
and minimal logic with their Kripke models under
Deduxit.Intuitionistic. The library is released beside deduxit,
under deduxit's version number, when it changes: deduxit 0.5.0's
certificates compile against rocq-deduxit 0.4.0, the latest
(deduxit::export::rocq::DEDUXIT names it).
Build it with Nix (nix build github:deduxit/rocq-deduxit/v0.4.0), or
with make in a checkout with Rocq on the path. Built in place, a
certificate compiles with the theories on the load path:
$ deduxit prove --mix --format rocq --standalone --output mix.v "A, B |- A, B"
$ rocq compile -Q path/to/rocq-deduxit/theories Deduxit mix.v
To install it with opam, pin it to its tag. The package is not yet in
the Rocq opam archive, so opam install rocq-deduxit fails today; once
a release is there, the archive's two lines install it:
opam pin add rocq-deduxit https://github.com/deduxit/rocq-deduxit.git#v0.4.0
opam repo add rocq-released https://rocq-prover.org/opam/released
opam install rocq-deduxit
Installed, a certificate compiles as it is. opam upgrade rocq-deduxit
takes a newer release from the archive and opam remove rocq-deduxit
removes it; a package pinned to a tag stays there until pinned to the
next.
Use a certificate in another file
A certificate is a module, named by its file, so another file (use.v
here) requires it and applies its lemma. An intuitionistic certificate
states the two-sided sequent itself, so it proves that goal as written:
From Stdlib Require Import List String.
From Deduxit.Linear Require Import IntuitionisticCheck.
Import ListNotations.
Open Scope string_scope.
From Proofs Require mp.
Goal ill (atom := string) intuitionistic [ivar "A"; ilmap (ivar "A") (ivar "B")] (ivar "B").
Proof. apply mp.certificate. Qed.
Write the certificate beside it as mp.v, and compile both under one
logical name:
deduxit prove -i --format rocq --standalone --output mp.v "A, A -o B |- B"
rocq compile -R . Proofs mp.v
rocq compile -R . Proofs use.v
The library's README says what it covers and what not, and its documentation is at deduxit.github.io/rocq-deduxit.
Prove step by step
deduxit interact builds a proof one rule at a time. Give it the
sequent, then type commands on standard input, one per line. A whole
session:
$ deduxit interact "A, A -o B |- B"
> goals
goal 0: ⊢ 0: ~A, 1: A ⊗ ~B, 2: B
> apply 0 1 * 0
opened goal 1: ⊢ 0: ~A, 1: A
opened goal 2: ⊢ 0: ~B, 1: B
> close
goal 1: provable (MLL, classical, focus engine)
goal 2: provable (MLL, classical, focus engine)
no goal is open: `proof` checks the proof
> proof
valid proof (classical)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~B, B
──────────────────── ⊗
⊢ ~A, A ⊗ ~B, B
goalslists the open goals. Each goal has a number, and each formula in it a position. In the default classical mode a goal is one-sided: a hypothesis moves right of⊢as its negation, soAis~AandA -o BisA ⊗ ~B.apply 0 1 * 0applies the rule⊗to formula 1 of goal 0. A⊗splits the other formulas between its two premises: the positions after the rule's name, here 0, go to the left premise, the others to the right one.closelets the search close every open goal, andclose Gcloses goal G alone.proofchecks the finished proof with the independent checker and prints it.
help lists every command, and quit ends the session.
Choose a rule
rules G P lists the rules that act on formula P of goal G. "With a
split" means that apply takes the positions of the formulas that go
to the left premise. With -i the session is intuitionistic: goals are
two-sided, and the rules have their two-sided names, such as ⊸L for
an implication on the left:
$ deduxit interact -i "A, A -o B |- B"
> goals
goal 0: 0: A, 1: A ⊸ B ⊢ 2: B
> rules 0 1
⊸L (with a split)
> apply 0 1 -oL 2
error: a premise would have 2 formulas right of ⊢ instead of one
> apply 0 1 -oL 0
opened goal 1: 0: A ⊢ 1: A
opened goal 2: 0: B ⊢ 1: B
> apply 1 0 ax
closed
> close
goal 2: provable (IMLL, intuitionistic, two-sided engine)
no goal is open: `proof` checks the proof
> proof
valid proof (intuitionistic)
───── ax ───── ax
A ⊢ A B ⊢ B
──────────────── ⊸L
A, A ⊸ B ⊢ B
A command that fails prints error: …, and the session goes on. Name
a rule by its usual name or by its ASCII spelling:
- classical:
ax,1,bot,top,*,par,&,+1,+2,?d,?c,?w,!,mix, andwk(weakening, in affine mode); - intuitionistic:
ax,-oL,-oR,*L,*R,&L1,&L2,&R,+L,+R1,+R2,1L,1R,0L,topR,!L,!R,!c,!w.
An unknown name gets an error that lists the rules of the session, the ASCII spelling first:
$ deduxit interact "A, B |- A * B"
> apply 0 2 tensor 1
error: unknown rule `tensor`; the rules here are ax, * (⊗), par (⅋), 1, bot (⊥), &, +1 (⊕₁), +2 (⊕₂), top (⊤), !, ?d, ?c and ?w
Take back a split that cannot be closed
When a split leaves a premise that has no proof, as the counts of its
atoms show, apply makes it and prints a warning. undo takes back
the last step:
$ deduxit interact "A, B |- A * B"
> apply 0 2 * 1
opened goal 1: ⊢ 0: ~B, 1: A
opened goal 2: ⊢ 0: ~A, 1: B
warning: one premise has no proof, so this split cannot be closed; `undo` takes it back
> undo
reopened goal 0: ⊢ 0: ~A, 1: ~B, 2: A ⊗ B
Here ~B went left with A, and no axiom pairs them. apply 0 2 * 0
sends ~A left instead and can be closed.
Prove a lemma with a cut
A cut proves a formula C once and then uses it: from Γ ⊢ C and
Δ, C ⊢ D it concludes Γ, Δ ⊢ D. cut G C P… cuts goal G on C.
Write C as the session writes formulas (in ILL's syntax with -i), in
quotes if it has blanks. The formulas at the positions P go to the
first premise, which proves C. The others go to the second premise,
which takes C as a hypothesis. undo takes the cut back with its
formula. The search never makes a cut, and close proves each premise
without one:
$ deduxit interact -i "A, A -o B, B -o C |- C"
> cut 0 B 0 1
opened goal 1: 0: A, 1: A ⊸ B ⊢ 2: B
opened goal 2: 0: B ⊸ C, 2: B ⊢ 1: C
> close
goal 1: provable (IMLL, intuitionistic, two-sided engine)
goal 2: provable (IMLL, intuitionistic, two-sided engine)
no goal is open: `proof` checks the proof
> proof
valid proof (intuitionistic)
───── ax ───── ax ───── ax ───── ax
A ⊢ A B ⊢ B B ⊢ B C ⊢ C
──────────────── ⊸L ──────────────── ⊸L
A, A ⊸ B ⊢ B B ⊸ C, B ⊢ C
────────────────────────────────── cut
A, A ⊸ B, B ⊸ C ⊢ C
Eliminate cuts turns such a proof into one without cuts.
Save a session and resume it
save FILE writes the session as JSON. deduxit interact --state FILE
starts from a saved session, in the mode it was saved in. Inside a
session, load FILE resumes a saved session of the same sequent and
mode. proof FILE writes the finished proof as JSON for
check and eliminate:
$ deduxit interact "A, A -o B |- B"
> apply 0 1 * 0
opened goal 1: ⊢ 0: ~A, 1: A
opened goal 2: ⊢ 0: ~B, 1: B
> save session.json
session written to session.json
$ deduxit interact --state session.json
> close
goal 1: provable (MLL, classical, focus engine)
goal 2: provable (MLL, classical, focus engine)
no goal is open: `proof` checks the proof
> proof proof.json
valid proof written to proof.json
$ deduxit check proof.json
valid proof of ⊢ ~A, A ⊗ ~B, B (classical)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~B, B
──────────────────── ⊗
⊢ ~A, A ⊗ ~B, B
Show the derivation and export the proof
show draws the derivation so far. An open goal is its sequent alone,
with no bar above it:
$ deduxit interact "A, A -o B |- B"
> apply 0 1 * 0
opened goal 1: ⊢ 0: ~A, 1: A
opened goal 2: ⊢ 0: ~B, 1: B
> show
⊢ ~A, A ⊢ ~B, B
───────────────── ⊗
⊢ ~A, A ⊗ ~B, B
> show tree.svg
derivation so far written to tree.svg
show [--FORMAT] [FILE]prints the derivation as text, or writes it with--latex,--typst,--svg,--pngor--pdf. PNG and PDF need a FILE.proof [--FORMAT] [FILE]checks the finished proof and prints or writes it in the same formats, or with--json, or with--rocqas a certificate for Rocq.- Given a FILE and no format, both write the format the file's
extension names. Where it names none,
showwrites text andproofwrites JSON. lambdaprints the finished proof's lambda-term (Read a proof as a program).
Export a proof describes each format.
Apply the invertible rules automatically
A rule is invertible when its premises are provable whenever its
conclusion is, so applying it never loses a proof. With --invertible,
or after the command invertible on, the session applies these rules
by itself, at once to every open goal and then to the goals each step
opens:
⅋,⊥,&and⊤, in intuitionistic mode⊸R,⊗L,&R,⊕L,1L,⊤Rand0L;!when every other formula is a?;1,⊗and the axiom when their formulas are the whole goal.
Each is a step of the session. undo takes back a step together with
the invertible steps that followed it, and invertible off stops them:
$ deduxit interact --invertible "A -o B, B -o C |- A -o C"
applied 1 invertible step
> goals
goal 1: ⊢ 0: A ⊗ ~B, 1: B ⊗ ~C, 2: ~A, 3: C
> apply 1 0 ⊗ 2
then 1 invertible step
opened goal 3: ⊢ 0: ~B, 1: B ⊗ ~C, 2: C
> apply 3 1 ⊗ 0
then 2 invertible steps
closed; no goal is open: `proof` checks the proof
> undo
retracted 3 steps
reopened goal 3: ⊢ 0: ~B, 1: B ⊗ ~C, 2: C
> invertible off
invertible rules off
> apply 3 1 ⊗ 0
opened goal 4: ⊢ 0: ~B, 1: B
opened goal 5: ⊢ 0: ~C, 1: C
> invertible on
invertible rules on; then 2 invertible steps
no goal is open: `proof` checks the proof
> proof
valid proof (classical)
─────── ax ─────── ax
⊢ ~B, B ⊢ ~C, C
─────── ax ──────────────────── ⊗
⊢ A, ~A ⊢ ~B, B ⊗ ~C, C
────────────────────────────── ⊗
⊢ A ⊗ ~B, B ⊗ ~C, ~A, C
──────────────────────── ⅋
⊢ A ⊗ ~B, B ⊗ ~C, ~A ⅋ C
Quantifiers
In a sequent with quantifiers, ∀R and ∃L (forallR, existsL;
one-sided forall) open the formula with a fresh eigenvariable, written
a, b, …. ∃R and ∀L (existsR, forallL; one-sided exists)
take their witness after the rule's name: apply G P existsR T, where
the term T is made of the sequent's function symbols and the
eigenvariables the goal shows. Without a witness the rule leaves it open,
written $1, $2, …, for an axiom or close to fill in.
Prove in first-order logic has a session.
Ordinary logic
deduxit interact --logic classical, intuitionistic or minimal
proves a sequent of ordinary logic with the rules of LK or LJ, with the
same commands but cut and invertible. See
Decide ordinary logic.
Exit status
The exit status is 0 when the session ends with a finished proof that
checks, and 1 otherwise. A command that fails prints error: … on
standard output, and the session goes on. The status is 2 when the
session cannot start or cannot read its input.
The library's Interactive type has the same operations, and its JSON
form is the file save writes.
Decide many sequents at once
Write one sequent per line into a file, as NAME: SEQUENT or just
SEQUENT, and give the file to prove with --input-format lines:
$ cat > sequents.txt
> # a comment, then four sequents
> identity: A |- A
> modus ponens: A, A -o B |- B
> A |- B
> broken: A |- (
$ deduxit prove --input-format lines --file sequents.txt
identity: provable (MLL, classical, focus engine)
modus ponens: provable (MLL, classical, focus engine)
sequents.txt:4: unprovable (MLL, classical, focus engine): A on the left has no A on the right to meet in an axiom
broken: error: cannot parse the sequent
A |- (
^ unexpected end of input, expected a formula
Every sequent gets one line, in the order of the input, as soon as it
is decided. A line is named by its name, or by its file and line
number where it has none. Blank lines and everything from # on are
skipped. A sequent that cannot be read gets an error line, and the
batch goes on.
Other inputs
prove decides a batch whenever it is given more than one sequent:
--filemore than once, or a directory;--files-from LIST, a file of paths, one per line, or separated by NUL with--nullasfind -print0writes them;-reads the list from standard input;--input-format lines, as above;--input-format jsonl: one JSON value per line, a sequent asseq jsonwrites it, or a record with aname, amodeand thesequent;--input-format problems: the benchmark harness's problem files.
Paths are taken literally, relative to the current directory, with no
glob or ~. A directory is walked in sorted order, following links,
for the files of the input format's extension (.p and .json by
default). A file in the batch is named by its path as given.
A file's kind is its extension's unless --input-format says
otherwise, for a single prove as well:
.pis a problem of the LLTP library;.specis a coverability problem in the format of the Mist tool;.jsonis a sequent in JSON;- anything else is the text syntax.
An LLTP problem does not say whether it is intuitionistic (the library
keeps those under ILL/), so the flags say it:
$ cat > problem.p
> % Status (intuit.) : Theorem
> fof(rule, axiom, !(a -o b)).
> fof(fact, axiom, a).
> fof(goal, conjecture, b * 1).
$ deduxit prove -i -q --file problem.p
provable (IMELL, intuitionistic, horn engine)
A .spec problem is a Petri net or a vector addition system, as the
coverability suites of software verification write it. It has
counters, rules that test and change them, an initial marking
(x >= k for at least k tokens), and the markings to cover, one line
each. deduxit reads it as a Horn program: the rules under ! and the
initial tokens left of ⊢. Covering a marking is a question of affine
mode, so a .spec file is decided in affine mode whatever the flags
say (-i and --mix keep their meaning). Here: can two processes be
in the critical section at once, for any number of processes and one
lock?
$ cat > mutex.spec
> vars idle critical lock
> rules
> idle >= 1, lock >= 1 -> idle' = idle - 1, lock' = lock - 1, critical' = critical + 1;
> critical >= 1 -> critical' = critical - 1, idle' = idle + 1, lock' = lock + 1;
> init idle >= 1, lock = 1
> target critical >= 2
$ deduxit prove -i --affine -q --file mutex.spec
unprovable (IMELL, intuitionistic affine, horn engine): the state equation of the Petri net has no solution, so no firing of its clauses yields the goal's atoms: weighting each lock by 1 and critical by 1, no clause that can fire raises the weighted count of the atoms, and the goal asks it raised
The mode of each sequent is the flags' (else a settings file's
batch.mode), a problem file's column, or a JSON Lines record's.
On standard input, a format of many sequents is a stream: each line is answered as soon as it is decided, so a program can ask, wait for the answer and ask again.
Write each proof to a file
With a drawn format, --output DIR writes each proved sequent's
derivation into the directory, named after the sequent with the
format's extension:
$ cat > sequents.txt
> identity: A |- A
> modus ponens: A, A -o B |- B
$ deduxit prove --input-format lines --file sequents.txt --format svg --output drawings
identity: provable (MLL, classical, focus engine)
modus ponens: provable (MLL, classical, focus engine)
This writes drawings/identity.svg and drawings/modus ponens.svg. A
path keeps its directories: ILL/01/X.p becomes DIR/ILL/01/X.p.svg,
so the LLTP library's translations of one problem do not overwrite
each other. Rocq takes a file's name as its module's name, so a
certificate's name is made a Rocq identifier: every character but a
letter, digit or _ is written _. modus ponens becomes
DIR/modus_ponens.v, and ILL/01/X.p becomes DIR/ILL/entry_01/X_p.v.
JSON Lines
With --format json every answer is a JSON Lines record: the wire
level and the name first, then what --format json writes for one
sequent. With --stats it has seconds too, the time the sequent took,
which a single sequent's JSON leaves out to stay reproducible:
$ echo '{"name": "pair", "mode": "intuitionistic", "sequent": "A, B |- A * B"}' | deduxit prove --input-format jsonl --format json
{"version":1,"name":"pair","deduxit":"…","verdict":"proved","checked":true,"fragment":"IMLL","mode":"intuitionistic","engine":"two-sided","statistics":{"nodes":1,"memo_hits":0,"memo_entries":1,"splits":1,"links":0,"tests":0,"copies":0,"forward_copies":0,"work":16},"sequent":{"terms":[{"D":0},{"D":1},{"V":0},{"V":1},{"⊗":[2,3]}],"roots":[0,1,4],"atoms":["A","B"],"antecedents":2},"nodes":[{"ax":[3,0]},{"ax":[4,1]},{"⊗":[2,0,1]}]}
- A sequent that could not be read or searched has
"verdict": "error"with amessage. Where the error is the library's, such as a parse error or a bound that refused the input, the record also has the library'serrorobject, with itscode,kindanddetails. - A sequent the batch stopped before deciding it has
"verdict": "unknown"with amessage.
The exit status of a batch
The exit status is the worst verdict: an error (2) before unknown (3) before unprovable (1) before proved (0). The first batch above exits with 2. A batch that holds no sequent is an error. Ctrl-C stops the searches and ends the input, and the status is then unknown at best.
Use the cores
By default the cores go across the sequents: each worker decides one
sequent on one thread, as --deterministic does. A batch with fewer
sequents than workers, or a stream on standard input, gives each
sequent every thread instead, as a single call does. --cores across
or --cores within chooses, and --workers N caps the sequents
decided at once.
Across the cores a batch answers the most sequents in a given time, and
each answer depends on its input alone. A sequent that only the pool
of a single call decides within its time limit stays unknown there. A
second pass over the unknown sequents with --cores within costs
little, since they are few:
deduxit prove -i --file problems/ > results.txt
grep ': unknown' results.txt | cut -d: -f1 > unknown.txt
deduxit prove -i --files-from unknown.txt --cores within > second.txt
Memory and time limits
--timeoutis each sequent's time limit, its reading included.--batch-timeoutis the whole batch's: when it passes, the running searches stop and the sequents not begun are unknown.- Each search holds at most
--memory-limit. As many searches run at once as--batch-memoryholds, so a batch never holds more than that for its searches. By default it is half the memory the process may use: the machine's, or its control group's limit where one is set. --isolatedecides each sequent in a child process of its own, so that one that exhausts the memory or the stack ends only itself.
Eliminate cuts
A cut proves a formula C once and then uses it as a hypothesis: from
Γ ⊢ C and Δ, C ⊢ D it concludes Γ, Δ ⊢ D. Cut elimination
rewrites a proof with cuts into a proof of the same sequent without
them. deduxit eliminate does it on a proof file, one step at a time:
$ printf 'cut 0 B 0 1\nclose\nproof cut.json\n' | deduxit interact -i "A, A -o B, B -o C |- C" > /dev/null
$ deduxit eliminate cut.json
1. a commutative case on the cut of B
2. the axiom case on the cut of B
cut-free proof of A, A ⊸ B, B ⊸ C ⊢ C (intuitionistic) after 2 steps
───── ax ───── ax
B ⊢ B C ⊢ C
───── ax ──────────────── ⊸L
A ⊢ A B, B ⊸ C ⊢ C
───────────────────────── ⊸L
A, A ⊸ B, B ⊸ C ⊢ C
The first command writes cut.json, a proof that cuts on B. The
search never makes a cut, so such a proof comes from the cut command
of a session (Prove a lemma with a cut)
or from a file written by hand.
eliminate reads a proof file as a session's proof FILE or
prove --format json writes it. It checks the proof in the mode the
file states, or the flags' mode where the file states none. Then each
step reduces the first cut of the proof, one with no cut above it, and
prints its case and the cut formula. Every proof reached is checked.
The last one is drawn as check draws it, and -q leaves
the drawing out.
The cases
A step is one of these cases:
- the axiom case, where one premise of the cut is an axiom;
- the key case of a connective against its dual, such as
⊗against⅋; - a commutative case, which moves the cut above a rule that does not act on the cut formula;
- for the exponentials: weakening, dereliction, contraction, and a box entering a box.
A contraction copies a box, so the proof grows:
$ printf 'cut 0 !a 0\nclose\nproof contraction.json\n' | deduxit interact -i '!a |- a * a' > /dev/null
$ deduxit eliminate -q contraction.json
1. contraction on the cut of !a
2. dereliction on the cut of !a
3. a commutative case on the cut of a
4. the axiom case on the cut of a
5. a commutative case on the cut of a
6. the axiom case on the cut of a
cut-free proof of !a ⊢ a ⊗ a (intuitionistic) after 6 steps
Take a few steps, or bound the size
--steps N takes N steps at most (10 000 by default) and prints the
proof reached, cuts and all. --node-limit N refuses a step that makes
a proof of more than N nodes (100 000 by default): the exponentials can
make a proof grow beyond any practical size. A bound you set with
--steps ends with exit status 0; every other bound ends with 3:
$ printf 'cut 0 !a 0\nclose\nproof contraction.json\n' | deduxit interact -i '!a |- a * a' > /dev/null
$ deduxit eliminate --steps=2 contraction.json
1. contraction on the cut of !a
2. dereliction on the cut of !a
proof of !a ⊢ a ⊗ a (intuitionistic) with 2 cuts left after 2 steps: the elimination took the most steps allowed, 2; --steps N allows more
───── ax ───── ax ───── ax
a ⊢ a a ⊢ a a ⊢ a
───── ax ────── !L ──────────────── ⊗R
a ⊢ a !a ⊢ a a, a ⊢ a ⊗ a
────── !L ────────────────────────── cut
!a ⊢ a !a, a ⊢ a ⊗ a
─────────────────────────────── cut
!a, !a ⊢ a ⊗ a
────────────── !c
!a ⊢ a ⊗ a
$ deduxit eliminate -q --node-limit 10 contraction.json; echo "exit $?"
proof of !a ⊢ a ⊗ a (intuitionistic) with 1 cut left after 0 steps: the next step of the elimination makes a proof of more than 10 nodes; raise it with --node-limit N
exit 3
Choose the first cut
--at NODE takes the first step on the cut at that node of the proof,
and the other steps as usual. NODE is the node's index in the file's
nodes, as the checker's messages and the JSON record number nodes. A
node that is no cut is an error. Here the proof has a cut on a
(node 6) below a cut on b (node 5):
$ printf 'cut 0 a 0\ncut 2 b 0 2\nclose\nproof two.json\n' | deduxit interact -i "a, a -o b |- b" > /dev/null
$ deduxit eliminate -q two.json
1. the axiom case on the cut of b
2. the axiom case on the cut of a
cut-free proof of a, a ⊸ b ⊢ b (intuitionistic) after 2 steps
$ deduxit eliminate -q --at 6 two.json
1. the axiom case on the cut of a
2. the axiom case on the cut of b
cut-free proof of a, a ⊸ b ⊢ b (intuitionistic) after 2 steps
Eliminate on the proof net
With --net the cuts are eliminated on the proof's
proof net instead. It takes the sequents --net
takes: MLL without units, and MELL without units with boxes, classical
with or without --mix, or intuitionistic.
- The proof's cuts are the net's cut links, and each step reduces the first cut link.
- Nets have no commutative case. The cases are the axiom case, the key
case of
⊗against⅋, and on boxes weakening (which erases a box), dereliction (which opens one), contraction (which copies one) and a box entering a box. - Every net reached passes the correctness criterion.
- The net reached is printed as text, each cut link as a line
cut A[x] — A⊥[y].--node-limitcounts the net's vertices.
$ printf 'cut 0 !a 0\nclose\nproof contraction.json\n' | deduxit interact -i '!a |- a * a' > /dev/null
$ deduxit eliminate --net --steps=1 contraction.json
1. contraction on the cut of !a
proof net of !a ⊢ a ⊗ a (intuitionistic) with 2 cut links left after 1 step: the elimination took the most steps allowed, 1; --steps N allows more
!a ⊢ a ⊗ a
!a[0]: a[2] in !a[10], a[3] in !a[6]
!a[8]: a[9]
!a[12]: a[13]
cut !a[6] — !a[8]
cut !a[10] — !a[12]
a[2] — a[11]
a[3] — a[7]
a[4] — a[13]
a[5] — a[9]
proof net (the correctness criterion holds)
$ deduxit eliminate --net --format svg --output net.svg contraction.json
1. contraction on the cut of !a
2. dereliction on the cut of !a
3. the axiom case on the cut of a
4. dereliction on the cut of !a
5. the axiom case on the cut of a
cut-free proof net of !a ⊢ a ⊗ a (intuitionistic) after 5 steps
--format svg, png or pdf with --output FILE draws every net
into a file of its own:
FILE-kis the net step k was taken on (net-1.svgfornet.svg). It shows the step's cut link with a bar under its two formulas, and highlights what the step acts on: the links at its ends, its⊗and⅋, the box of its!, the box it enters. An SVG file's first line is a comment that names its step.FILEis the net reached.
Each file is written as soon as it is drawn. Each drawing is held to
--derivation-limit, and the steps' files together take 256 MiB at
most (--drawings-limit SIZE, the settings key cut.drawn_bytes).
Past that the steps go on without drawings, a line on standard error
says from which step, and FILE still holds the net reached.
JSON output
With --format json the output is the record
{"version", "proof", "steps", "end"}:
proofis the proof reached;- each step has its
cut(a node of the proof it was taken on), itsformula, itscase, andabove, the node where the step acted besides the cut, where it has one; endiscut_free, orrefusedwith itsreason.
With --net the record is {"version", "net", "steps", "end"}, with
the net reached, and each step's cut is the two vertices of its cut
link.
Exit status
- 0: no cut is left, or the steps asked for with
--steps(or a settings file'scut.steps) were taken. - 1: the proof is not valid.
- 2: an error.
- 3: the default bound on steps, another bound or the time limit stopped the elimination with cuts left. The proof reached is still printed.
In the library
linear::proofs::cut::step reduces one cut, the caller's or the
strategy's, and says which cut and which case.
linear::proofs::cut::eliminate runs to the end within cut::Options,
its first step on a cut the caller names where one is given.
linear::nets::cut::step and linear::nets::cut::eliminate do the
same on a ProofStructure or a MellStructure, and svg::net_step and
svg::mell_net_step draw a step.
Draw a proof net
A proof net shows a proof as a graph: the trees of the sequent's
formulas, and axiom links that pair each literal with its dual. Proofs
that differ only in the order of their rules have the same net. Add
--net to prove to get the net in place of the derivation:
$ deduxit prove --net "|- A * B, C * (~A par ~B), ~C"
provable (MLL, classical, focus engine)
⊢ A ⊗ B, C ⊗ (~A ⅋ ~B), ~C
A[1] — ~A[6]
B[2] — ~B[7]
C[4] — ~C[8]
proof net (the correctness criterion holds)
After the verdict come the sequent and the axiom links. Each literal
carries its vertex number, its place when the sequent's subformulas
are numbered in the order they are written. The last line is the
verdict of the correctness criterion. With the net engine
(--engine net) the net is the one the search found; with the other
engines it is read off the proof.
What the criterion checks
A switching keeps one premise edge of every ⅋ and drops the other.
The structure is a proof net, the net of some proof, when every
switching leaves a graph that is connected and has no cycle (Danos and
Regnier's criterion); with Mix, having no cycle is enough. The last
line says which criterion held:
$ deduxit prove --net --mix "|- A, ~A, B, ~B"
provable (MLL, classical with Mix, focus engine)
⊢ A, ~A, B, ~B
A[0] — ~A[1]
B[2] — ~B[3]
proof net with Mix (the correctness criterion with Mix holds)
$ deduxit prove --net --cyclic "A, A -o B |- B"
provable (MLL, cyclic, net engine)
⊢ ~B ⊗ A, ~A, B
~B[1] — B[4]
A[2] — ~A[3]
planar proof net (the correctness criterion holds, and no two links cross)
In cyclic linear logic a net must also be planar: no two links cross.
The net of a proof file
check --net checks a proof file and then shows its net:
$ deduxit prove --output proof.json "A, A -o B |- B"
$ deduxit check --net proof.json
valid proof of ⊢ ~A, A ⊗ ~B, B (classical)
⊢ ~A, A ⊗ ~B, B
~A[0] — A[2]
~B[3] — B[4]
proof net (the correctness criterion holds)
Draw it, or write it as JSON
--format svg, png or pdf, or an --output file with one of those
extensions, draws the net: the formula trees, the axiom links as arcs
over the literals, and every !-box as a rectangle around its
contents:
$ deduxit prove --net --output net.svg "A, A -o B |- B"
Export a proof shows the drawings and their
styles. A drawing estimated above --derivation-limit is left out.
--format json writes the net's document in place of the outcome. The
library reads it back as a ProofStructure, or as a MellStructure
for a net with boxes.
Nets with boxes
A proof with exponentials, in MELL without units, gets a net with
!-boxes, in classical mode with or without Mix and in intuitionistic
mode. A vertex is one instance of a subformula, since a ? formula may
be used several times. Each ? vertex is listed with its copies, each
with the !-box it lies in where that is another box than the ?'s
own. A ? formula that is never used is listed with no copy and the
literal of the axiom link its weakening hangs on:
$ deduxit prove --net "!a, !b |- !a"
provable (MELL, classical, focus engine)
⊢ ?~a, ?~b, !a
?~a[0]: ~a[3] in !a[2]
?~b[1]: no copy, hangs on a[4]
~a[3] — a[4]
proof net (the correctness criterion holds)
$ deduxit prove --net --format json "!a, !b |- !a"
{"version":4,"sequent":{"terms":[{"D":0},{"?":0},{"D":1},{"?":2},{"V":0},{"!":4}],"roots":[1,3,5],"atoms":["a","b"],"antecedents":2},"mix":false,"vertices":[[1,0,2],[5,2,2]],"links":[[4,3]],"weakenings":[[1,4]]}
Intuitionistic nets
An intuitionistic proof's net is the net of its one-sided sequent,
written as the sequent was. A hypothesis !A, whose copies the boxes
use, stands for the conclusion ?~A, and an axiom links an atom left
of ⊢ to the same atom right of it:
$ deduxit prove --net -i "!a, !(a -o b) |- !b"
provable (IMELL, intuitionistic, two-sided engine)
!a, !(a ⊸ b) ⊢ !b
!a[0]: a[3] in !b[2]
!(a ⊸ b)[1]: a ⊸ b[4] in !b[2]
a[3] — a[5]
b[6] — b[7]
proof net (the correctness criterion holds)
Where nets do not exist
Proof nets exist for MLL and MELL without units. A sequent with units
or additives, and affine mode, have none, and --net says so before
the search, with exit status 2:
$ deduxit prove --engine net "A & B |- A"
error: proof nets exist for MLL without units only, not for ALL
$ deduxit prove --net -i --affine "!a |- !a"
error: proof nets exist in linear mode only, with or without --mix, not in intuitionistic affine mode
Prove in first-order logic
First-order logic adds quantifiers over terms: forall x. A (∀x. A)
says that A holds for every x, and exists x. A (∃x. A) that it
holds for some x. prove decides such a sequent as it decides any
other. A proof names, for each ∃ it opens, the term it chose for x,
called the witness:
$ deduxit prove "p(a) & p(b), q(b) |- exists x. (p(x) * q(x))"
provable (MALL1, classical, focus engine)
───────────── ax ───────────── ax
⊢ ~p(b), p(b) ⊢ ~q(b), q(b)
──────────────────────────────── ⊗
⊢ ~p(b), ~q(b), p(b) ⊗ q(b)
───────────────────────────────── ∃
⊢ ~p(b), ~q(b), ∃x. (p(x) ⊗ q(x))
───────────────────────────────────────── ⊕₂
⊢ ~p(a) ⊕ ~p(b), ~q(b), ∃x. (p(x) ⊗ q(x))
The ∃ step fills x with the witness b. The proof passes the checker
before it is shown, as every proof deduxit reports does.
Write a first-order sequent
- An atom may be a predicate applied to terms, as in
p(x, f(a)). - A name bound by an enclosing quantifier is a variable. Any other name is a constant, or a function symbol when a bracket follows it.
- A symbol has one arity (number of arguments) throughout the sequent, and a name is a predicate or a function symbol, not both.
- A quantifier binds loosest. Its scope runs to the right as far as it can: to a closing bracket, a comma, the turnstile or the end.
- Every sequent is closed: it has no free variable.
seq print writes the one-sided form, where a negation swaps the
quantifiers. seq fragment names a first-order fragment with a 1 after
it, as in MLL1. A sequent whose atoms have arguments but which has no
quantifier is propositional, so its fragment has no 1 and every engine
decides it:
$ deduxit seq print "forall x. p(x) -o q(x), p(a) |- exists y. q(y)"
⊢ ∃x. (p(x) ⊗ ~q(x)), ~p(a), ∃y. q(y)
$ deduxit seq print "|- ∀x y. ~r(x, f(y)) ⅋ r(x, f(y)), (exists z. p(z))^"
⊢ ∀x. (∀y. (~r(x, f(y)) ⅋ r(x, f(y)))), ∀z. ~p(z)
$ deduxit seq fragment "forall x. p(x) |- p(a)"
MLL1
$ deduxit seq fragment "p(a), !p(a) -o q(f(a)) |- q(f(a))"
MELL
The syntax chapter lists every connective (The syntax).
Read the verdict
Without the exponentials ! and ?, the search decides every sequent,
since MLL1 and MALL1 are decidable: "unprovable" means that no proof
exists. The order of quantifiers matters. ∀x. ∃y. r(x, y) does not give
∃y. ∀x. r(x, y), while the converse holds:
$ deduxit prove "p(a), p(a) -o q(f(a)) |- q(f(a))"
provable (MLL, classical, focus engine)
───────────── ax ─────────────────── ax
⊢ ~p(a), p(a) ⊢ ~q(f(a)), q(f(a))
────────────────────────────────────── ⊗
⊢ ~p(a), p(a) ⊗ ~q(f(a)), q(f(a))
$ deduxit prove "forall x. exists y. r(x, y) |- exists y. forall x. r(x, y)"; echo "exit $?"
unprovable (MLL1, classical, focus engine): the search was exhaustive
exit 1
$ deduxit prove -i "exists y. forall x. r(x, y) |- forall x. exists y. r(x, y)"
provable (IMLL1, intuitionistic, two-sided engine)
───────────────── ax
r(b, a) ⊢ r(b, a)
───────────────────── ∃R
r(b, a) ⊢ ∃y. r(b, y)
───────────────────────── ∀L
∀x. r(x, a) ⊢ ∃y. r(b, y)
─────────────────────────────── ∀R
∀x. r(x, a) ⊢ ∀x. (∃y. r(x, y))
───────────────────────────────────── ∃L
∃y. (∀x. r(x, y)) ⊢ ∀x. (∃y. r(x, y))
The focused engine decides a sequent with a quantifier in the classical modes, with Mix and in affine mode too. The two-sided engine decides it in the intuitionistic modes, affine included. Both find witnesses the same way:
- The witness of each
∃stays open as a variable until an axiom matches two atoms. The match fills it in (unification), never with a term that holds the variable itself. - Each
∀opens its formula with an eigenvariable: a fresh constant that stands for any term. It is kept out of every witness chosen before it. - Where one premise's witness fails the other premise, the search asks the first premise for another witness, and resumes that premise's search where it stopped.
A refutation may count atoms, as it does without quantifiers. A predicate with a bound variable in one of its atoms is counted over all its atoms, since an instance may be any of them:
$ deduxit prove "forall x. p(x), p(a) |- p(b)"; echo "exit $?"
unprovable (MLL1, classical, focus engine): p(…) occurs 1 more time on the left than on the right, every atom of the predicate counted, since one has a bound variable, so they cannot all meet in axioms; with -a (affine), an unused hypothesis is allowed
exit 1
With exponentials
First-order linear logic with exponentials is undecidable. The copy
bound and the three verdicts work as they do without quantifiers (Decide
a sequent): --copies N bounds how often a ? formula is
copied on one branch, and --copies none, the default, deepens the bound
while the time limit lasts. A sequent the search can neither prove nor
refute ends at the time limit as unknown.
$ deduxit prove --copies 2 "p(z), !forall x. (p(x) -o p(s(x))) |- p(s(s(z)))" | head -1
provable (MELL1, classical, focus engine)
$ deduxit prove -i --copies 6 "!(forall x. (p(x) -o p(x))), !(q -o r), !(r -o q), p(e) |- r"; echo "exit $?"
unprovable (IMELL1, intuitionistic, two-sided engine): the search was exhaustive
exit 1
The second sequent is refuted by the loop check. A sequent met again on
its own branch, as the same instance, is a loop, so a hypothesis under
! that leads back to where it started is refuted instead of being cut
at the copy bound. The memo remembers a failure for every renaming of
the witnesses it leaves open. --memo-limit 0 switches both off, and the
second sequent is then unknown at its copy bound.
Two bounds of their own cut a branch where the search would go further. A search that cut one is unknown, not unprovable:
--witness-depth N(64 by default) is the deepest term a witness is filled in with.--instances N(65536 by default) is the most instances of quantified formulas the search holds at once.
$ deduxit prove --witness-depth 2 "|- exists x. p(x), ~p(f(f(f(a))))" | sed 's/after .*;/after …;/'; echo "exit $?"
unknown (MLL1, classical, focus engine): the witness depth of 2 was reached after …; raise it with --witness-depth N
exit 3
For the same verdict on every machine, bound the search with --work-limit N or --copies N and lift the time limit with --timeout none.
--deterministic also makes the proof and --stats the same on every run.
Statistics and threads
On a first-order sequent --stats adds two counters: the unifications of
two literals tried, and the witnesses bound. In JSON they are
unifications and bindings, written only where they are not zero.
$ deduxit prove -q --deterministic --stats "p(a), p(b) & q(c) |- exists x. (p(x) * p(b))"
provable (MALL1, classical, focus engine)
stable sequents visited: 2
from the memo: 0
memo entries at most: 0
splits examined: 6
unifications tried: 5
metavariables bound: 3
units of work: 36
time: 391.45µs
On several threads (--jobs, and the pool that joins the first thread
by default), a first-order sequent is searched as a propositional one is:
the threads share the choices nearest the root. Only a choice where no
rule around it may ask its premise for another witness is shared:
$ deduxit prove -q -j 4 "p(a1), p(a2), p(a3), p(a4), q(b) |- (exists x. (p(x) * q(x))) * (exists x. p(x)) * (exists x. p(x)) * (exists x. p(x))"; echo "exit $?"
unprovable (MLL1, classical, focus engine): the search was exhaustive
exit 1
Prove step by step
In interact (Prove step by step) the quantifier
rules come in two kinds:
∀Rand∃L(∀one-sided) open the formula with a fresh eigenvariable, writtena,b, … (a letter no symbol of the sequent takes).∃Rand∀L(∃one-sided) take their witness after the rule's name. The witness is a term of the sequent's function symbols and of the eigenvariables of the∀Rand∃Lsteps below the goal. With no term, the witness stays open as$1,$2, … (a$that no formula holds), and a later axiom fills it by unification, orcloseby the search.
An open witness never takes an eigenvariable made after it, which would
stand in the conclusion of its own step. This is the eigenvariable
condition, and apply reports a breach by the eigenvariable's name.
undo of the step that filled a witness leaves it open again. save
keeps the witnesses and what fills them (the session's JSON at wire level
7, its instances, with each step's mark), so that undo in a session
resumed from its file drops what the step made, as in the session saved:
$ deduxit interact -i "exists y. forall x. r(x, y) |- forall x. exists y. r(x, y)"
> apply 0 0 ∃L
opened goal 1: 1: ∀x. r(x, a) ⊢ 0: ∀x. (∃y. r(x, y))
> apply 1 0 ∀R
opened goal 2: 0: ∀x. r(x, a) ⊢ 1: ∃y. r(b, y)
> rules 2 0
∀L (with a witness or none)
> apply 2 0 ∀L
opened goal 3: 1: r($1, a) ⊢ 0: ∃y. r(b, y)
> apply 3 0 ∃R a
opened goal 4: 0: r($1, a) ⊢ 1: r(b, a)
> apply 4 0 ax
closed; no goal is open: `proof` checks the proof
> undo
reopened goal 4: 0: r($1, a) ⊢ 1: r(b, a)
> close
goal 4: provable (IMLL1, intuitionistic, two-sided engine)
no goal is open: `proof` checks the proof
> proof
valid proof (intuitionistic)
───────────────── ax
r(b, a) ⊢ r(b, a)
───────────────────── ∃R
r(b, a) ⊢ ∃y. r(b, y)
───────────────────────── ∀L
∀x. r(x, a) ⊢ ∃y. r(b, y)
─────────────────────────────── ∀R
∀x. r(x, a) ⊢ ∀x. (∃y. r(x, y))
───────────────────────────────────── ∃L
∃y. (∀x. r(x, y)) ⊢ ∀x. (∃y. r(x, y))
A cut formula, like a witness, may use only the sequent's symbols (with
their arities) and the eigenvariables of the ∀R and ∃L steps below
the goal, quantifiers included. A cut on p(a) is then the lemma about
the a at hand, the instance of ∀x. p(x)'s body. cut refuses a name
the sequent lacks or has with another arity, and an eigenvariable of
another branch, by name:
$ printf 'apply 0 2 forallR\ncut 1 "r(a)" 1\ncut 1 "p(a)" 1\nclose\nproof\n' | deduxit interact -i "forall x. (p(x) -o q(x)), forall x. p(x) |- forall y. q(y)"
opened goal 1: 0: ∀x. (p(x) ⊸ q(x)), 1: ∀x. p(x) ⊢ 2: q(a)
error: the cut formula names r, which the sequent does not have with this arity and role: in a session with quantifiers, a cut formula may use only the sequent's symbols and the goal's eigenvariables
opened goal 2: 0: ∀x. p(x) ⊢ 1: p(a)
opened goal 3: 0: ∀x. (p(x) ⊸ q(x)), 2: p(a) ⊢ 1: q(a)
goal 2: provable (IMLL1, intuitionistic, two-sided engine)
goal 3: provable (IMLL1, intuitionistic, two-sided engine)
no goal is open: `proof` checks the proof
valid proof (intuitionistic)
─────────── ax ─────────── ax
p(a) ⊢ p(a) q(a) ⊢ q(a)
─────────── ax ──────────────────────────── ⊸L
p(a) ⊢ p(a) p(a), p(a) ⊸ q(a) ⊢ q(a)
─────────────── ∀L ────────────────────────────── ∀L
∀x. p(x) ⊢ p(a) ∀x. (p(x) ⊸ q(x)), p(a) ⊢ q(a)
─────────────────────────────────────────────────── cut
∀x. (p(x) ⊸ q(x)), ∀x. p(x) ⊢ q(a)
────────────────────────────────────── ∀R
∀x. (p(x) ⊸ q(x)), ∀x. p(x) ⊢ ∀y. q(y)
Check a first-order proof
The JSON form of a first-order sequent is written at wire level 7. Beside the propositional form's keys it has:
symbols: each symbol's name with its arity;fo: the first-order terms,{"B": n}a bound variable (0for the innermost quantifier's) and{"F": [symbol, [terms]]}an application;- the atoms as
{"P": [symbol, [terms]]}, and a quantifier as{"∀": body}or{"∃": body}; binders: the quantifiers' variable names, one per quantifier in the order of the terms.
$ deduxit seq json "forall x. p(x) |- p(a)"
{"version":7,"terms":[{"D":0},{"∃":0},{"V":1}],"roots":[1,2],"atoms":[{"P":[0,[0]]},{"P":[0,[1]]}],"symbols":[["p",1],["a",0]],"fo":[{"B":0},{"F":[1,[]]}],"binders":["x"],"antecedents":1}
A proof of a first-order sequent names, for every member under quantifiers, the terms its quantifiers were opened with:
- a
∀step its eigenvariable, a fresh constant the proof numbers, as{"∀": [member, eigenvariable, premise]}; - a
∃step its witness, a closed term, as{"∃": [member, term, premise]}.
The proof's instances list each member past the sequent's occurrences
as [occurrence, frame], and each frame as [parent, term]: the
innermost quantifier's term first, null past the outermost. The proof's
own terms follow the sequent's fo (an eigenvariable is {"E": k}).
check checks such a proof with the eigenvariable condition. An
eigenvariable that a ∀ step introduces is introduced by that step
alone, and only witnesses above it name it. One that no step introduces
is a constant outside the signature, a witness like any other. The
derivation writes every instance with its terms, the eigenvariables named
after letters no symbol takes:
$ echo '{"version":7,"sequent":{"terms":[{"D":0},{"∃":0},{"V":1}],"roots":[1,2],"atoms":[{"P":[0,[0]]},{"P":[0,[2]]}],"symbols":[["p",1],["a",0],["f",1]],"fo":[{"B":0},{"F":[1,[]]},{"F":[2,[1]]}],"binders":["x"],"antecedents":1},"nodes":[{"ax":[3,2]},{"∃":[0,2,0]}],"instances":{"members":[[1,0]],"frames":[[null,2]],"terms":[]}}' | deduxit check
valid proof of ⊢ ∃x. ~p(x), p(f(a)) (classical)
─────────────────── ax
⊢ p(f(a)), ~p(f(a))
──────────────────── ∃
⊢ ∃x. ~p(x), p(f(a))
Eliminate cuts
eliminate (Eliminate cuts) eliminates the cuts of a
first-order proof as it does a propositional one, in every mode that has
the cut. A cut may be on a formula with quantifiers or on an instance of
one. The key case of ∀ and ∃ cuts the instance of the ∀ formula's
body at the ∃ step's witness: the witness takes the eigenvariable's
place throughout the ∀ step's premise, its instances and the witnesses
above included. Where another cut still reads that premise, this happens
in a copy, and a copied ∀ step takes an eigenvariable of its own. A
copy is counted against --node-limit before it is made. Every step's
line writes the instance it cut with its terms.
Here cut.json proves ∀x. p(x) ⊢ p(a) through the cut formula
∀x. p(x), by a ∀ step against a ∃ step with the witness a:
$ echo '{"version":7,"sequent":{"terms":[{"D":0},{"∃":0},{"V":1},{"V":0},{"∀":3}],"roots":[1,2],"atoms":[{"P":[0,[0]]},{"P":[0,[1]]}],"symbols":[["p",1],["a",0]],"fo":[{"B":0},{"F":[1,[]]}],"binders":["x","x"],"antecedents":1,"cuts":[4]},"nodes":[{"ax":[7,8]},{"∃":[0,2,0]},{"∀":[3,0,1]},{"ax":[9,2]},{"∃":[5,1,3]},{"cut":[3,2,4]}],"instances":{"members":[[1,0],[4,0],[6,1]],"frames":[[null,2],[null,1]],"terms":[{"E":0}]}}' > cut.json
$ deduxit eliminate cut.json
1. the key case of ∀ and ∃ on the cut of ∀x. p(x)
2. the axiom case on the cut of p(a)
cut-free proof of ⊢ ∃x. ~p(x), p(a) (classical) after 2 steps
───────────── ax
⊢ p(a), ~p(a)
───────────────── ∃
⊢ ∃x. ~p(x), p(a)
$ deduxit eliminate -i --steps=1 cut.json
1. the key case of ∀ and ∃ on the cut of ∀x. p(x)
proof of ∀x. p(x) ⊢ p(a) (intuitionistic) with 1 cut left after 1 step: the elimination took the most steps allowed, 1; --steps N allows more
─────────── ax
p(a) ⊢ p(a)
─────────────── ∀L ─────────── ax
∀x. p(x) ⊢ p(a) p(a) ⊢ p(a)
──────────────────────────────── cut
∀x. p(x) ⊢ p(a)
What quantifiers do not have yet
- Proof nets refuse a quantifier, with the exit status 2 of an error.
- A Rocq certificate of a first-order proof is written for deduxit's own Rocq library (Check a certificate in Rocq); NanoYalla's kernel has no quantifiers.
- A first-order proof has no lambda-term (Read a proof as a program).
$ deduxit prove --net "forall x. p(x) |- p(a)"; echo "exit $?"
error: proof nets exist for MLL without units only, not for MLL1
exit 2
Decide ordinary logic
deduxit also decides ordinary propositional logic, in three variants:
- classical logic, where every formula is true or false, so that
a \/ ~aholds; - intuitionistic logic, where a proof of a formula must build it, so
that
a \/ ~aand~~a -> ado not hold in general; - minimal logic, intuitionistic logic in which false is an ordinary atom: nothing follows from it.
Name the logic with --logic and give prove a formula or a sequent:
$ deduxit prove --logic classical '((a -> b) -> a) -> a'
valid (classical logic by the affine translation into affine MALL, focus engine)
──────── ax
a ⊢ b, a
────────── →R ───── ax
⊢ a → b, a a ⊢ a
───────────────────── →L
(a → b) → a ⊢ a
─────────────────── →R
⊢ ((a → b) → a) → a
$ deduxit prove --logic intuitionistic 'a \/ b -> b \/ a'
valid (intuitionistic logic by the SAT solver)
───── ax ───── ax
a ⊢ a b ⊢ b
───────── ∨R₂ ───────── ∨R₁
a ⊢ b ∨ a b ⊢ b ∨ a
───────────────────────── ∨L
a ∨ b ⊢ b ∨ a
─────────────────── →R
⊢ (a ∨ b) → (b ∨ a)
$ deduxit prove --logic intuitionistic '~~a -> a'
not valid (intuitionistic logic by the SAT solver): a checked countermodel refutes it
world 0 (the model's world): forces nothing; below 1, 2
world 1: forces a; below 3
world 2: forces nothing; below 3
world 3: forces a
Read the answer
valid: the sequent is a theorem of the logic. deduxit shows its proof in Gentzen's sequent calculus, LK for classical logic and LJ for the other two, and checks it by the rules of the logic before it is shown. The exit status is 0.not valid: no proof exists in LK or LJ, so the sequent is not a theorem of that logic.~~a -> aabove is a classical theorem, but not an intuitionistic one. The exit status is 1. The lines after it are a countermodel (A countermodel).unknown: a limit, such as the time limit, stopped the search before it decided. The exit status is 3, and the line says which limit it was.
The words in brackets name the logic and how deduxit decided the sequent: by LJT, or through a translation into linear logic and the engine that searched there (How a sequent is decided).
The line of a classical sequent that is not valid may name an
assignment of truth values that makes it false. Here a -> b fails
where a is true and b false:
$ deduxit prove --logic classical 'a -> b'; echo "exit $?"
not valid (classical logic by the affine translation into affine MALL, focus engine): the translated sequent is unprovable: the classical reading is false where a is true and every other atom false (! and ? erased, ⊗ and & as and, ⅋ and ⊕ as or, 1 and ⊤ true, ⊥ and 0 false), and every provable sequent reads as a tautology
exit 1
Write a formula
The connectives are ->/→, /\/∧, \//∨, ~/¬, <->/↔,
true/⊤ and false/⊥. ~ binds tightest, then /\, \/, ->,
and last <->. -> and <-> group to the right. A sequent such as
a, a -> b |- b has hypotheses left of |-; a formula alone is the
sequent with nothing on the left.
How a sequent is decided
--method chooses how (the settings key ordinary.method):
satis a SAT solver, for all three logics, and the default for each. Its search always ends. A sequent that is not valid comes with a countermodel, which is checked: a Kripke model in intuitionistic and minimal logic, an assignment of the atoms in classical logic. A valid sequent comes with a derivation of LJ in intuitionistic and minimal logic. By default that derivation is LJT's, which is smaller, and where LJT gives none, the one read off the solver's search;--method satalways reads it off the search. In classical logic a valid sequent comes with the solver's clausal proof: every step follows from the clauses of the sequent's negation and the steps before it by unit propagation, and the last step is the empty clause. A checker of deduxit's own accepts it before the verdict is given. A clausal proof is no derivation, so nothing is drawn.embeddingtranslates the sequent into linear logic, searches the image there and reads the proof back as one of LK or LJ. It decides all three logics, and gives the derivation of LK, the refutation and the certificates that the SAT solver does not give.ljtis Dyckhoff's calculus LJT, for intuitionistic and minimal logic. Its search always ends too.tableandtableau, for classical logic, decide the sequent by its truth table or by a tableau, as a first logic course does, and print the table or the tableau (Truth tables and tableaux).
$ deduxit prove --logic classical --method sat -q '((a -> b) -> a) -> a'
valid (classical logic by the SAT solver): a checked clausal proof of 1 step against the 6 clauses of the sequent's negation
$ deduxit prove --logic intuitionistic --method sat '((a -> b) -> a) -> a'; echo "exit $?"
not valid (intuitionistic logic by the SAT solver): a checked countermodel refutes it
world 0 (the model's world): forces nothing; below 1, 2
world 1: forces a; below 3
world 2: forces nothing; below 3
world 3: forces a
exit 1
On the ILTP library's 274 problems, with 2 seconds each, the SAT solver decides 252 in intuitionistic logic and 253 in minimal logic, LJT 200 and the embedding 188 in each. In classical logic the SAT solver decides 254 and the embedding 157. The SAT solver decides every problem the others decide. The classical default decides the same 254, and gives the embedding's output for the 124 the embedding answers with its evidence within 2 seconds: 123 derivations of LK and one refutation. The 186 problems all three decide in intuitionistic logic take it 26 ms in all, LJT 313 ms and the embedding 11.6 s (the measurement).
In classical logic the default keeps the embedding's output where the
embedding gives it quickly. Once the SAT solver has decided, the
embedding searches for at most 2²⁰ units of work, on an image of at
most 2²⁰ occurrences, which costs a median of 16 ms on ILTP and at most
0.1 s. Where it
proves the sequent, you get its verdict line, its derivation of LK and
its certificate, as --method embedding gives them; where it refutes
the sequent, its refutation. Otherwise the solver's clausal proof or
countermodel stands. A larger --work-limit or --occurrence-limit
does not raise these bounds, and a smaller one lowers them;
--method embedding gives the embedding the whole time limit.
Where the SAT solver stops at a bound other than the time limit, such
as a derivation past --derivation-limit, the default hands the
sequent to the embedding, and the verdict line names the translation.
--method sat reports the bound instead. --translation and --linear
name the embedding, so either of them alone chooses it. Through the
embedding, a not valid says that the translated sequent is
unprovable:
$ deduxit prove --logic intuitionistic --method embedding -q '~~a -> a'
not valid (intuitionistic logic by the cbn translation into ILL, two-sided engine): the translated sequent is unprovable: the search was exhaustive
$ deduxit prove --logic minimal --stats -q 'a, a -> b |- b'
valid (minimal logic by the SAT solver)
solver calls: 1
conflicts: 0
lemmas: 0
worlds: 0
facts derived: 3
clauses: 0
proof steps: 0
derivation by LJT: 2 sequents expanded
time: …
LJT's derivation of LJ uses Gentzen's cut for four of its rules, so its
lambda-term (Read a proof as a program) may hold a redex and
its certificate a let.
The translations
Through the embedding, classical logic goes into affine MALL without
exponentials (negation normal form, ∧ as &, ∨ as ⅋), where the
search needs no copy bound. Intuitionistic logic goes into
intuitionistic linear logic (ILL) by one of three translations, which
--translation names:
cbn, Girard's call-by-name translation, the default;cbv, his call-by-value one;01, Liang and Miller's 0/1 translation.
Minimal logic is the same with false an atom. In ILL the search deepens
its copy bound under the time limit, so an intuitionistic formula may be
answered unknown (exit status 3). seq print shows the image, and
--linear the linear proof of it:
$ deduxit seq print --logic intuitionistic --translation cbv 'a, a -> b |- b'
!a, !(!a ⊸ !b) ⊢ !b
$ deduxit seq print --logic minimal '~a |- a -> b'
!(!a ⊸ false) ⊢ !a ⊸ b
$ deduxit prove --logic intuitionistic --linear 'a, a -> b |- b'
valid (intuitionistic logic by the cbn translation into ILL, two-sided engine)
───── ax
a ⊢ a
────── !L
!a ⊢ a
─────── !R ───── ax
!a ⊢ !a b ⊢ b
────────────────── ⊸L
!a, !a ⊸ b ⊢ b
───────────────── !L
!a, !(!a ⊸ b) ⊢ b
A countermodel
A sequent that is not valid comes with a Kripke model that shows why.
The model has worlds, each forcing some atoms. A world lies below the
worlds its arrows reach, and every world forces what each world below it
forces. A world forces A -> B when every world at or above it that
forces A forces B, and ~A is A -> false. Only in minimal logic
can a world force false; in the other logics a world forces ~A when
no world at or above it forces A.
The model's world forces every formula left of |- and not the one
right of it, so the sequent cannot be a theorem. In the example at the
top, world 0 forces neither a nor ~a, since world 1 above it forces
a; so it forces ~~a and not a.
In classical logic the model has one world: the atoms it forces are
true, the others false. By default the verdict line names those atoms
itself; where it cannot, the model follows it. In minimal logic a world may force false, as
an atom. deduxit checks the model before it gives the verdict, and
check checks it again in a file prove --format json wrote. LJT
(--method ljt) finds no model: its "not valid" says the search was
exhaustive. A model past a size bound is not shown or checked, and the
verdict line says so.
To check a model of your own, write it in JSON and give check the
logic and the sequent. The model holds each world's atoms and its
arrows, by the index of the world above:
$ echo '{"worlds": [{"atoms": [], "arrows": [1]}, {"atoms": ["a"]}]}' > model.json
$ deduxit check --logic intuitionistic --sequent 'a \/ ~a' model.json; echo "exit $?"
the model does not satisfy ⊢ a ∨ ¬a at every world: world 0 forces each formula left of ⊢ and not the one right of it
at world 0: a not forced
at world 0: ¬a not forced
at world 0: a ∨ ¬a not forced
exit 1
$ deduxit check --logic intuitionistic --sequent 'a \/ ~a' --world 1 model.json
the model satisfies ⊢ a ∨ ¬a at world 1
A world gets "falsity": true where it forces false (minimal logic).
check first checks that the file is a model of the logic: its arrows
do not go round, every world forces what each world below it forces,
and only minimal logic has falsity. A key it does not know, such as a
misspelt arrows, is an error. The exit status is 0 where the sequent
holds, 1 where it fails, and 2 for a file that is no model of the logic.
--format svg, png and pdf draw the model: each world a box with
the atoms it forces, its number w₀, w₁, … beside it, an arrow up to
each world directly above it, and the model's world outlined in orange.
The drawing's description, which a screen reader reads, says what each
world forces and why the sequent fails. LaTeX and Typst draw no model.
check draws one too: the countermodel of an outcome, or a model of
your own at the world where it fails.
$ deduxit prove --logic intuitionistic --format svg --output model.svg 'a \/ ~a'
--format rocq writes the model as a certificate for deduxit's Rocq
library (Check a certificate in Rocq): a lemma that LJ, or
minimal logic, does not derive the sequent, proved by the library's
theorem that a Kripke model refutes what it does not satisfy. The model
is written as data: for each world the worlds above it, the atoms it
forces, and the worlds that force false. The library checks it by
computation. check --format rocq writes the same for a countermodel
in an outcome, and for a model of your own at the world where it fails.
$ deduxit prove --logic intuitionistic --format rocq 'a \/ ~a'
(* not valid (intuitionistic logic by the SAT solver): a checked countermodel refutes it *)
Lemma certificate : ~ lj (atom := string) intuitionistic [] (vee (var "a") (neg (var "a"))).
Proof.
apply (kripke_refutation String.eqb String.eqb_spec intuitionistic
{| later := [[1]; []];
atoms := [[]; ["a"]];
absurd := [] |} 0).
vm_compute. reflexivity.
Qed.
Truth tables and tableaux
For classical logic, --method table and --method tableau decide a
sequent the way a first logic course does, and print the table or the
tableau in place of a derivation.
The truth table has a row for every assignment of the atoms, from all
true to all false. A row marked × makes every formula left of |-
true and every formula right of it false, so it falsifies the sequent:
$ deduxit prove --logic classical --method table 'a -> b |- b -> a'; echo "exit $?"
not valid (classical logic by its truth table): 1 of its 4 rows falsifies it, a checked countermodel
a b │ a → b ⊢ b → a
T T │ T T
T F │ F T
F T │ T F ×
F F │ T T
world 0 (the model's world): forces b
exit 1
The rows double with each atom, so --method table refuses a sequent
of more than 10 atoms. --table-atoms N raises the bound (the settings
key limits.table_atoms), and none lifts it. check takes the same
flag to check a table made with a raised bound.
A tableau marks each formula T (true) or F (false). It starts from
the sequent, its hypotheses true and the formulas right of |- false,
and expands one formula at a time: a true p ∨ q splits the branch in
two, one where p is true and one where q is. A branch closes, ×,
where a formula is both true and false, ⊥ true or ⊤ false. Each line
names the rule of LK that made it and the line it expands:
$ deduxit prove --logic classical --method tableau 'p \/ q, p -> r, q -> r |- r'
valid (classical logic by a tableau): every branch closes, a checked derivation of LK
1 T p ∨ q
2 T p → r
3 T q → r
4 F r
├─ 5 T p ∨L 1
│ ├─ 6 F p →L 2
│ │ × 5, 6
│ └─ 7 T r →L 2
│ × 7, 4
└─ 8 T q ∨L 1
├─ 9 F p →L 2
│ ├─ 10 F q →L 3
│ │ × 8, 10
│ └─ 11 T r →L 3
│ × 11, 4
└─ 12 T r →L 2
× 12, 4
A closed tableau is a derivation of LK read upside down: a branch is a
goal, its T formulas left of ⊢ and its F formulas right. deduxit
builds it step by step, checks every step by the rules of LK, and checks
the finished derivation, which --format latex and the other drawn
formats draw. A branch left open, with nothing more to expand, gives an
assignment that falsifies the sequent: its true atoms are those the
countermodel forces.
$ deduxit prove --logic classical --method tableau 'a -> b |- b -> a'
not valid (classical logic by a tableau): an open branch gives a checked countermodel
1 T a → b
2 F b → a
3 T b →R 2
4 F a →R 2
├─ 5 F a →L 1
│ open
└─ 6 T b →L 1
open
world 0 (the model's world): forces b
With --format json, the outcome holds the table or the tableau under
search (wire level 14): the table's rows as a T or F per formula of
its sequent's form, and the tableau's nodes, each before its children,
with its signed lines and either the line it expands or how its branch
ends.
Check a tableau written by hand
deduxit check --tableau reads a signed tableau that a student wrote,
checks it rule by rule, and names the first step that breaks a rule.
The tableau is text, one line per signed formula, as on paper and as in
the forall x and Open Logic Project books:
- a line is its number,
TorF, the formula, and at its end the number of the line it expands. A rule's name may come before that number (F∨ 2,∨R 2orF\/ 2), and is then checked too; - the first lines, which expand no line, are the sequent's: its
hypotheses
Tand its conclusionsF; - a branch starts with
-under the lines it goes on from, its lines indented to the column after the-. The tree thatprove --method tableauprints, with├─and└─, reads as well; ×(orx) under a branch closes it, followed by the two lines of a formula true and false, or by the one line of⊥true or⊤false.openmarks a branch that stays open.
A tableau with every step right and every branch closed proves the sequent valid:
$ deduxit check --tableau; echo "exit $?"
> 1 T p \/ q
> 2 F q \/ p
> 3 F q 2
> 4 F p 2
> - 5 T p 1
> × 4, 5
> - 6 T q 1
> × 3, 6
closed tableau of p ∨ q ⊢ q ∨ p: every step follows the rules and every branch closes, so the sequent is valid in classical logic
exit 0
A wrong step is named with its line, its rule and what the rule gives, and the exit status is 1:
$ deduxit check --tableau; echo "exit $?"
> 1 T p /\ q
> 2 F q
> 3 T p 1
> 4 T r 1
wrong tableau of p ∧ q ⊢ q: line 4: T∧ on line 1 (T p ∧ q) adds T p and T q, not T r
exit 1
The check also says where a branch is marked wrongly (× with nothing
that closes it, open on a branch that closes or has a formula left to
expand) and which branch is not finished yet. A finished open branch
makes the sequent not valid: its true atoms give a countermodel, which
is checked against the sequent and printed. --sequent names the
sequent the tableau must start from, as an exercise sets it:
$ deduxit check --tableau --sequent 'a -> b |- b -> a'
> 1 T a -> b
> 2 F b -> a
> 3 T b 2
> 4 F a 2
> - 5 F a 1
> open
> - 6 T b 1
> open
open tableau of a → b ⊢ b → a: every step follows the rules, every branch is finished, and the branch ending at line 5 is open, so the sequent is not valid in classical logic: a checked countermodel
world 0 (the model's world): forces b
An equivalence expands either way: by its sides' values, as the
textbooks do (T p ↔ q into T p, T q and F p, F q), or into its two
implications, as LK does. A tableau without a fault is checked once more
as a derivation in the built-in calculus tableau (see
Calculi given as data), so a closed tableau is a checked
proof. --format json writes the review: {"version": 14, "standing": "closed"|"open"|"unfinished"|"wrong", "sequent", "text_line", "line", "message", "countermodel"}, where text_line is the line of the text
the message is about and line the tableau's own number for it.
Draw the derivation
The derivation is checked with every weakening and contraction as an
inference of its own. It is drawn with each of them left out where it is
admissible, so that it reads as in G3, whose axiom takes a context
(a ⊢ b, a above) and whose rules contract what they use twice.
--structural explicit draws every one (the key view.structural), and
a certificate names every one whatever the flag says:
$ deduxit prove --logic classical --structural explicit '((a -> b) -> a) -> a'
valid (classical logic by the affine translation into affine MALL, focus engine)
───── ax
a ⊢ a
──────── WR
a ⊢ b, a
────────── →R ───── ax
⊢ a → b, a a ⊢ a
───────────────────── →L
(a → b) → a ⊢ a
─────────────────── →R
⊢ ((a → b) → a) → a
--format latex, typst, svg, png and pdf draw the derivation of
LK or LJ. --format rocq writes a certificate over Prop that needs no
library; a classical one uses the standard library's excluded middle.
For a sequent that is not valid, where its image's refutation or the SAT
solver's model is a classical assignment, the certificate is the lemma
that the formula does not hold for all propositions, proved by
instantiating the atoms with True and False. A Kripke countermodel
of intuitionistic or minimal logic has a certificate of its own
(A countermodel).
$ deduxit prove --logic classical --format rocq 'a \/ ~a'
(* valid (classical logic by the affine translation into affine MALL, focus engine) *)
Lemma certificate : forall a : Prop, (a \/ ~ a).
Proof.
exact (fun (a : Prop) => NNPP (a \/ ~ a) (fun k'1 : ~ (a \/ ~ a) => (let k'2 : ~ a := fun x' => k'1 (or_introl x') in let k'3 : ~ (~ a) := fun x' => k'1 (or_intror x') in (k'3 (fun h'4 : a => (k'2 h'4)))))).
Qed.
$ deduxit prove --logic classical --format rocq 'a -> b, b |- a'
(* not valid (classical logic by the affine translation into affine MALL, focus engine): the translated sequent is unprovable: the classical reading is false where b is true and every other atom false (! and ? erased, ⊗ and & as and, ⅋ and ⊕ as or, 1 and ⊤ true, ⊥ and 0 false), and every provable sequent reads as a tautology *)
Lemma certificate : ~ (forall a b : Prop, (a -> b) -> b -> a).
Proof.
intro H. specialize (H False True). tauto.
Qed.
Read a problem file
A .p file under --logic is a problem in TPTP's syntax, as the ILTP
library writes them (nix build .#iltp fetches its 274 propositional
problems). The batch (Decide many sequents at once) takes a
directory of them.
$ echo 'fof(pel1, conjecture, (p => q) <=> (~ q => ~ p)).' > pel1.p
$ deduxit prove --logic intuitionistic --quiet --file pel1.p
not valid (intuitionistic logic by the SAT solver): a checked countermodel refutes it
$ deduxit prove --logic classical --quiet --file pel1.p
valid (classical logic by the affine translation into affine MALL, focus engine)
JSON output
With --format json every method writes the outcome of the ordinary
sequent: its verdict (valid, not_valid, or unknown with a
reason), its logic, the search that decided it and, for a valid
sequent, its evidence. search says the method in method; LJT and the
SAT solver add their statistics:
$ deduxit prove --logic intuitionistic --format json '~~a -> a'
{"version":12,"deduxit":"0.5.0","verdict":"not_valid","logic":"intuitionistic","search":{"method":"sat","statistics":{"calls":4,"conflicts":0,"lemmas":0,"worlds":4,"facts":0,"clauses":0,"proof_steps":0,"ljt":null}},"countermodel":{"sequent":{"formulas":[{"V":0},{"¬":0},{"¬":1},{"→":[2,0]}],"atoms":["a"],"left":[],"right":[3]},"model":{"worlds":[{"atoms":[],"arrows":[1,2]},{"atoms":["a"],"arrows":[3]},{"atoms":[],"arrows":[3]},{"atoms":["a"]}],"world":0}}}
Through the embedding, search holds the translation and, under
image, the outcome of the search on the image, as prove writes it
without --logic (its proof, or its refutation):
$ deduxit prove --logic classical --method embedding --format json 'a |- b'
{"version":12,"deduxit":"0.5.0","verdict":"not_valid","logic":"classical","search":{"method":"embedding","translation":"affine","image":{"verdict":"unprovable","refutation":{"kind":"classical","assignment":[true,false]},"fragment":"MLL","mode":"affine","engine":"focus","statistics":{"nodes":1,"memo_hits":0,"memo_entries":1,"splits":0,"links":0,"tests":0,"copies":0,"forward_copies":0,"work":16},"sequent":{"terms":[{"D":0},{"V":1}],"roots":[0,1],"atoms":["a","b"],"antecedents":0}}},"countermodel":{"sequent":{"formulas":[{"V":0},{"V":1},"⊥"],"atoms":["a","b"],"left":[0],"right":[1]},"model":{"worlds":[{"atoms":["a"]}],"world":0}}}
A valid sequent has its derivation. One valid by a clausal proof has
clausal_proof in its place, with the counts of its variables, clauses
and steps. Where the embedding proved the image but a bound or the time
limit refused its derivation, neither is there, and the image's proof
is the evidence:
$ deduxit prove --logic classical --method sat --format json 'a \/ ~a'
{"version":12,"deduxit":"0.5.0","verdict":"valid","logic":"classical","search":{"method":"sat","statistics":{"calls":1,"conflicts":1,"lemmas":0,"worlds":0,"facts":0,"clauses":4,"proof_steps":1,"ljt":null}},"clausal_proof":{"variables":3,"clauses":4,"steps":1}}
--linear writes the image's outcome alone, as without --logic.
check reads every outcome prove --logic writes, and a derivation of
LK or LJ. It checks the derivation by the rules of its calculus, and the
image's proof or refutation where the embedding found one:
$ deduxit prove --logic intuitionistic --format json 'a |- a' > valid.json
$ deduxit check --file valid.json
valid derivation in LJ of a ⊢ a (intuitionistic logic)
───── ax
a ⊢ a
A clausal proof is written as its counts, LJT and the SAT solver write
no refutation of a sequent that is not valid, and an unknown holds no
proof: there check says the file holds nothing to check, with exit
status 3.
Step by step
deduxit interact --logic classical, intuitionistic or minimal
proves the sequent step by step by the rules of LK or LJ. The session
has the commands of a linear session (Prove step by
step): goals, rules, apply, undo, close,
show, proof, save, load, help and quit.
- A formula is named by its side and its position there:
L0,L1, … left of⊢andR0,R1, … right of it, asgoalslists them. - A rule is named by its name or an ASCII spelling:
andR,orR1,->LorimpL,~RornotR,iffL1,falseL,WL,CR. - The axiom closes a goal that has its formula on both sides, whatever else it holds.
- A rule with two premises gives both the whole context, as LJ's
→Ldoes in G3. Formulas named after the rule go to the first premise instead, and the rest to the second:apply 1 L1 ->L L0sendsL0to the first. closedecides a goal through the embedding, whose derivations have no cut, by the translation--translationchooses. It grafts the derivation found, whichundotakes back whole.
$ deduxit interact --logic intuitionistic 'a -> b, b -> c |- a -> c'
> goals
goal 0: L0: a → b, L1: b → c ⊢ R0: a → c
> apply 0 R0 ->R
opened goal 1: L0: a → b, L1: b → c, L2: a ⊢ R0: c
> rules 1 L1
WL CL →L (with a split or none)
> apply 1 L1 ->L
opened goal 4: L0: a → b, L1: a ⊢ R0: b
opened goal 5: L0: a → b, L1: c, L2: a ⊢ R0: c
> apply 5 L1 ax
closed
> close 4
goal 4: valid (intuitionistic logic by the cbn translation into ILL, two-sided engine)
no goal is open: `proof` checks the proof
> proof
valid proof in LJ (intuitionistic logic)
───── ax ───── ax
a ⊢ a b ⊢ b
──────────────── →L ─────────────── ax
a → b, a ⊢ b a → b, c, a ⊢ c
─────────────────────────────────── →L
a → b, b → c, a ⊢ c
──────────────────── →R
a → b, b → c ⊢ a → c
In intuitionistic and minimal logic every goal keeps one formula right
of ⊢:
- A sequent with none starts as
Γ ⊢ ⊥. - The rules of LK that would leave a premise with none or two (
WR,CR,⊥R,∨Rwith both disjuncts) are refused with the reason. ¬Rand¬Ltake the form of→Rand→LforA → ⊥.- Minimal logic has no
⊥L.
The goals the search cannot decide stay open with the reason, as prove
gives it. show draws the derivation so far, open goals as bare
sequents. proof checks the finished one and prints it in every format
of prove, --structural choosing how the structural rules are drawn
(proof --rocq names every one). save writes the session as JSON,
which --state FILE resumes:
$ deduxit interact --logic minimal 'a |- ~~a'
> apply 0 R0 ~R
opened goal 1: L0: a, L1: ¬a ⊢ R0: ⊥
> apply 1 R0 falseR
error: the rule ⊥R is not available in minimal logic: its premise would have no formula right of ⊢, and every goal of LJ has exactly one
> apply 1 L1 ~L
opened goal 3: L0: a ⊢ R0: a
opened goal 4: L0: a, L1: ⊥ ⊢ R0: ⊥
> close
goal 3: valid (minimal logic by the cbn translation into ILL, horn engine)
goal 4: valid (minimal logic by the cbn translation into ILL, horn engine)
no goal is open: `proof` checks the proof
> proof --rocq
valid proof in LJ (minimal logic)
Lemma certificate : forall a : Prop, a -> (~ ~ a).
Proof.
exact (fun (a : Prop) (h'1 : a) => (fun h'2 : (~ a) => (let h'3 : False := h'2 (h'1) in h'3))).
Qed.
Decide modal logic
Modal logic adds two prefixes to ordinary logic: □A, "necessarily A",
and ◇A, "possibly A". A Kripke model gives them their meaning: it has
worlds, each world sees some worlds, and □A holds at a world when A
holds at every world it sees, ◇A when A holds at one of them. Which
sequents are valid depends on what the seeing may be: a system names
the conditions, such as S4, where every world sees itself and whatever
the worlds it sees see.
Name the system with --system and give prove a formula or a
sequent, one at a time (a batch of many is refused):
$ deduxit prove --system S4 '[]p -> [][]p'
valid in S4: ⊢ □p → □□p, a checked derivation of 6 inferences in G3S4
0. w0 : □p, w0 R w1, w1 R w2, w2 : p, w0 R w2 ⊢ w0 : □p → □□p, w0 : □□p, w1 : □p, w2 : p ax
1. w0 : □p, w0 R w1, w1 R w2, w0 R w2 ⊢ w0 : □p → □□p, w0 : □□p, w1 : □p, w2 : p L□ 0
2. w0 : □p, w0 R w1, w1 R w2 ⊢ w0 : □p → □□p, w0 : □□p, w1 : □p, w2 : p Trans 1
3. w0 : □p, w0 R w1 ⊢ w0 : □p → □□p, w0 : □□p, w1 : □p R□ 2
4. w0 : □p ⊢ w0 : □p → □□p, w0 : □□p R□ 3
5. ⊢ w0 : □p → □□p R→ 4
$ deduxit prove --system K '[]p -> [][]p'; echo "exit $?"
not valid in K: a checked countermodel of 3 worlds refutes ⊢ □p → □□p at world 0
world 0 (where the sequent fails): forces nothing; sees 1
world 1: forces p; sees 2
world 2: forces nothing; sees no world
exit 1
Read the answer
valid: the sequent holds at every world of every model of the system. deduxit shows its derivation and checks it before it is shown. The exit status is 0.not valid: some model of the system has a world where every formula left of⊢is true and every formula right of it false. deduxit shows that model and checks it first. Above, world 0 sees world 1, wherepholds, so□pis true at world 0; world 1 sees world 2, wherepdoes not hold, so□□pis false at world 0. The exit status is 1.unknown: a limit, such as the time limit, stopped the search before it decided. The exit status is 3, and the line says which limit it was.
The derivation is in G3S4, the labelled sequent calculus of S4: each
formula carries the world it is about (w0 : □p), and w0 R w1 says
that world 0 sees world 1. Its rules are those of ordinary logic, L□,
R□, L◇, R◇ for the prefixes, and one rule per condition of the
system (Trans above). Each line is a sequent, the rule that made it
and the lines it was made from; the last line is the sequent you gave,
every formula at world 0.
Write a formula
The syntax is that of ordinary logic with the
prefixes []/□ and <>/◇, which bind as tightly as ~: []p -> q
is (□p) → q, and []~p is □(¬p).
$ deduxit prove --system K -q '~<>p <-> []~p'
valid in K: ⊢ ¬◇p ↔ □¬p, a checked derivation of 11 inferences in G3K
$ deduxit prove --system S5 -q '<>[]p -> []<>p'
valid in S5: ⊢ ◇□p → □◇p, a checked derivation of 8 inferences in G3S5
$ deduxit prove --system S4 -q '<>[]p -> []<>p'; echo "exit $?"
not valid in S4: a checked countermodel of 3 worlds refutes ⊢ ◇□p → □◇p at world 0
exit 1
The systems
A system is the set of conditions its models meet. K has none; each other system adds some of these:
| condition | every world… | axiom | rule |
|---|---|---|---|
| serial | sees some world | D: □A → ◇A | Ser |
| reflexive | sees itself | T: □A → A | Ref |
| symmetric | is seen by every world it sees | B: A → □◇A | Sym |
| transitive | sees every world the worlds it sees see | 4: □A → □□A | Trans |
| euclidean | sees only worlds that see each other and themselves | 5: ◇A → □◇A | Eucl |
The fifteen systems these give are K, D, T, KB, KDB, B, K4, KD4, S4, K5,
KD5, K45, KD45, KB5 and S5. --system takes those names and any other
name of one: K followed by the axioms' letters (KT4 is S4, KT is T,
KTB is B), in any case.
$ deduxit prove --system kt -q '[]p |- p'
valid in T: □p ⊢ p, a checked derivation of 3 inferences in G3T
Check an outcome or a model
--format json writes the outcome, with the derivation or the
countermodel. check reads it and checks its evidence again:
$ deduxit prove --system K --format json --output outcome.json '[]p -> [][]p'; echo "exit $?"
exit 1
$ deduxit check outcome.json
not valid in K: ⊢ □p → □□p, its countermodel checked
A derivation alone, the outcome's derivation, is checked by check
too, which takes its calculus from the name it carries (G3S4), or by
check --calculus G3S4.
check --system checks a Kripke model you write against a sequent: the
model's JSON lists the worlds, each with the atoms it forces and the
worlds it sees. The check says whether the sequent holds at every world,
or at the world --world names, and where it fails, the value there of
each formula and the world that shows it. The model must meet the
system's conditions as written: a model of S4 lists every world's arrow
to itself. Otherwise the check names the first condition it fails, exit
status 2:
$ echo '{"worlds": [{"atoms": [], "arrows": [1]}, {"atoms": ["p"], "arrows": [2]}, {"atoms": []}]}' > model.json
$ deduxit check --system K --sequent '[]p |- [][]p' model.json; echo "exit $?"
fails in K at world 0: □p ⊢ □□p; every formula left of ⊢ is true there and every formula right of it false
□p is true
□□p is false: world 1 shows it
world 0 (where the sequent fails): forces nothing; sees 1
world 1: forces p; sees 2
world 2: forces nothing; sees no world
exit 1
$ deduxit check --system T --sequent '[]p |- [][]p' model.json; echo "exit $?"
error: the model is no model of T: not reflexive: world 0 does not see itself
exit 2
Prove step by step
interact --calculus G3S4 builds a derivation in the labelled calculus
yourself, one rule at a time; every system's calculus is G3 and the
system's name (G3K, G3KD45). Give the sequent with each formula's
world, w0 : []p |- w0 : p, and type commands on standard input, as in
any calculus given as data:
rules G lists the rules that apply to goal G and the members they act
on, numbered across both sides, and apply applies one backwards.
derive G RULE N… applies a rule forwards to members N… of goal G and
adds what the rule derives from them to the goal: L□ derives y : A
from x : □A and x R y, and a condition's rule derives what the
condition gives (Ref derives x R x, Trans derives x R z from
x R y and y R z). Where the members do not fix a label, give it:
x=w0. Axiom T in T:
$ deduxit interact --calculus G3T 'w0 : []p |- w0 : p'
> derive 0 Ref x=w0
opened goal 1: 0: w0 : □p, 1: w0 R w0 ⊢ 2: w0 : p
added 1: w0 R w0
> derive 1 L□ 0 1
opened goal 2: 0: w0 : □p, 1: w0 R w0, 2: w0 : p ⊢ 3: w0 : p
added 2: w0 : p
> apply 2 ax 2 3
closed; no goal is open: `proof` checks the proof
> proof
valid in the calculus given (G3T): w0 : □p ⊢ w0 : p
0. w0 : □p, w0 R w0, w0 : p ⊢ w0 : p ax
1. w0 : □p, w0 R w0 ⊢ w0 : p L□ 0
2. w0 : □p ⊢ w0 : p Ref 1
Axiom 4 in S4: R□ applied backwards twice makes two new worlds, y
and y1; Trans derives that world 0 sees y1, and L□ takes p
there:
$ deduxit interact --calculus G3S4 'w0 : []p |- w0 : [][]p'
> apply 0 R□ 1
opened goal 1: 0: w0 : □p, 1: w0 R y ⊢ 2: w0 : □□p, 3: y : □p
> apply 1 R□ 3
opened goal 2: 0: w0 : □p, 1: w0 R y, 2: y R y1 ⊢ 3: w0 : □□p, 4: y : □p, 5: y1 : p
> derive 2 Trans 1 2
opened goal 3: 0: w0 : □p, 1: w0 R y, 2: y R y1, 3: w0 R y1 ⊢ 4: w0 : □□p, 5: y : □p, 6: y1 : p
added 3: w0 R y1
> derive 3 L□ 0 3
opened goal 4: 0: w0 : □p, 1: w0 R y, 2: y R y1, 3: w0 R y1, 4: y1 : p ⊢ 5: w0 : □□p, 6: y : □p, 7: y1 : p
added 4: y1 : p
> apply 4 ax 4 7
closed; no goal is open: `proof` checks the proof
A forward step reasons from members before ⊢ and adds there. A rule
that acts on a member after ⊢ (every right rule), adds after it
(L¬), splits the goal in two (L∨, L→, L↔) or closes it (ax)
applies backwards, and derive says so:
$ deduxit interact --calculus G3K 'w0 : [](p \/ q), w0 : ~q |- w0 : []p'
> derive 0 R□ 2
error: the step is refused: R□ acts on members after ⊢, and a forward step acts on members before ⊢ alone: apply it backwards to the goal
> derive 0 L∨ 0
error: the step is refused: L∨ has 2 premises, and a forward step keeps one goal: apply it backwards to the goal
> derive 0 L¬ 1
error: the step is refused: L¬ adds members after ⊢, and a forward step adds them only before ⊢: apply it backwards to the goal
proof FILE writes the finished derivation as JSON, which check --calculus G3S4 FILE checks again, and proof --rocq FILE its
certificate for Rocq. The search's derivations are in the same calculi,
so a session shows how a proof prove --system found is made.
Draw a derivation or a model
--format latex, typst and svg draw the derivation as a tree, and
svg, png and pdf draw a countermodel, an arrow from each world to
each world it sees:
$ deduxit prove --system S4 --output proof.tex '[]p |- [][]p'
$ deduxit prove --system K --output model.svg '[]p |- [][]p'; echo "exit $?"
exit 1
--format rocq writes a certificate of either verdict for deduxit's
Rocq library, which proves the sequent valid over the system's frames,
or not valid, from the derivation or the countermodel
(Certificates of modal logic).
Limits
The search always ends: it makes a bounded number of worlds for each
sequent, and stops exploring a world that holds what an earlier one
holds. On a large sequent that can still take long. The time limit (--timeout, 2 seconds by
default) and the work limit (--work-limit) stop it before then, with
unknown:
$ deduxit prove --system S4 --work-limit 1 '[](p -> []p) -> (p -> []p)'; echo "exit $?"
unknown in S4: the work limit of 1 was reached after …; raise it with --work-limit N
exit 3
--stats counts the worlds the search made, the splits it took, the
worlds it did not explore again, its units of work and the inferences of
the derivation.
Translate a sequent and find its interpolant
deduxit turns a sequent of ordinary logic into another and checks what the change promises before it prints the result. Two changes are built: the negative translations of classical logic into intuitionistic and minimal logic, and Craig interpolants.
Translate classical logic into a weaker one
A negative translation turns a classical sequent into one that a weaker
logic proves exactly when classical logic proves the first. seq translate prints the translation, decides the sequent in classical logic
and its translation in the weaker logic, and prints both verdicts:
$ deduxit seq translate 'a \/ ~a'
Kolmogorov's translation into minimal logic: ⊢ ¬¬(¬¬a ∨ ¬¬¬¬¬a)
classical logic: valid, a checked derivation of LK (3 inferences)
minimal logic: valid, a checked derivation of LJ (65 inferences)
The verdicts agree, as Kolmogorov's translation claims.
--by names the translation:
--by | what it does | the logic it reaches |
|---|---|---|
kolmogorov (the default) | ¬¬ before every subformula | minimal logic |
godel-gentzen | ¬¬ before every atom, and A ∨ B as ¬(¬A ∧ ¬B) | minimal logic |
kuroda | ¬¬ before every formula of the sequent | intuitionistic logic |
glivenko | ¬¬ before the formula right of ⊢ | intuitionistic logic |
Several formulas right of ⊢ are translated as their disjunction. In
propositional logic Kuroda's translation adds no more than ¬¬ before
each formula: the rest of it acts on quantifiers. Glivenko's theorem
says that ⊢ A holds classically exactly when ⊢ ¬¬A holds
intuitionistically:
$ deduxit seq translate --by glivenko '~~a -> a'
Glivenko's translation into intuitionistic logic: ⊢ ¬¬(¬¬a → a)
classical logic: valid, a checked derivation of LK (4 inferences)
intuitionistic logic: valid, a checked derivation of LJ (16 inferences)
The verdicts agree, as Glivenko's translation claims.
--to intuitionistic translates by Kolmogorov's or Gödel and Gentzen's
translation into intuitionistic logic, which proves what minimal logic
proves. Kuroda's and Glivenko's translations do not reach minimal logic,
and --to minimal with them is an error.
A sequent that is not valid stays not valid, and each verdict comes with the countermodel that shows it:
$ deduxit seq translate --by godel-gentzen 'a |- b'; echo "exit $?"
Gödel and Gentzen's translation into minimal logic: ¬¬a ⊢ ¬¬b
classical logic: not valid, a checked Kripke model refutes it:
world 0 (the model's world): forces a
minimal logic: not valid, a checked Kripke model refutes it:
world 0 (the model's world): forces nothing; below 1
world 1: forces a; below 2
world 2: forces a
The verdicts agree, as Gödel and Gentzen's translation claims.
exit 1
The exit status is 0 where both verdicts are valid, 1 where neither is and 3 where a search stopped at a limit. Verdicts that differ would be a defect of deduxit; the command reports it as an error, exit status 2.
Find an interpolant
Split a valid sequent into two halves. An interpolant is a formula I
that the first half proves, that proves the second half, and whose atoms
are in both halves. For A ⊢ B that is A ⊢ I and I ⊢ B:
$ deduxit interpolate 'a /\ b |- b \/ c'
interpolant: b
a ∧ b ⊢ b: valid, a checked derivation of LK (3 inferences)
b ⊢ b ∨ c: valid, a checked derivation of LK (3 inferences)
By default the formulas left of ⊢ are the first half and those right
of it the second. --first names the first half's formulas instead,
L0 being the first formula left of ⊢ and R0 the first right of it.
In classical logic the first half may hold formulas right of ⊢: the
interpolant then goes right of ⊢ in the first half.
$ deduxit interpolate --first L0,R0 'a, b |- a /\ b, c'
interpolant: ¬b
a ⊢ a ∧ b, ¬b: valid, a checked derivation of LK (6 inferences)
¬b, b ⊢ c: valid, a checked derivation of LK (3 inferences)
--logic names the logic, classical by default. In intuitionistic and
minimal logic the formula right of ⊢ is always in the second half:
$ deduxit interpolate --logic intuitionistic --first L1 'a, a -> b |- b'
interpolant: a → b
a → b ⊢ a → b: valid, a checked derivation of LJ (1 inference)
a → b, a ⊢ b: valid, a checked derivation of LJ (5 inferences)
deduxit reads the interpolant off a derivation without cuts by Maehara's method, and checks it before it prints it: it decides both halves again and compares the atoms. A sequent that is not valid has no interpolant:
$ deduxit interpolate 'a |- b'; echo "exit $?"
classical logic: not valid, a checked Kripke model refutes it:
world 0 (the model's world): forces a
A sequent that is not valid has no interpolant.
exit 1
The exit status is 0 for a checked interpolant, 1 for a sequent that is
not valid, 3 where a search stopped at a limit (by default after 2 s,
--timeout) and 2 for an error.
JSON output
--format json writes the whole answer as one document at wire level
16. seq translate writes {"version", "deduxit", "translation", "target", "agreement", "sequent", "translated", "classical", "decided"}: both sequents, both outcomes with their derivations or
countermodels, and agreement, which is valid, not_valid or
unknown. interpolate writes {"version", "deduxit", "logic", "partition", "outcome", "interpolant"}: the positions of the first half,
the sequent's outcome, and the interpolant's text with its first and
second halves, each a sequent with its outcome.
In a program, deduxit::ordinary::negative::compare and
deduxit::ordinary::interpolant::interpolate return the same answers,
and the web bindings' ordinary_translate and ordinary_interpolate
answer the same JSON.
Keep a sequent and what is made from it
A workspace file keeps a sequent beside what deduxit made from it: its translation, the translation's decision, a proof started, each with how it was made. Change the sequent, and what was made from it shows as out of date until you make it again; undo takes a whole change back.
Make a workspace and add to it
workspace new makes the file, here with a classical sequent. Each node
has a number, its kind and its value in a line:
$ deduxit workspace new lem.json '|- a \/ ~a' --logic classical
0 ordinary.sequent ⊢ a ∨ ¬a (classical)
workspace apply makes a node from other nodes by an operation and runs
it. The nodes come first, then the operation; --set gives the
operation's parameters. The line under the node says how it was made and
whether the check of what the operation promises held: a negative
translation promises that both sequents are valid together or not, and
deduxit decides both to check it.
$ deduxit workspace new lem.json '|- a \/ ~a' --logic classical
0 ordinary.sequent ⊢ a ∨ ¬a (classical)
$ deduxit workspace apply lem.json 0 ordinary.translate --set translation=glivenko
1 ordinary.sequent ⊢ ¬¬(a ∨ ¬a) (intuitionistic)
from 0 by ordinary.translate translation=glivenko; check: held
$ deduxit workspace apply lem.json 1 ordinary.decide
2 ordinary.outcome Valid
from 1 by ordinary.decide; check: held
workspace operations lists what each kind of value takes:
$ deduxit workspace operations ordinary.outcome
ordinary.derivation ordinary.session or ordinary.outcome -> ordinary.derivation: The derivation
ordinary.draw ordinary.session or ordinary.derivation or ordinary.outcome -> drawing: A drawing
ordinary.certificate ordinary.derivation or ordinary.outcome -> certificate: A Rocq certificate
What each suite offers lists every kind and operation, with the parameters each takes.
Change a sequent and make again what follows
workspace set gives a node a new sequent. What was made from it is out
of date, and keeps its last value until workspace run makes it again.
--checks makes each node's check too. The exit status is the worst
verdict run: 0 valid, 1 not valid, 3 not decided, 2 an error or a check
that failed.
$ deduxit workspace new lem.json '|- a \/ ~a' --logic classical
0 ordinary.sequent ⊢ a ∨ ¬a (classical)
$ deduxit workspace apply lem.json 0 ordinary.translate --set translation=glivenko
1 ordinary.sequent ⊢ ¬¬(a ∨ ¬a) (intuitionistic)
from 0 by ordinary.translate translation=glivenko; check: held
$ deduxit workspace apply lem.json 1 ordinary.decide
2 ordinary.outcome Valid
from 1 by ordinary.decide; check: held
$ deduxit workspace set lem.json 0 '|- a -> b \/ ~b'
0 ordinary.sequent ⊢ a → (b ∨ ¬b) (classical)
1 ordinary.sequent ⊢ ¬¬(a ∨ ¬a) (intuitionistic)
from 0 by ordinary.translate translation=glivenko; check: recorded
out of date: node 0 changed
2 ordinary.outcome Valid
from 1 by ordinary.decide; check: held
out of date: it waits for node 1
$ deduxit workspace run lem.json --checks; echo "exit $?"
0 ordinary.sequent ⊢ a → (b ∨ ¬b) (classical)
1 ordinary.sequent ⊢ ¬¬(a → (b ∨ ¬b)) (intuitionistic)
from 0 by ordinary.translate translation=glivenko; check: held
2 ordinary.outcome Valid
from 1 by ordinary.decide; check: held
exit 0
$ deduxit workspace undo lem.json
undone: sequent change. Nothing is out of date.
$ deduxit workspace log lem.json
undo takes back: ordinary.decide
redo brings back: sequent change
A check that needs a search reads back from the file as recorded: it
held when it was made, and workspace check makes every check again.
Its exit status is the checks': 0 where all hold, 1 where one fails, 3
where one could not be made within its node's limits.
Undo shows again what was made before the change without running it:
the file keeps each run, keyed by its operation, its parameters, the
limits it ran under and its inputs. workspace remove removes a node
and every node made from it.
Limits a node keeps
A node runs under the limits given when it was made (--work-limit,
--memory-limit, --settings), and keeps them: a later run of
workspace run with other flags changes no node. workspace set NODE --work-limit N gives one node other limits, and a node a bound stopped
says which:
$ deduxit workspace new peirce.json '|- ((a -> b) -> a) -> a' --logic classical
0 ordinary.sequent ⊢ ((a → b) → a) → a (classical)
$ deduxit workspace apply peirce.json 0 ordinary.decide --set method=embedding --work-limit 1; echo "exit $?"
1 ordinary.outcome Not decided
from 0 by ordinary.decide method=embedding
not decided: the run stopped at its bound limits.work
exit 3
$ deduxit workspace set peirce.json 1 --work-limit none
1 ordinary.outcome Not decided
from 0 by ordinary.decide method=embedding
not decided: the run stopped at its bound limits.work
out of date: its parameters or limits changed
$ deduxit workspace run peirce.json; echo "exit $?"
0 ordinary.sequent ⊢ ((a → b) → a) → a (classical)
1 ordinary.outcome Valid
from 0 by ordinary.decide method=embedding
exit 0
--timeout stops a run without changing the node, which then stays as
it was.
The file
The file is JSON at wire level 19: each value as its kind's document,
the nodes, the runs kept, and the changes undo takes back. workspace show FILE --format json writes it, and workspace show FILE NODE --format json writes one node's value, which the other commands read:
check reads an outcome or a derivation, interact --state a session.
Reading a file checks every value, runs again each run that needs no
search and drops one whose output differs, and makes again each check
that needs no search. The bounds of a workspace are limits.workspace
in the settings file: its nodes, its runs kept, the
changes undo keeps and the bytes of its values. Past the number of
changes kept, the oldest is forgotten; past any other bound, the change
or the file is refused.
Read a proof as a program
Every intuitionistic proof is also a program: its formulas are the
program's types, and its hypotheses the program's inputs. This is the
Curry-Howard correspondence. --lambda prints the program of a proof as
a lambda-term, the notation in which λx. M is the function of x
whose result is M, and f x applies f to x:
$ deduxit prove -i --lambda 'a, a -o b |- b'
provable (IMLL, intuitionistic, two-sided engine)
───── ax ───── ax
a ⊢ a b ⊢ b
──────────────── ⊸L
a, a ⊸ b ⊢ b
lambda-term: x : a, f : a ⊸ b ⊢ f x : b
The last line is the term's typing judgement. Left of ⊢ stand the
hypotheses' variables with their types: x has the type a, and f
the type a ⊸ b. Right of it stands the term, f x, with its type,
b. The proof that b follows from a and a ⊸ b is the program
that applies f to x.
A proof of intuitionistic linear logic (-i) is a term of a linear
lambda calculus, and a derivation of LJ (--logic intuitionistic or
minimal) a term of the simply typed lambda calculus. deduxit reads
every intuitionistic proof it finds or checks back as its term. The term
is computed from the proof the checker accepted, one construction per
rule. It is shown, not trusted: the proof stays the certificate.
The linear lambda calculus
In a linear lambda calculus a term uses each variable once, as linear
logic uses each hypothesis once. A variable of a ! type may be copied
or discarded, and both components of a pair use the same variables,
since a program takes only one of them.
A proof of intuitionistic linear logic reads back as a term of the linear lambda calculus of Benton, Bierman, de Paiva and Hyland, "A term calculus for intuitionistic linear logic" (TLCA 1993, LNCS 664, pages 75 to 90). deduxit takes it in the sequent calculus form, with the additives and their units, that G. M. Bierman gives in On Intuitionistic Linear Logic (PhD thesis, University of Cambridge, 1993, published as technical report UCAM-CL-TR-346, 1994), chapter 3, figure 3.2. Each rule of the two-sided sequent calculus has its term:
| rule | term |
|---|---|
| axiom | x |
⊸R, ⊸L | λx:A. M; N[x := f M] |
⊗R, ⊗L | M ⊗ N; let z be x ⊗ y in M |
1R, 1L | ∗; let z be ∗ in M |
&R, &L₁, &L₂ | ⟨M, N⟩; M[x := fst(z)], M[x := snd(z)] |
⊕R₁, ⊕R₂, ⊕L | inl(M), inr(M); case z of inl(x) → M ‖ inr(y) → N |
⊤R, 0L | true(x⃗); false_A(x⃗; z) |
!R, !L | promote y⃗ for x⃗ in M; M[x := derelict(z)] |
!w, !c | discard z in M; copy z as x, y in M |
| cut | (λx:A. N) M |
Every form in the table is the thesis's except the cut's. The thesis's
cut is the substitution N[x := M] itself; deduxit writes it as the
redex whose reduction is that substitution, in the calculus's own
syntax. A left rule substitutes, as in the thesis, so the term of a
cut-free proof is in normal form. true and false take every other
hypothesis, since ⊤ and 0 discard a linear context only by consuming
it. The two components of a pair share their context:
$ deduxit prove -i --lambda --tree never '|- a -o b -o a * b'
provable (IMLL, intuitionistic, two-sided engine)
lambda-term: ⊢ λx. λy. x ⊗ y : a ⊸ (b ⊸ (a ⊗ b))
$ deduxit prove -i --lambda --tree never '1 * a |- a'
provable (IMLL with units, intuitionistic, two-sided engine)
lambda-term: x : 1 ⊗ a ⊢ let x be y ⊗ z in let y be ∗ in z : a
$ deduxit prove -i --lambda --tree never 'a & b |- b & a'
provable (IALL, intuitionistic, additive engine)
lambda-term: x : a & b ⊢ ⟨snd(x), fst(x)⟩ : b & a
$ deduxit prove -i --lambda --tree never 'a + b |- b + a'
provable (IALL, intuitionistic, additive engine)
lambda-term: x : a ⊕ b ⊢ case x of inl(y) → inr(y) ‖ inr(z) → inl(z) : b ⊕ a
$ deduxit prove -i --lambda --tree never 'a, b |- top'
provable (IALL, intuitionistic, two-sided engine)
lambda-term: x : a, y : b ⊢ true(x, y) : ⊤
$ deduxit prove -i --lambda --tree never '0, a |- b'
provable (IALL, intuitionistic, two-sided engine)
lambda-term: x : 0, y : a ⊢ false(y; x) : b
$ deduxit prove -i --lambda --tree never '!a |- a * a'
provable (IMELL, intuitionistic, horn engine)
lambda-term: x : !a ⊢ copy x as y, z in derelict(z) ⊗ derelict(y) : a ⊗ a
$ deduxit prove -i --lambda --tree never '!(a -o b), !a |- !b'
provable (IMELL, intuitionistic, two-sided engine)
lambda-term: x : !(a ⊸ b), y : !a ⊢ promote x, y for z, u in derelict(z) derelict(u) : !b
A proof of affine linear logic (--affine) reads back to the affine
lambda calculus: the same terms, with weakening left implicit, so a
variable may go unused. Neither the paper nor the thesis gives an affine
calculus, so this reading is deduxit's own.
$ deduxit prove -i --affine --lambda --tree never 'a, b |- a'
provable (IMLL, intuitionistic affine, two-sided engine)
lambda-term: x : a, y : b ⊢ x : a
Cuts are redexes
A cut on A between a proof of Γ ⊢ M : A and one of Δ, x : A ⊢ N : C is the redex (λx:A. N) M: a function applied to its argument.
Reducing it is the substitution of the thesis's cut, and eliminating the
cut (deduxit eliminate, see Eliminate cuts) reduces the
term. The session command lambda shows the term of a session that
cuts:
$ deduxit interact -i 'a, a -o b |- b'
> cut 0 b 0 1
> close
> lambda
opened goal 1: 0: a, 1: a ⊸ b ⊢ 2: b
opened goal 2: 1: b ⊢ 0: b
goal 1: provable (IMLL, intuitionistic, two-sided engine)
goal 2: provable (IMLL, intuitionistic, two-sided engine)
no goal is open: `proof` checks the proof
x : a, f : a ⊸ b ⊢ (λy. y) (f x) : b
The simply typed lambda calculus
A derivation of LJ, from intuitionistic or minimal logic (--logic, see
Decide ordinary logic), reads back to the simply
typed lambda calculus with products, sums, a unit and an empty type, as
J.-Y. Girard, Y. Lafont and P. Taylor give it in Proofs and Types
(Cambridge University Press, 1989), sections 3.1.2 and 10.6. Their π₁,
π₂, ι₁, ι₂, δ and ε are written fst, snd, inl, inr,
case and abort. The book names no term of the unit type, so ⟨⟩, the empty
pair, is deduxit's own notation for it. ¬A is A → ⊥, and A ↔ B the
pair of both implications:
$ deduxit prove --logic intuitionistic --lambda --tree never '|- (a -> b) -> (b -> c) -> a -> c'
valid (intuitionistic logic by the SAT solver)
lambda-term: ⊢ λf. λg. λx. g (f x) : (a → b) → ((b → c) → (a → c))
$ deduxit prove --logic intuitionistic --lambda --tree never '~(a \/ b) |- ~a /\ ~b'
valid (intuitionistic logic by the SAT solver)
lambda-term: f : (a ∨ b) → ⊥ ⊢ ⟨λx. f inl(x), λy. f inr(y)⟩ : (a → ⊥) ∧ (b → ⊥)
$ deduxit prove --logic minimal --lambda --tree never '|- a -> ~~a'
valid (minimal logic by the SAT solver)
lambda-term: ⊢ λx. λf. f x : a → ((a → ⊥) → ⊥)
Under --logic, --linear prints the term of the linear proof of the
image instead.
What has no term
A proof of classical linear logic may have several conclusions, which no lambda-term types. These have no term either:
- a derivation of LK;
- a proof with Mix;
- a proof of the cyclic or the Lambek calculus, whose terms belong to an ordered calculus of their own;
- a proof with first-order quantifiers, which are not quantifiers over types.
The line says why:
$ deduxit prove --lambda --tree never '|- a, ~a'
provable (MLL, classical, focus engine)
no lambda-term: a proof of classical logic may have several conclusions, which no lambda-term types; a term needs an intuitionistic proof
$ deduxit prove -i --lambda --tree never 'forall x. p(x) |- p(c)'
provable (IMLL1, intuitionistic, two-sided engine)
no lambda-term: quantifiers over first-order terms are not quantifiers over types
How the term is printed
--lambda-notation ascii writes the term in ASCII, a notation of
deduxit's own: \x. M for λx. M, M * N for M ⊗ N, () for ∗,
<M, N> for ⟨M, N⟩, -> and | in a case, and the types as the parser
reads them. --lambda-types gives every binder its variable's type,
λx:A. M, and false and abort their goal's, as the calculus writes
them. The
settings keys are lambda.notation and lambda.types:
$ deduxit prove -i --lambda --lambda-notation ascii --lambda-types --tree never '|- a -o b -o a * b'
provable (IMLL, intuitionistic, two-sided engine)
lambda-term: |- \x:a. \y:b. x * y : a -o (b -o (a * b))
In a program that uses the library, a lambda::Term prints with
Display (term.to_string() is the term alone, in the default
notation), and Term::write and Term::write_judgement take the
options.
check --lambda prints the term of a proof read from a file, and the
session command lambda of interact that of the finished proof or
derivation:
$ deduxit prove -i --format json 'a & b |- b & a' > proof.json
$ deduxit check -i --lambda --tree never proof.json
valid proof of a & b ⊢ b & a (intuitionistic)
lambda-term: x : a & b ⊢ ⟨snd(x), fst(x)⟩ : b & a
In LaTeX, Typst, SVG, PNG and PDF the judgement stands under the conclusion of the derivation:
$ deduxit prove -i --lambda --format latex 'a, a -o b |- b'
% provable (IMLL, intuitionistic, two-sided engine)
\begin{prooftree}
\infer0[$\mathrm{ax}$]{a &\vdash a}
\infer0[$\mathrm{ax}$]{b &\vdash b}
\infer2[$\multimap\mathrm{L}$]{a, a \multimap b &\vdash b}
\infer[no rule]1{x : a, f : a \multimap b \vdash f\ x : b}
\end{prooftree}
In JSON the outcome gains the key lambda: the term as data (its
calculus, atoms, types, variables, the hypotheses' variables as
context, its type as goal, and its nodes, each after the nodes it
names, root the whole term), with its text and its judgement as
printed, or {"error": …} where there is none:
$ deduxit prove -i --format json --lambda 'a |- a'
{"checked":true,"deduxit":"0.5.0","engine":"two-sided","fragment":"IMLL","lambda":{"atoms":["a"],"calculus":"linear","context":[0],"goal":0,"judgement":"x : a ⊢ x : a","nodes":[{"kind":"var","variable":0}],"root":0,"text":"x","types":[{"atom":0,"kind":"atom"}],"variables":[{"index":0,"letter":"x","type":0}]},"mode":"intuitionistic","nodes":[{"ax":[0,1]}],"sequent":{"antecedents":1,"atoms":["a"],"roots":[0,1],"terms":[{"D":0},{"V":0}]},"statistics":{"copies":0,"forward_copies":0,"links":0,"memo_entries":1,"memo_hits":0,"nodes":1,"splits":0,"tests":0,"work":16},"verdict":"proved","version":1}
A term repeats a left rule's term wherever its hypothesis goes, in both
components of a pair, so its text can be longer than the derivation by
any factor. A term whose text would pass --derivation-limit is not
written, and the line says so.
Prove in cyclic linear logic
Cyclic linear logic is linear logic in which the order of the formulas
counts. A sequent is a ring of formulas: it may be rotated, but no two
formulas may change places otherwise. --cyclic decides it, for the
multiplicatives ⊗ and ⅋ without units:
$ deduxit prove --cyclic "a * b |- a * b"
provable (MLL, cyclic, net engine)
─────── ax ─────── ax
⊢ ~a, a ⊢ ~b, b
──────────────────── ⊗
⊢ ~b, ~a, a ⊗ b
──────────────── ⅋
⊢ ~b ⅋ ~a, a ⊗ b
$ deduxit prove --cyclic "a * b |- b * a"
unprovable (MLL, cyclic, net engine): the search was exhaustive
The second sequent holds in ordinary linear logic, where a ⊗ b and
b ⊗ a say the same. In the cyclic calculus they do not.
How the order is read
- A sequent is one-sided, read up to rotation.
⊗joins the formulas on either side of it, and⅋two neighbours.- The dual of a product reverses it:
~(A * B)is~B par ~A. - The formulas left of
|-come in the reverse order, each negated. A -o Bis~A par B, soA, A -o B |- Bholds andA -o B, A |- Bdoes not.
seq print --cyclic and seq json --cyclic show the one-sided sequent
deduxit reads:
$ deduxit seq print --cyclic "a * b |- a * b"
⊢ ~b ⅋ ~a, a ⊗ b
Every sequent of a derivation is written in its cyclic order, read from
its first formula. In a batch (Decide many sequents at
once), a JSON Lines record names the mode cyclic.
Draw the proof net
The net engine decides the mode. It searches for an axiom linking that
is a proof net and planar: no two links cross when the literals stand in
their order around a circle. --net draws the net so (Draw a proof
net):
$ deduxit prove --cyclic --net "a, a -o b |- b"
provable (MLL, cyclic, net engine)
⊢ ~b ⊗ a, ~a, b
~b[1] — b[4]
a[2] — ~a[3]
planar proof net (the correctness criterion holds, and no two links cross)
What the mode refuses
The mode refuses units, additives, exponentials, Mix, weakening and
--intuitionistic, and every engine but the net engine. It has no Rocq
certificates, since the Rocq calculi are commutative: the verdict
stands, and a line on standard error says why there is no certificate.
$ deduxit prove --cyclic "|- a * b, 1"
error: cyclic mode decides unit-free MLL, and the sequent lies in MLL with units
$ deduxit prove --cyclic --format rocq "a |- a"
no certificate: the Rocq calculi are commutative, so a derivation or a disproof of the cyclic mode has no certificate
(* provable (MLL, cyclic, net engine) *)
Prove in the Lambek calculus
The Lambek calculus is a logic of word order, used for the grammar of
natural language. Its sequents A₁, …, Aₙ ⊢ B are intuitionistic (one
formula on the right), and the hypotheses keep the order they are
written in. --lambek decides it:
$ deduxit prove --lambek "c / b, a, a \ b |- c"
provable (IMLL, Lambek, essential engine)
───── ax ───── ax
b ⊢ b c ⊢ c
──────────────── /L ───── ax
c / b, b ⊢ c a ⊢ a
───────────────────────── \L
c / b, a, a \ b ⊢ c
$ deduxit prove --lambek "a, b |- b * a"
unprovable (IMLL, Lambek, essential engine): the search was exhaustive
The formulas are built from atoms with * and two divisions:
A \ BgivesBfrom anAon its left, asA -o Bdoes;B / AgivesBfrom anAon its right.
The derivations are two-sided, with the divisions' rules. The text is
read as --cyclic reads it (Prove in cyclic linear logic),
since the calculus is the intuitionistic part of cyclic linear logic.
seq print --lambek shows the sequent as the calculus reads it:
$ deduxit seq print --lambek "b / a, a |- b"
b / a, a ⊢ b
Allow empty antecedents
In the Lambek calculus every sequent of a proof has a hypothesis.
--empty-antecedents allows sequents without one, which gives the
calculus L*:
$ deduxit prove --lambek "e |- e * (a \ a)"
unprovable (IMLL, Lambek, essential engine): the search was exhaustive
$ deduxit prove --lambek --empty-antecedents "e |- e * (a \ a)"
provable (IMLL, Lambek with empty antecedents, essential engine)
───── ax
a ⊢ a
───── ax ─────── \R
e ⊢ e ⊢ a \ a
────────────────── ⊗R
e ⊢ e ⊗ (a \ a)
$ deduxit prove --lambek "|- a \ a"
error: not an intuitionistic sequent: the sequent has no formula left of ⊢, which the Lambek calculus without empty antecedents needs
In a batch (Decide many sequents at once) and in problem
files, the modes are named lambek and lambek-star.
How the calculus is decided
The essential engine decides the calculus. It searches for an axiom linking that is a planar essential net:
- no two links cross in the cyclic order;
- every implication dominates its antecedents;
- without empty antecedents, the body of every division has a hypothesis of its own.
Use the library
The library is the crate deduxit. Add it, with serde_json for the
JSON forms:
[dependencies]
deduxit = "0.5"
serde_json = "1"
The API's documentation is on docs.rs/deduxit
for the releases and on
deduxit.github.io/deduxit for
main. Its crate root has the examples below, which its tests run.
Install deduxit lists the crate's
features.
Decide a sequent and print the proof
Parse the sequent, prove it, print the derivation, and write the proof as JSON:
#![allow(unused)]
fn main() {
use deduxit::linear::{Fragment, Mode, Options, Sequent, Verdict, prove};
// Two-sided input becomes one-sided: ⊢ ~A, A ⊗ ~B, B.
let sequent: Sequent = "A, A -o B |- B".parse()?;
assert_eq!(sequent.fragment(), Fragment::MLL);
let outcome = prove(&sequent, Mode::CLASSICAL, &Options::default())?;
let Verdict::Proved(proof) = &outcome.verdict else {
panic!("the sequent is provable");
};
assert_eq!(
proof.derivation()?.to_string(),
"─────── ax ─────── ax\n\
⊢ ~A, A ⊢ ~B, B\n\
──────────────────── ⊗\n\
\x20 ⊢ ~A, A ⊗ ~B, B"
);
let json = serde_json::to_string(&proof)?;
let back: deduxit::linear::Proof = serde_json::from_str(&json)?;
back.check(Mode::CLASSICAL)?;
}
Mode is the logic (Mode::CLASSICAL or Mode::INTUITIONISTIC, with
.with_mix() or .with_affine()), and Options the search's settings.
An unprovable verdict, Verdict::Unprovable(disproof), prints its reason
with {}. For an intuitionistic sequent written with sides, parse it
as an IllSequent.
Decide as the command does
Options::default() bounds the copies of a ? formula at three, since
a call without a stop must end. The command instead deepens the bound
until its time limit of two seconds. Settings::default() holds the
command's settings, and Settings::stop builds its stop from the time
since the start. It fires at the time limit and lets the classical
reading after the search run past it, as the command does.
Settings::deterministic() keeps the search on one thread, which gives
the command's --deterministic answer:
#![allow(unused)]
fn main() {
use deduxit::{Settings, linear::{Mode, Verdict, prove_within}};
use std::time::Instant;
let settings = Settings::default().deterministic();
let start = Instant::now();
let sequent = "!A |- !A * !A".parse()?;
let stop = settings.stop(|| start.elapsed());
let outcome = prove_within(&sequent, Mode::CLASSICAL, &settings.search, &settings.limits, stop)?;
assert!(matches!(outcome.verdict, Verdict::Proved(_)));
}
The crate reads no clock, so the caller passes the time. In a browser,
where there is no clock to read, a stop can count the work that each
call to it reports instead.
Export a proof
Each export has a to_string beside its write:
export::latex::to_string(derivation, &options), and the same for
typst, svg and rocq. It returns the whole text. write writes into
a stream and takes a stop, for a large derivation.
Export a proof shows the formats and their options.
A lambda::Term prints with {} under the default options
(Read a proof as a program).
Read the command's JSON
A file that deduxit prove --format json wrote reads back as an
Outcome: let outcome: Outcome = serde_json::from_str(&text)?; gives
the verdict with its proof or disproof, the mode, the engine and the
statistics. Check the proof with proof.check(outcome.mode). An engine
that a later version names reads as Engine::Unknown.
Read an error
Every call returns the one error type, deduxit::Error. Its kind says
what sort of failure it is, so that a call that a bound or a stop refused
is never read as a fault of its input, and its code is a stable reason
to branch on. Its Display writes formulas where it can: given a
sequent with no intuitionistic reading, prove in an intuitionistic
mode returns Error::NotIntuitionistic, whose message names the
subformula.
The syntax
This page lists how to write a sequent of linear logic, the input of
prove, interact and seq. Ordinary logic, read under
--logic, has a syntax of its own: see
Decide ordinary logic.
Sequents
A sequent is two lists of formulas separated by the turnstile, |- or
⊢: A, B |- C. The formulas in a list are separated by commas.
Either list may be empty (|- A, A |-, |-), but the turnstile is
always written. Spaces and line breaks may stand between any two
tokens.
Connectives and units
| ASCII | Unicode | name | meaning in a few words |
|---|---|---|---|
A * B | A ⊗ B | tensor | both, each from its own part of the resources |
A | B or A par B | A ⅋ B | par | the dual of tensor; A -o B is ~A par B |
A & B | with | one of the two, chosen by whoever uses it | |
A + B | A ⊕ B | plus | one of the two, chosen by whoever gives it |
A -o B | A ⊸ B | linear implication | spend an A to get a B |
!A | of course | as many copies of A as needed, none included | |
?A | why not | the dual of ! | |
1 | one | the unit of tensor | |
bot | ⊥ | bottom | the unit of par |
top | ⊤ | top | the unit of with |
0 | zero | the unit of plus |
par, bot and top are keywords only as whole words: bottom is an
atom.
Negation
~A and A^ both negate A. ~ is written before its formula and ^
after it. Two negations cancel: ~~A is A.
Atoms
An atom is a name: a letter or _, then letters, digits and _
(Unicode identifiers, so é and α are letters). A name written with
composed or decomposed accents is one atom. The keywords par, bot,
top, forall and exists name no atom.
Precedence and grouping
From the loosest to the tightest:
| connective | groups |
|---|---|
-o | to the right: A -o B -o C is A -o (B -o C) |
+ | to the left |
& | to the left |
par, | | to the left |
* | to the left: A * B * C is (A * B) * C |
~, !, ?, ^ | bind tightest |
Parentheses group. A prefix ~, ! or ? takes the formula right
after it, so !A * B is (!A) * B. A postfix ^ negates the formula
just before it: !A^ is !(A^), and (!A)^ is the negation of !A.
seq print shows how a sequent is grouped:
$ deduxit seq print "|- a * b | c & d + e"
⊢ (((a ⊗ b) ⅋ c) & d) ⊕ e
$ deduxit seq print -i "a -o b -o c |- a -o c"
a ⊸ (b ⊸ c) ⊢ a ⊸ c
$ deduxit seq print "|- !a^, ~(a * b)"
⊢ !~a, ~a ⅋ ~b
How a sequent is read
deduxit reads every sequent as a one-sided sequent ⊢ Γ. The formulas
left of the turnstile move to the right, negated. A -o B becomes
~A par B, and negation is pushed down to the atoms. The formulas keep
the order they were written in. seq print writes this form, and -i
the two-sided form of intuitionistic linear logic:
$ deduxit seq print "A, A -o B |- B"
⊢ ~A, A ⊗ ~B, B
$ deduxit seq print -i "A, A -o B |- B"
A, A ⊸ B ⊢ B
The text seq print writes reads back as the sequent it shows:
one-sided without -i, two-sided with it.
Intuitionistic linear logic
With -i (--intuitionistic), a sequent is read in the syntax of
intuitionistic linear logic:
- one formula right of the turnstile, any number left of it;
- the connectives
*,&,+,-o,!and the units1,topand0; - no negation (
~,^), no par (|,par,⅋), no?and nobot.
A symbol of the classical syntax is refused, and the error says what to write instead:
$ deduxit seq print -i "|- ~A par B"
error: cannot parse the sequent
|- ~A par B
^ unexpected "~"
intuitionistic linear logic has no negation: write a negated formula on the other side of |- (A |- B, not |- ~A, B), and ~A par B as A -o B; --ill-syntax one-sided reads the classical syntax
$ deduxit seq print -i --ill-syntax one-sided "|- ~A par B"
⊢ A ⊸ B
--ill-syntax one-sided reads the classical syntax instead, as the
one-sided sequent it stands for. The sequent must still have an
intuitionistic reading.
First-order logic
A first-order sequent adds quantifiers and predicates over terms (Prove in first-order logic):
forall x. A(∀x. A) andexists x. A(∃x. A).forall x y. Abinds both variables.- A quantifier binds loosest. Its scope runs right as far as it can: to
a
), a,, the turnstile or the end. Soforall x. p(x) * qisforall x. (p(x) * q). - An atom may be a predicate applied to terms:
p(x, f(a)). Inside the brackets, a name bound by an enclosing quantifier is that variable. Any other name is a constant, or a function symbol when(follows it. - A symbol takes the same number of arguments everywhere. A name is a predicate or a function symbol, not both.
- Every variable is bound by a quantifier.
$ deduxit seq print "forall x. p(x) |- exists y. p(y)"
⊢ ∃x. ~p(x), ∃y. p(y)
The Lambek calculus
With --cyclic or --lambek, the order of the formulas matters, and
the text also reads the two divisions A \ B and B / A. They bind as
loosely as -o. Prove in the Lambek calculus and
Prove in cyclic linear logic say how these modes read a
sequent.
Limits, defaults and exit statuses
deduxit <command> -h lists a command's common options under the
headings Logic, Input, Output, Search and Limits, and ends with
"--help shows every option."; deduxit <command> --help lists every
option with its default. A flag that sets a key of the settings file
names the key in parentheses, such as (search.copies)
(The settings file).
Exit statuses
| status | prove | check | interact |
|---|---|---|---|
| 0 | provable (valid under --logic) | valid | the session ends with a finished proof that checks |
| 1 | unprovable (not valid) | invalid | the session ends otherwise |
| 2 | an error | an error | an error |
| 3 | unknown | unknown: a limit stopped the check, or a refutation has no check | |
| 130 | a second Ctrl-C |
The first Ctrl-C stops the search, and the verdict is unknown. A
reader that closes the pipe early, as deduxit prove … | head -1 does,
does not change the status. A batch's status is the worst of its
entries' (Decide many sequents at once).
The limits
| flag | default | what it bounds |
|---|---|---|
--timeout DURATION | 2s | the whole command, reading the input included (500ms, 10s, 2m, 1h, none) |
--copies N | none | how often a ? formula may be copied on one branch; with none the bound deepens while the time limit lasts |
--forward-copies N | 30 | the forward search's copy bound on a Horn program, under --copies |
--memory-limit SIZE | 1GiB | the search's memory (512MiB, 4GiB, none) |
--work-limit N | none | the search's units of work, which are the same on every machine |
--recursion-limit N | 2048 | the nesting of rules on one branch |
--memo-limit N | 1048576 | the decided sequents remembered at once |
--classical-work N | 67108864 | the classical reading after the search (0 turns it off) |
--witness-depth N | 64 | the deepest term a first-order search fills a witness in with |
--instances N | 65536 | the instances of quantified formulas a first-order search holds at once |
--derivation-limit SIZE | 64MiB | the derivation built from a proof; above it the verdict stands without it |
--occurrence-limit N | 50000000 | the sequent's subformula occurrences |
--term-limit N | 50000000 | the first-order terms the sequent's atoms unfold to, and a proof's instance table |
A search that reaches a limit answers unknown, exit status 3, and its
line names the flag that raises the limit. For the same verdict on
every machine, bound the search with --work-limit N or --copies N
and lift the time limit with --timeout none. --deterministic also
makes the proof and --stats the same on every run.
The time limit
--timeout counts from the start of the command, so it covers reading
and parsing the sequent as well as the search. The command answers
within a fraction of a second of it, on one thread and on several. The
classical reading after the search runs past it within its own bound of
work, which this example turns off:
$ deduxit prove -q --engine focus --timeout 1s --classical-work 0 "!(A -o A * A), !(A -o B), !(B * B -o C), A |- C * ?D"
unknown (MELL, classical, focus engine): the time limit of 1s was reached at a copy bound of 82; --timeout DURATION gives the search longer
The largest problem of the LLTP library is a file of 86 MB that takes twelve seconds to parse. The limit ends its reading too, with exit status 3 a second after the start:
$ deduxit prove -q -i --timeout 1s --file SYJ212+1.020.p
unknown: the time limit of 1s was reached while the sequent was read
The time limit and Ctrl-C also stop building and writing a derivation.
Memory
--memory-limit counts the sequent as the search holds it (about 25
bytes for each subformula occurrence) and what grows with the search:
what it remembers, the proofs it keeps, and what each level of its
recursion takes. What the search remembers is emptied first when it no
longer fits, which costs time and never an answer. When that is not
enough, the verdict is unknown:
$ deduxit prove --memory-limit 100 "|- (a & b) + (a & c), ~a par (~b & ~c)"
unknown (MALL, classical, focus engine): the memory limit of 100 B was reached after 32.28µs; raise it with --memory-limit SIZE
$ deduxit prove --memory-limit 100 --format json "|- (a & b) + (a & c), ~a par (~b & ~c)"
{"version":1,"deduxit":"…","verdict":"unknown","reason":{"kind":"memory_limit","limit_bytes":100},"fragment":"MALL","mode":"classical","engine":"focus","statistics":{"nodes":0,"memo_hits":0,"memo_entries":0,"splits":0,"links":0,"tests":0,"copies":0,"forward_copies":0,"work":0}}
The size of the input
--occurrence-limit bounds the sequent on every command that reads
one. A sequent in JSON can share subformulas, so a file of 438 bytes
that doubles one atom 25 times stands for 67 million occurrences. It is
refused before anything unfolds it:
$ deduxit seq fragment --file shared.json
error: the sequent unfolds to 67108863 subformula occurrences, more than the limit of 50000000; raise it with --occurrence-limit
--term-limit bounds a first-order sequent's terms: the terms its
atoms' arguments unfold to, which shared terms in JSON can make many
from a short file, and the entries of a proof's instance table that
check reads:
$ deduxit seq fragment --term-limit 2 "|- p(f(f(a)))"
error: the first-order terms unfold to at least 3 terms, more than the limit of 2; raise it with --term-limit
No input ends the command other than by a verdict or an error. A
formula nested a hundred thousand deep is parsed, printed and searched
without recursion on it (the search itself gives up at
--recursion-limit), and a parse error far into a long line is shown
with the part of the line around it.
Threads
| flag | default | what it sets |
|---|---|---|
-j N, --jobs N | auto | the threads a search may use; auto is every thread the machine runs at once |
--pool-after DURATION | 100ms without --jobs, 0 with it | how long one thread searches before the others join it |
--deterministic | off | one thread throughout, so the proof and --stats are a function of the input |
How deduxit searches explains how the threads share the work.
The JSON outcome
prove --format json writes one object. Its keys:
| key | value |
|---|---|
version | the wire level of the document |
deduxit | the version of deduxit that wrote it |
verdict | proved, unprovable or unknown |
checked | whether the proof passed the checker (with a proof) |
refutation | why the sequent is unprovable (with unprovable) |
reason | which limit stopped the search (with unknown) |
fragment, mode, engine | as on the verdict line |
statistics | the engine's counters, as --stats prints them |
sequent, nodes | the sequent and the proof, which check reads |
Under --logic, the outcome is that of ordinary logic
(Decide ordinary logic). The guide for AI models
(skills/deduxit/reference.md,
section 8) has every JSON form.
The settings file
--settings FILE reads settings from a JSON file. prove, check,
interact, eliminate, seq print and the workspace commands that
run take it. The file holds the
same settings the flags set, in the form a front end keeps (the
library's Settings).
What the file holds
The file is a JSON object with any of these keys:
| key | holds |
|---|---|
clock | the time limits, and when a pool of threads joins the search |
limits | the resources a call may use, such as memory and the sequent's size |
search | the search's options |
view | how a derivation is shown |
styles | the options of every output format, as --style-file holds them |
batch | how a batch shares the machine, and its entries' mode |
ordinary | how ordinary logic is decided |
interactive | how a session takes steps of its own |
input | how the input is read |
cut | how cut elimination proceeds and when it stops |
lambda | how a lambda-term is printed |
Each key holds the fields the flags set. A flag's --help names its
field in parentheses: --copies sets search.copies, --timeout sets
clock.time_limit_ms, and --memory-limit sets limits.memory_bytes.
null lifts a bound, as none does on the command line:
{"limits": {"memory_bytes": null}}. A key or field deduxit does not
know is an error.
The file is read whole, up to 16 MiB, and never from standard input, which carries the sequent.
A workspace has bounds of its own under
limits.workspace: nodes (1 024 by default), records, the runs it
keeps (4 096), log, the edits undo keeps (256), and bytes, the bytes
of its values (64 MiB). Past the edits kept, the oldest is forgotten;
past any other bound, the change is refused.
How the file and the flags combine
- A field the file leaves out keeps the command's default.
- A flag given on the command line overrides the file. A flag that is not given leaves the file's value as it is.
- A flag that only switches something on or off one way (
--no-check, the mode flags) cannot undo the file's value: change the file instead. batch.modeis the mode of a batch's entries that name none, as the mode flags set it. A mode flag given on the command line overrides it.ordinaryapplies only under--logic, which names the logic. The file'sordinary.logicis not read: the settings a front end keeps always hold one, which would make every input ordinary logic. The file'sordinary.translationis the translation unless--translationnames one.
Example
$ echo '{"search": {"copies": 0, "engine": "focus"}}' > settings.json
$ deduxit prove --settings settings.json "|- ?(~a * ~a), a * a * a * a"
unknown (MELL, classical, focus engine): the copy bound of 0 was reached after 300.39µs; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
$ deduxit prove --settings settings.json --copies 3 "|- ?(~a * ~a), a * a * a * a"
unprovable (MELL, classical, focus engine): the search was exhaustive
What each suite offers
deduxit's suites (linear logic, ordinary logic, calculi given as rule files, modal logic) each make values and turn values into others: a sequent becomes a decision, a translation, a proof step by step, a drawing. The library lists these as data, so that a program, a web page or the workspace of linked tabs can offer every one of them without code of its own per suite. This chapter is the reference of that list and of the values it passes.
In the library
The module deduxit::protocol (the crate's feature protocol, on by
default) holds the list and runs it. Every value is JSON text. Here a
classical sequent is translated into intuitionistic logic, and the
translation's promise, that both sequents are valid together or not, is
checked:
#![allow(unused)]
fn main() {
use deduxit::{Settings, protocol};
let settings = Settings::default().deterministic();
let sequent = r#"{"version": 8, "formulas": [{"V": 0}, {"¬": 0}, {"∨": [0, 1]}],
"atoms": ["a"], "left": [], "right": [2], "logic": "classical"}"#;
let glivenko = r#"{"translation": "glivenko"}"#;
let translated =
protocol::run("ordinary.translate", &[sequent], glivenko, &settings, |_| false)?;
let text = protocol::summary("ordinary.sequent", &translated.value, &settings.limits)?;
assert_eq!(text, "⊢ ¬¬(a ∨ ¬a)");
let check = protocol::check(
"ordinary.translate", &[sequent], glivenko, &translated.value, &settings, |_| false,
)?;
assert_eq!(check.status, protocol::Status::Held);
}
protocol::catalogue() writes the whole list as JSON. Each suite is a
value of the trait protocol::Suite, so a suite from another crate can
join it.
Kinds of values
A kind says what a value is and how it is written. A statement is a sequent with the calculus it is claimed in; a work kind holds the steps someone took; evidence is what a run found; a rendering is a drawing or a text, quick to make again.
| kind | what it is | written as |
|---|---|---|
linear.sequent | a sequent of linear logic and its mode | the sequent's JSON with mode |
linear.session | a proof in progress | the session's JSON |
linear.outcome | a sequent decided | the outcome's JSON |
linear.proof | a proof | the proof's JSON |
linear.net | a proof net | the proof structure's JSON |
ordinary.sequent | a sequent of ordinary logic and its logic | the sequent's JSON with logic |
ordinary.session | a proof in progress in LK or LJ | the session's JSON |
ordinary.outcome | a sequent decided, with a derivation or a countermodel | the outcome's JSON |
ordinary.derivation | a derivation of LK or LJ | the derivation's JSON |
ordinary.interpolant | a Craig interpolant and its two halves | {"logic", "partition", "outcome", "interpolant"} |
rules.calculus | a calculus | the rule file |
rules.sequent | a sequent to derive in a calculus | {"goal", "assumptions"}, text the calculus reads |
rules.session | a derivation in progress | the session's JSON |
rules.derivation | a derivation | the derivation's JSON |
modal.sequent | a sequent of modal logic and its system | the sequent's JSON with system |
modal.outcome | a sequent decided, with a derivation or a countermodel | the outcome's JSON |
modal.model | a Kripke model, each world's arrows the worlds it sees | the model's JSON |
modal.evaluation | a model checked against a sequent | {"system", "world", "frame", "holds", "failing", "values"} |
drawing | a drawing | {"svg"} |
text | a text in a format | {"format", "text"} |
certificate | a certificate for Rocq | {"text"} |
term | a proof read as a lambda-term | {"text", "judgement"} |
A sequent's JSON with mode, logic or system beside its keys reads as the
sequent wherever a sequent is read: the key is ignored there. text,
where present, is the sequent as it was typed.
Operations
An operation takes values of the kinds it lists, in order, and makes one
value. Its parameters are a JSON object, "" for every default. It
promises something of its output and says what checking that costs.
| operation | from | to | promise |
|---|---|---|---|
linear.prove | linear.sequent | linear.outcome | decides |
linear.start | linear.sequent | linear.session | exact |
linear.goal | linear.session | linear.sequent | exact |
linear.proof | linear.session | linear.proof | proves |
linear.net | linear.proof | linear.net | proves |
linear.eliminate | linear.proof | linear.proof | proves |
linear.term | a session or a proof | term | renders |
linear.draw | a session, a proof or a net | drawing | renders |
linear.export | a session or a proof | text | renders |
linear.certificate | a proof or an outcome | certificate | certifies |
linear.duplicate | linear.sequent | linear.sequent | exact |
ordinary.decide | ordinary.sequent | ordinary.outcome | decides |
ordinary.start | ordinary.sequent | ordinary.session | exact |
ordinary.goal | ordinary.session | ordinary.sequent | exact |
ordinary.derivation | a session or an outcome | ordinary.derivation | proves |
ordinary.translate | ordinary.sequent | ordinary.sequent | same verdict |
ordinary.interpolate | ordinary.sequent | ordinary.interpolant | interpolates |
ordinary.half | ordinary.interpolant | ordinary.sequent | exact |
ordinary.embed | ordinary.sequent | linear.sequent | same verdict |
ordinary.term | a session or a derivation | term | renders |
ordinary.draw | a session, a derivation or an outcome | drawing | renders |
ordinary.export | a session or a derivation | text | renders |
ordinary.certificate | a derivation or an outcome | certificate | certifies |
ordinary.duplicate | ordinary.sequent | ordinary.sequent | exact |
rules.start | rules.calculus, rules.sequent | rules.session | exact |
rules.derivation | rules.session | rules.derivation | proves |
rules.from_ordinary | ordinary.derivation | rules.derivation | proves |
rules.draw | rules.session | drawing | renders |
rules.export | rules.session | text | renders |
rules.duplicate | rules.sequent | rules.sequent | exact |
modal.decide | modal.sequent | modal.outcome | decides |
modal.countermodel | modal.outcome | modal.model | exact |
modal.evaluate | modal.sequent, modal.model | modal.evaluation | exact |
modal.derivation | modal.outcome | rules.derivation | proves |
modal.calculus | modal.sequent | rules.calculus | exact |
modal.draw | modal.outcome | drawing | renders |
modal.export | modal.outcome | text | renders |
modal.duplicate | modal.sequent | modal.sequent | exact |
The catalogue gives each operation's parameters with their values and
defaults, its plain name, how its output relates to its inputs once made
(derived, work or copy), and whether a run is instant or a
search that may end at a bound.
Promises and their checks
| promise | what it claims | what checking it costs |
|---|---|---|
| exact | the output is read off the input | nothing to check |
| decides | the verdict has evidence deduxit's checker accepts | instant |
| proves | the proof or derivation proves its sequent | instant |
| same verdict | input and output are valid together or not | two searches |
| interpolates | the interpolant's atoms occur in both parts, and both halves are valid | two searches |
| renders | the drawing or text shows its input | nothing to check |
| certifies | Rocq accepts the certificate | Rocq checks it |
A check ends held, failed (a fault of deduxit), open (a part was
not decided within the bounds), recorded (it held when the output was
made, and the output keeps nothing to check it by again, as a clausal
proof's counts), outside (another program checks it) or none.
What a run depends on
Each operation lists the settings keys its output depends on, besides its
inputs and parameters: limits.work, search, view, styles.svg and
so on, from the settings file. On one thread
(--deterministic in the command, Settings::deterministic in the
library) the same inputs, parameters and settings give the same output,
so a program may keep it. A run that a bound ended says which: its
output says "unknown", and the run names the reason and the settings
key that lifts it, limits.work for the budget of work.
In the web page's module
The WebAssembly module of the web page (the crate deduxit-web) has the
same calls for every suite, under the suite's prefix: none for linear
logic, ordinary_ and rules_. describe() answers which call of a
suite is which, with its arguments, and the catalogue above:
| call | what it does | linear | ordinary | rules |
|---|---|---|---|---|
read | reads a sequent, or a rule file | read_as | ordinary_read | rules_read |
start | starts a proof step by step | start | ordinary_start | rules_start |
view | what the page shows of a proof | view | ordinary_view | rules_view |
rules | the rules that apply at a goal | rules | ordinary_rules | rules_rules |
apply | takes a step | apply | ordinary_apply | rules_apply |
undo | takes the last step back | undo | ordinary_undo | rules_undo |
close | closes a goal by the search | close | ordinary_close | none |
hint | the next steps of the goal's proof | hint | ordinary_hint | none |
draw | the proof as SVG | draw | ordinary_draw | rules_draw |
export_as | the proof in a format | export_as | ordinary_export | rules_export |
certificate | a Rocq certificate of an outcome | certificate | ordinary_certificate | none |
Each call takes JSON text and the page's settings, and keeps nothing
between calls: the documents it takes and gives carry their version.
Every view says in layout where the page draws the proof: tree
for a derivation, list for a Fitch proof.
The schema of the JSON forms
wire.schema.json is a JSON Schema of every
document deduxit writes and reads, with the level each form appeared at,
and of the values above. A rule file has a schema of its own,
deduxit::rules::SCHEMA (Check a derivation in your own
rules). Each
release carries both
schemas of its version, wire.schema.json and rules.schema.json.
How deduxit searches
This page explains how deduxit prove finds a proof or shows there is
none: which engine searches which sequent, why the search with
exponentials deepens a bound, how a sequent is refuted, and how threads
share the work. You need none of it to use the command; it helps to
read --stats, to choose --engine, and to understand an "unknown".
Which engine searches
deduxit looks at the sequent's connectives (its fragment) and picks
an engine. The verdict line names it, and --engine forces another:
- The additive engine decides a sequent of two formulas built from
atoms with
&,⊕,⊤and0alone. It recurses on pairs of subformulas, so it runs in time linear in the product of their sizes. - The Horn engine decides a Horn program: atoms, implications
between tensors of atoms, such implications under
!, and a goal that is a tensor of atoms (below). - The focus engine searches everything else in classical linear logic: a focused sequent search over bitsets, which applies the rules that need no choice at once and makes choices only at stable sequents.
- The two-sided engine is the focus engine's counterpart in intuitionistic linear logic. It keeps one goal on every branch.
- The net engine searches MLL without units for an axiom linking that makes the sequent's formula trees a proof net. It decides cyclic linear logic, and in classical linear logic it takes over where the focus engine stops at its recursion limit on a sequent whose atoms occur once with each sign (a chain of thousands of links), or at its memory bound under Mix.
- The inverse method (
--engine inverse) searches forward, from the axioms up. Without Mix, it takes over where the focus engine meets its memory bound (some sequents of thousands of distinct atoms), three to four times as fast there, and the net engine takes over after it where it meets a bound of its own. It also takes short turns beside the engine on some goals (below). - The essential engine (
--engine essential) searches IMLL without units for an essential net. It decides the Lambek calculus, and in intuitionistic linear logic it runs only when asked.
--fragment asserts the fragment, and a sequent outside it is an error.
--stats prints the counters of the engine that ran. The focus engine
counts the stable sequents it visited, those it found in its memo (the
sequents already decided), and the splits it examined (the ways to
divide a context between the two premises of a ⊗). The net engine
counts the literals it chose to link, the links it tried and the
correctness tests it ran. Units of work are each engine's steps; on one
thread they are the same on every machine.
$ deduxit prove --mix --stats --deterministic --engine net "|- A par B, ~A, ~B"
provable (MLL, classical with Mix, net engine)
─────── ax ─────── ax
⊢ A, ~A ⊢ B, ~B
──────────────────── mix
⊢ A, B, ~A, ~B
─────────────── ⅋
⊢ A ⅋ B, ~A, ~B
literals chosen: 2
links tried: 2
exact tests run: 2
units of work: 2
time: 63.45µs
$ deduxit prove --engine focus --stats --quiet --deterministic "|- A * B, C * (~A par ~B), ~C"
provable (MLL, classical, focus engine)
stable sequents visited: 2
from the memo: 0
memo entries at most: 2
splits examined: 3
units of work: 35
time: 56.66µs
Exponentials and the copy bound
With ! and ? (MELL and full linear logic) a proof may copy a ?
formula any number of times. The focus engine searches under a bound on
how often a ? formula is copied on one branch, and deepens the bound
from zero: it goes on to the next bound until it decides or the time
limit passes. --copies N caps the bound at N. The derivation shows the
standard rules: dereliction (?d), contraction (?c), weakening (?w)
and promotion (!).
$ deduxit prove "!A |- !(A * A)"
provable (MELL, classical, focus engine)
─────── ax ─────── ax
⊢ ~A, A ⊢ ~A, A
──────── ?d ──────── ?d
⊢ ?~A, A ⊢ ?~A, A
────────────────────── ⊗
⊢ ?~A, ?~A, A ⊗ A
───────────────── ?c
⊢ ?~A, A ⊗ A
─────────────── !
⊢ ?~A, !(A ⊗ A)
Deepening is why a call without flags answers within its time limit whatever it is given, and why an answer near the limit depends on the machine.
The bias
The focused engines treat one literal of every atom as positive. This
decides where a proof keeps its focus, never what is provable. --bias
names the rule: factors makes positive the literal that is more often
a direct factor of a ⊗ (such a ⊗ needs no search for its split),
rarer the one with fewer occurrences. Without exponentials the
default, auto, is factors, and under --affine it is rarer.
With exponentials neither always wins. On Horn clauses under !,
factors chains forward from the facts and is often faster by orders
of magnitude, but a forward chain takes one copy per step on a single
branch, where rarer chains backward from the goal within a few copies.
So on a sequent with exponentials auto runs both searches and answers
with the first that decides: in turns, in slices of work, on one core,
so that the run stays a function of the input, and side by side on
several. Under --copies N the backward search keeps to the bound, and
so does the forward one, except on a Horn program, where it runs within
--forward-copies (30 by default), a bound in steps of the chain:
$ deduxit prove -q --deterministic --stats --engine focus "!(a * a -o b), !(b * b -o c), !(c * c -o d), a, a, a, a, a, a, a, a |- d"
provable (MELL, classical, focus engine)
stable sequents visited: 47
from the memo: 5
memo entries at most: 9
splits examined: 151
copy bound reached: 7
forward search's copy bound reached: 7
units of work: 1297
time: 136.45µs
$ deduxit prove -q --deterministic --stats --engine focus --bias rarer "!(a * a -o b), !(b * b -o c), !(c * c -o d), a, a, a, a, a, a, a, a |- d"
provable (MELL, classical, focus engine)
stable sequents visited: 230
from the memo: 178
memo entries at most: 34
splits examined: 1036
copy bound reached: 3
units of work: 4256
time: 181.10µs
$ deduxit prove -q --deterministic --stats --engine focus --bias factors --copies 3 "!(a * a -o b), !(b * b -o c), !(c * c -o d), a, a, a, a, a, a, a, a |- d"
unknown (MELL, classical, focus engine): the copy bound of 3 was reached after 55.51µs; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
stable sequents visited: 11
from the memo: 0
memo entries at most: 5
splits examined: 31
copy bound reached: 3
units of work: 322
time: 55.51µs
$ deduxit prove -q --engine focus --copies 1 "!A, !(A -o B), !(B -o C) |- C"
provable (MELL, classical, focus engine)
$ deduxit prove -q --engine focus --copies 1 --forward-copies 1 "!A, !(A -o B), !(B -o C) |- C"
unknown (MELL, classical, focus engine): the copy bound of 1 was reached after 149.56µs; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
The Horn engine
A Horn program is a Petri net. !(a * b -o c * d) is a transition that
takes the tokens a and b and gives c and d; the atoms left of
⊢ are the starting marking, and the goal is the marking to reach. With
a clause under !, the sequent goes to the Horn engine. It searches the
markings in place of sequents, each reached once and the one nearest the
goal first. It reads the proof off the firing sequence it finds: each
firing is a copy of its clause, whose body takes its atoms by axioms.
It needs no copy bound. It answers "unprovable" when it has seen every reachable marking without the goal, or when the counts of an atom rule the goal out. It also answers "unprovable" when the net's state equation has no solution, which a simplex beside the search finds out. Then weights for the atoms, checked exactly, show that no firing raises the weighted count of the tokens while the goal needs it raised, however many markings the net has. A net whose markings grow without end and whose equation has a solution is searched until the time or the memory limit.
Two more refutations reach nets whose markings grow without end. A clause with an atom no reachable marking holds can never fire, and is left out. And once the search has run a while, the same search runs backward from the goal beside it, where such a net often has few markings.
In affine mode, the tokens and clauses left over may be weakened, so
the question is whether some reachable marking covers the goal. The
engine decides it backward from the goal: it keeps the least markings
from which a firing covers the goal, until one lies below the start or
none is new, which always comes. --stats counts the markings:
$ deduxit prove "!A, !(A -o B), !(B -o C) |- C"
provable (MELL, classical, horn engine)
─────── ax ─────── ax
⊢ ~B, B ⊢ ~C, C
──────────────────── ⊗
⊢ ~B, B ⊗ ~C, C
─────── ax ────────────────── ?d
⊢ ~A, A ⊢ ~B, ?(B ⊗ ~C), C
──────────────────────────────── ⊗
⊢ ~A, A ⊗ ~B, ?(B ⊗ ~C), C
───────────────────────────── ?d
⊢ ~A, ?(A ⊗ ~B), ?(B ⊗ ~C), C
────────────────────────────── ?d
⊢ ?~A, ?(A ⊗ ~B), ?(B ⊗ ~C), C
$ deduxit prove -q --deterministic --stats "!(a * a -o b), !(b * b -o c), !(c * c -o d), a, a, a, a, a, a, a, a |- d"
provable (MELL, classical, horn engine)
markings reached: 7
markings met again: 0
markings kept: 7
units of work: 6
time: 45.06µs
$ deduxit prove -q --deterministic --stats "!(a * a -o b), !(b * b -o c), !(c * c -o d), a, a, a, a, a, a, a, a |- d * a"
unprovable (MELL, classical, horn engine): the search was exhaustive
markings reached: 12
markings met again: 2
markings kept: 10
units of work: 13
time: 31.81µs
$ deduxit prove -q "!(a -o a * a), !(b * b -o c), a, b |- c"
unprovable (MELL, classical, horn engine): the state equation of the Petri net has no solution, so no firing of its clauses yields the goal's atoms: weighting each a by −2, b by 1 and c by 2, no clause that can fire raises the weighted count of the atoms, and the goal asks it raised
$ deduxit prove -q --affine --stats "!(a * a -o b * b * b), a, a, a |- b * b * b"
provable (MELL, classical affine, horn engine)
markings computed backward: 1
markings covered already: 0
markings kept: 1
units of work: 2
time: 268.07µs
$ deduxit prove -q --affine "!(a * a -o b * b * b), a, a, a |- b * b * b * b"
unprovable (MELL, classical affine, horn engine): read as a Petri net, the goal's target cannot be covered: a backward search from it saturated, and none of the 3 markings it kept is at most the initial marking
The last goal's state equation has a solution, one and a third firings
of the clause, so only the search refutes it. The a left over in the
proof before it is weakened.
Such a refutation carries the markings the backward search kept: every
marking from which the target can be covered is at least one of them,
and the initial marking is none of these. A check of its own verifies
them before the verdict, without the search: one of them is at most the
target, none is at most the initial marking, and every clause that can
fire, fired backward from any of them, needs a marking at least one of
them. --format json writes them, and deduxit check checks them
again (the chapter on checking); the Rocq export has no certificate for
them yet. Where the counts or an assignment refute too, those are
reported instead, being smaller.
The inverse method
--engine inverse searches forward by the focused inverse method. It
derives stable sequents from the axioms upward, each focusing phase of
the sequent's formulas one rule. It keeps a derived sequent unless one
already kept stands for every sequent it stands for, and proves the goal
once every stable sequent the goal decomposes into is derived. Without
exponentials it can derive finitely many sequents, so it decides. With
them it needs no copy bound: it proves what is provable given time, and
refutes where nothing new comes. This suits a small goal under many
hypotheses that ! makes reusable.
Where it refutes, the refutation is the set of sequents it saturated with. A check of its own verifies it before the verdict: it reads the rules off the sequent again and applies them to every choice of the set's sequents. Its counters are the sequents taken up, subsumed and kept, and it runs in every commutative mode.
Without --engine, on an intuitionistic goal with an exponential and on
a goal under Mix (not affine), the inverse method takes turns beside the
engine detection picks. That engine searches alone for some hundredths
of a second. Then, each time its work has doubled, the inverse method
takes a turn on the same thread, starting afresh, of at most a
thirty-second of that work, and the engine goes on where it stopped. The
turns cost at most a sixteenth of the engine's work, and a goal decided
within the head start sees none. A goal the inverse method decides in a
turn is answered by it, and the verdict line says inverse engine. On
the intuitionistic problems of the LLTP library, this decides in
milliseconds what the backward search leaves undecided after a minute.
$ deduxit prove -i --engine inverse --stats "!(a -o b), !(b -o c), a |- c"
provable (IMELL, intuitionistic, inverse engine)
───── ax ───── ax
b ⊢ b c ⊢ c
──────────────── ⊸L
b, b ⊸ c ⊢ c
───── ax ─────────────── !L
a ⊢ a b, !(b ⊸ c) ⊢ c
─────────────────────────── ⊸L
a ⊸ b, !(b ⊸ c), a ⊢ c
───────────────────────── !L
!(a ⊸ b), !(b ⊸ c), a ⊢ c
sequents taken up: 2
sequents subsumed: 0
sequents kept: 3
units of work: 50
time: 102.44µs
$ deduxit prove -i --engine inverse -q "!(a -o b), a |- b * b"
unprovable (IMELL, intuitionistic, inverse engine): the search saturated: its 2 sequents are closed under the rules, and none of them yields the goal
Intuitionistic linear logic
Under -i a sequent of two additive-only formulas goes to the additive
engine, in every mode, and a Horn program with a clause under ! to
the Horn engine, as in classical logic. Everything else goes to the
two-sided engine, with the same copy bound and affine mode as the focus
engine. IMLL without units, each atom once with each sign, goes to the
net engine where the two-sided engine stops at its recursion limit or
memory bound: the classical net of the one-sided sequent is always an
intuitionistic proof.
$ deduxit prove -i -q --stats "(A & B) + (A & C) |- A & (B + C)"
provable (IALL, intuitionistic, additive engine)
pairs of subformulas visited: 20
from the memo: 0
memo entries: 20
units of work: 20
time: 89.90µs
--engine essential searches IMLL without units for an essential net.
The intuitionistic reading directs every edge from the hypotheses toward
the goal. A linking is then a proof net when the directed graph has no
cycle and every implication A ⊸ B on the goal's side dominates its
antecedent: every path from A to the goal passes through it. The
engine keeps which occurrence reaches which, a matrix of bits that
--memory-limit bounds. It was slower than the two-sided engine on all
but the smallest sequents it was measured on, so under -i it runs only when
asked:
$ deduxit prove -i --engine essential --net "A -o B, B -o C |- A -o C"
provable (IMLL, intuitionistic, essential engine)
A ⊸ B, B ⊸ C ⊢ A ⊸ C
A[1] — A[7]
B[2] — B[4]
C[5] — C[8]
proof net (the correctness criterion holds)
Why a sequent is unprovable
An "unprovable" verdict carries a reason, which deduxit check
verifies without the search (Check a proof or a
refutation):
- An atom's count. In every axiom an atom meets its negation. So if
an atom occurs more often with one sign than the other, whichever
additive alternatives a proof takes, the occurrences cannot all meet
in axioms. Under
!and?a copy adds occurrences; the count still refutes where all of the atom's occurrences there have one sign. Of a sequent written with two sides, the reason speaks of the sides:Aon the right meetsAon the left, and a negated formula or an implication's antecedent counts on the other side. Where a hypothesis is the atom left over and nothing is missing on the right, the line adds that-alets a hypothesis go unused. - The count equation. A provable one-sided sequent of MLL has exactly #⊗ − #⅋ − #1 + #⊥ + 2 formulas.
- The state equation of a Horn program, above.
- The classical reading. After a search that did not prove the
sequent, the command reads it in classical propositional logic:
!and?erased,*and&as "and",parand+as "or",-oas implication,1andtoptrue,botand0false. It looks for truth values of the atoms that make it false. No provable sequent has them, in any mode, so an unknown search becomes unprovable with the values as its reason, and an exhausted one gets them as a certificate. This search runs after the proof search, past the time limit, within--classical-work Nformulas evaluated (2²⁶ by default;0turns it off), and never changes a verdict the proof search gave. - A saturated set of the inverse method, and the basis of the Horn engine's backward search in affine mode, above.
- "The search was exhaustive": the search tried everything within
its bounds and none of the above applies. Only the search vouches for
it, so
checkcannot verify it.
The JSON output holds the same reason as refutation, written
one-sided.
Threads
By default the search runs on one thread first. If that has not
decided within a tenth of a second (--pool-after), a pool of the
machine's other cores searches beside it, and the first to decide
answers. So a small sequent is decided at once and always the same way,
a hard one gets the machine, and what one thread decides within the
limit stays decided. The additive, Horn, essential and inverse engines
run on one thread and get no pool.
--jobs N (-j) runs N threads from the start (after one thread, with
--pool-after). --deterministic runs the sequential engines
throughout, whose proof and statistics are a function of the input. A
parallel run may find a different proof of the same sequent, never a
different verdict. The focus engine splits the choices nearest the root
among the threads and shares its memo; on a first-order sequent it
splits only the choices that no rule around them may ask for another
witness. The net engine splits its search into cubes at its first
choices, and where every link is forced it makes each link once, as one
thread does. A search never uses more threads than the machine runs at
once, and a larger --jobs is taken as that many, with a note:
$ deduxit prove -q -j 4 --copies 3 --classical-work 0 "!(A -o A * A), !(B * B -o C), A, B |- A * A * A * ?D"
unknown (MELL, classical, focus engine): the copy bound of 3 was reached after 1.79ms; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
$ deduxit prove -q --deterministic --copies 3 --classical-work 0 "!(A -o A * A), !(B * B -o C), A, B |- A * A * A * ?D"
unknown (MELL, classical, focus engine): the copy bound of 3 was reached after 2.55ms; raise it with --copies N, or lift it with --copies none to deepen it while the time limit lasts
$ deduxit prove -q -j 10000 "A |- A"
note: --jobs 10000 is more than this machine runs at once; a search uses 16
provable (MLL, classical, focus engine)
Architecture
This chapter explains how deduxit is built: which crate does what, how the library stores a sequent, and how proofs, search and outputs fit together. It helps when reading the code or the library's API.
The crates
All the logic is in the library. Everything else is a front end to it.
| package | directory | what it is |
|---|---|---|
deduxit | core/ | the library |
deduxit-cli | cli/ | the command deduxit, a thin front end |
deduxit-bench | bench/ | the benchmark harness, which times the library's engines on problem sets |
deduxit-web | web/ | the bindings that compile the library to WebAssembly for a web page |
linlog, linlog-cli | compat/ | the crates under their names up to 0.2.0, which point to deduxit |
The library must run in a browser. So it reads no clock, and it uses
threads only behind its parallel feature. The bindings leave that
feature off: the flake builds them for wasm32-unknown-unknown with
every other feature.
The library holds three suites side by side: linear (linear logic),
ordinary (propositional logic) and lambda (proofs read as
lambda-terms). What they share stays at the root: the one error type,
the limits a long call takes, the settings a front end holds, the
exports and the JSON forms.
Sequents and occurrences
A sequent is a compact arena of its subformulas in negation normal
form, one-sided: Γ ⊢ Δ becomes ⊢ Γ^⊥, Δ. There is no second
representation for the other readings:
- An intuitionistic sequent is lowered once into the same arena, with the side of every subformula recorded. Every output reads it back two-sided through those sides.
- A classical sequent's text keeps, beside the arena, one byte per
subformula occurrence saying how it was written: its side of
⊢, andA ⊸ BagainstA^⊥ ⅋ B. Derivations are drawn two-sided from it.
On top of the arena the library detects the fragment the sequent lives in, and builds the occurrence forest. The forest numbers every place a subformula occurs. Every engine, the checker and the proof nets work on those numbers, and errors name occurrences by them.
Proofs and the checker
A proof is a compact term over the occurrences, one node per rule instance. An independent checker decides whether a term proves its sequent. It shares no code with the search. A derivation view unfolds a term into the tree of explicit sequents of the standard sequent calculus, one-sided or two-sided, for printing and the exports.
A proof net is the same forest with axiom links. It has its own correctness criterion, and converts to and from a proof term.
Interactive proving holds a derivation with open goals over the same forest, with the same inferences as the derivation view. Once it is finished, it turns back into a term for the checker.
Search
The search decides a sequent, or any goal within one, with the engine its fragment and mode call for: the focused sequent search, the net search, the additive recursion, the inverse method or the search of a Petri net's markings. How deduxit searches describes them. The search returns a checked proof, a refutation that a check of its own confirms, or the reason it could not tell.
Every long call takes the limits it may use and a stop closure, which it
asks regularly and tells the progress made. The library has no clock: a
caller with one stops on time (Settings::stop builds the command's
stop), and a caller without one, such as a browser tab, stops on the
work done.
The other suites
Ordinary logic has an arena and a syntax of its own. It decides
intuitionistic and minimal logic by LJT, a calculus whose search always
ends, and by a SAT-based engine (behind the feature sat, the default),
and every logic through an embedding: it translates the sequent
into a linear one, searches that, and reads the linear proof back as a
derivation of LK or LJ. A checker of its own checks that derivation by
the rules of the logic. The SAT-based engine decides classical logic
too. In classical
logic its evidence for a valid sequent is a clausal proof, which a
checker of its own accepts: every step follows from the clauses before
it by unit propagation, and the last is the empty clause.
The lambda suite reads an intuitionistic proof back as a term: a proof of intuitionistic linear logic as a linear lambda-term, a derivation of LJ as a simply typed one.
Outputs
The exports write sequents and derivations, finished or not, as LaTeX and Typst source, one inference at a time, so they hold one inference's text at once. A derivation of LK or LJ goes through the same writers as a linear one.
SVG drawings come from layouts of deduxit's own. A tree is laid out by the widths of its subtrees. A net is laid out by its formula trees under the axiom links, each subformula written where it stands in its conclusion. PNG and PDF render the SVG with fonts the caller gives.
A finished derivation becomes a Rocq certificate for one of two kernels.
For NanoYalla it is a proof script, one derived rule per inference. The
kernel's sequents are lists, so the writer tracks the order of each
goal's formulas, and adds an exchange only before a ⊗ whose goal is
not already in the order the rule needs. For deduxit's own Rocq library
it is the sequent, the proof term and one computation, in which the
library's checker accepts the term.
What exists and what is planned
This page lists what deduxit does today, suite by suite, and what is planned for the next releases. The chapters it links to show each part in use.
Linear logic
Sequents
- Sequents are read and printed in the syntax, with an ASCII and a Unicode spelling of every connective, and have a compact JSON form.
- deduxit detects the fragment a sequent lives in: MLL, MLL with units, ALL, MALL, MELL, LL, and their intuitionistic counterparts IMLL to ILL. The modes are a choice of the user: classical, affine (weakening allowed, in every fragment), intuitionistic and Mix.
- An intuitionistic sequent is written two-sided, the hypotheses left of
⊢and one goal right of it. The classical symbols are refused with a hint, or read from the classical syntax with--ill-syntax one-sided. Every output writes the sequent back two-sided: derivations, refutations, nets, errors, exports and terms. It has a JSON form of its own. - First-order linear logic has quantifiers over terms, predicates with arguments, function symbols and constants. Its sequents are read, printed one- and two-sided and written as JSON. A sequent with arguments but no quantifier is decided as a propositional one.
Proofs and the checker
- A proof is a compact term over the subformula occurrences of its sequent. An independent checker decides whether a term proves its sequent, in one pass and in memory proportional to the proof. In intuitionistic mode it also checks that every sequent of the proof has one goal. Every proof the search finds passes the checker, in every build.
- A derivation view unfolds a term into the tree of the standard sequent calculus, one-sided or two-sided with the rules of ILL, printed as text. On request a classical derivation is drawn two-sided, as its sequent was written: the rules are named by side, and a negation step stands where a negation was written.
- The size of a derivation is computed from the term without building it. Every path that builds a derivation (the text tree, the exports, the search inside an interactive proof) keeps within a bound on that size, which is an option.
- First-order proofs have
∀and∃steps with eigenvariables and witnesses. The checker checks the eigenvariable condition. Their derivations are printed one- and two-sided and drawn in LaTeX, Typst and SVG with every instance written out. deduxit checkreads a proof, or an unprovable outcome, and checks it (Check a proof or a refutation).
Proof search
- The search decides every fragment, MLL to LL and IMLL to ILL, with or without Mix. It answers with a checked proof, with "unprovable" and the reason, or with "unknown" and the bound or limit that ended it. How deduxit searches explains the engines.
- The engines are:
- a focused sequent engine for every fragment, one- and two-sided,
with a bound on the copies of
?formulas that deepens until the search decides or the time limit passes; - a proof-net engine for MLL without units, and for IMLL without units over essential nets, used where the focused engine stops at a limit or when asked;
- a recursion on pairs of subformulas, for two formulas built from additives alone;
- the focused inverse method, a forward search from the axioms, which decides without exponentials, proves with them without a copy bound, and refutes where its search ends;
- a Horn engine for Horn programs with clauses under
!, read as Petri nets: it searches the reachable markings in linear mode, decides coverability in affine mode, and refutes by the net's state equation.
- a focused sequent engine for every fragment, one- and two-sided,
with a bound on the copies of
- Which engine decides a goal is a table by fragment, mode and one more
feature. Each row is the engine measured fastest there, or the only one
that decides there. The library's documentation of
Enginehas the table with the measurements. - "Unprovable" comes from an exhaustive search, a saturated set of the
inverse method, the basis of the Horn engine's backward search in
affine mode, a count (an atom whose literals cannot pair up, the
count equation that fails), a Petri net's state equation, or an
assignment that makes the sequent false read classically. Each
refutation is checked apart from the search. A classical refutation of
a sequent written with two sides speaks of the sides, and names
-awhere an unused hypothesis is the problem. - First-order sequents are decided by unification with the occurs check:
by the focused engine in the classical modes, Mix and affine included,
and by the two-sided engine in the intuitionistic modes. MLL1 and MALL1
are decided, and with exponentials within the copy bound.
--witness-depthand--instancesbound the search. - The search runs on threads behind the library's feature
parallel, which the command has on. The focused engine and the net engine share their first choices out among a pool of threads, and one stop reaches every thread. By default one thread searches alone for a tenth of a second, and then the other cores join it. - The limits hold. The time limit is checked wherever a search can
spend time, and the command's
--timeoutcounts from its start, reading included, to within a fraction of a second. A search holds at most--memory-limitbytes, and a sequent unfolds to at most--occurrence-limitoccurrences. No walk over a formula, a net or a derivation recurses on the depth of the input.
Proof nets
- Proof nets exist for MLL with or without Mix, for MELL without units
with or without Mix, and for intuitionistic MELL without units. Each
has an independent correctness criterion (Danos–Regnier, decided by
Yeo's deletion test), which names the switching cycle or the
disconnection when it fails. A net turns into a checked proof, and a
proof into its net. Nets have a text form, a JSON form and a drawing,
every
!-box a rectangle. - In MELL the net of a proof is fixed only up to the axiom link each
weakening hangs on: the one the proof's weakening rule has above it.
So two proofs that differ only in the order of their rules can give
different nets. The same happens where a sequent holds two copies of
one
?formula, since a rule does not say which copy it acts on.
Cyclic linear logic and the Lambek calculus
- Cyclic linear logic, multiplicative and without units, keeps the order of a sequent's formulas up to rotation. It is decided by a search for planar proof nets, and checked, proved step by step and drawn with no exchange rule.
- The Lambek calculus, with or without empty antecedents, is read two-sided in the order written, with its two divisions. It is decided by a search for planar essential nets, and checked, proved step by step and drawn two-sided with the rules of the divisions.
Step by step and cuts
- Proving step by step holds a derivation with open goals. A rule applied to a formula of a goal is checked first: the connective, the mode, the context a promotion or an axiom needs, and one goal per premise in intuitionistic mode. A session can undo a step, close any goal by the search, and apply every invertible rule on request. The finished derivation becomes a term that the checker validates. A session has a JSON form. An unknown rule lists the session's rules with their ASCII spellings, and a split whose premise has no proof gets a warning.
- Proofs may have cuts in every commutative mode: the checker has the cut rule, a session lets the user name a cut formula, every view and export draws the cut, and a certificate for deduxit's Rocq library states the calculus with cut. The search stays cut-free.
- Cut elimination on proof terms works in every mode with the cut (classical, affine, with Mix, intuitionistic) and at first order: one step at a time on the cut the user names, or to the end within a bound on steps and on the proof's size. Every step is named by its case and checked.
- Cut elimination on proof nets works with and without boxes (classical, with Mix, intuitionistic): one step at a time, each named by its case and checked by the criterion, and each drawn with the cut link and what the step acts on highlighted.
Ordinary logic
- Ordinary logic is classical, intuitionistic and minimal propositional logic, in a syntax of its own or read from TPTP problems.
- By default intuitionistic and minimal logic are decided by a SAT
solver, below, with the derivation of LJT, Dyckhoff's contraction-free
calculus, where LJT gives one. Runs of the ILTP library chose this
default. Where a bound other than the time limit stops the solver,
the embedding below decides instead. LJT alone is
--method ljt; its proofs become derivations of LJ with cuts. - Classical logic also has the methods of a first logic course:
--method tableprints the sequent's truth table with its falsifying rows marked, and--method tableaua signed tableau whose lines name their rules. A closed tableau is a checked derivation of LK, and an open branch or a falsifying row a checked countermodel. The table is bounded at 10 atoms by default. - A tableau a student writes by hand, as text, is checked step by step
(
check --tableau): the first step that breaks a rule is named with its line and what the rule gives, a branch marked wrongly or not finished is said, and a right tableau without a fault is checked again as a derivation in the calculustableau; an open one's branch gives a checked countermodel. - Every "not valid" of the SAT solver comes with a Kripke countermodel,
and in classical logic the embedding's assignment is a model of one
world. The model is checked before the verdict, printed a world per
line, written in the JSON, drawn as SVG, PNG or PDF, and certified for
deduxit's Rocq library.
check --logic L --sequent SEQUENT FILEchecks a Kripke model you give and says at which world the sequent fails. - All three logics can also be decided through their embeddings into
linear logic: classical logic into affine MALL; intuitionistic logic into ILL
by Girard's call-by-name and call-by-value translations or the 0/1
translation; minimal logic the same, with false an atom.
seq printprints the translated sequent, and--method embeddingdecides through it. - The linear proof is read back as a derivation of LK or LJ, which a
checker of its own validates and every output draws. Its weakenings and
contractions are drawn, or left out where they are admissible. A valid
sequent gets a certificate over
Propfor Rocq, and so does a sequent that an assignment of its atoms makes false; a Kripke countermodel of intuitionistic or minimal logic gets a certificate for deduxit's Rocq library. - Sequents are proved step by step in LK and LJ, in the command and in
the web bindings. A goal's
closeandhintdecide through the embedding; in the bindings a goal that is not valid gets the SAT solver's countermodel. - Classical sequents are translated into
minimal logic by Kolmogorov's and Gödel and Gentzen's negative
translations, and into intuitionistic logic by Kuroda's and Glivenko's.
seq translatedecides the sequent and its translation and checks that the verdicts agree.interpolatereads a Craig interpolant off a derivation of LK or LJ without cuts by Maehara's method, and checks it by deciding both halves and comparing the atoms. The library, the web bindings and the web page have both. - In the library, behind the default feature
sat,ordinary::satdecides classical, intuitionistic and minimal logic with a SAT solver. A sequent that is not valid comes with a model, which is checked. A valid sequent comes with a checked derivation of LJ in intuitionistic and minimal logic, and in classical logic with the solver's clausal proof, which a checker of deduxit's own accepts. It is the default of every logic; in classical logic the default keeps the embedding's derivation of LK, refutation and certificate wherever the embedding gives them within 2²⁰ units of work. The command offers it as--method sat.
Proofs as programs
- Every intuitionistic proof reads as a program: a proof of intuitionistic linear logic as a term of the linear lambda calculus of Benton, Bierman, de Paiva and Hyland (the affine one in affine mode, a cut a redex), and a derivation of LJ as a simply typed term.
- Terms are printed in Unicode or ASCII, with or without types, by
prove,checkandinteract, in JSON, and under the conclusion in LaTeX, Typst, SVG, PNG and PDF. What has no term is refused with the reason. In the librarylambda::TermhasDisplay.
Outputs and certificates
-
Exports write sequents and derivations, finished or in progress, as LaTeX (ebproof trees) and Typst (curryst trees, and a layout of deduxit's own for trees of any height), as fragments or standalone documents that choose no font.
-
SVG draws sequents, derivations and proof nets. A net can have every subformula written or be compact, and be drawn in deduxit's look or the textbooks'. The text is laid out with the widths of Euler Math, STIX Two Math, Garamond-Math, Asana Math or New Computer Modern Math, or of a font the caller gives. A switching cycle or the parts of a disconnected net are highlighted. Intuitionistic nets can be drawn as essential nets. A drawing can carry a text for screen readers, and renders as PNG, as archival PDF (PDF/A-4, PDF/A-2u) or as accessible PDF (PDF/UA-1).
-
Every output format has one options value, with serde: rule labels, the shape of an open goal, alignment, preambles, the SVG's font, sizes and colours, and the certificate's names. The command sets them with
--styleand--style-file, and writes a derivation as it is made. -
Rocq certificates: a finished proof becomes a Rocq script. The NanoYalla kernel takes classical proofs, and intuitionistic ones as the classical proofs they are. deduxit's own Rocq library takes every mode (
--kernel deduxit, the default for Mix, affine, intuitionistic and first-order proofs). Flake checks compile both kinds.nix run github:deduxit/deduxit#check-certificate -- proof.vchecks a certificate of either kernel with nothing but Nix installed. -
For an unprovable sequent whose refutation is a classical countermodel, an atom's count, the count equation, a weighted count or a Petri net's state equation,
--format rocqwrites the lemma that the calculus does not derive it, checked by computation. -
deduxit's Rocq library is the package
rocq-deduxit, in its own repository, deduxit/rocq-deduxit, on Rocq 9 and its standard library alone. It has:- the one-sided calculus of classical linear logic, with Mix and weakening as parameters, and the two-sided calculus of intuitionistic linear logic and its affine variant, each with the cut as an optional rule;
- deduxit's proof terms as datatypes, its checkers as functions, and for every mode the theorem that a term the checker accepts proves its sequent, closed under the global context;
- the same at first order, with the quantifier rules and the eigenvariable condition;
- the invariants every derivation keeps (it is a tautology read classically, an atom's literals balance, the count equation, a weighted count), on which the certificates of refutations rest;
- the proof that a derivation with Mix gives one of
?(⊥⊗⊥), Γwithout Mix and without cut; - the calculi of intuitionistic and minimal logic, their Kripke models with the theorem that a derivable sequent holds in every model, and a checker of finite countermodels, on which the certificates of countermodels rest;
- bridges, checked against the kernels' own files, showing that its
classical calculus derives exactly the sequents NanoYalla derives,
and its intuitionistic calculus exactly those of Yalla's
nanoill.v.
deduxit's flake compiles the certificates the command writes against the library, pinned to a commit.
The command
- The
deduxitcommand hasprove,check,eliminate,interact,interpolate,seqandworkspace. It has time limits, Ctrl-C, statistics, JSON output, proof nets, LaTeX, Typst, SVG and Rocq output, and--jobs,--pool-afterand--deterministicfor the search. Decide a sequent shows them. - Every setting a flag sets can also come from one file, given with
--settings(The settings file). A front end keeps its settings in that form. checkruns under a time limit and under limits of work and memory, and answers "unknown" where one of them ends it.- The defaults suit a newcomer, and each is an option. The copy bound deepens while a time limit of two seconds lasts. One thread searches for a tenth of a second before the other cores join it. "Unknown" says which bound or limit ended the search, after how long, at which copy bound, and with the flag that changes it. "Unprovable" says why, where the counts of the sequent tell or an assignment makes it false.
-hshows the common flags under headings, and--helpevery one. The first errors say what to write instead:deduxit "A |- A"suggestsdeduxit prove "A |- A", an unquoted sequent suggests quotes,->in linear logic suggests-oor--logic classical, and a file ofNAME: SEQUENTlines suggests--input-format lines.--format texis read aslatex.- A proof tree is printed on a terminal where it fits. Where the whole
tree would not fit, or would pass
--derivation-limit, a run of one structural rule is drawn as one inference. A derivation past the limit either way is left out, with a line that says so. - Many sequents at once: files, directories, lists of paths and standard input, in the text syntax, as JSON Lines, in the harness's problem files and in the LLTP library's format. There is one answer per sequent, in input order, a time limit per sequent and for the batch, a memory bound for the batch, and on request a child process per sequent.
The library and the web
- The library
deduxithas every engine, checker and output the command has (Use the library).Settings::stop(elapsed)stops a search as the command does.export::{latex, typst, svg, rocq}::to_string(derivation, &options)writes an export into a string. A linearOutcomereads back from its JSON withserde_json::from_str. deduxit::protocollists what each suite offers as data: the kinds of values, the operations between them with their parameters, the settings each reads and what each promises, and runs and checks them over JSON (What each suite offers). A JSON Schema describes every JSON form.deduxit workspacekeeps sequents and what was made from them in a file (Keep a sequent and what is made from it): a changed sequent marks what follows from it out of date until it runs again, and undo and redo take back whole edits. The web page links tabs the same way.- The library reads and writes sequents of propositional modal logic
(
deduxit::modal): the syntax of ordinary logic with[]or□and<>or◇, and a JSON form. It names the fifteen normal systems from K to S5, each by the conditions its frames meet (serial, reflexive, symmetric, transitive, euclidean). It decides a modal sequent in any of them: a valid one with a derivation in the system's labelled sequent calculus, which the checker of calculi given as data accepts, one that is not valid with a Kripke countermodel, checked where it is small enough to check. It checks a Kripke model you give against a sequent and a system. The command does both under--system(Decide modal logic), and proves a labelled sequent step by step in any system's calculus, backwards and, for the rules that add before⊢, forwards (interact --calculus G3S4). The protocol offers the decision, and the web page decides a modal sequent, draws its derivation or countermodel, and proves it step by step in the system's calculus. checkchecks a derivation in a calculus you give as data (Check a derivation in your own rules): a rule file in JSON declares the connectives, the zones of a sequent (each a set, a multiset or a sequence) and the rules as premises and a conclusion over schematic formulas and contexts, and each step of the derivation is matched against its rule, without a search. The verdict is "valid in the calculus given": the rules are yours, and nothing checks that they are sound. Hypotheses that a rule discharges and nested scopes serve natural deduction, sets of signed formulas a tableau, and sorts for labels a labelled modal calculus. LK, LJ, minimal logic's calculus, one-sided linear logic and signed tableaux are built in; derivations of LK and LJ and the tableaux of ordinary logic agree with their own checkers. Natural deduction is built in too (Check a proof in natural deduction): NJ, NK and NM with the variants courses use (¬defined asA → ⊥, double negation elimination or excluded middle in place ofRAA), each deriving exactly what the ordinary suite calls valid in its logic.interact --calculusbuilds such a derivation step by step, each step checked, what the goal leaves open asked for by name: backwards from a goal, or forwards from numbered lines in force, as a Fitch-style proof is written. Such a derivation is drawn as a tree in LaTeX, Typst and SVG, natural deduction with each discharged hypothesis in brackets and numbered, and as a Fitch proof, as text, as SVG, for the LaTeX packagefitchand for the Typst packagefitchcraft.- The unpublished crate
deduxit-webinweb/compiles the library to WebAssembly for a web page. Its calls take JSON and give JSON or SVG: a sequent read, a proof step by step, a goal closed by the search within a budget of work, a hint, and every export, for linear logic, for LK and LJ and for a calculus given as data; the translations and interpolants; the protocol's description of each suite; and the workspace. Its defaults fit a browser tab. The flake builds it as a package and tests it under Node. The library's checker and memo are tested on a 32-bit target there too. - deduxit.github.io is a web page for proving step by step in the browser on those bindings, in linear logic and in LK and LJ, with each intuitionistic proof's lambda-term, the countermodel of a goal that is not valid, the truth table and the tableau of classical logic. It proves in natural deduction (NK, NJ and NM, as a tree or as Fitch's lines) and in a rule file of your own, translates a classical sequent and finds an interpolant, and links the tabs made from one sequent into a workspace. Learn and Practice follow the tab's suite: linear logic has a course of eleven lessons, ordinary logic one of six and a store of problems. It lives in a repository of its own.
Benchmarks
- Readers for the problems of the LLTP library and for coverability
problems in the
.specformat of the Mist tool, and generated families with known verdicts: the hard families of the literature and the cases where one engine is known to be slow. deduxit-benchruns them with a time limit per run, writes CSV and summarises it. Scripts take a whole baseline on an idle machine, run the focused engine's target set, and compare two baselines problem by problem. Growing sets of families, each chosen for a claim about an engine or another prover, are drawn as time against size with the growth fitted. Benchmarks and the comparison shows them.- A comparison with the other provers of linear logic: each built from its own source at a pinned version, each problem translated into its syntax, every run measured by BenchExec under one time and memory limit. It covers the libraries with the engines of 0.1.0, and the growing families to each tool's limit with those of 0.2.0. Anyone can start it as a CI workflow.
- Four baselines measured the focused engine's performance work: one
before it, one after it, and one at each of the releases 0.1.0 and
0.2.0. The latest, of 2026-11-16, is in
bench/RESULTS.md.
Releases
- The crates
deduxitanddeduxit-cliare on crates.io. Up to 0.2.0 they werelinlogandlinlog-cli, whose last release, 0.3.0, points here. A changelog states what each version promises and what it breaks. - A workflow publishes a version tag with the command built for Linux
(an archive, a
.deb, an.rpmand an Arch Linux package), macOS and Windows, their checksums and a provenance attestation.
Planned
The collection grows by a suite at a time, release by release:
- 0.6.0: the modal logics K, T, K4, S4 and S5 decided, every refutation a checked Kripke countermodel, and a labelled calculus proved sound in Rocq; tools for teachers.
- 0.7.0: normal forms (NNF, CNF and DNF, and CNF by Tseitin's encoding) and propositional resolution at teaching scale, and the simply typed lambda calculus, its typing derivations checked and built.
- 0.8.0: first-order ordinary logic: classical, intuitionistic and minimal, proved step by step and searched, with finite countermodels; prenex form, Skolem form, clausal form and Herbrand's theorem, each checked; equality and first-order resolution; all of it on the web page, the linear tab at first order too.
Not yet placed in a release: the comparison with the other provers on the libraries with the engines of 0.2.0.
Where it comes from
deduxit owes much to Click & coLLecT. It aims to cover more uses, faster. Feature requests and contributions are welcome. deduxit is licensed under the EUPL; see Licence.
Benchmarks and the comparison
deduxit's speed is measured with its own harness, deduxit-bench, and
set beside the other provers of linear logic. This chapter says what is
measured, how to read the results, and how to run the harness yourself.
"Beside the other provers" sums up the
comparison.
The results
Each run has a chapter of its own, with its tables and figures:
- The baseline of 2026-11-02: the engines of 0.2.0 on the generated families and the LLTP library.
- The baseline of 2026-10-17: the engines of 0.1.0, on the same.
- Families that grow, 2026-11-02 and 2026-10-31: time against size for families chosen to show each engine's and each other prover's strengths and weaknesses.
- The comparison with the other provers: beside the other provers, 2026-10-15, first order against LinearOne, 2026-10-30 and the other provers on the growing sets, 2026-11-03.
How to read them
Every figure is drawn by bench/plots.py from the rows of the run's CSV
files when the manual is built (docs/figures.sh). None is drawn by
hand, and a figure always shows the rows it names.
- Time is the wall-clock time of the search alone: building the occurrence forest and starting a thread pool count, reading the problem, checking the proof and starting the process do not. A problem's time is the median of its runs. In a comparison with other provers the time is instead the whole process's, as BenchExec measures it.
- In the tables,
✓is a proof,✗a refutation, and> 10 sa problem not decided within the time limit.†marks a run on one thread that waited for a CPU for over 1 % of its time, so another process slowed it down. - In the figures of time against size, a hollow marker on the
limit's line is a size not decided, and a cross above the limit is a
size skipped because a smaller one already failed. Where a table
follows the figure, it gives per line the better fit by least squares
of the logarithm of the time, polynomial
n^dor exponentialb^n; "fewer than 3 sizes" means too few sizes took over a millisecond to fit. - In the comparison, a tool solves a problem when it answers within the limit and is not wrong. A verdict is wrong when it refutes a problem some tool proved with a checked proof, or contradicts the verdict a generated problem has by construction. A verdict that only contradicts an LLTP file's header counts as solved, in a column of its own: about thirty of the library's headers are wrong. "Late" is an answer after the limit and before the kill.
Run the harness
deduxit-bench is cargo run --release -p deduxit-bench -- … in a
checkout, or nix build .#deduxit-bench. It times the engines on these
kinds of problems:
- Generated families with known verdicts, each at any size.
deduxit-bench familieslists them: 3-Partition as a Horn program and as an MLL sequent, Matsuoka's Partition, random QBF, wide sequents, contexts under Mix, Petri-net counters, the Lambek calculus in first-order MILL, a chain of instances of a quantified clause under!, a witness among many, Franzén's contraction formulas and Cook's pigeonhole principle from Dyckhoff's intuitionistic benchmarks read in linear logic, Euler tours, a clause used many times on one branch, reachability through a cycle at first order, and more. - The LLTP library:
nix build .#lltp -o bench/lltpfetches it at a pinned commit. Its problems underILL/run intuitionistically. - Coverability problems in the
.specformat, with--spec: the 176 of the qcover suite, whichnix build .#qcover -o bench/qcoverfetches. They run in intuitionistic affine mode. - Problem files of lines
name; mode; expected; copies; sequent, such asbench/problems/slow-tests.txt. - Problems of ordinary logic from the ILTP library, in TPTP format:
nix build .#iltp -o bench/iltpfetches its 274 propositional problems, andrun --tptp PATH --logics …runs them with the enginesembedding,ljtandauto.
run runs every problem in every mode, engine and thread count asked
for. Each run is a child process of its own with a time limit, and
writes one CSV row with the verdict, the time and the engine's counters.
summary prints Markdown tables of CSV files: the problems solved
within the time limit per family and configuration, and a time per
problem and configuration.
$ deduxit-bench run --family partition-no=3,4 --engines focus,net --jobs 1,4 --timeout 10 --output runs.csv
[1/8] partition-no/3 classical focus j1: unprovable 0.089 ms, about 0 min left
[2/8] partition-no/3 classical focus j4: unprovable 0.146 ms, about 0 min left
[3/8] partition-no/3 classical net j1: unprovable 3355.671 ms, about 0 min left
[4/8] partition-no/3 classical net j4: unprovable 1020.791 ms, about 0 min left
[5/8] partition-no/4 classical focus j1: unprovable 0.146 ms, about 0 min left
[6/8] partition-no/4 classical focus j4: unprovable 0.303 ms, about 0 min left
[7/8] partition-no/4 classical net j1: unknown timeout 10000.591 ms, about 0 min left
[8/8] partition-no/4 classical net j4: unknown timeout 10000.139 ms, about 0 min left
$ deduxit-bench summary runs.csv
…
## partition-no
| problem | runs: classical focus j1 | runs: classical focus j4 | runs: classical net j1 | runs: classical net j4 |
|---|--:|--:|--:|--:|
| partition-no/3 | 89 µs ✗ | 146 µs ✗ | 3.36 s ✗ | 1.02 s ✗ |
| partition-no/4 | 146 µs ✗ | 303 µs ✗ | > 10 s | > 10 s |
Compare two runs
summary --before DIR compares every file with the file of the same
name in DIR, an earlier baseline, problem by problem. It lists the
verdicts that differ, the problems decided before and not after, one row
per family or LLTP collection and configuration (the problems decided
before and after, late verdicts apart, where the undecided ended, and
the median ratio of the times), and every generated problem side by
side. Given again for each earlier baseline, oldest first, it sets them
all side by side before it compares with the last.
summary --against FILE compares every other file with FILE in the
same way, whatever the files' names: for instance, the passes under one
bias with the default.
$ deduxit-bench summary --before bench/results/2026-09-30 bench/results/2026-10-02/long-1.csv
…
| file | family | configuration | problem | before | after | after/before |
|---|---|---|---|--:|--:|--:|
| long-1 | 3-partition-no | classical auto j1 | 3-partition-no/5 | 302.42 s ✗ | 393 µs ✗ | 1.3e-6× |
| long-1 | counter | classical auto j1 | counter/16 | > 1200 s | 280 µs ✓ | |
| long-1 | counter | classical auto j1 | counter/64 | | 85.14 s ✓ | |
| long-1 | partition-no | classical auto j1 | partition-no/15 | | > 1200 s | |
| long-1 | partition-no | classical auto j1 | partition-no/5 | 811.48 s ✗ | 477 µs ✗ | 5.9e-7× |
| long-1 | partition-yes | classical auto j1 | partition-yes/28 | | > 1200 s | |
| long-1 | partition-yes | classical auto j1 | partition-yes/7 | > 1200 s | 230 µs ✓ | |
Change how the search runs
Each of these options is written into the rows, so the summary keeps the configurations apart:
run --bias rarer|factorsruns the focused engines under that bias.run --forward-copies Nbounds the default's forward search.run --copies nonedeepens the copy bound until the time limit; the rows have the copy bound reached (copies_reached).run --pool-after SECONDSsearches on one thread for that long before a pool of the other--jobsthreads joins it, as the command does by default.run --memo-limit 0runs without the memo, to measure what it gains.
The focused engine's target set
bench/targets.sh LABEL runs the instances the first baseline showed
the focused engine losing on: the hard families at the sizes that took
minutes or did not finish, and a fixed sample of 113 LLTP problems. It
runs on two pinned cores in a memory-capped user unit, into
bench/targets/LABEL.csv. On one thread the engine's counters are a
function of the input, so two such files tell whether a change altered
the search at all: summary --against FILE with --counters lists every
problem decided alike whose counters differ. bench/TARGETS.md sets the engine before the
performance work beside the engine after it.
Growing sets
Some families have a growing set: sizes from easy to past what the
engines decide in a minute, chosen for a claim about the strength or
weakness of an engine or of another prover, which the growth of the time
shows. deduxit-bench families prints each family's sizes and claim
under its summary.
run --growing runs every growing set. Once a configuration's run on a
size is refused, or meets the time limit or the memory bound, the
configuration skips that shape's larger sizes: every growing set is a
constructed family whose larger instance is no easier. The skipped sizes
are rows skipped ("past the limit at size n") that no table counts.
With --shard, a shard takes whole shapes.
$ deduxit-bench run --growing --only pigeonhole/ --engines auto,inverse --timeout 1 --output runs.csv
[1/28] pigeonhole/2#0 intuitionistic-affine auto j1: proved 0.144 ms, about 0 min left
[2/28] pigeonhole/2#0 intuitionistic-affine inverse j1: proved 0.078 ms, about 0 min left
…
[9/28] pigeonhole/4#0 intuitionistic-affine auto j1: proved 56.756 ms, about 0 min left
[10/28] pigeonhole/4#0 intuitionistic-affine inverse j1: proved 0.697 ms, about 0 min left
…
[13/28] pigeonhole/5#0 intuitionistic-affine auto j1: unknown timeout 1010.707 ms, about 0 min left
[14/28] pigeonhole/5#0 intuitionistic-affine inverse j1: proved 21.632 ms, about 0 min left
…
[18/28] pigeonhole/6#0 intuitionistic-affine inverse j1: proved 370.384 ms, about 0 min left
…
[22/28] pigeonhole/7#0 intuitionistic-affine inverse j1: unknown memory_limit 1038.479 ms, about 0 min left
bench/growing.sh runs the growing sets as the figures draw them, into
bench/growing/DAY/:
- every family under the default and with every engine forced
(
engines-K.csv, a stream per core); - the passes that switch off the mechanism a claim is about: the memo on
chainandreach-fo(memo-off.csv), the copy bound onchain(deepening.csv,--copies none), and the single thread onwitness-fo(pool.csv, every core of--pool-cores).
bench/comparison.sh --growing runs the other provers on them.
Baselines
bench/baseline.sh --detach --fresh takes the whole baseline (every
family, engine and thread count, and the whole LLTP library) at once, as
a systemd user unit on an otherwise idle machine, in about three hours.
--arm instead starts it unattended at night: at 20:00, or at once if
that has passed, once the machine is idle, and it stops at 07:00
whatever its state. --slot=HH:MM-HH:MM gives other times, and the
script run again without --fresh finishes a stopped baseline.
journalctl --user -fu deduxit-baseline follows it.
Every baseline keeps a directory named by the day it started,
bench/results/DAY/: the CSV files of its runs, starts.txt with the
commit measured, and its tables in RESULTS.md. bench/RESULTS.md is a
copy of the latest baseline's. A last stage runs again, with more time
before the kill and more memory, the runs that bench/reruns.txt lists:
those of an earlier baseline that were killed or crashed and that
measurement showed to finish with more room.
The baselines so far ran on a 16-core Intel Core Ultra X9 388H:
| baseline | engines | took |
|---|---|---|
| 2026-09-30 | before the performance work on the focused engine | 9 h 21 min, and 1 h 28 min the next night for the last stage |
| 2026-10-02 | after that work | 8 h 4 min |
| 2026-10-17 | the first release, 0.1.0, with the intuitionistic library under the command's default as a pass of its own | 2 h 58 min |
| 2026-11-02 | the second release, 0.2.0 | 2 h 23 min, by day beside other work, two of its four streams on efficiency cores (its chapter says what that changes) |
bench/RESULTS.md has the fourth's tables, and bench/COMPARISON.md
sets the four side by side. No verdict differs between them. The
intuitionistic LLTP pass decides 3 663 problems within 5 s in the
fourth, where the first decided 737, the second 2 047 and the third
3 610. Under the command's default (no copy bound, every core, 2 s) the
fourth decides 4 124 of the 4 495.
The comparison with other provers
run --tools runs the same problems through other provers of linear
logic beside deduxit's command. The flake builds each at a pinned
version (nix build .#comparison has them all, with BenchExec). Every
problem is translated into each tool's syntax. Every run is a process
measured by BenchExec's runexec under the same time and memory limit
(--timeout, --memory-limit, 4 GiB by default). A problem outside a
tool's fragment or mode is a row of its own and is not run.
ranking prints the comparison: the problems each tool solves within
the limit, per group of problems; deduxit on one thread against each
tool; and every problem on which tools contradict each other or the
known verdict. --shard K/N runs every N-th problem from the K-th, so
that jobs on several machines split a set.
$ deduxit-bench run --tools deduxit,maude-ill,sympli --lltp lltp/ILL/ILLTP-SYJ-01 --only SYJ101+1,SYJ105+1.003 --timeout 10 --output tools.csv
[1/6] ILLTP-SYJ-01/SYJ101+1.p deduxit: proved 3.4 ms, about 0 min left
[2/6] ILLTP-SYJ-01/SYJ101+1.p maude-ill: proved 89.8 ms, about 0 min left
[3/6] ILLTP-SYJ-01/SYJ101+1.p sympli: proved 11.7 ms, about 0 min left
[4/6] ILLTP-SYJ-01/SYJ105+1.003.p deduxit: unprovable 4.0 ms, about 0 min left
[5/6] ILLTP-SYJ-01/SYJ105+1.003.p maude-ill: unknown copy_bound 131.5 ms, about 0 min left
[6/6] ILLTP-SYJ-01/SYJ105+1.003.p sympli: unprovable 3.0 ms, about 0 min left
$ deduxit-bench ranking tools.csv
…
## Solved within the limit
| tool | solved | proved | unprovable | wrong | late | time | memory | gave up | error | outside | against the header |
|---|---|---|---|---|---|---|---|---|---|---|---|
| deduxit | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| sympli | 2 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 |
| maude-ill | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 |
…
deduxit's and Sympli's refutations of SYJ105+1.003 count as solved and
against the file's header, which says Theorem. The formula has a
classical countermodel, a and b false, so the header is wrong.
bench/comparison.sh runs the whole comparison on any machine with
Nix, and bench/TOOLS.md has the tools, how they were run and the
results.
Beside the other provers
The comparison with the other provers, run by run:
| run | deduxit | problems | other provers | chapter |
|---|---|---|---|---|
| 2026-10-15 | the engines of 0.1.0 | the LLTP library, qcover's coverability problems and the generated families, 4 811 | the eight of the table below | Beside the other provers, 2026-10-15 |
| 2026-10-30 | the first-order search of 0.2.0 | lambek-fo and witness-fo, 36 | LinearOne | First order against LinearOne, 2026-10-30 |
| 2026-10-31 | the engines of 0.2.0 | each growing set's first two sizes, a check of every tool's verdicts, not its curve | the eight of the table below | Families that grow, 2026-10-31 |
| 2026-11-03 | the engines of 0.2.0 | the growing sets to each tool's limit, 212 problems run | the eight of the table below | The other provers on the growing sets, 2026-11-03 |
So the numbers on the libraries below are those of 0.1.0's engines; the engines of 0.2.0 decide more of them (the baseline of 2026-11-02), but the other provers have not yet run on the libraries beside them. On the growing families the other provers ran beside the engines of 0.2.0, to their limits.
The provers of linear logic we found, as their own sources state them
(read on 2026-10-15). bench/TOOLS.md has every feature with its source
and the results of running all of them on the same problems.
| prover | fragments | modes | refutes | checked proofs | licence |
|---|---|---|---|---|---|
| deduxit | MLL to LL, units | classical, intuitionistic, affine, Mix, cyclic and Lambek (MLL) | ✓ | ✓ (and Rocq certificates) | EUPL-1.2 |
| Maude LL prover | LL, ILL | classical, intuitionistic | without ! | ✗ | none stated |
| llprover | first-order LL | classical, intuitionistic | without !, ? | ✗ | none formal |
| linTAP | MLL with ? | classical | without ? | ✗ | GPL |
| Click & coLLecT | LL | classical | ✓ | Coq certificates | LGPL-2.1 |
| Sympli | ILL without ⅋ ? | intuitionistic | ✓ | its own | BSD-2-Clause |
| LinearOne | first-order MILL | intuitionistic | ✓ | unverified | LGPL-2.1 |
| lolli | MLL, MALL, MELL | classical | ✗ (a depth limit) | ✗ | MIT |
| APLL | LL, ILL | classical, intuitionistic | unless its bound is met | Coq certificates | none stated |
| Proof Net Calculator | unit-free MLL nets | — | no prover | net criteria | none stated |
The 4 811 problems are the LLTP library, qcover's coverability problems and the generated families. Each was run under 10 s and 4 GiB on one core and measured by BenchExec, each tool on the problems in its own fragment and modes. Solved:
| tool | solved |
|---|---|
| deduxit, one thread | 4 181 |
| Sympli | 1 684 |
| the Maude prover, intuitionistic and classical | 768 and 31 |
| APLL, intuitionistic and classical | 612 and 31 |
| llprover, intuitionistic and classical | 479 and 11 |
| LinearOne | 69 |
| Click & coLLecT | 31 |
| linTAP | 15 |
| lolli | 14 |
Most of deduxit's lead is the library's 3 137 Petri nets, which it decides with an engine of its own (3 072, against Sympli's 811). On the other 1 358 intuitionistic problems Sympli solves the most, 873 against deduxit's 829 (852 by its default), and 132 that deduxit does not, mostly refutations of the SYJ collections.
No tool proves a sequent deduxit refutes. APLL and Click & coLLecT
refute provable sequents, 1 308 and 12 of them. Every one is an overflow
in the search the two share, from 63 formulas beside a ⊗ (the growing
sets' comparison).
On the first-order families in LinearOne's fragment (28 problems) the
two agree wherever both decide. LinearOne decides all 28 and deduxit
25; the other three end at deduxit's recursion and time limits
(bench/TOOLS.md, "The first-order families").
Ordinary logic on ILTP, 2026-11-14
The ILTP library's 274 propositional problems (v1.1.2, nix build .#iltp), decided in classical, intuitionistic and minimal logic by each
method of ordinary logic, and in intuitionistic
logic by deduxit's default beside intuit and intuitR, the SAT-based
provers whose algorithm deduxit's SAT solver follows.
The methods
The rows are bench/defaults/sat-default.csv, written by one release
build of deduxit-bench from 18:13 to 18:24: deduxit-bench run --tptp bench/iltp/Problems --logics classical,intuitionistic,minimal --engines embedding,ljt,sat,auto --jobs 1 --copies none --timeout 2 --repeat 3 --repeat-under 1, in two shards pinned to the performance cores 2 and
3 of an Intel Core Ultra X9 388H, by day, with a single verification
process on cores 7 to 9 beside them. auto is the library's default. A run under a
second ran three times, and its time is the median. Each method's time
includes its checks: the SAT solver's derivation, clausal proof or
countermodel, LJT's derivation, and for the default the embedding's
derivation of LK. The embedding's own rows check its derivation outside
the time, so they count a linear proof whose derivation is past the
64 MiB bound as decided, which the default does not.
| logic | the embedding | LJT | the SAT solver | the default | the default's time on the problems all decide |
|---|---|---|---|---|---|
| classical | 157 | – | 254 | 124 | 346 ms (124 problems) |
| intuitionistic | 188 | 200 | 252 | 252 | 50 ms (186 problems) |
| minimal | 188 | 200 | 253 | 252 | 47 ms (186 problems) |
No verdict differs between the methods or from ILTP's status. On the 186 problems all four decide in intuitionistic logic the SAT solver takes 26 ms in all, LJT 313 ms and the embedding 11.6 s. In this build the default of classical logic was the embedding, for its derivations of LK; the SAT solver decides 254 there with a checked clausal proof.
The classical default
The rows are bench/defaults/sat-classical.csv, written by one release
build from 21:17 to 21:20 the same day, with the same command as above
but --logics classical --engines embedding,sat,auto, on cores 2 and 3,
with other work on other cores. Here the default is the SAT solver,
followed by at most 2²⁰ units of the embedding's work, whose derivation
or refutation replaces the solver's answer where it gives one.
| the embedding | the SAT solver | the default | |
|---|---|---|---|
| decided | 157 | 254 | 254 |
| with the embedding's derivation of LK or refutation | 124 | – | 124 |
| time on the 124 | – | – | 348 ms |
The default decides the problems the SAT solver decides, and for each of the 124 the earlier default answered with the embedding's evidence (123 derivations of LK and one refutation) it gives that evidence again, in 348 ms in all against the earlier default's 346 ms. On the other 130 its answer is the solver's. Asking the embedding first costs a median of 16 ms per problem, more than 100 ms on 18 problems and at most 0.7 s (SYJ206+1.020 and SYJ212+1.020), where the embedding works on a large first sequent before it checks its bound. No verdict differs between the methods or from ILTP's status.
Beside intuit and intuitR
The rows are bench/comparison/2026-11-14-iltp/runs.csv, with
ranking.md and each stream's env.json beside them, written from
18:24 to 18:29 by deduxit-bench run --tools deduxit-default,intuit,intuitr --tptp bench/iltp/Problems --logics intuitionistic --timeout 10 --memory-limit 4294967296, in two shards on cores 2 and 3, each run
measured by BenchExec's runexec 3.35 as the
comparison measures every tool: 10 s and 4 GiB, the
time the whole process's, its start included. deduxit was built from the
commit zurrvuwo; intuit and intuitR are at the commits the flake pins,
intuitR with its default, weak clausification.
| tool | solved | proved | not valid | not solved | time on the 254 all solve | median time |
|---|---|---|---|---|---|---|
| deduxit's default | 254 | 119 | 135 | 20 | 13.0 s | 3.6 ms |
| intuit | 263 | 128 | 135 | 11 | 2.4 s | 5.1 ms |
| intuitR | 263 | 128 | 135 | 11 | 1.6 s | 5.4 ms |
deduxit's default answers most problems sooner than intuit and intuitR: it is faster than intuitR on 218 of the 254 problems all three solve, and its median time is 3.6 ms against intuitR's 5.4 ms. It solves nine fewer, all of them valid: Cook's pigeonhole formulas SYJ202 at sizes 4 to 9 and the three largest sizes of SYJ206, which intuit and intuitR solve within 10 s. The larger sizes of SYJ206 also take most of its time on the problems all three solve, 11.7 s of the 13.0 s. For every valid problem deduxit also builds and checks a derivation of LJ, which intuit and intuitR do not make. No answer contradicts another or ILTP's status.
The baseline of 2026-11-02
The fourth baseline of deduxit's engines, the engines of 0.2.0, taken by
bench/baseline.sh on 2026-11-02 from 14:34 for 2 h 23 min, at commit
a917eaf4772d, in a release build on an Intel Core Ultra X9 388H (16
cores, 62 GB). A time is the median of up to three runs. Every proof of
the baseline passed the checker, and no verdict differs from the third
baseline's on any problem both decide. The tables of every run are
bench/RESULTS.md,
the rows bench/results/2026-11-02/, and the four baselines compared
bench/COMPARISON.md,
from which the tables below are taken.
It was taken by day, beside other work, and not on the third's cores:
- the sequential runs went in four streams at once, each pinned to a CPU
of its own, CPUs 4, 5, 2 and 3 where the third's were 1, 0, 2 and 3:
the passes under one bias (
lltp-rarer,lltp-forward), the long runs and two of the last stage's reruns (lltp-intuitionistic-generous,lltp-classical-generous) went on two efficiency cores, the bias passes taking about 1.3 to 1.6 times the third's time for that; the families, the engines and the other LLTP passes ran on the third's cores; - other processes could share the streams' CPUs (46 problems waited
for a CPU for over 1 % of their time,
†in the tables); - the parallel stage ran on 16 threads over the whole machine while two other projects' sessions worked on it, so it is reported apart below and is not comparable with the third baseline's.
The families
The generated families, on one thread under a limit of 300 s
(families.csv, CPU 2 as in the third baseline); a run past 300 s went
again under 1 200 s (long-1.csv, long-2.csv):
| family | the fourth baseline | the third |
|---|---|---|
| 3-partition-no (bins of b) | every size in under 1 ms (b = 5: 320 µs) | b = 5: 346 µs |
| partition-yes (n items) | n = 24: 71.6 s, 28 > 1 200 s | n = 24: 74.4 s |
| partition-no | n = 12: 3.2 s, 14 and 15 > 300 s | n = 12: 3.8 s |
| qbf (n variables, four instances) | n = 48: three of four, 142–185 s (#0 at the memory bound); qbf/44#3 at the memory bound | n = 48: 162–222 s |
| wide-m1 (k pairs) | k = 2 048: 203 ms (the focused engine) | 523 ms (the net engine) |
| wide-m3 (k literals) | k = 2 048: 163 ms | 173 ms |
| wide-m4 | k = 2 048: 154 ms | 167 ms |
| mix (k pairs) | k = 11: 270 ms (the inverse method's turn) | k = 10: 62.5 s, 11 > 1 200 s |
| counter (n tokens) | n = 64: 53 µs | 55 µs |
| counter-over | refuted at every size, 64 in 45 µs | the same |
| chain (k clauses) | k = 256: 276 ms | 275 ms |
| additive (depth d) | d = 16: 192 ms | 182 ms |
| growing (copy bound n) | refuted at every size, 1 024 in 113 ms (the classical reading) | the copy bound or the recursion limit |
The families new in 0.2.0 ran at their listed sizes here; their growing sets are Families that grow, 2026-11-02.
The families' time against their size. The wall time of every
generated family's instances under the engine the command chooses for
it, the median of the runs of families.csv above (one thread, 300 s,
CPU 2), both axes logarithmic, a line per engine; a size where most runs
of some instance ended undecided, at the time limit or a bound, is a
hollow marker on the limit's line. Against the third baseline's figure:
mix is now the inverse method's, flat at about 0.27 s from 8 pairs on
where the focused engine rose to a minute at 10; wide-m1 and
wide-m2 are now the focused engine's, below the net engine's old
line; growing is refuted at every size instead of ending at a bound;
partition-yes, partition-no and qbf still rise ever more steeply.
The new families take their panels: contraction, euler,
pigeonhole, reach-fo, lambek-fo and witness-fo under the
two-sided engine, duplicate under the Horn engine, chain-fo under
the focused engine.
The focused engine against the net engine. The same measure for the
families of engines.csv, where the baseline forces each engine in
turn (one thread, 60 s, CPU 3 as in the third): the focused engine
decides every instance; the net engine, with its symmetry breaking and
its balance check new in 0.2.0, now decides every 3-partition-mll-no
instance (8 bins in 3 ms, past 60 s before from 6), partition-yes up
to 6 items (0.48 s) and partition-no up to 4 (9.6 ms), and meets the
limit beyond; on wide-m1 the two grow alike, the focused engine about
three times ahead at 2 048 pairs (209 against 599 ms). The net engine
refuses additive, which has no proof nets.
The LLTP library
Problems solved within 5 s on one thread, per pass (the counts of
bench/RESULTS.md's "Solved within the time limit", summed per file):
| pass | solved | the third |
|---|---|---|
lltp-intuitionistic (4 495 problems, copy bound 3; CPU 2) | 3 663 | 3 610 |
lltp-classical (4 512; CPU 3) | 3 674 | 3 621 |
lltp-rarer (the backward search alone; CPU 4, an efficiency core) | 3 662 | 3 608 |
lltp-forward (the forward search alone, 30 copies; CPU 5, an efficiency core) | 4 135 | 4 026 |
lltp-copies-10 (1 003 that ended at the copy bound; CPU 2) | 713 | 592 |
lltp-recursion (995 that ended at the recursion limit; CPU 3) | 895 | 895 |
The Petri nets are unchanged, 3 071 of 3 137 in each pass; the gains
are in the SYJ and KLE collections, by two things new in 0.2.0, as the
rows' engines and verdicts say: the refutation by the sequent's
classical reading after a search that ended at its copy bound (53 more
in the default and the classical copy-bound-3 passes, 54 under --bias rarer), and the inverse method's turns beside the
two-sided engine on a goal with an exponential (100 of lltp-forward's
problems that ended at the time limit before, and with the classical
reading 121 of lltp-copies-10's). Each such refutation is an
assignment falsifying the classical reading, so it holds whatever the
file's header says; the one new verdict against a header is KLE083+1
of KLE-01, whose other translations were refuted before.
The parallel stage, not comparable
The runs on more than one thread, parallel.csv (the families on 1, 2,
4, 8 and 16 threads, 120 s), parallel-net.csv (the net engine's),
lltp-all-cores.csv (1 102 LLTP problems on every core, 5 s) and
lltp-default.csv (the library under the command's default, 2 s), ran
on 16 threads over the whole machine (the rows' jobs) while other
work used it, where the third baseline's ran at night: their times,
speedups and the problems decided within the limit measure that load as
much as the engines. A rerun of this stage on a quiet machine replaces
these four files and this section.
| pass | solved | the third |
|---|---|---|
lltp-all-cores (1 102, every core, 5 s) | 993 | 993 |
lltp-default (4 495, the command's default: no copy bound, one thread for 0.1 s and then a pool of the other fifteen, 2 s) | 4 124 | 4 024 |
Under the default, 104 problems that ended at the limit before are
decided by the inverse method's turns, and four that the third decided
within 2 s end at the limit (SYJ205+1.008 and SYJ212+1.012 to
.014 of the cbn translation), one of them with about 6.5 of its 16
threads' worth of CPU time. One thing in parallel.csv holds whatever
the load: on mix, one thread decides 8 to 11 pairs in about 0.27 to
0.30 s by the inverse method's turn, which the dispatch gives only to a
search of one thread, while 2 to 16 threads race the focused engine
alone and take 0.8 s at 8 pairs, about a minute and more at 10, and
past the 120 s limit at 11.
Families that grow, 2026-11-02
The growing sets of Families that grow, 2026-10-31
again, at the sizes extended since and with the classical shape of
duplicate, from the engines of 0.2.0: each family chosen with a claim,
the strength or the weakness of one engine or of another prover, which
the growth of the time to decide the family shows. That chapter says
what each family is and what its claim and comparison are;
deduxit-bench families prints each family's sizes and claim.
The engines
The times are bench/growing/2026-11-02/: on 2026-11-02 from 16:59 to
17:28, bench/growing.sh --cores 2,3 --pool-cores 2-3 --timeout 60,
two sequential streams pinned to CPUs 2 and 3, two performance cores of
an Intel Core Ultra X9 388H, and the pool pass on both of them (so "2
threads"), with the build of deduxit that took
the baseline of the same day (commit
a917eaf4772d), one run per problem. It ran by day, right after that
baseline, while two other projects' sessions worked on the machine's
efficiency cores; nothing kept other processes off CPUs 2 and 3.
Time against size. The search time of each family's shape against its size, both logarithmic, a line per configuration: the default and every engine that admits the shape, forced; the memo switched off, no copy bound and two threads dashed in their engine's colour; a size not decided within 60 s a hollow marker on the limit's line; a size not run because the line met the limit at a smaller one a small cross above it.
What it shows is what the run of 2026-10-31 showed: every line that both runs drew ends at the same size, its largest decided size taking within a quarter of the earlier time where that was over a millisecond, apart from the sizes added since; so each claim stands as that chapter states it. What is new, each from the rows:
mix: the inverse method forced decides 4 096 pairs in 87 ms, and the default, after its turn's 2²⁴ units of work, 4 096 in 0.39 s, flat from 8 pairs on; the focused engine alone grows about eightfold per pair, as before.chain: the inverse method forced decides 8 192 clauses in 19 ms, linear; the default and the focused engine still meet the recursion limit at 1 024.contraction#0: the inverse method forced decides 256 atoms in 1.8 s and meets its memory bound at 512.lambek-fo#1, refuted, takes 1.1 s at 2 048 formulas.duplicate#1, the same sequent classically: the Horn engine decides 262 144 factors in 63 ms, as the default does; the focused engine forced 256 in 0.22 s and passes the minute at 1 024; the inverse method forced takes 44 s at 16 and passes the minute at 32.
The fitted growth of each line, over its sizes solved in more than a
millisecond (n^d a polynomial, b^n an exponential, whichever fits the
logarithm of the time better):
| shape | line | sizes fitted | fitted growth |
|---|---|---|---|
| chain #0 | focus | 64 to 512 | n^3.0 |
| chain #0 | inverse | 512 to 8192 | n^1.0 |
| chain #0 | default | 64 to 512 | n^3.0 |
| chain #0 | default, memo off | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | default, no copy bound | 64 to 512 | n^3.0 |
| chain-fo #0 | focus | 32 to 384 | n^2.7 |
| chain-fo #0 | default | 32 to 384 | n^2.6 |
| chain-fo #1 | focus | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | inverse | 32 to 256 | n^3.3 |
| contraction #0 | default | 8 to 128 | 1.05^n |
| contraction #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | inverse | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | default | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | focus | 32 to 256 | n^2.7 |
| counter #0 | horn | 4096 to 262144 | n^1.1 |
| counter #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | default | 16384 to 262144 | n^1.1 |
| duplicate #0 | horn | 16384 to 262144 | n^1.1 |
| duplicate #0 | two-sided | 64 to 256 | n^2.8 |
| duplicate #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | default | 16384 to 262144 | n^1.1 |
| duplicate #1 | focus | 64 to 256 | n^2.7 |
| duplicate #1 | horn | 16384 to 262144 | n^1.1 |
| duplicate #1 | inverse | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | default | 16384 to 262144 | n^1.0 |
| euler #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | inverse | 6 to 14 | 2.37^n |
| euler #0 | default | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | two-sided | 8 to 18 | 2.37^n |
| euler #1 | inverse | 8 to 16 | 2.41^n |
| euler #1 | default | 8 to 18 | 2.36^n |
| lambek-fo #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #0 | default | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #1 | two-sided | 128 to 2048 | n^2.2 |
| lambek-fo #1 | default | 128 to 2048 | n^2.2 |
| lambek-fo #2 | two-sided | 32 to 256 | n^2.9 |
| lambek-fo #2 | default | 32 to 256 | n^2.9 |
| lambek-fo #3 | two-sided | 128 to 512 | n^1.9 |
| lambek-fo #3 | default | 128 to 512 | n^1.8 |
| lambek-fo #4 | two-sided | 128 to 512 | n^2.0 |
| lambek-fo #4 | default | 128 to 512 | n^2.0 |
| mix #0 | focus | 6 to 10 | 8.27^n |
| mix #0 | inverse | 256 to 4096 | n^1.4 |
| mix #0 | default | 6 to 4096 | n^0.2 |
| pigeonhole #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #0 | default | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #1 | two-sided | 5 to 7 | 20.07^n |
| pigeonhole #1 | inverse | 5 to 8 | n^11.6 |
| pigeonhole #1 | default | 5 to 7 | 19.37^n |
| reach-fo #0 | two-sided | 4 to 10 | 5.11^n |
| reach-fo #0 | default | 4 to 10 | 5.09^n |
| reach-fo #0 | default, memo off | 4 to 6 | 18.75^n |
| reach-fo #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | default, memo off | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | focus | 256 to 2048 | n^2.0 |
| wide-m1 #0 | net | 256 to 16384 | n^2.0 |
| wide-m1 #0 | inverse | 256 to 32768 | n^2.0 |
| wide-m1 #0 | default | 256 to 16384 | n^2.3 |
| witness-fo #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
The other provers
The other provers ran on these growing sets to their limits on
2026-11-03, beside the engines of the same release:
the other provers on the growing sets, 2026-11-03
has their figure of time against size, their fitted growth and their
cactus and scatter plots. It adds where each family's claim about
another prover shows (no other tool passes 8 factors of duplicate but
Sympli), what they decide that deduxit does not (LinearOne 8 problems of
lambek-fo and witness-fo), and why Click & coLLecT and APLL refute
wide-m1: an overflow in their search from 63 formulas beside a ⊗.
The check of every tool on each set's first two sizes is
the chapter of 2026-10-31,
and the comparison with the other provers on the libraries is
that of 2026-10-15, of the engines of 0.1.0.
The other provers on the growing sets, 2026-11-03
The growing sets of Families that grow, 2026-11-02, each family chosen to show where an engine or another prover is strong or weak, run by 0.2.0 (then named linlog) and every other prover whose fragment and mode cover them, each line to the size where it meets the limit. That chapter and the one of 2026-10-31 say what each family is and what it claims; this one sets the other provers beside deduxit.
The rows are bench/comparison/2026-11-03-growing/runs.csv, written by
bench/comparison.sh --growing --cores 4,5,6,7,8,9 --default-cores 12-15 --timeout 60 on 2026-11-03 from 09:29 to 09:46, with ranking.md and
each stream's env.json beside them. Six sequential streams, each
pinned to one efficiency core (CPUs 4 to 9) of an Intel Core Ultra X9
388H (16 cores, 64 GB, Linux 7.3.1), ran every tool but deduxit's
default, which ran as a user runs it on the four low-power cores (12 to
15); every run had 60 s and 4 GiB and was measured by BenchExec's
runexec 3.35, one run per problem, the time being the whole process's
(its start included). deduxit was built from commit 540755d87f9a,
whose engines are those of the v0.2.0 tag; every other tool is at the
version the flake pins. It ran by day: another project had
light work on CPUs 10 and 11, and nothing kept other processes off the
streams' cores.
deduxit's two columns are the command: deduxit prove --deterministic
on one thread, deduxit-default as a user runs it. Like every other
tool, it gets the sequent alone, not the copy bound a family states, so
it deepens its own; a size not decided ends its line, and the line's
larger sizes are not run. 3 068 rows: 2 193 sizes not run past a line's
end, 226 outside a tool's fragment or mode, and 649 runs.
Solved within 60 s
| tool | ran | solved | proved | unprovable | wrong | ended at the limit | out of memory | the tool's bound | error |
|---|---|---|---|---|---|---|---|---|---|
| deduxit, one thread | 202 | 179 | 117 | 62 | 0 | 11 | 1 | 11 | 0 |
| deduxit, default (4 low-power cores) | 202 | 179 | 117 | 62 | 0 | 11 | 1 | 11 | 0 |
| LinearOne | 61 | 58 | 32 | 26 | 0 | 3 | 0 | 0 | 0 |
| Sympli | 28 | 23 | 16 | 7 | 0 | 4 | 1 | 0 | 0 |
| Maude, LL | 17 | 13 | 13 | 0 | 0 | 1 | 3 | 0 | 0 |
| APLL, LL | 25 | 10 | 10 | 0 | 8 | 3 | 0 | 4 | 0 |
| Maude, ILL | 29 | 10 | 7 | 3 | 0 | 4 | 0 | 13 | 2 |
| Click & coLLecT | 17 | 6 | 6 | 0 | 8 | 3 | 0 | 0 | 0 |
| APLL, ILL | 33 | 3 | 3 | 0 | 0 | 4 | 0 | 24 | 2 |
| linTAP | 6 | 3 | 3 | 0 | 0 | 2 | 1 | 0 | 0 |
| llprover, ILL | 8 | 3 | 3 | 0 | 0 | 5 | 0 | 0 | 0 |
| lolli | 15 | 3 | 3 | 0 | 0 | 2 | 0 | 7 | 2 |
| llprover, LL | 6 | 2 | 2 | 0 | 0 | 4 | 0 | 0 | 0 |
"Ran" counts the problems a tool was given: those of its fragment up to
where its line ended. A wrong verdict, a refutation of a problem some
tool proved with a checked proof or a verdict against a generated
problem's by construction, never counts as solved. lolli's answer on
counter at 8 tokens came 0.78 s after the limit, a late answer that
no column counts. The two deduxit columns are equal in every count.
Against each tool on the problems both ran: LinearOne solves 8 that deduxit does not and deduxit none that LinearOne does not (48 both, 3 neither, of 59); against every other tool deduxit solves every problem the tool solves, and more: 18 more than the Maude prover's ILL system, 3 more than its LL system, 8 more than Click & coLLecT, 4 and 5 more than llprover's LL and ILL systems, 3 more than linTAP, 4 more than Sympli, 12 more than lolli, 11 and 22 more than APLL's LL and ILL searches.
Time against size
Time against size. Each family's shape, its time against its size, both logarithmic, a line per tool that ran it; a size not decided within 60 s, by a bound of the tool's own or wrongly a hollow marker on the limit's line; a size not run because the line ended at a smaller one a small cross above it. Each family, from the rows:
wide-m1(MLL, provable): deduxit proves 256 to 4 096 pairs, 4 096 in 0.87 s on one thread and 0.91 s by its default, about n^1.7, and runs out of the run's 4 GiB at 8 192 (one thread after 3.3 s, the default after 2.0 s; the default's peak at 4 096 was 2.0 GiB). The Maude prover's LL system and linTAP run out of memory at 256, llprover's LL system and lolli reach the limit there. Click & coLLecT and APLL's LL search answer "unprovable" at every size from 256 to 32 768, which is wrong (below, "The wrong refutations").counter(the Horn engine's claim): deduxit decides 262 144 tokens in 0.25 s; the Maude prover's LL system 16 (0.45 s, out of memory at 32), Click & coLLecT 8 (7.7 s), APLL's LL search and lolli 4, linTAP and llprover's LL system 2.duplicate(the other provers' caps on contraction): deduxit decides 262 144 factors in about 0.22 to 0.25 s in both shapes. In ILL (#0) Sympli reaches 1 024 (1.5 s) and runs out of memory at 4 096; llprover, the Maude prover (at its copy bound) and APLL (at its bound) stop after 4. Classically (#1) the Maude prover reaches 8 (2.4 s, out of memory at 16), APLL, Click & coLLecT and linTAP 4, llprover and lolli (at its depth) 2. So every cap the family was chosen for shows: none of the other tools passes 8, but Sympli.chain(classical, provable): deduxit, APLL's LL search and the Maude prover's LL system each prove up to 512 clauses, where APLL takes 9 ms, deduxit 3.7 s on one thread and 3.9 s by its default, and the Maude prover 48 s; APLL's line fits n^0.2, deduxit's and the Maude prover's 1.01ⁿ. At 1 024 deduxit ends at its recursion limit (2 048) after 20 s, and APLL and the Maude prover at the time limit; Click & coLLecT proves 16 (1.2 s). APLL's backward search is the fastest tool on this family by far.contraction: the provable #0 deduxit to 128 atoms (47 s on one thread, 36 s by its default), Sympli to 8 (22 ms, the limit at 16), the Maude prover to 4 (its copy bound at 8), APLL and llprover 2. The unprovable #1 deduxit and Sympli both to 8 (0.11 s and 9 ms), then both at the limit; no other tool refutes it.euler: a circuit (#0) deduxit finds at every size to 24 vertices in about 4.5 ms, Sympli to 10 (55 s) and the Maude prover to 8 (25 s); without one (#1) deduxit decides to 18 (16 s on one thread, 8.6 s by its default, about 1.8ⁿ), Sympli to 10 (9.9 s) and the Maude prover to 8 (7.9 s), each growing about fourfold a vertex. APLL and llprover decide neither shape at 5.lambek-fo(first-order MILL, LinearOne's fragment): LinearOne decides 1 024 formulas of #0, #2 and #3 (about 28 s each, the limit at 2 048) and all of #1 and #4 to 2 048 (0.29 and 0.46 s). deduxit decides #1 to 2 048 (1.7 s on one thread, 0.72 s by its default) and is faster at every size both decide but #1's two largest (0.34 s and 1.7 s at 1 024 and 2 048, against LinearOne's 0.14 s and 0.29 s). It reaches its recursion limit (2 048) from 512 on #0, at 512 and 1 024 on #2 (after 5.9 s and 44 s; the time limit at 2 048) and from 1 024 on #3 and #4, within 0.3 s but on #2: so LinearOne solves 7 problems of this family that deduxit does not.witness-fo: LinearOne decides #2 and #3 (its fragment) at every size to 16 in about 80 ms, its start included; deduxit decides #0 to #2 to 16 in about 5 ms and #3 to 10 (3.4 s, about 2.1ⁿ), and reaches the time limit on #3 at 12, the eighth problem LinearOne solves and deduxit does not.mix,pigeonhole,reach-foandchain-fono other tool runs: Mix, affine logic and first order outside LinearOne's multiplicative intuitionistic fragment are deduxit's alone. deduxit refutesmixto 4 096 pairs (0.49 s, 0.29 s by its default), decidespigeonhole#0 to 5 holes and #1 to 8 (54 s on one thread, 22 s by its default, which peaked at 3.0 GiB there),reach-fo#0 to 10 nodes and #1 at 2.chain-fo#0 it proves to 64 and reaches the limit at 128, and #1 it does not refute at 16: given no copy bound, it deepens its own, which passed 140 000 within the minute, where the engines' run, which states the family's bound, proves #0 to 384 and ends #1 at that bound to 384 and at the recursion limit from 512.
The fitted growth of each line, over its sizes solved in more than a
millisecond (n^d a polynomial, b^n an exponential, whichever fits the
logarithm of the time better); the times include each tool's start, so
a line flat at a few milliseconds, or at LinearOne's 70 to 80 ms, is
the start alone:
| shape | line | sizes fitted | fitted growth |
|---|---|---|---|
| chain #0 | deduxit | 16 to 512 | 1.01^n |
| chain #0 | deduxit-default | 16 to 512 | 1.01^n |
| chain #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | maude-cll | 16 to 512 | 1.01^n |
| chain #0 | apll-ll | 16 to 512 | n^0.2 |
| chain #0 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #0 | deduxit | 16 to 64 | 1.02^n |
| chain-fo #0 | deduxit-default | 16 to 64 | 1.02^n |
| chain-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #1 | deduxit-default | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | deduxit | 2 to 128 | n^2.2 |
| contraction #0 | deduxit-default | 2 to 128 | n^2.1 |
| contraction #0 | sympli | 2 to 8 | 1.38^n |
| contraction #0 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | deduxit | 2 to 8 | n^0.1 |
| contraction #1 | deduxit-default | 2 to 8 | 1.01^n |
| contraction #1 | sympli | 2 to 8 | 1.20^n |
| contraction #1 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | deduxit | 2 to 262144 | 1.00^n |
| counter #0 | deduxit-default | 2 to 262144 | 1.00^n |
| counter #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | maude-cll | 2 to 16 | 1.15^n |
| counter #0 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | click-and-collect | 2 to 8 | 3.24^n |
| counter #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | lintap | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | deduxit | 2 to 262144 | 1.00^n |
| duplicate #0 | deduxit-default | 2 to 262144 | 1.00^n |
| duplicate #0 | sympli | 2 to 1024 | 1.01^n |
| duplicate #0 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | deduxit | 2 to 262144 | 1.00^n |
| duplicate #1 | deduxit-default | 2 to 262144 | 1.00^n |
| duplicate #1 | lolli | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | maude-cll | 2 to 8 | 2.01^n |
| duplicate #1 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | lintap | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | deduxit | 5 to 24 | n^0.0 |
| euler #0 | deduxit-default | 5 to 24 | 1.01^n |
| euler #0 | sympli | 5 to 10 | 4.75^n |
| euler #0 | maude-ill | 5 to 8 | 5.00^n |
| euler #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | deduxit | 5 to 18 | 1.86^n |
| euler #1 | deduxit-default | 5 to 18 | 1.77^n |
| euler #1 | sympli | 5 to 10 | 4.23^n |
| euler #1 | maude-ill | 5 to 8 | 4.24^n |
| euler #1 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #0 | deduxit | 8 to 256 | 1.00^n |
| lambek-fo #0 | linearone | 8 to 1024 | 1.01^n |
| lambek-fo #0 | deduxit-default | 8 to 256 | 1.00^n |
| lambek-fo #1 | deduxit | 8 to 2048 | 1.00^n |
| lambek-fo #1 | linearone | 8 to 2048 | 1.00^n |
| lambek-fo #1 | deduxit-default | 8 to 2048 | 1.00^n |
| lambek-fo #2 | deduxit | 8 to 256 | 1.02^n |
| lambek-fo #2 | linearone | 8 to 1024 | 1.01^n |
| lambek-fo #2 | deduxit-default | 8 to 256 | 1.02^n |
| lambek-fo #3 | deduxit | 8 to 512 | 1.00^n |
| lambek-fo #3 | linearone | 8 to 1024 | 1.01^n |
| lambek-fo #3 | deduxit-default | 8 to 512 | 1.00^n |
| lambek-fo #4 | deduxit | 8 to 512 | 1.00^n |
| lambek-fo #4 | linearone | 8 to 2048 | 1.00^n |
| lambek-fo #4 | deduxit-default | 8 to 512 | 1.00^n |
| mix #0 | deduxit | 4 to 4096 | n^0.3 |
| mix #0 | deduxit-default | 4 to 4096 | n^0.3 |
| pigeonhole #0 | deduxit | 2 to 5 | 9.68^n |
| pigeonhole #0 | deduxit-default | 2 to 5 | 8.74^n |
| pigeonhole #1 | deduxit | 2 to 8 | 4.53^n |
| pigeonhole #1 | deduxit-default | 2 to 8 | 3.98^n |
| reach-fo #0 | deduxit | 2 to 10 | 3.13^n |
| reach-fo #0 | deduxit-default | 2 to 10 | 2.84^n |
| reach-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | deduxit-default | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | deduxit | 256 to 4096 | n^1.7 |
| wide-m1 #0 | deduxit-default | 256 to 4096 | n^1.7 |
| wide-m1 #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | maude-cll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | lintap | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | deduxit | 2 to 16 | 1.01^n |
| witness-fo #0 | deduxit-default | 2 to 16 | n^0.0 |
| witness-fo #1 | deduxit | 2 to 16 | n^0.0 |
| witness-fo #1 | deduxit-default | 2 to 16 | 1.00^n |
| witness-fo #2 | deduxit | 2 to 16 | 1.00^n |
| witness-fo #2 | linearone | 2 to 16 | 1.00^n |
| witness-fo #2 | deduxit-default | 2 to 16 | 1.00^n |
| witness-fo #3 | deduxit | 2 to 10 | 2.14^n |
| witness-fo #3 | linearone | 2 to 16 | 1.00^n |
| witness-fo #3 | deduxit-default | 2 to 10 | 2.06^n |
The wrong refutations
Click & coLLecT and APLL's LL search refute wide-m1 at every size of
its growing set, 256 to 32 768 pairs, in 6 ms to 37 s, while deduxit
proves it to 4 096 with a checked proof; in the run of 2026-10-15 they
refuted it and its shapes with shared atoms from 256 on, and timed out
from 8 to 36. To find out whether our translation is the cause, the
files the harness writes for each tool were run by hand on the tools'
binaries (the flake's .#comparison), at every size from 1 pair to
512, and on sequents written by hand. Derived from those runs and from
the tools' sources at the revisions the flake pins:
- The answer flips at 63 pairs, a sequent of 64 formulas. Both tools
prove
wide-m1at 1 to 4 pairs, reach their limits (10 s and 12 s by hand) at every size tried from 8 to 62 pairs, and refute it at 63 and 64 within 10 ms, and at every larger size tried; the time then grows with the sequent (37 s for Click & coLLecT at 32 768 in the run). - It is the number of formulas beside a focused
⊗, not the atoms or the depth. One atom does it:⊢ p ⊗ p ⊗ ⋯ ⊗ p, p⊥, …, p⊥, with 63 factors and 63 negations (64 formulas), is refuted by both in under 10 ms, and with 62 both reach the limit. 63 negated atoms beside a balanced tensor of depth 6 are refuted too, while⊢ ⊥, …, ⊥, 1of 64 formulas is proved, its⊥leaving the context before any⊗.partition-yes, refuted in 2026-10-15's run at 24 and 28, has 75 and 87 formulas once its⅋are taken apart, and 63 at 20, where both tools reached the limit. - The cause is an integer overflow in the search, shared by both
tools. Each enumerates the ways to split the context
Γof a focusedA ⊗ Bby counting down from2^|Γ| − 1, computed asfast_exp_2 (List.length gamma) - 1(Click & coLLecT'sfocused_proof.ml, line 280; APLL'sfoc_ll_bwd.ml, line 157, and its ILL search'sfoc_ill_bwd.ml, line 72, with the same count for a⊸focused on the left at line 163). OCaml's native integers have 63 bits, so2^63is 0 and the count starts at −1 for any context of 63 formulas or more: the⊗rule then has no premise, the search fails everywhere, and the tool reports a search it calls exhaustive as a refutation. With 62 formulas the count is the largest integer and the search runs on. - The translation is cleared: the hand-written one-atom sequent shows the same flip without the harness, and the files the harness wrote read as the sequent deduxit proves.
The same counter accounts for APLL's ILL search on the library's Petri nets in the run of 2026-10-15 (derived from that run's rows and the library's files, not run again): it refuted every net whose initial marking has 63 tokens or more and on which it did not crash (1 327, 1 296 of them proved by deduxit with checked proofs; 13 larger nets, of 401 to 20 000 tokens, ended in a stack overflow) and none with fewer. So every wrong verdict of the two tools in both runs is this overflow.
The cactus plots
Intuitionistic problems. For each tool, the problems of the
intuitionistic modes (affine pigeonhole included) it solved within
60 s, sorted by time, against that time on a logarithmic axis: deduxit
solves 125, LinearOne 58, Sympli 23, the Maude prover 10, llprover and
APLL 3.
Classical problems. The same for the classical ones: deduxit 40, the
Maude prover 13, APLL 10, Click & coLLecT 6, linTAP and lolli 3,
llprover 2. mix's 14, under Mix, are in neither plot.
The scatter plots
Each plot sets deduxit on one thread against one tool on every problem
both ran, the tool's time across and deduxit's up, both logarithmic; a
problem not solved, a wrong verdict included, lies on the dashed line
of the 60 s limit. A point below the diagonal is one deduxit solved
faster. Against LinearOne the points above the diagonal are the
lambek-fo sizes where deduxit ends at its recursion limit or is slower,
and witness-fo #3 at 10 and 12; against Sympli, contraction, which
Sympli decides in 3 to 22 ms and deduxit in about 0.1 s at every size of
the unprovable #1 and at 8 of #0, and, by under a millisecond,
contraction #0 at 2 and duplicate #0 at 2 to 8.
The baseline of 2026-10-17
The third baseline of deduxit's engines, taken by bench/baseline.sh on
2026-10-17 from 19:32 for 2 h 58 min, at commit ed74387d9bf3, the
engines of the first release, in a release build on an Intel Core Ultra
X9 388H (16 cores, 62 GB). The sequential runs went in four streams at
once, each pinned to a performance core of its own; a time is the
median of up to three runs. Every proof of the baseline passed the
checker. The tables of every run are
bench/RESULTS.md,
the rows bench/results/2026-10-17/, and the three baselines compared
bench/COMPARISON.md,
from which the tables below are taken.
The families
The generated families, on one thread under a limit of 300 s
(families.csv); a run past 300 s went again under 1 200 s
(long-1.csv, long-2.csv):
| family | the third baseline |
|---|---|
| 3-partition-no (bins of b) | every size in under 1 ms (b = 5: 346 µs) |
| partition-yes (n items) | n = 24: 74.4 s, 28 > 1 200 s |
| partition-no | n = 12: 3.8 s, 14 and 15 > 300 s |
| qbf (n variables, four instances) | n = 48: three of four, 162–222 s (#3 refuted in 222 s; #0 at the memory bound after 85 s); qbf/44#3 at the memory bound |
| wide-m3 (k literals) | k = 2 048: 173 ms |
| wide-m4 | k = 2 048: 167 ms |
| mix (k pairs) | k = 10: 62.5 s (11 > 1 200 s) |
| counter (n tokens) | n = 64: 55 µs |
| counter-over | refuted at every size, 64 in 45 µs |
| chain (k clauses) | k = 256: 275 ms |
| additive (depth d) | d = 16: 182 ms |
The families' time against their size. The wall time of every
generated family's instances under the engine the command chooses for
it, the median of the runs of families.csv above (one thread, 300 s),
both axes logarithmic, a line per engine; a size where most runs of
some instance ended undecided, at the time limit or a bound, is a
hollow marker on the limit's line. partition-yes, partition-no,
qbf and mix rise ever more steeply with their size, while the four
3-Partition families stay flat at tens to hundreds of microseconds; wide-m*, chain and
additive follow nearly straight lines on the two logarithmic axes, a
power of the size; counter and counter-over, Petri nets the Horn
engine searches by their markings, stay at tens of microseconds; and
growing ends at the copy bound or the recursion limit at every
size.
The focused engine against the net engine. The same measure for the
families of engines.csv, where the baseline forces each engine in
turn (one thread, 60 s, the same machine and run): the focused engine
decides every instance, where the net engine leaves partition-yes
and partition-no undecided past their smallest size and
3-partition-mll-no past size 5; on the wide families, two of which the command gives to the
net engine, the two grow alike, the focused engine a nearly constant
factor ahead. The net engine refuses additive, which has no proof
nets.
The LLTP library
Problems solved within 5 s on one thread, per pass (the counts of
bench/RESULTS.md's "Solved within the time limit", summed per file):
| pass | solved |
|---|---|
lltp-intuitionistic (4 495 problems, copy bound 3) | 3 610 |
lltp-classical (4 512) | 3 621 |
lltp-rarer (the backward search alone) | 3 608 |
lltp-forward (the forward search alone, 30 copies) | 4 026 |
lltp-copies-10 (1 003 that ended at the copy bound) | 592 |
lltp-recursion (995 that ended at the recursion limit) | 895 |
lltp-all-cores (1 102, every core) | 993 |
lltp-default (4 495, the command's default, 2 s) | 4 024 |
The Petri nets make most of it: 3 071 of 3 137 in the intuitionistic pass. The pass under the command's default (no copy bound, one thread for 0.1 s and then a pool of the other fifteen beside it, 2 s) decides 4 024 of the 4 495 problems: 3 069 nets and 955 others.
Beside the other provers, 2026-10-15
One run of deduxit and the other provers of linear logic on the same
4 811 problems (the LLTP library, qcover's coverability problems and
deduxit's generated families), on 2026-10-15 on an Intel Core Ultra X9
388H (16 cores, 64 GB, Linux 7.2.9): the sequential tools and deduxit's
one-thread column each on one efficiency core (cores 6–11, six streams
side by side), deduxit's default on the four low-power cores (12–15),
every run under 10 s and 4 GiB, measured by BenchExec 3.27. deduxit was
built from commit 60226b2c, every other tool at the version the flake
pins. The rows are bench/comparison/2026-10-15/runs.csv (62 543 runs),
the tables ranking.md beside them, and
bench/TOOLS.md
says how each tool was run and discusses every result; the tables below
are its own.
Solved within 10 s
| tool | solved | proved | unprovable | wrong | ended at the limit | out of memory | the tool's bound | error | outside its fragment |
|---|---|---|---|---|---|---|---|---|---|
| deduxit, default (4 low-power cores) | 4 204 | 3 907 | 297 | 0 | 547 | 1 | 59 | 0 | 0 |
| deduxit, one thread | 4 181 | 3 899 | 282 | 0 | 571 | 0 | 59 | 0 | 0 |
| Sympli | 1 684 | 1 439 | 245 | 0 | 1 935 | 876 | 0 | 0 | 316 |
| Maude, ILL | 768 | 742 | 26 | 0 | 2 940 | 71 | 700 | 16 | 316 |
| APLL, ILL | 612 | 544 | 68 | 1 296 | 2 015 | 20 | 412 | 140 | 316 |
| llprover, ILL | 479 | 453 | 26 | 0 | 3 857 | 0 | 19 | 140 | 316 |
| LinearOne | 69 | 46 | 23 | 0 | 0 | 0 | 0 | 0 | 4 742 |
| APLL, LL | 31 | 22 | 9 | 12 | 78 | 0 | 13 | 0 | 4 677 |
| Click & coLLecT | 31 | 23 | 8 | 12 | 91 | 0 | 0 | 0 | 4 677 |
| Maude, LL | 31 | 20 | 11 | 0 | 82 | 21 | 0 | 0 | 4 677 |
| linTAP | 15 | 14 | 1 | 0 | 37 | 21 | 0 | 0 | 4 738 |
| lolli | 14 | 14 | 0 | 0 | 54 | 35 | 23 | 6 | 4 679 |
| llprover, LL | 11 | 10 | 1 | 0 | 123 | 0 | 0 | 0 | 4 677 |
A wrong verdict, a refutation of a problem some tool proved with a checked proof or a verdict against a generated problem's by construction, never counts as solved.
| problems | deduxit | deduxit, default | Maude | llprover | Sympli | APLL | LinearOne | Click & coLLecT | linTAP | lolli |
|---|---|---|---|---|---|---|---|---|---|---|
| LLTP intuitionistic, 1 358 | 829 | 852 | 613 | 479 | 873 | 548 | 69 / 69 | – | – | – |
| LLTP Petri nets, 3 137 | 3 072 | 3 072 | 155 | 0 | 811 | 64 | – | – | – | – |
| LLTP classical, 17 | 17 | 17 | 12 | 10 | – | 13 | – | 15 | 2 / 6 | 7 |
| qcover, 176 (intuitionistic affine) | 162 | 162 | – | – | – | – | – | – | – | – |
| generated families, 123 | 101 | 101 | 19 / 117 | 1 / 117 | – | 18 / 117 | – | 16 / 117 | 13 / 67 | 7 / 115 |
A dash is a set outside the tool's fragment or mode; n / m where the
tool covers only m of the set.
The cactus plots
Intuitionistic problems. For each tool, the problems of the intuitionistic modes (the LLTP library, its Petri nets and qcover) it solved within 10 s, sorted by the time each took, against that time on a logarithmic axis; the legend gives each count. A line further right solves more and a lower one solves faster: both of deduxit's columns solve over 4 000, most of them Petri nets, at a median of 6 ms, and Sympli, the next, 1 684.
Classical problems. The same for the classical problems (the LLTP library's classical files and the generated families): deduxit solves 114, the other tools between 11 and 31, which most of them reach at times where deduxit's line is still flat.
The scatter plots
Each plot sets deduxit on one thread against one tool on every problem both cover, a point per problem, the tool's time across and deduxit's up, both logarithmic; a problem not solved is drawn on the dashed line of the 10 s limit. A point below the diagonal is a problem deduxit solved faster. Against every other prover most points lie below it: of the 4 495 problems deduxit and Sympli both cover, deduxit is faster by more than a tenth on 3 294 and slower on 551, Sympli's refutations that deduxit leaves at its limit making the row along the top; against Maude, llprover, linTAP, lolli and LinearOne no point lies above it. Against deduxit's own default, which runs on the slower low-power cores and races a second search, most points lie on the diagonal.
First order against LinearOne, 2026-10-30
deduxit's first-order families against LinearOne, Moot's prover of
first-order MILL, the only other prover of first-order linear logic
that the comparison runs: lambek-fo (the Lambek calculus in Moot and
Piazza's translation into MILL1, at 16, 64, 256 and 512 formulas, five
shapes) and witness-fo (a witness among 4, 8, 10 and 12, four shapes,
of which LinearOne's fragment holds the MILL1 shapes #2 and #3).
bench/TOOLS.md
says how the problems are translated and discusses the verdicts.
The times are bench/comparison/first-order/times-1.csv and
times-2.csv: on 2026-10-30, linlog-bench run --tools linlog,linearone --family lambek-fo --family witness-fo --timeout 10 --memory-limit 4294967296 (the harness and the command were named
linlog then) in two shards on cores 2 and 3 of an
otherwise quiet Intel Core Ultra X9 388H, measured by runexec 3.35, one
run per problem, linlog on one thread. The run did not record the
commit of linlog's build (its env.json leaves linlog_commit empty);
the rows were committed in af34ca95711d.
| tool | in its fragment | proved | unprovable | undecided | wrong |
|---|---|---|---|---|---|
| deduxit, one thread | 36 | 18 | 15 | 3 | 0 |
| LinearOne | 28 | 16 | 12 | 0 | 0 |
On the 25 problems both decide the verdicts are equal, and every
verdict of either equals the family's by construction. deduxit takes
4.0 ms in the median and LinearOne 51 ms, deduxit the faster on 24;
LinearOne's floor of about 46 ms is SWI-Prolog's start. LinearOne alone
decides three: lambek-fo/512 #0 and #2, where deduxit's two-sided
search meets its recursion limit of 2 048, and witness-fo/12#3, which
deduxit leaves at the time limit.
Time against size. The wall time of each shape of the two families
against its size, both logarithmic, a line per tool; a size not
decided within 10 s is a hollow marker on the limit's line, and a shape
outside LinearOne's fragment (witness-fo #0 and #1) has deduxit's line
alone. deduxit is ten to twenty times faster at the smallest sizes; on
lambek-fo it grows more slowly than LinearOne on #0 and #3 and faster
on #1, #2 and #4, the two meeting at the largest sizes of #1 and #2;
deduxit loses on witness-fo #3, whose time rises steeply from size 8,
and at size 512 of lambek-fo #0 and #2.
deduxit against LinearOne. A point per problem both cover, LinearOne's
time across and deduxit's up, a problem not solved on the dashed line of
the 10 s limit: all but four lie below the diagonal, and those four are
the three deduxit leaves undecided and witness-fo/10#3, 2.5 s against
LinearOne's 46 ms.
Problems solved within the limit. Each tool's problems solved within 10 s, sorted by time: deduxit solves 33 of its 36, LinearOne 28 of its 28.
Families that grow, 2026-10-31
Families of deduxit's own, each chosen with a claim: the strength or the
weakness of one engine or of another prover, which the growth of the
time to decide the family shows. Each has its verdicts by construction
(argued at its generator in core/src/linear/families.rs) and a growing set of
sizes, from easy to past what the engines decide in a minute;
deduxit-bench families prints each family's sizes and claim. Where the
claim is a mechanism's gain, a second pass runs the family with that
mechanism switched off, drawn dashed in its engine's colour.
| family | what it is | the claim's line | its comparison |
|---|---|---|---|
wide-m1 | (a1 ⅋ b1) ⊗ … ⊗ (ak ⅋ bk), ~a1 ⊗ ~b1, …, distinct atoms (MLL) | the net engine, to which the default hands the sequent over | the focused engine, which stops at its memory bound |
counter | a Petri-net counter of n tokens under ! (MELL) | the Horn engine | the focused engine and the inverse method forced |
mix | (ai ⊗ bi) ⊕ 0, (~ai ⊗ ~bi) ⊕ 0 under Mix, unprovable | the inverse method, which the default gives a turn | the focused engine forced |
chain | !(pi ⊸ p(i+1) & p(i+2)), …, p0 ⊢ p(k+1) | the focused engine's memo | the memo switched off, and no copy bound |
contraction | Franzén's formulas (ILTP's SYJ203 and SYJ209) in ILL: one ! clause used n + 1 times on a branch | the inverse method, which the default gives a turn | the two-sided engine forced |
pigeonhole | Cook's pigeonhole principle (SYJ202) in intuitionistic affine MALL | the two-sided engine's case splits | the inverse method forced |
euler | Euler tours through the square of a cycle (IMALL); #1 without one edge | the focused engines' context splits | the inverse method forced |
duplicate | !(a ⊸ a ⊗ a), a ⊢ a ⊗ … ⊗ a with m factors | the other provers' caps on contraction | deduxit's Horn engine |
reach-fo | reachability through a cycle to its exit (IMELL1) | the first-order memo's loop check | the memo switched off |
chain-fo | p(z), !∀x.(p(x) ⊸ p(s(x))) ⊢ p(sⁿ(z)) | n instances of one clause, until the recursion limit | LinearOne refuses it (MILL1 only) |
witness-fo | a witness among n | the pool of threads on the refutation #3 | one thread, and LinearOne |
lambek-fo | the Lambek calculus in first-order MILL | LinearOne's fragment | deduxit's two-sided search |
The engines
The times are bench/growing/2026-10-31/: on 2026-10-31,
bench/growing.sh --cores 2,3 --pool-cores 2-3 --timeout 60 in about 24
minutes, two sequential streams on two performance cores of an Intel
Core Ultra X9 388H whose other heavy work was paused (the pool pass on
both of them, so "2 threads"), deduxit at the commit kwrssksr
(aadfab8bc33b), one run per problem. These are the runs that placed
each family's sizes, by day; the run of 2026-11-02
repeats them with the engines of 0.2.0, at the sizes since extended.
Time against size. The search time of each family's shape against its size, both logarithmic, a line per configuration: the default and every engine that admits the shape, forced; the memo switched off, no copy bound and two threads dashed in their engine's colour; a size not decided within 60 s a hollow marker on the limit's line; a size not run because the line met the limit at a smaller one a small cross above it. What it shows, each from the rows:
wide-m1: the focused engine decides 2 048 pairs in 0.2 s and stops at its memory bound at 4 096; the default hands the sequent over to the net engine, which decides 16 384 pairs in 35 s, quadratic; the inverse method forced is faster still, 32 768 pairs in 47 s, though no row of the dispatch gives it a turn here.counter: the Horn engine decides 262 144 tokens in 0.09 s, linear; the focused engine forced grows as about the cube of the tokens (256 in 0.8 s, past a minute at 1 024); the inverse method forced takes 16 s at 16.mix: the inverse method decides 1 024 pairs in 34 ms; the focused engine alone grows about eightfold per pair (10 pairs in 51 s); the default, after its turn's 2²⁴ units of work, is flat at about 0.3 s.chain: with the memo, 512 clauses in 2.3 s, about cubic, the recursion limit at 1 024; without it, 32 clauses take 0.23 s and 64 pass the minute; without a copy bound it costs nothing more (2.2 s at 512), the memo answering the deepening's repeated levels; the inverse method forced decides 2 048 clauses in 4 ms.contraction#0: the two-sided engine forced decides 8 atoms in 0.07 s and passes the minute at 16; the inverse method forced decides 256 in 1.8 s, as about n³; the default proves 16 to 128 by the inverse method's turn, 35 s at 128. #1: the backward search ends at its copy bound at every size, the inverse method saturates up to 16 atoms and meets its memory bound at 32.pigeonhole: the default (the two-sided engine) proves 5 holes in 2.2 s and passes the minute at 6, growing about fortyfold per hole; the inverse method forced proves 6 in 0.27 s; #1, false classically, is refuted by its classical reading once the backward search has ended, up to 7 holes, and by the inverse method forced up to 8.euler: a circuit (#0) is found in under a millisecond at every size; without one (#1) the exhaustive search grows about 2.4-fold per vertex, 18 vertices in 11 s; the inverse method forced is slower and meets its memory bound at 16 vertices on #0 and at 18 on #1.duplicate: the Horn engine decides 262 144 factors in 0.07 s, linear; the two-sided engine forced, 256 in 0.2 s and past the minute at 1 024.reach-fo: with the memo, a cycle of 10 nodes in 20 s, about fivefold per node; without it, 6 nodes in 1.1 s and past the minute at 8; #1 ends at its copy bound up to 10 nodes.chain-fo: 384 copies in 1.0 s, as about n^2.6, the recursion limit at 512; #1 ends at its copy bound up to 384.witness-fo: #0 to #2 in under a millisecond at every size; the refutation #3 takes 2.7 s at 10 on one thread and 1.7 s on two, and passes the minute at 12.lambek-fo: every shape within 0.5 s up to 256 formulas; #0 and #2 meet the recursion limit at 512, #3 and #4 at 1 024, and #1, refuted, takes 0.22 s at 1 024.
The fitted growth of each line, over its sizes solved in more than a
millisecond (n^d a polynomial, b^n an exponential, whichever fits the
logarithm of the time better):
| shape | line | sizes fitted | fitted growth |
|---|---|---|---|
| chain #0 | focus | 64 to 512 | n^3.0 |
| chain #0 | inverse | 512 to 2048 | n^1.0 |
| chain #0 | default | 64 to 512 | n^3.0 |
| chain #0 | default, memo off | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | default, no copy bound | 64 to 512 | n^3.0 |
| chain-fo #0 | focus | 32 to 384 | n^2.6 |
| chain-fo #0 | default | 32 to 384 | n^2.6 |
| chain-fo #1 | focus | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | inverse | 32 to 256 | n^3.3 |
| contraction #0 | default | 8 to 128 | 1.05^n |
| contraction #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | inverse | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | default | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | focus | 32 to 256 | n^2.7 |
| counter #0 | horn | 16384 to 262144 | n^1.1 |
| counter #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | default | 4096 to 262144 | n^1.1 |
| duplicate #0 | horn | 16384 to 262144 | n^1.1 |
| duplicate #0 | two-sided | 64 to 256 | n^2.7 |
| duplicate #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | default | 16384 to 262144 | n^1.1 |
| euler #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | inverse | 6 to 14 | 2.37^n |
| euler #0 | default | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | two-sided | 8 to 18 | 2.36^n |
| euler #1 | inverse | 8 to 16 | 2.39^n |
| euler #1 | default | 8 to 18 | 2.36^n |
| lambek-fo #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #0 | default | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #1 | two-sided | 128 to 1024 | n^2.2 |
| lambek-fo #1 | default | 128 to 1024 | n^2.2 |
| lambek-fo #2 | two-sided | 32 to 256 | n^2.9 |
| lambek-fo #2 | default | 32 to 256 | n^2.9 |
| lambek-fo #3 | two-sided | 128 to 512 | n^1.9 |
| lambek-fo #3 | default | 128 to 512 | n^1.8 |
| lambek-fo #4 | two-sided | 128 to 512 | n^2.0 |
| lambek-fo #4 | default | 128 to 512 | n^2.1 |
| mix #0 | focus | 6 to 10 | 8.20^n |
| mix #0 | inverse | 256 to 1024 | n^1.9 |
| mix #0 | default | 6 to 1024 | n^0.2 |
| pigeonhole #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #0 | inverse | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #0 | default | 3 to 5 | 45.09^n |
| pigeonhole #1 | two-sided | 5 to 7 | 19.99^n |
| pigeonhole #1 | inverse | 5 to 8 | n^11.5 |
| pigeonhole #1 | default | 5 to 7 | 19.50^n |
| reach-fo #0 | two-sided | 4 to 10 | 5.05^n |
| reach-fo #0 | default | 4 to 10 | 5.06^n |
| reach-fo #0 | default, memo off | 4 to 6 | 19.01^n |
| reach-fo #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | default, memo off | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | focus | 256 to 2048 | n^2.0 |
| wide-m1 #0 | net | 256 to 16384 | n^2.0 |
| wide-m1 #0 | inverse | 256 to 32768 | n^2.0 |
| wide-m1 #0 | default | 256 to 16384 | n^2.3 |
| witness-fo #0 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | two-sided | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | default | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | default, 2 threads | — | fewer than 3 sizes solved over 1 ms |
The other provers
The other provers ran on each growing set's first two sizes only, a
check that each tool runs on the families its logic covers and of its
verdicts; the curves to their limits come from a night of their own. The
rows are bench/growing/2026-10-31/provers/runs.csv: on 2026-10-31,
bench/comparison.sh --growing --quick --cores 2,3 --timeout 10, every
run a process measured by runexec under 10 s and 4 GiB, deduxit's command
on one thread built from the commit vukmwwzr, one run per problem, on
two performance cores of the same machine, its other heavy work paused.
ranking.md beside them has the tables.
| tool | in its fragment | solved | wrong |
|---|---|---|---|
| deduxit, one thread | 50 | 47 | 0 |
| LinearOne | 14 | 14 | 0 |
| Sympli | 10 | 10 | 0 |
| Maude prover, ILL | 10 | 8 | 0 |
| APLL, LL | 8 | 6 | 2 |
| Maude prover, CLL | 8 | 6 | 0 |
| Click & coLLecT | 8 | 5 | 2 |
| APLL, ILL | 10 | 3 | 0 |
| linTAP | 6 | 3 | 0 |
| llprover, ILL | 10 | 3 | 0 |
| lolli | 8 | 3 | 0 |
| llprover, CLL | 8 | 2 | 0 |
deduxit's three undecided runs are chain-fo #1 at 16 and 32 and
reach-fo #1 at 3, unprovable shapes that no refuter decides, which the
command searches without a copy bound until its limit. The four wrong
verdicts are APLL's and Click & coLLecT's refutations of the provable
wide-m1 at 256 and 512 pairs. On duplicate the caps show already at
4 factors: lolli gives up at its depth and llprover's classical system
passes the 10 s, while every other tool proves both sizes.
Time against size, the other provers. The wall time of each tool on each family's shape at its first two sizes, a line per tool, a run not decided within 10 s a hollow marker on the limit's line; a shape outside a tool's fragment has no line of it. With two sizes a line is a slope at most, and the fitted growth needs three:
| shape | line | sizes fitted | fitted growth |
|---|---|---|---|
| chain #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | maude-cll | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| chain #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| chain-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | sympli | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | sympli | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| contraction #1 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | maude-cll | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| counter #0 | lintap | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | sympli | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | lolli | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | maude-cll | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| duplicate #1 | lintap | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | sympli | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #0 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | sympli | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | maude-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | apll-ill | — | fewer than 3 sizes solved over 1 ms |
| euler #1 | llprover-ill | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #0 | linearone | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #1 | linearone | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #2 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #2 | linearone | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #3 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #3 | linearone | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #4 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| lambek-fo #4 | linearone | — | fewer than 3 sizes solved over 1 ms |
| mix #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| pigeonhole #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| reach-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | lolli | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | maude-cll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | apll-ll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | click-and-collect | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | llprover-cll | — | fewer than 3 sizes solved over 1 ms |
| wide-m1 #0 | lintap | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #0 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #1 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #2 | linearone | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | deduxit | — | fewer than 3 sizes solved over 1 ms |
| witness-fo #3 | linearone | — | fewer than 3 sizes solved over 1 ms |
Development
This chapter is for working on deduxit itself: getting the tools, building, testing, and running the checks a change must pass.
Get the tools
The flake's development shell has the Rust toolchain and every tool the
checks use. Enter it with nix develop, or let direnv load it. menu
lists its commands:
| command | what it does |
|---|---|
launch ARGS | builds and runs the command with your arguments |
tests | runs the workspace's tests |
gate | runs what every change that touches code must pass |
ratchet | counts the instructions of fixed workloads against their ceilings |
check | runs every flake check, as CI does |
manual | draws the manual's figures and serves it at localhost:3000 |
live | checks again on every save, with bacon |
Build and run
cargo build
cargo run -p deduxit-cli -- prove "A |- A"
nix build # the command, as result/bin/deduxit
nix build .#manual # the manual alone
Test
cargo test --workspace
cargo test -p deduxit TEST_NAME # one test of the library
cargo clippy --workspace --all-targets -- --deny warnings
cargo test --workspace also runs every example of README, the manual
and the guide for AI models, and compares the output with the text. A
change of what the command prints therefore changes the chapter that
shows it.
A change behind a feature, or of [features], also needs both feature
checks, which build the library with each feature alone and with every
pair:
cargo hack check --each-feature -p deduxit
cargo hack check --feature-powerset --depth 2 -p deduxit
cargo test -p deduxit alone leaves the feature parallel off, and
cargo test -p deduxit --features parallel tests the parallel search
too. The web bindings' tests run under Node:
nix build .#checks.x86_64-linux.web-wasm-tests
Before a commit
gate runs clippy, the tests, both feature checks and the ratchet, in
about four minutes on four cores. Every change that touches code passes
it. The ratchet fails when a workload's instruction count rises more than
2 % above its ceiling in bench/ceilings.csv. After a count went down,
the second command below writes the new ceiling:
gate
ratchet --lower
Format before committing. Every source file starts with the licence header, as the existing files show.
nix fmt
The full check
nix flake check runs what CI runs, except the online
cargo deny check advisories. Run it after a change of the flake, the
toolchain or a lock file, and before a push. It builds every crate and
the manual, runs the tests with and without debug assertions, compiles
the exports' LaTeX and Typst, and checks the Rocq certificates.
CI uploads what main builds to the public binary cache
linlog-prover on Cachix. With the cache, a local check fetches
everything a change does not touch instead of building it again. Add it
once, as a trusted user of the Nix daemon (otherwise cachix says what
to add to the system's configuration):
nix run nixpkgs#cachix -- use linlog-prover
Or add https://linlog-prover.cachix.org to extra-substituters and
linlog-prover.cachix.org-1:6K+DDVwwELnSYtfflwUdsHdYuolC7hprdD/r2/KOQZU=
to extra-trusted-public-keys in nix.conf.
Benchmarks
Timings mean something only on an idle machine. Benchmarks and the comparison says how to run the harness and read its results.