1

Given a complete set of axioms (for example, associativity, communtative, distributivity, identity, annihilator, idepotence, and the "complementation" laws) for boolean algebra, I know any other true statement follows logically from these axioms. As an example, Boolean algebra question. shows someone asking how to prove a statement using the laws of boolean algebra.

II've been trying to find a constructive method of generating such a proof (just for boolean algebra, I know this isn't possible in general), but can't seem to find one published anywhere.

By just using breadth-first search I could construct a proof (in a possibly huge amount of time) for any true theorem, but such a system would never terminate for any false theorem.

  • Do you mean a proof like in propositional calculus (e.g. Hilbert-style axioms & Modus Ponens)? If so, there are constructive proofs of completeness of propositional calculus, which can be turned into proof-generating algorithms. – lisyarus Feb 13 '19 at 11:07
  • Does "any true statement" mean "any boolean expression" ? If not, for clarification , some examples would be welcome which statements you have in mind. – Peter Feb 13 '19 at 11:13
  • I have (hopefully) verified – Chris Jefferson Feb 13 '19 at 11:40

2 Answers2

1

To prove a statement in Boolean algebra like $\phi(A_1,A_2,\dots,A_n)=\psi(A_1,A_2,\dots,A_n)$ you can put both $\phi$ and $\psi$ into some normal form, e.g. CNF or DNF, which can be done algorithmically (see the linked wikipedia articles). These normal forms are essentially unique (up to reordering of terms e.g. $A \wedge B=B \wedge A$), so $\phi=\psi$ iff they have the same normal form.

lisyarus
  • 15,517
  • How would you put something into a normal CNF form? Checking if a CNF is equivalent to false sounds a lot like solving SAT, which is NP-complete. – Chris Jefferson Feb 13 '19 at 14:45
  • @ChrisJefferson Yes, the task is NP-complete, but your original question includes 3SAT as a special case, thus is also NP-complete. – lisyarus Feb 14 '19 at 12:35
1

You can systematically put both statements into their Canonical Conjunctive (or Disjunctive) Normal Form (cCNF or cDNF) relative to the shared aet of variables.

For example, if one statement is $(A \lor B) \land (A \lor \neg B)$ and the other is $(A \land C) \lor (A \land \neg C)$, then their shared set if variables is $\{ A, B,C \}$, and for both statements their cDNF with regard to set of variables is $(A \land B \land C) \lor (A \land B \land \neg C) \lor (A \land \neg B \land C) \lor (A \land \neg B \land \neg C)$

The algorithm to put any propositional logic statement into its cDNF with regard to some set of variables is fairly easy:

  1. Rewrite all operators into $\neg$, $\lor$, and $\land$'s

  2. Keep applying DeMorgan and Double Negation until any negations left are negations of atomic variables (the statement is now in NNF)

  3. Keep applying Distribution of $\land$ over $\lor$ until there are no such Distributions to be done (the statement is now in DNF)

  4. Simplify as much as possible using Annihilation, Identity, Complement, and Idempotence

  5. Use Adjacency to make sure every term includes references to each variable from the shared variable set (e.g. $A$ becomes $(A \land B) \lor (A \land \neg B)$

  6. Use commutation to get all terms in the order as specified by the cDNF

Bram28
  • 100,612
  • 6
  • 70
  • 118