A Lean 4 library for a constraint-solving framework for Constrained Horn Clauses (CHCs).
- Lean 4 installed via
elan
[[require]]
name = "Flex"
git = "https://github.com/jam-khan/Flex"
rev = "main"lake updateThis clones the repo into .lake/packages/Flex/ using your local Git credentials.
lake buildNote: Flex is mathlib-free — the only dependency is
aesop(built from source on the first build).
A single import gives you everything:
import FlexThis includes all core types, tactics, elaboration, and the solver.
import Flex
def ex1 : Prop :=
∃ κ : Int → Prop,
∀ x : Int,
0 ≤ x →
(∀ ν : Int, ν = x - 1 → κ ν)
∧ (∀ y : Int, κ y →
∀ ν : Int, ν = y + 1 → 0 ≤ ν)See the Demo/ folder for more worked examples.