logic programming to add simplification support