--| home
| research
| txt
| img
| code
| teach
| specialfunctionswiki
| timescalewiki
| hyperspacewiki
| links |--
Back to the class

__A question from 15 February 2018 class__

Recall that a literal is an atomic formula or its negation ($P$ is a positive literal, $\neg P$ is a negative literal). Also recall that a Horn formula is a formula in CNF form (so it is a conjunction of disjunctions) such that those disjunctions can be written to contain only one positive literal.

**Question:** If we have a formula $F$ in conjunctive normal form (CNF) with $F \equiv A \wedge (B \vee B)$, then is $F$ equivalent to a Horn formula?

**Answer:** *Yes*, because $F$ is equivalent to $A \wedge B$. To see that they are equivalent, make a truth table:
$$\begin{array}{|l|l|l|l|l|}
\hline
A & B & B \vee B & A \wedge B & A \wedge (B \vee B) & (A \wedge B) \leftrightarrow (A \wedge (B \vee B)) \\
\hline
1&1&1&1&1&1 \\
1&0&0&0&0&1 \\
0&1&1&0&0&1 \\
0&0&0&0&0&1 \\
\hline
\end{array}$$
It should be noted that the formula $A \wedge (B \vee B)$ is *not* a Horn formula, because $B \vee B$ contains two positive literals! This shows us that the property of "being a Horn formula" is not "preserved" by looking at equivalent formulas. We also already knew that, because we looked at the algorithm to turn a given formula into an equivalent CNF formula!

Equivalence of formulas does not mean the formulas are "equal"! We defined $F \equiv G$ to mean that both $F \vDash G$ and $G \vDash F$. Equality of formulas is a syntax question and equivalence of the formulas is a semantic thing!