Function:
(defun maybe-a3vec-fix (v x) (declare (xargs :guard (and (a4vec-p v) (svex-p x)))) (let ((__function__ 'maybe-a3vec-fix)) (declare (ignorable __function__)) (if (3valued-syntaxp (svex-fix x)) (a4vec-fix v) (a3vec-fix v))))
Theorem:
(defthm a4vec-p-of-maybe-a3vec-fix (b* ((vv (maybe-a3vec-fix v x))) (a4vec-p vv)) :rule-classes :rewrite)
Theorem:
(defthm maybe-a3vec-fix-when-implies (implies (case-split (implies (3valued-syntaxp x) (3vec-p (a4vec-eval v env)))) (equal (a4vec-eval (maybe-a3vec-fix v x) env) (3vec-fix (a4vec-eval v env)))))
Theorem:
(defthm maybe-a3vec-fix-of-nths (implies (equal (a4veclist-eval vals env) (svexlist-eval x (svex-a4vec-env-eval a4env env))) (equal (a4vec-eval (maybe-a3vec-fix (nth n vals) (nth n x)) env) (3vec-fix (a4vec-eval (nth n vals) env)))))
Theorem:
(defthm maybe-a3vec-fix-of-a3vec (implies (a4vec-syntactic-3vec-p v) (equal (maybe-a3vec-fix v x) (a4vec-fix v))))
Theorem:
(defthm maybe-a3vec-fix-of-a4vec-fix-v (equal (maybe-a3vec-fix (a4vec-fix v) x) (maybe-a3vec-fix v x)))
Theorem:
(defthm maybe-a3vec-fix-a4vec-equiv-congruence-on-v (implies (a4vec-equiv v v-equiv) (equal (maybe-a3vec-fix v x) (maybe-a3vec-fix v-equiv x))) :rule-classes :congruence)
Theorem:
(defthm maybe-a3vec-fix-of-svex-fix-x (equal (maybe-a3vec-fix v (svex-fix x)) (maybe-a3vec-fix v x)))
Theorem:
(defthm maybe-a3vec-fix-svex-equiv-congruence-on-x (implies (svex-equiv x x-equiv) (equal (maybe-a3vec-fix v x) (maybe-a3vec-fix v x-equiv))) :rule-classes :congruence)