Algebraic Theory of Universal and Local Constraints in Recognition Algorithms - Ontify