Translates Eunoia proof signatures and scripts to LambdaPi, enabling verification of cvc5 SMT solver proofs in the Dedukti ecosystem.
Currently handles CPC-MINI, a 22-module subset of cvc5's Cooperating Proof Calculus. All generated LambdaPi files pass type checking with subject reduction. On a benchmark of 1,036 proofs across 14 SMT-LIB fragments, 97% pass LambdaPi verification.
Requires OCaml, Dune, and LambdaPi (as an opam library).
dune build
dune test# Translate CPC-MINI signature (cpc/ → _build/cpc/)
dune exec eo2lp
# Translate and verify proofs
dune exec eo2lp -- --proofs proofs/QF_UF --check --timeout 5
# Custom input/output, verbose
dune exec eo2lp -- -d <input_dir> -o <output_dir> -v infoGenerated .lp files can be checked independently:
cd _build/cpc && lambdapi check Cpc.lpRun dune exec eo2lp -- --help for the full list of options.
.eo files → [Parse] → Eunoia AST → [Elaborate] → [Encode] → .lp files
-
Parsing (
lexer.mll,parser.mly): produces an Eunoia AST. Module dependencies are resolved fromincludedirectives, and modules are topologically sorted. -
Elaboration (
elaborate.ml): rewrites EO terms into a normalized form — resolves overloads, expands n-ary operators to binary, handles binders and argument lists, expands defines. No LP-specific logic. -
Encoding (
encode.ml): translates elaborated EO terms to LambdaPiCore.Termvalues. Eunoia types are lifted viatau : Set → TYPE. Implicit arguments are filled by LambdaPi's type inference (resolve.ml). Core builtins are defined inPrelude.lp.
./scripts/bench.sh proofs --results results.csv --timeout 5 # parallel benchmark
./scripts/gen-results-table.sh results.csv > tex/results-table.tex
./scripts/gen-proofs.sh # generate proofs from SMT-LIB
./scripts/diff-cpc.sh # compare cpc/ with upstream cvc5This project is under development.