This meta function is designed to quickly rewrite terms of the form
Function:
(defun reduce-nth-meta (term) (declare (xargs :guard (pseudo-termp term))) (case-match term (('nth ('quote n) lst) (if (and (integerp n) (<= 0 n) (equal (formal-true-listp lst) *t*)) (formal-nth n lst) term)) (& term)))
This meta lemma was designed to quickly rewrite the terms generated by the mv-let macro.
Theorem:
(defthm reduce-nth-meta-correct (implies (and (pseudo-termp term) (alistp a)) (equal (meta-ev term a) (meta-ev (reduce-nth-meta term) a))) :rule-classes ((:meta :trigger-fns (nth))))