Equality lifting transformation of a
(xeq-stmt-dowhile body body-new body-thm-name
test test-new test-thm-name gin)
→
(mv stmt gout)Function:
(defun xeq-stmt-dowhile (body body-new body-thm-name test test-new test-thm-name gin) (declare (xargs :guard (and (stmtp body) (stmtp body-new) (symbolp body-thm-name) (exprp test) (exprp test-new) (symbolp test-thm-name) (ginp gin)))) (declare (xargs :guard (and (stmt-unambp body) (stmt-annop body) (stmt-unambp body-new) (stmt-annop body-new) (expr-unambp test) (expr-annop test) (expr-unambp test-new) (expr-annop test-new)))) (let ((__function__ 'xeq-stmt-dowhile)) (declare (ignorable __function__)) (b* (((gin gin) gin) (stmt (make-stmt-dowhile :body body :test test)) (stmt-new (make-stmt-dowhile :body body-new :test test-new)) ((unless (and body-thm-name test-thm-name)) (mv stmt-new (gout-no-thm gin))) (types (stmt-types body)) ((mv & old-body) (ldm-stmt body)) ((mv & new-body) (ldm-stmt body-new)) ((mv & old-test) (ldm-expr test)) ((mv & new-test) (ldm-expr test-new)) (hints (cons (cons '"Goal" (cons ':in-theory (cons ''((:e c::stmt-dowhile) (:e c::ident-type-map-fix) (:e omap::emptyp) (:e omap::head) (:e omap::tail) (:e insert) (:e c::type-nonchar-integerp) dowhile-test-hyp dowhile-body-hyp c::compustate-has-vars-with-types-p stmt-compustate-vars) (cons ':use (cons (cons (cons ':instance (cons body-thm-name (cons (cons 'compst (cons (cons 'mv-nth (cons '0 (cons (cons 'dowhile-body-hyp-witness (cons (cons 'quote (cons old-body 'nil)) (cons (cons 'quote (cons new-body 'nil)) (cons 'old-fenv (cons 'new-fenv (cons (cons 'quote (cons types 'nil)) (cons (cons 'quote (cons gin.vartys 'nil)) 'nil))))))) 'nil))) 'nil)) (cons (cons 'limit (cons (cons 'mv-nth (cons '1 (cons (cons 'dowhile-body-hyp-witness (cons (cons 'quote (cons old-body 'nil)) (cons (cons 'quote (cons new-body 'nil)) (cons 'old-fenv (cons 'new-fenv (cons (cons 'quote (cons types 'nil)) (cons (cons 'quote (cons gin.vartys 'nil)) 'nil))))))) 'nil))) 'nil)) 'nil)))) (cons (cons ':instance (cons test-thm-name (cons (cons 'compst (cons (cons 'mv-nth (cons '0 (cons (cons 'dowhile-test-hyp-witness (cons (cons 'quote (cons old-test 'nil)) (cons (cons 'quote (cons new-test 'nil)) (cons 'old-fenv (cons 'new-fenv (cons (cons 'quote (cons gin.vartys 'nil)) 'nil)))))) 'nil))) 'nil)) (cons (cons 'limit (cons (cons 'mv-nth (cons '1 (cons (cons 'dowhile-test-hyp-witness (cons (cons 'quote (cons old-test 'nil)) (cons (cons 'quote (cons new-test 'nil)) (cons 'old-fenv (cons 'new-fenv (cons (cons 'quote (cons gin.vartys 'nil)) 'nil)))))) 'nil))) 'nil)) 'nil)))) (cons (cons ':instance (cons 'stmt-dowhile-theorem (cons (cons 'old-body (cons (cons 'quote (cons old-body 'nil)) 'nil)) (cons (cons 'new-body (cons (cons 'quote (cons new-body 'nil)) 'nil)) (cons (cons 'old-test (cons (cons 'quote (cons old-test 'nil)) 'nil)) (cons (cons 'new-test (cons (cons 'quote (cons new-test 'nil)) 'nil)) (cons (cons 'types (cons (cons 'quote (cons types 'nil)) 'nil)) (cons (cons 'vartys (cons (cons 'quote (cons gin.vartys 'nil)) 'nil)) 'nil)))))))) 'nil))) 'nil))))) 'nil)) ((mv thm-event thm-name thm-index) (gen-stmt-thm stmt stmt-new gin.vartys gin.const-new gin.thm-index hints))) (mv stmt-new (make-gout :events (cons thm-event gin.events) :thm-index thm-index :thm-name thm-name :vartys gin.vartys)))))
Theorem:
(defthm stmtp-of-xeq-stmt-dowhile.stmt (b* (((mv ?stmt ?gout) (xeq-stmt-dowhile body body-new body-thm-name test test-new test-thm-name gin))) (stmtp stmt)) :rule-classes :rewrite)
Theorem:
(defthm goutp-of-xeq-stmt-dowhile.gout (b* (((mv ?stmt ?gout) (xeq-stmt-dowhile body body-new body-thm-name test test-new test-thm-name gin))) (goutp gout)) :rule-classes :rewrite)
Theorem:
(defthm stmt-unambp-of-xeq-stmt-dowhile (implies (and (stmt-unambp body-new) (expr-unambp test-new)) (b* (((mv ?stmt ?gout) (xeq-stmt-dowhile body body-new body-thm-name test test-new test-thm-name gin))) (stmt-unambp stmt))))
Theorem:
(defthm stmt-annop-of-xeq-stmt-dowhile (implies (and (stmt-annop body-new) (expr-annop test-new)) (b* (((mv ?stmt ?gout) (xeq-stmt-dowhile body body-new body-thm-name test test-new test-thm-name gin))) (stmt-annop stmt))))
Theorem:
(defthm stmt-aidentp-of-xeq-stmt-dowhile (implies (and (stmt-aidentp body-new gcc) (expr-aidentp test-new gcc)) (b* (((mv ?stmt ?gout) (xeq-stmt-dowhile body body-new body-thm-name test test-new test-thm-name gin))) (stmt-aidentp stmt gcc))))