Do all of these paths
(paths-all-exist-p paths &key (state 'state)) → (mv err ans new-state)
Function:
(defun paths-all-exist-p-fn (paths state) (declare (xargs :stobjs (state))) (declare (xargs :guard (string-listp paths))) (let ((__function__ 'paths-all-exist-p)) (declare (ignorable __function__)) (b* (((when (atom paths)) (mv nil t state)) ((mv err ans1 state) (path-exists-p (car paths))) ((when err) (mv err nil state)) ((unless ans1) (mv nil nil state))) (paths-all-exist-p (cdr paths)))))
Theorem:
(defthm booleanp-of-paths-all-exist-p.ans (b* (((mv ?err ?ans ?new-state) (paths-all-exist-p-fn paths state))) (booleanp ans)) :rule-classes :type-prescription)
Theorem:
(defthm state-p1-of-paths-all-exist-p.new-state (implies (force (state-p1 state)) (b* (((mv ?err ?ans ?new-state) (paths-all-exist-p-fn paths state))) (state-p1 new-state))) :rule-classes :rewrite)
Theorem:
(defthm w-state-of-paths-all-exist-p (b* (((mv ?err ?ans ?new-state) (paths-all-exist-p-fn paths state))) (equal (w new-state) (w state))))