Mathematical Definition and Systematization of Puzzle Rules