A logic-mode guard-verified version of
(one-way-unify$ pat term state) → (mv okp subst)
The built in
This
Function:
(defun one-way-unify$ (pat term state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (pseudo-termp pat) (pseudo-termp term)))) (let ((__function__ 'one-way-unify$)) (declare (ignorable __function__)) (b* (((mv erp okp+subst) (magic-ev-fncall 'one-way-unify (list pat term) state nil t)) ((when erp) (raise "Internal error: ~@0" erp) (mv nil nil)) ((unless (and (true-listp okp+subst) (= (len okp+subst) 2))) (raise "Internal error: ONE-WAY-UNIFY returned ~x0." okp+subst) (mv nil nil)) (okp (first okp+subst)) (subst (second okp+subst)) ((unless (booleanp okp)) (raise "Internal error: ONE-WAY-UNIFY's first result is ~x0." okp) (mv nil nil)) ((unless (symbol-pseudoterm-alistp subst)) (raise "Internal error: ONE-WAY-UNIFY's second result is ~x0." subst) (mv nil nil))) (mv okp subst))))
Theorem:
(defthm booleanp-of-one-way-unify$.okp (b* (((mv ?okp common-lisp::?subst) (one-way-unify$ pat term state))) (booleanp okp)) :rule-classes :rewrite)
Theorem:
(defthm symbol-pseudoterm-alistp-of-one-way-unify$.subst (b* (((mv ?okp common-lisp::?subst) (one-way-unify$ pat term state))) (symbol-pseudoterm-alistp subst)) :rule-classes :rewrite)