Git Product home page Git Product logo

lean-smt's Introduction

SMT Lean

This project is inspired by SMTCoq and aims to provide Lean tactics that discharge goals into SMT solvers. This project is in its early design/development phase and is not recommended for use.

Requirements

lean-smt communicates with SMT solvers via the SMT-LIB textual interface. Therefore, it requires a supported SMT solver to be installed. Currently, lean-smt supports two SMT solvers:

Usage

To use the lean-smt in your project. Add the following line to your list of dependencies in lakefile.lean:

require smt from git "https://github.com/ufmg-smite/lean-smt.git"@"main"

lean-smt comes with one main tactic, smt, that translates the current goal into an SMT query, sends the query to an SMT solver, and prints the result returned by the SMT solver. The tactic DOES NOT currently generate a proof term to discharge the goal.

Example

To use the smt tactic, you just need to import the Smt library:

import Smt

theorem modus_ponens (p q : Prop) : p → (p → q) → q := by
  smt
  simp_all

For the theorem above, smt prints

goal: p → (p → q) → q

query:
(declare-const p Bool)
(declare-const q Bool)
(assert (not (=> p (=> (=> p q) q))))
(check-sat)

result: unsat

You can specify the SMT solver to use like so:

set_option smt.solver.kind "z3"

lean-smt assumes the specified SMT solver to be in the path. If that's not the case, you can specify the path to the SMT solver like so:

set_option smt.solver.path "path/to/z3"

lean-smt's People

Contributors

abdoo8080 avatar mhk119 avatar tomaz1502 avatar vtec234 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.