Coerces an arbitrary 4vec into a 2vecnatx, by forcing any non-naturals to all Xes.
(2vecnatx-fix x) → fix
Function:
(defun 2vecnatx-fix (x) (declare (xargs :guard (4vec-p x))) (let ((__function__ '2vecnatx-fix)) (declare (ignorable __function__)) (if (and (2vec-p x) (<= 0 (2vec->val x))) (4vec-fix x) (4vec-x))))
Theorem:
(defthm 2vecnatx-p!-of-2vecnatx-fix (b* ((fix (2vecnatx-fix x))) (2vecnatx-p! fix)) :rule-classes :rewrite)
Theorem:
(defthm 2vecnatx-fix-of-2vecnatx-p (implies (2vecnatx-p x) (equal (2vecnatx-fix x) (4vec-fix x))))
Theorem:
(defthm 2vecnatx-fix-of-2vecx-fix-x (equal (2vecnatx-fix (2vecx-fix x)) (2vecnatx-fix x)))
Theorem:
(defthm 2vecnatx-fix-2vecx-equiv-congruence-on-x (implies (2vecx-equiv x x-equiv) (equal (2vecnatx-fix x) (2vecnatx-fix x-equiv))) :rule-classes :congruence)