Wouldn't that make it essentially a mathematical patent, which is not allowed? Or at best a software patent, which is a gray area? Patenting an equivalence class of logical operations, without specificity about their implementation, is on a lot shakier footing than patenting a hardware invention, at least in U.S. patent law. It does lead to wider potential applicability, but at the risk of weaker foundations.