Zulip Chat Archive

Stream: new members

Topic: How is Cadical used in Lean and Mathlib?


Isak Colboubrani (Sep 23 2024 at 19:10):

I noticed that building Lean also builds the CaDiCaL SAT Solver:

% stage1/bin/cadical
c --- [ banner ] -------------------------------------------------------------
c
c CaDiCaL SAT Solver
c Copyright (c) 2016-2023 A. Biere, M. Fleury, N. Froleyks, K. Fazekas, F. Pollitt
c
c Version 1.9.5

How is Cadical used in Lean?

Is it used by Mathlib yet?

Henrik Böving (Sep 23 2024 at 19:13):

bv_decide and friends use cadical

Isak Colboubrani (Sep 23 2024 at 19:21):

Thanks! Those are bv_check, bv_decide, bv_normalize and bv_omega?

If so none of them seems to be used by Mathlib as of master.

Henrik Böving (Sep 23 2024 at 19:22):

bv_omega not

Henrik Böving (Sep 23 2024 at 19:22):

And that's correct, mathlib doesn't do BitVec theory after all

Eric Wieser (Sep 23 2024 at 21:35):

Cadical is a new dependency in 4.12.0, right?

Eric Wieser (Sep 23 2024 at 21:40):

Is it an optional one, or required?

Henrik Böving (Sep 23 2024 at 21:48):

It's not a dependency, Lean ships it on its own.

Eric Wieser (Sep 23 2024 at 21:52):

It's a dependency if you build from source though?

Henrik Böving (Sep 23 2024 at 21:53):

No, if it's not installed it will compile the thing on its own

Isak Colboubrani (Sep 23 2024 at 22:09):

It qualifies as a dependency in the sense that it is an external software component that the project relies on to function properly.

However, it does not qualify as a dependency in the sense that you need to have it installed before compiling Lean.

Does that sound reasonable?

Henrik Böving (Sep 23 2024 at 22:11):

yes that's correct


Last updated: May 02 2025 at 03:31 UTC