Rule for generating the next term