Expand arith's farkas lemma rule as a macro (#6577)