Compute a && b
where a
and b
are Boolean formulas in CNF.
Compute a && b
where a
and b
are Boolean formulas in CNF.
Type of primitive Boolean terms.
A Boolean formula in CNF.
A Boolean formula in CNF.
The resulting Boolean formula in CNF.
Compute a || b
where a
and b
are Boolean formulas in CNF.
Compute a || b
where a
and b
are Boolean formulas in CNF.
Type of primitive Boolean terms.
A Boolean formula in CNF.
A Boolean formula in CNF.
The resulting Boolean formula in CNF.
Compute a || b
where a
is a single "clause", i.e.
Compute a || b
where a
is a single "clause", i.e. a disjunction of primitive Boolean terms, and b
is a Boolean formula in CNF.
Type of primitive Boolean terms.
A list of primitive Boolean terms. This list represents a single disjunction clause, e.g. List(a, b, c)
represents a || b || c
.
A Boolean formula in CNF.
The resulting Boolean formula in CNF.
Compute a || b
where a
is a single Boolean term and b
is a Boolean formula in CNF.
Compute a || b
where a
is a single Boolean term and b
is a Boolean formula in CNF.
Type of primitive Boolean terms.
Primitive Boolean term that cannot be simplified; does not contain disjunctions or conjunctions.
A Boolean formula in CNF.
The resulting Boolean formula in CNF.
Represents the constant false
value in CNF.
Compute ! a
where a
is a Boolean formula in CNF.
Compute ! a
where a
is a Boolean formula in CNF.
Type of primitive Boolean terms.
A function that describes the transformation of a primitive term under negation.
For instance, negateOneTerm(a)
should return ! a
in the term's appropriate representation.
A Boolean formula in CNF.
The resulting Boolean formula in CNF.
Injects a single primitive term into a CNF.
Represents the constant true
value in CNF.
Helper functions that perform computations with Boolean formulas while keeping them in the conjunctive normal form.
A Boolean formula in CNF is represented by a list of lists of an arbitrary type
T
. For instance, the Boolean formula (a || b) && (c || d || e) is represented asThese helper methods will compute disjunction, conjunction, and negation of Boolean formulas in CNF, outputting the results also in CNF. Simplifications are performed only in so far as to remove exact duplicate terms or clauses such as
a || a
or(a || b) && (a || b)
.The type
T
represents primitive Boolean terms that cannot be further simplified or factored to CNF. These terms could be represented by expression trees or in another way; the CNF computations do not depend on the representation of terms.Note that negation such as
! a
is considered to be a primitive term. Negation of a conjunction or disjunction, such as! (a || b)
, can be simplified to CNF.