package orthologic-coq

  1. Overview
  2. Docs
A plugin to add orthologic-based tactics to Coq

Install

Dune Dependency

Authors

Maintainers

Sources

orthologic-coq-0.9.1.tbz
sha256=60a9eeb27b6ad0a6fadb4127f5a7fdc194133dc55fa627e5eaedbee58a58651e
sha512=bab767857cecbb1529e599785f2485e62171a55b7ec34483976a9a15e8223167c52a2977f88752e64f17fd1b4e6fde682b608bd046b2a7867da2eca10844cf57

Description

Orthologic-based reasoning is super great. This plugin proposes a verified and optimized implementation of orthologic proof search, with memoization and pointer equality. It also provides an ocaml-based tactic that computes orthologic normal form, and a boolean tautology solver based on it.

README

This repository contains the formalization in Coq of the main result of Orthologic with Axioms (the cut elimination theorem for orthologic), and the implementation of an algorithm deciding orthologic inequalities, optimized using memoization and reference equality: The optimized algorithm is proven correct, and lifted to a Coq tactic using reflection. Independent proof search and normalization tactic implmented directly in OCaml are also provided.

The theorems and tactics are available as a plugin.

Requirements:

This formalization has been carried using Coq 8.18, Ocaml 5.3 and Dune 3.8. Using opam, run:

$ opam install dune.3.8.2 coq.8.18.0

Building the project

Build and verify the project using (takes a couple minutes):

$ dune build

You can also try the plugin by running:

$ coqtop -R _build/default/theories/ OLCoq -I _build/default/src/

and then

Coq < Require Import OLCoq.OLPlugin.

Tutorial

A short introduction to the plugin can be found in theories/Tutorial.v.

Reference Paper

Verified and Optimized Implementation of Orthologic Proof Search (Preprint, CAV 2025)

Benchmarks

Benchmarks where generated according to Main.scala using Scala and can be regenerate using sbt run. Benchmarks can be found in theories/olsolve_bench and theories/oltauto_bench. The raw results of the benchmarks are in bench.2025-01-31 and oltauto.bench.2025-02-01. They can be reevaluated with (takes arround 8 hours on a Intel Core i9-13900K CPU with 64GB RAM)

make solve-bench

and

make tauto-bench

Plots are plotted using plot.py.

Note that the objective of the first benchmark is to demonstrate that the assymptotic behaviour is as expected from the theory (results in lines.pdf) and the objective of the second benchmark is to show practical improvements over Coq's built-in solver for propositional logic, btauto (results in OCaml+n+btauto.pdf). The key corectness property of the artifact is validation by Coq, which is independent of the benchmarks and verified with dune build.

Dependencies (3)

  1. coq = "8.18.0"
  2. dune >= "3.8"
  3. ocaml >= "5.3.0"

Dev Dependencies

None

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.