Code dealing with propositional logic has been factored out