A solver that solves a set of product and sum equations in which variables are discrete sets of rational numbers