Check if a term may be an mv-let statement term.
(atc-check-mv-let term) → (mv yes/no var? vars indices val body wrapper? mv-var)
The forms of these terms are described in the user documentation.
First, we check if the term is an mv-let,
obtaining variables, indices, value term, and body term.
Then we check whether the value term is
a
Function:
(defun atc-check-mv-let (term) (declare (xargs :guard (pseudo-termp term))) (let ((__function__ 'atc-check-mv-let)) (declare (ignorable __function__)) (b* (((mv okp mv-var vars indices & val body) (fty-check-mv-let-call term)) ((when (not okp)) (mv nil nil nil nil nil nil nil nil)) ((mv okp wrapper & wrapped) (atc-check-declar/assign-n val)) ((when (not okp)) (mv t nil vars indices val body nil mv-var))) (mv t (car vars) (cdr vars) indices wrapped body wrapper mv-var))))
Theorem:
(defthm booleanp-of-atc-check-mv-let.yes/no (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (booleanp yes/no)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-mv-let.var? (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (symbolp var?)) :rule-classes :rewrite)
Theorem:
(defthm symbol-listp-of-atc-check-mv-let.vars (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (symbol-listp vars)) :rule-classes :rewrite)
Theorem:
(defthm nat-listp-of-atc-check-mv-let.indices (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (nat-listp indices)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-termp-of-atc-check-mv-let.val (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (pseudo-termp val)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-termp-of-atc-check-mv-let.body (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (pseudo-termp body)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-mv-let.wrapper? (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (symbolp wrapper?)) :rule-classes :rewrite)
Theorem:
(defthm symbolp-of-atc-check-mv-let.mv-var (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (symbolp mv-var)) :rule-classes :rewrite)
Theorem:
(defthm pseudo-term-count-of-atc-check-mv-let-val (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (implies yes/no (< (pseudo-term-count val) (pseudo-term-count term)))) :rule-classes :linear)
Theorem:
(defthm pseudo-term-count-of-atc-check-mv-let-body (b* (((mv ?yes/no ?var? ?vars ?indices ?val ?body ?wrapper? ?mv-var) (atc-check-mv-let term))) (implies yes/no (< (pseudo-term-count body) (pseudo-term-count term)))) :rule-classes :linear)