A library for manipulating Conjunctive Normal Form (CNF) formulae.
We implement:
- Basic logic operations
- Conjunction (
∧
) - Disjunction (
∨
) - Negation (
¬
)
- Conjunction (
- Formula reduction (
trim!
) - Formula restriction/partial evaluation (
|
) - Formula evaluation (
ϕ()
, whereϕ
is a CNF) - Shannon's Decomposition (
shannon
,shannon!
) - Extracting formula scope (
get_vars
) - Counting variables (
count_vars
) - Formula equality (
==
,!=
,is_⊤
,is_⊥
) - Clause membership (
∈
,∋
) - Unique hash for equivalent CNFs (
hash
) - String representation for CNFs (
string
) - CNF copies (
copy
) - Iterating over all valuations (
valuations
) - String representation for instantiations and literals (
inst_str
,lit_str
) - Composing disjunctions or conjunctions out of a set of literals (
and
,or
) - Removing duplicate literals (
rmdups!
,rmdups
)