Build a conjunction of equalities with the given left-hand and right-hand sides.
(conjoin-equalities lefts rights) → term
Function:
(defun conjoin-equalities-aux (lefts rights) (declare (xargs :guard (and (pseudo-term-listp lefts) (pseudo-term-listp rights)))) (declare (xargs :guard (= (len lefts) (len rights)))) (let ((__function__ 'conjoin-equalities-aux)) (declare (ignorable __function__)) (if (endp lefts) nil (cons (cons 'equal (cons (car lefts) (cons (car rights) 'nil))) (conjoin-equalities-aux (cdr lefts) (cdr rights))))))
Theorem:
(defthm pseudo-term-listp-of-conjoin-equalities-aux (implies (and (pseudo-term-listp lefts) (pseudo-term-listp rights) (= (len lefts) (len rights))) (b* ((equalities (conjoin-equalities-aux lefts rights))) (pseudo-term-listp equalities))) :rule-classes :rewrite)
Function:
(defun conjoin-equalities (lefts rights) (declare (xargs :guard (and (pseudo-term-listp lefts) (pseudo-term-listp rights)))) (declare (xargs :guard (= (len lefts) (len rights)))) (let ((__function__ 'conjoin-equalities)) (declare (ignorable __function__)) (conjoin (conjoin-equalities-aux lefts rights))))
Theorem:
(defthm pseudo-termp-of-conjoin-equalities (implies (and (pseudo-term-listp lefts) (pseudo-term-listp rights) (= (len lefts) (len rights))) (b* ((term (conjoin-equalities lefts rights))) (pseudo-termp term))) :rule-classes :rewrite)