Minimization of incompletely specified functions as three-level logic via Boolean relations