Define default Smtlink config and custom Smtlink config
Function:
(defun smtlink-config-p (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config-p)) (declare (ignorable acl2::__function__)) (and (mbe :logic (and (alistp x) (equal (strip-cars x) '(interface-dir smt-module smt-class smt-cmd pythonpath))) :exec (fty::alist-with-carsp x '(interface-dir smt-module smt-class smt-cmd pythonpath))) (b* ((interface-dir (cdr (std::da-nth 0 x))) (smt-module (cdr (std::da-nth 1 x))) (smt-class (cdr (std::da-nth 2 x))) (smt-cmd (cdr (std::da-nth 3 x))) (pythonpath (cdr (std::da-nth 4 x)))) (and (stringp interface-dir) (stringp smt-module) (stringp smt-class) (stringp smt-cmd) (stringp pythonpath))))))
Theorem:
(defthm consp-when-smtlink-config-p (implies (smtlink-config-p x) (consp x)) :rule-classes :compound-recognizer)
Function:
(defun smtlink-config-fix$inline (x) (declare (xargs :guard (smtlink-config-p x))) (let ((acl2::__function__ 'smtlink-config-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((interface-dir (str-fix (cdr (std::da-nth 0 x)))) (smt-module (str-fix (cdr (std::da-nth 1 x)))) (smt-class (str-fix (cdr (std::da-nth 2 x)))) (smt-cmd (str-fix (cdr (std::da-nth 3 x)))) (pythonpath (str-fix (cdr (std::da-nth 4 x))))) (list (cons 'interface-dir interface-dir) (cons 'smt-module smt-module) (cons 'smt-class smt-class) (cons 'smt-cmd smt-cmd) (cons 'pythonpath pythonpath))) :exec x)))
Theorem:
(defthm smtlink-config-p-of-smtlink-config-fix (b* ((new-x (smtlink-config-fix$inline x))) (smtlink-config-p new-x)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config-fix-when-smtlink-config-p (implies (smtlink-config-p x) (equal (smtlink-config-fix x) x)))
Function:
(defun smtlink-config-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (smtlink-config-p acl2::x) (smtlink-config-p acl2::y)))) (equal (smtlink-config-fix acl2::x) (smtlink-config-fix acl2::y)))
Theorem:
(defthm smtlink-config-equiv-is-an-equivalence (and (booleanp (smtlink-config-equiv x y)) (smtlink-config-equiv x x) (implies (smtlink-config-equiv x y) (smtlink-config-equiv y x)) (implies (and (smtlink-config-equiv x y) (smtlink-config-equiv y z)) (smtlink-config-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm smtlink-config-equiv-implies-equal-smtlink-config-fix-1 (implies (smtlink-config-equiv acl2::x x-equiv) (equal (smtlink-config-fix acl2::x) (smtlink-config-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm smtlink-config-fix-under-smtlink-config-equiv (smtlink-config-equiv (smtlink-config-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-smtlink-config-fix-1-forward-to-smtlink-config-equiv (implies (equal (smtlink-config-fix acl2::x) acl2::y) (smtlink-config-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-smtlink-config-fix-2-forward-to-smtlink-config-equiv (implies (equal acl2::x (smtlink-config-fix acl2::y)) (smtlink-config-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm smtlink-config-equiv-of-smtlink-config-fix-1-forward (implies (smtlink-config-equiv (smtlink-config-fix acl2::x) acl2::y) (smtlink-config-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm smtlink-config-equiv-of-smtlink-config-fix-2-forward (implies (smtlink-config-equiv acl2::x (smtlink-config-fix acl2::y)) (smtlink-config-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Function:
(defun smtlink-config->interface-dir$inline (x) (declare (xargs :guard (smtlink-config-p x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config->interface-dir)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x))) (str-fix (cdr (std::da-nth 0 x)))) :exec (cdr (std::da-nth 0 x)))))
Theorem:
(defthm stringp-of-smtlink-config->interface-dir (b* ((interface-dir (smtlink-config->interface-dir$inline x))) (stringp interface-dir)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->interface-dir$inline-of-smtlink-config-fix-x (equal (smtlink-config->interface-dir$inline (smtlink-config-fix x)) (smtlink-config->interface-dir$inline x)))
Theorem:
(defthm smtlink-config->interface-dir$inline-smtlink-config-equiv-congruence-on-x (implies (smtlink-config-equiv x x-equiv) (equal (smtlink-config->interface-dir$inline x) (smtlink-config->interface-dir$inline x-equiv))) :rule-classes :congruence)
Function:
(defun smtlink-config->smt-module$inline (x) (declare (xargs :guard (smtlink-config-p x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config->smt-module)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x))) (str-fix (cdr (std::da-nth 1 x)))) :exec (cdr (std::da-nth 1 x)))))
Theorem:
(defthm stringp-of-smtlink-config->smt-module (b* ((smt-module (smtlink-config->smt-module$inline x))) (stringp smt-module)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->smt-module$inline-of-smtlink-config-fix-x (equal (smtlink-config->smt-module$inline (smtlink-config-fix x)) (smtlink-config->smt-module$inline x)))
Theorem:
(defthm smtlink-config->smt-module$inline-smtlink-config-equiv-congruence-on-x (implies (smtlink-config-equiv x x-equiv) (equal (smtlink-config->smt-module$inline x) (smtlink-config->smt-module$inline x-equiv))) :rule-classes :congruence)
Function:
(defun smtlink-config->smt-class$inline (x) (declare (xargs :guard (smtlink-config-p x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config->smt-class)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x))) (str-fix (cdr (std::da-nth 2 x)))) :exec (cdr (std::da-nth 2 x)))))
Theorem:
(defthm stringp-of-smtlink-config->smt-class (b* ((smt-class (smtlink-config->smt-class$inline x))) (stringp smt-class)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->smt-class$inline-of-smtlink-config-fix-x (equal (smtlink-config->smt-class$inline (smtlink-config-fix x)) (smtlink-config->smt-class$inline x)))
Theorem:
(defthm smtlink-config->smt-class$inline-smtlink-config-equiv-congruence-on-x (implies (smtlink-config-equiv x x-equiv) (equal (smtlink-config->smt-class$inline x) (smtlink-config->smt-class$inline x-equiv))) :rule-classes :congruence)
Function:
(defun smtlink-config->smt-cmd$inline (x) (declare (xargs :guard (smtlink-config-p x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config->smt-cmd)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x))) (str-fix (cdr (std::da-nth 3 x)))) :exec (cdr (std::da-nth 3 x)))))
Theorem:
(defthm stringp-of-smtlink-config->smt-cmd (b* ((smt-cmd (smtlink-config->smt-cmd$inline x))) (stringp smt-cmd)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->smt-cmd$inline-of-smtlink-config-fix-x (equal (smtlink-config->smt-cmd$inline (smtlink-config-fix x)) (smtlink-config->smt-cmd$inline x)))
Theorem:
(defthm smtlink-config->smt-cmd$inline-smtlink-config-equiv-congruence-on-x (implies (smtlink-config-equiv x x-equiv) (equal (smtlink-config->smt-cmd$inline x) (smtlink-config->smt-cmd$inline x-equiv))) :rule-classes :congruence)
Function:
(defun smtlink-config->pythonpath$inline (x) (declare (xargs :guard (smtlink-config-p x))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config->pythonpath)) (declare (ignorable acl2::__function__)) (mbe :logic (b* ((x (and t x))) (str-fix (cdr (std::da-nth 4 x)))) :exec (cdr (std::da-nth 4 x)))))
Theorem:
(defthm stringp-of-smtlink-config->pythonpath (b* ((pythonpath (smtlink-config->pythonpath$inline x))) (stringp pythonpath)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->pythonpath$inline-of-smtlink-config-fix-x (equal (smtlink-config->pythonpath$inline (smtlink-config-fix x)) (smtlink-config->pythonpath$inline x)))
Theorem:
(defthm smtlink-config->pythonpath$inline-smtlink-config-equiv-congruence-on-x (implies (smtlink-config-equiv x x-equiv) (equal (smtlink-config->pythonpath$inline x) (smtlink-config->pythonpath$inline x-equiv))) :rule-classes :congruence)
Function:
(defun smtlink-config (interface-dir smt-module smt-class smt-cmd pythonpath) (declare (xargs :guard (and (stringp interface-dir) (stringp smt-module) (stringp smt-class) (stringp smt-cmd) (stringp pythonpath)))) (declare (xargs :guard t)) (let ((acl2::__function__ 'smtlink-config)) (declare (ignorable acl2::__function__)) (b* ((interface-dir (mbe :logic (str-fix interface-dir) :exec interface-dir)) (smt-module (mbe :logic (str-fix smt-module) :exec smt-module)) (smt-class (mbe :logic (str-fix smt-class) :exec smt-class)) (smt-cmd (mbe :logic (str-fix smt-cmd) :exec smt-cmd)) (pythonpath (mbe :logic (str-fix pythonpath) :exec pythonpath))) (list (cons 'interface-dir interface-dir) (cons 'smt-module smt-module) (cons 'smt-class smt-class) (cons 'smt-cmd smt-cmd) (cons 'pythonpath pythonpath)))))
Theorem:
(defthm smtlink-config-p-of-smtlink-config (b* ((x (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath))) (smtlink-config-p x)) :rule-classes :rewrite)
Theorem:
(defthm smtlink-config->interface-dir-of-smtlink-config (equal (smtlink-config->interface-dir (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)) (str-fix interface-dir)))
Theorem:
(defthm smtlink-config->smt-module-of-smtlink-config (equal (smtlink-config->smt-module (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)) (str-fix smt-module)))
Theorem:
(defthm smtlink-config->smt-class-of-smtlink-config (equal (smtlink-config->smt-class (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)) (str-fix smt-class)))
Theorem:
(defthm smtlink-config->smt-cmd-of-smtlink-config (equal (smtlink-config->smt-cmd (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)) (str-fix smt-cmd)))
Theorem:
(defthm smtlink-config->pythonpath-of-smtlink-config (equal (smtlink-config->pythonpath (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)) (str-fix pythonpath)))
Theorem:
(defthm smtlink-config-of-fields (equal (smtlink-config (smtlink-config->interface-dir x) (smtlink-config->smt-module x) (smtlink-config->smt-class x) (smtlink-config->smt-cmd x) (smtlink-config->pythonpath x)) (smtlink-config-fix x)))
Theorem:
(defthm smtlink-config-fix-when-smtlink-config (equal (smtlink-config-fix x) (smtlink-config (smtlink-config->interface-dir x) (smtlink-config->smt-module x) (smtlink-config->smt-class x) (smtlink-config->smt-cmd x) (smtlink-config->pythonpath x))))
Theorem:
(defthm equal-of-smtlink-config (equal (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) x) (and (smtlink-config-p x) (equal (smtlink-config->interface-dir x) (str-fix interface-dir)) (equal (smtlink-config->smt-module x) (str-fix smt-module)) (equal (smtlink-config->smt-class x) (str-fix smt-class)) (equal (smtlink-config->smt-cmd x) (str-fix smt-cmd)) (equal (smtlink-config->pythonpath x) (str-fix pythonpath)))))
Theorem:
(defthm smtlink-config-of-str-fix-interface-dir (equal (smtlink-config (str-fix interface-dir) smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)))
Theorem:
(defthm smtlink-config-streqv-congruence-on-interface-dir (implies (acl2::streqv interface-dir interface-dir-equiv) (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir-equiv smt-module smt-class smt-cmd pythonpath))) :rule-classes :congruence)
Theorem:
(defthm smtlink-config-of-str-fix-smt-module (equal (smtlink-config interface-dir (str-fix smt-module) smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)))
Theorem:
(defthm smtlink-config-streqv-congruence-on-smt-module (implies (acl2::streqv smt-module smt-module-equiv) (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module-equiv smt-class smt-cmd pythonpath))) :rule-classes :congruence)
Theorem:
(defthm smtlink-config-of-str-fix-smt-class (equal (smtlink-config interface-dir smt-module (str-fix smt-class) smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)))
Theorem:
(defthm smtlink-config-streqv-congruence-on-smt-class (implies (acl2::streqv smt-class smt-class-equiv) (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class-equiv smt-cmd pythonpath))) :rule-classes :congruence)
Theorem:
(defthm smtlink-config-of-str-fix-smt-cmd (equal (smtlink-config interface-dir smt-module smt-class (str-fix smt-cmd) pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)))
Theorem:
(defthm smtlink-config-streqv-congruence-on-smt-cmd (implies (acl2::streqv smt-cmd smt-cmd-equiv) (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd-equiv pythonpath))) :rule-classes :congruence)
Theorem:
(defthm smtlink-config-of-str-fix-pythonpath (equal (smtlink-config interface-dir smt-module smt-class smt-cmd (str-fix pythonpath)) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath)))
Theorem:
(defthm smtlink-config-streqv-congruence-on-pythonpath (implies (acl2::streqv pythonpath pythonpath-equiv) (equal (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath) (smtlink-config interface-dir smt-module smt-class smt-cmd pythonpath-equiv))) :rule-classes :congruence)
Theorem:
(defthm smtlink-config-fix-redef (equal (smtlink-config-fix x) (smtlink-config (smtlink-config->interface-dir x) (smtlink-config->smt-module x) (smtlink-config->smt-class x) (smtlink-config->smt-cmd x) (smtlink-config->pythonpath x))) :rule-classes :definition)
Theorem:
(defthm smtlink-config-p-of-custom-smt-cnf (smtlink-config-p (custom-smt-cnf)))
Function:
(defun default-smtlink-config nil (declare (xargs :guard t)) (let ((acl2::__function__ 'default-smtlink-config)) (declare (ignorable acl2::__function__)) (change-smtlink-config *default-smtlink-config*)))
Function:
(defun string-string-alistp (x) (declare (xargs :guard t)) (let ((acl2::__function__ 'string-string-alistp)) (declare (ignorable acl2::__function__)) (if (atom x) (eq x nil) (and (consp (car x)) (stringp (caar x)) (stringp (cdar x)) (string-string-alistp (cdr x))))))
Theorem:
(defthm string-string-alistp-of-revappend (equal (string-string-alistp (revappend acl2::x acl2::y)) (and (string-string-alistp (acl2::list-fix acl2::x)) (string-string-alistp acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-remove (implies (string-string-alistp acl2::x) (string-string-alistp (remove acl2::a acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-last (implies (string-string-alistp (double-rewrite acl2::x)) (string-string-alistp (last acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-nthcdr (implies (string-string-alistp (double-rewrite acl2::x)) (string-string-alistp (nthcdr acl2::n acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-butlast (implies (string-string-alistp (double-rewrite acl2::x)) (string-string-alistp (butlast acl2::x acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-update-nth (implies (string-string-alistp (double-rewrite acl2::x)) (iff (string-string-alistp (update-nth acl2::n acl2::y acl2::x)) (and (and (consp acl2::y) (stringp (car acl2::y)) (stringp (cdr acl2::y))) (or (<= (nfix acl2::n) (len acl2::x)) (and (consp nil) (stringp (car nil)) (stringp (cdr nil))))))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-repeat (iff (string-string-alistp (acl2::repeat acl2::n acl2::x)) (or (and (consp acl2::x) (stringp (car acl2::x)) (stringp (cdr acl2::x))) (zp acl2::n))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-take (implies (string-string-alistp (double-rewrite acl2::x)) (iff (string-string-alistp (take acl2::n acl2::x)) (or (and (consp nil) (stringp (car nil)) (stringp (cdr nil))) (<= (nfix acl2::n) (len acl2::x))))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-union-equal (equal (string-string-alistp (union-equal acl2::x acl2::y)) (and (string-string-alistp (acl2::list-fix acl2::x)) (string-string-alistp (double-rewrite acl2::y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-intersection-equal-2 (implies (string-string-alistp (double-rewrite acl2::y)) (string-string-alistp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-intersection-equal-1 (implies (string-string-alistp (double-rewrite acl2::x)) (string-string-alistp (intersection-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-set-difference-equal (implies (string-string-alistp acl2::x) (string-string-alistp (set-difference-equal acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-when-subsetp-equal (and (implies (and (subsetp-equal acl2::x acl2::y) (string-string-alistp acl2::y)) (equal (string-string-alistp acl2::x) (true-listp acl2::x))) (implies (and (string-string-alistp acl2::y) (subsetp-equal acl2::x acl2::y)) (equal (string-string-alistp acl2::x) (true-listp acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-rcons (iff (string-string-alistp (acl2::rcons acl2::a acl2::x)) (and (and (consp acl2::a) (stringp (car acl2::a)) (stringp (cdr acl2::a))) (string-string-alistp (acl2::list-fix acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-append (equal (string-string-alistp (append acl2::a acl2::b)) (and (string-string-alistp (acl2::list-fix acl2::a)) (string-string-alistp acl2::b))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-rev (equal (string-string-alistp (acl2::rev acl2::x)) (string-string-alistp (acl2::list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-duplicated-members (implies (string-string-alistp acl2::x) (string-string-alistp (acl2::duplicated-members acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-difference (implies (string-string-alistp acl2::x) (string-string-alistp (set::difference acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-intersect-2 (implies (string-string-alistp acl2::y) (string-string-alistp (set::intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-intersect-1 (implies (string-string-alistp acl2::x) (string-string-alistp (set::intersect acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-union (iff (string-string-alistp (set::union acl2::x acl2::y)) (and (string-string-alistp (set::sfix acl2::x)) (string-string-alistp (set::sfix acl2::y)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-mergesort (iff (string-string-alistp (set::mergesort acl2::x)) (string-string-alistp (acl2::list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-delete (implies (string-string-alistp acl2::x) (string-string-alistp (set::delete acl2::k acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-insert (iff (string-string-alistp (set::insert acl2::a acl2::x)) (and (string-string-alistp (set::sfix acl2::x)) (and (consp acl2::a) (stringp (car acl2::a)) (stringp (cdr acl2::a))))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-sfix (iff (string-string-alistp (set::sfix acl2::x)) (or (string-string-alistp acl2::x) (not (set::setp acl2::x)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-list-fix (implies (string-string-alistp acl2::x) (string-string-alistp (acl2::list-fix acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm true-listp-when-string-string-alistp-compound-recognizer (implies (string-string-alistp acl2::x) (true-listp acl2::x)) :rule-classes :compound-recognizer)
Theorem:
(defthm string-string-alistp-when-not-consp (implies (not (consp acl2::x)) (equal (string-string-alistp acl2::x) (not acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-cdr-when-string-string-alistp (implies (string-string-alistp (double-rewrite acl2::x)) (string-string-alistp (cdr acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-cons (equal (string-string-alistp (cons acl2::a acl2::x)) (and (and (consp acl2::a) (stringp (car acl2::a)) (stringp (cdr acl2::a))) (string-string-alistp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-remove-assoc (implies (string-string-alistp acl2::x) (string-string-alistp (remove-assoc-equal acl2::name acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-put-assoc (implies (and (string-string-alistp acl2::x)) (iff (string-string-alistp (put-assoc-equal acl2::name acl2::val acl2::x)) (and (stringp acl2::name) (stringp acl2::val)))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-fast-alist-clean (implies (string-string-alistp acl2::x) (string-string-alistp (fast-alist-clean acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-hons-shrink-alist (implies (and (string-string-alistp acl2::x) (string-string-alistp acl2::y)) (string-string-alistp (hons-shrink-alist acl2::x acl2::y))) :rule-classes ((:rewrite)))
Theorem:
(defthm string-string-alistp-of-hons-acons (equal (string-string-alistp (hons-acons acl2::a acl2::n acl2::x)) (and (stringp acl2::a) (stringp acl2::n) (string-string-alistp acl2::x))) :rule-classes ((:rewrite)))
Theorem:
(defthm stringp-of-cdr-of-hons-assoc-equal-when-string-string-alistp (implies (string-string-alistp acl2::x) (iff (stringp (cdr (hons-assoc-equal acl2::k acl2::x))) (or (hons-assoc-equal acl2::k acl2::x) (stringp nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-string-string-alistp-rewrite (implies (string-string-alistp acl2::x) (alistp acl2::x)) :rule-classes ((:rewrite)))
Theorem:
(defthm alistp-when-string-string-alistp (implies (string-string-alistp acl2::x) (alistp acl2::x)) :rule-classes :tau-system)
Theorem:
(defthm stringp-of-cdar-when-string-string-alistp (implies (string-string-alistp acl2::x) (iff (stringp (cdar acl2::x)) (or (consp acl2::x) (stringp nil)))) :rule-classes ((:rewrite)))
Theorem:
(defthm stringp-of-caar-when-string-string-alistp (implies (string-string-alistp acl2::x) (iff (stringp (caar acl2::x)) (or (consp acl2::x) (stringp nil)))) :rule-classes ((:rewrite)))
Function:
(defun string-string-alist-fix$inline (x) (declare (xargs :guard (string-string-alistp x))) (let ((acl2::__function__ 'string-string-alist-fix)) (declare (ignorable acl2::__function__)) (mbe :logic (if (atom x) nil (if (consp (car x)) (cons (cons (str-fix (caar x)) (str-fix (cdar x))) (string-string-alist-fix (cdr x))) (string-string-alist-fix (cdr x)))) :exec x)))
Theorem:
(defthm string-string-alistp-of-string-string-alist-fix (b* ((fty::newx (string-string-alist-fix$inline x))) (string-string-alistp fty::newx)) :rule-classes :rewrite)
Theorem:
(defthm string-string-alist-fix-when-string-string-alistp (implies (string-string-alistp x) (equal (string-string-alist-fix x) x)))
Function:
(defun string-string-alist-equiv$inline (acl2::x acl2::y) (declare (xargs :guard (and (string-string-alistp acl2::x) (string-string-alistp acl2::y)))) (equal (string-string-alist-fix acl2::x) (string-string-alist-fix acl2::y)))
Theorem:
(defthm string-string-alist-equiv-is-an-equivalence (and (booleanp (string-string-alist-equiv x y)) (string-string-alist-equiv x x) (implies (string-string-alist-equiv x y) (string-string-alist-equiv y x)) (implies (and (string-string-alist-equiv x y) (string-string-alist-equiv y z)) (string-string-alist-equiv x z))) :rule-classes (:equivalence))
Theorem:
(defthm string-string-alist-equiv-implies-equal-string-string-alist-fix-1 (implies (string-string-alist-equiv acl2::x x-equiv) (equal (string-string-alist-fix acl2::x) (string-string-alist-fix x-equiv))) :rule-classes (:congruence))
Theorem:
(defthm string-string-alist-fix-under-string-string-alist-equiv (string-string-alist-equiv (string-string-alist-fix acl2::x) acl2::x) :rule-classes (:rewrite :rewrite-quoted-constant))
Theorem:
(defthm equal-of-string-string-alist-fix-1-forward-to-string-string-alist-equiv (implies (equal (string-string-alist-fix acl2::x) acl2::y) (string-string-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm equal-of-string-string-alist-fix-2-forward-to-string-string-alist-equiv (implies (equal acl2::x (string-string-alist-fix acl2::y)) (string-string-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm string-string-alist-equiv-of-string-string-alist-fix-1-forward (implies (string-string-alist-equiv (string-string-alist-fix acl2::x) acl2::y) (string-string-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm string-string-alist-equiv-of-string-string-alist-fix-2-forward (implies (string-string-alist-equiv acl2::x (string-string-alist-fix acl2::y)) (string-string-alist-equiv acl2::x acl2::y)) :rule-classes :forward-chaining)
Theorem:
(defthm cons-of-str-fix-k-under-string-string-alist-equiv (string-string-alist-equiv (cons (cons (str-fix acl2::k) acl2::v) acl2::x) (cons (cons acl2::k acl2::v) acl2::x)))
Theorem:
(defthm cons-streqv-congruence-on-k-under-string-string-alist-equiv (implies (acl2::streqv acl2::k k-equiv) (string-string-alist-equiv (cons (cons acl2::k acl2::v) acl2::x) (cons (cons k-equiv acl2::v) acl2::x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-str-fix-v-under-string-string-alist-equiv (string-string-alist-equiv (cons (cons acl2::k (str-fix acl2::v)) acl2::x) (cons (cons acl2::k acl2::v) acl2::x)))
Theorem:
(defthm cons-streqv-congruence-on-v-under-string-string-alist-equiv (implies (acl2::streqv acl2::v v-equiv) (string-string-alist-equiv (cons (cons acl2::k acl2::v) acl2::x) (cons (cons acl2::k v-equiv) acl2::x))) :rule-classes :congruence)
Theorem:
(defthm cons-of-string-string-alist-fix-y-under-string-string-alist-equiv (string-string-alist-equiv (cons acl2::x (string-string-alist-fix acl2::y)) (cons acl2::x acl2::y)))
Theorem:
(defthm cons-string-string-alist-equiv-congruence-on-y-under-string-string-alist-equiv (implies (string-string-alist-equiv acl2::y y-equiv) (string-string-alist-equiv (cons acl2::x acl2::y) (cons acl2::x y-equiv))) :rule-classes :congruence)
Theorem:
(defthm string-string-alist-fix-of-acons (equal (string-string-alist-fix (cons (cons acl2::a acl2::b) x)) (cons (cons (str-fix acl2::a) (str-fix acl2::b)) (string-string-alist-fix x))))
Theorem:
(defthm string-string-alist-fix-of-append (equal (string-string-alist-fix (append std::a std::b)) (append (string-string-alist-fix std::a) (string-string-alist-fix std::b))))
Theorem:
(defthm consp-car-of-string-string-alist-fix (equal (consp (car (string-string-alist-fix x))) (consp (string-string-alist-fix x))))
Function:
(defun check-valid-option (option value) (declare (xargs :guard (and (stringp option) (stringp value)))) (let ((acl2::__function__ 'check-valid-option)) (declare (ignorable acl2::__function__)) (b* (((unless (or (equal option "interface-dir") (equal option "smt-module") (equal option "smt-class") (equal option "smt-cmd") (equal option "pythonpath"))) nil)) t)))
Theorem:
(defthm booleanp-of-check-valid-option (b* ((valid? (check-valid-option option value))) (booleanp valid?)) :rule-classes :rewrite)
Function:
(defun extract-=-left-and-right (lines) (declare (xargs :guard (string-listp lines))) (let ((acl2::__function__ 'extract-=-left-and-right)) (declare (ignorable acl2::__function__)) (b* ((lines (str::string-list-fix lines)) ((unless (consp lines)) nil) ((cons first rest) lines) (extracted-line (strtok first (list #\=))) ((unless (and (consp extracted-line) (endp (cddr extracted-line)) (stringp (car extracted-line)) (stringp (cadr extracted-line)))) (er hard? 'smt-config=>extract-=-left-and-right "Smtlink-config wrong ~ format!~%~q0" first)) ((list option value &) extracted-line) ((unless (check-valid-option option value)) (er hard? 'smt-config=>extract-=-left-and-right "There's something wrong with the configuration setup in smtlink-config."))) (cons (cons (car extracted-line) (cadr extracted-line)) (extract-=-left-and-right rest)))))
Theorem:
(defthm string-string-alistp-of-extract-=-left-and-right (b* ((config-alist (extract-=-left-and-right lines))) (string-string-alistp config-alist)) :rule-classes :rewrite)
Function:
(defun process-config (config-str) (declare (xargs :guard (stringp config-str))) (let ((acl2::__function__ 'process-config)) (declare (ignorable acl2::__function__)) (b* ((lines (strtok config-str (list #\Newline))) (config-alist (extract-=-left-and-right lines))) config-alist)))
Theorem:
(defthm string-string-alistp-of-process-config (b* ((config-alist (process-config config-str))) (string-string-alistp config-alist)) :rule-classes :rewrite)
Function:
(defun change-smt-cnf (config-alist default-cnf) (declare (xargs :guard (and (string-string-alistp config-alist) (smtlink-config-p default-cnf)))) (let ((acl2::__function__ 'change-smt-cnf)) (declare (ignorable acl2::__function__)) (b* ((config-alist (string-string-alist-fix config-alist)) (default-cnf (smtlink-config-fix default-cnf)) ((unless (consp config-alist)) default-cnf) ((cons first rest) config-alist) ((cons option value) first) (new-cnf (cond ((equal option "smt-cmd") (change-smtlink-config default-cnf :smt-cmd value)) (t default-cnf)))) (change-smt-cnf rest new-cnf))))
Theorem:
(defthm smtlink-config-p-of-change-smt-cnf (b* ((smt-cnf (change-smt-cnf config-alist default-cnf))) (smtlink-config-p smt-cnf)) :rule-classes :rewrite)
Function:
(defun file-exists (smtconfig dir state) (declare (xargs :stobjs (state))) (declare (xargs :guard (and (stringp smtconfig) (stringp dir)))) (let ((acl2::__function__ 'file-exists)) (declare (ignorable acl2::__function__)) (b* ((cmd (concatenate 'string "test -f " dir "/" smtconfig)) ((mv exit-status & state) (time$ (tshell-call cmd :print t :save t) :msg "; test -f: `~s0`: ~st sec, ~sa bytes~%" :args (list cmd)))) (if (equal exit-status 0) (mv t state) (mv nil state)))))
Theorem:
(defthm booleanp-of-file-exists.exist? (b* (((mv ?exist? acl2::?state) (file-exists smtconfig dir state))) (booleanp exist?)) :rule-classes :rewrite)
Function:
(defun find-smtlink-config (smtconfig state) (declare (xargs :stobjs (state))) (declare (xargs :guard (stringp smtconfig))) (let ((acl2::__function__ 'find-smtlink-config)) (declare (ignorable acl2::__function__)) (b* (((mv & smt_home state) (getenv$ "SMT_HOME" state)) ((mv exists-in-smt_home state) (if (stringp smt_home) (file-exists smtconfig smt_home state) (mv nil state))) ((if exists-in-smt_home) (prog2$ (cw "Reading smtlink-config from $SMT_HOME...~%") (mv smt_home state))) ((mv & home state) (getenv$ "HOME" state)) ((mv exists-in-home state) (if (stringp home) (file-exists smtconfig home state) (mv nil state))) ((if exists-in-home) (prog2$ (cw "Reading smtlink-config from $HOME...~%") (mv home state))) ((mv & smtlink-pwd state) (getenv$ "PWD" state)) ((mv exists-in-smtlink-pwd state) (if (stringp smtlink-pwd) (file-exists smtconfig smtlink-pwd state) (mv nil state))) ((if exists-in-smtlink-pwd) (prog2$ (cw "Reading smtlink-config from Smtlink directory...~%") (mv smtlink-pwd state)))) (mv (prog2$ (er hard? 'smt-config=>find-smtlink-config "Failed to find smtlink-config.~%") "") state))))
Theorem:
(defthm stringp-of-find-smtlink-config.dir (b* (((mv ?dir acl2::?state) (find-smtlink-config smtconfig state))) (stringp dir)) :rule-classes :rewrite)
Function:
(defun default-smt-cnf nil (declare (xargs :guard t)) (let ((acl2::__function__ 'default-smt-cnf)) (declare (ignorable acl2::__function__)) *smt-cnf*))