nested quantifier arithmetic works