ARITH_CONV : conv
ARITH_CONV further restricts the subset as follows: when the formula has been put in prenex normal form it must contain only one kind of quantifier, that is the quantifiers must either all be universal (‘forall’) or all existential. Variables may appear free (unquantified) provided any quantifiers that do appear in the prenex normal form are universal; free variables are taken as being implicitly universally quantified so mixing them with existential quantifiers would violate the above restriction.
Given a formula in the permitted subset, ARITH_CONV attempts to prove that it is equal to T (true). For universally quantified formulae the procedure only works if the formula would also be true of the non-negative rationals; it cannot prove formulae whose truth depends on the integral properties of the natural numbers. The procedure is also incomplete for existentially quantified formulae, but in this case there is no rule-of-thumb for determining whether the procedure will work.
The function features a number of preprocessors which extend the coverage beyond the subset specified above. In particular, natural number subtraction and conditional statements are allowed. Another permits substitution instances of universally quantified formulae to be accepted. Note that Boolean-valued variables are not allowed.
- ARITH_CONV ``m < SUC m``; > val it = |- m < (SUC m) = T : thm
- ARITH_CONV ``!m p. p < m ==> !q r. (m < (p + q) + r) ==> ((m - p) < q + r)``; > val it = |- (!m p. p < m ==> (!q r. m < ((p + q) + r) ==> (m - p) < (q + r))) = T
- ARITH_CONV ``?m n. m < n``; > val it = |- (?m n. m < n) = T - ARITH_CONV ``?m n. (2 * m) + (3 * n) = 10``; > val it = |- (?m n. (2 * m) + (3 * n) = 10) = T
- ARITH_CONV ``((p + 3) <= n) ==> (!m. ((m EXP 2 = 0) => (n - 1) | (n - 2)) > p)``; > val it = |- (p + 3) <= n ==> (!m. ((m EXP 2 = 0) => n - 1 | n - 2) > p) = T
- ARITH_CONV ``!m. ?n. m < n``; evaluation failed ARITH_CONV -- formula not in the allowed subset
- ARITH_CONV ``!m n. ~(SUC (2 * m) = 2 * n)``; evaluation failed ARITH_CONV -- cannot prove formula