boolean function reduction