• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
          • Decomp.lisp
            • Svex-env-compat-union
            • Svdecomp-symenv-compat-union
            • Svexlists-rewrite-until-same
            • Svdecomp-normalize-svexlist-eval
            • Svex-decomp-process-env-term
            • Map-alist-term-keys-to-val-terms
            • Envmap-extract-union-env
            • Alist-collect-compositions
            • Envmap-entry-extract-env
            • Svdecomp-env-extract
            • Svex-alist-evaluation-to-symenv
            • Envmap-entry-to-term-alist
            • Svar-lookup
            • Svar-alist-keys
            • Map-alist-const-keys-to-val-terms
            • Svdecomp-svex?-eval-compare-term
            • Svdecomp-equal-svex-evals-metafun
            • Svdecomp-equal-svex-alist-evals-metafun
            • Envmap->svex-alist
            • Envmap-to-term-alist
            • Svdecomp-equal-svexlist-evals-metafun
            • Pseudo-term-fix
            • Svdecomp-symenv->term
            • Svdecomp-svex-alist-eval-metafun
            • Svdecomp-ev-symenv
            • Svdecomp-svexlist-eval-metafun
            • Svdecomp-svex-eval-metafun
            • Svdecomp-ev-envmap
            • Envmap
            • Svex-alist-alist
            • Svdecomp-symenv
              • Svdecomp-symenv-p
              • Svdecomp-symenv-fix
                • Svdecomp-symenv-equiv
              • Svdecomp-get-rewrite-limit
            • Svdecomp-hints
          • Svex-compose-dfs
          • Svex-compilation
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svdecomp-symenv

    Svdecomp-symenv-fix

    (svdecomp-symenv-fix x) is an fty alist fixing function that follows the drop-keys strategy.

    Signature
    (svdecomp-symenv-fix x) → fty::newx
    Arguments
    x — Guard (svdecomp-symenv-p x).
    Returns
    fty::newx — Type (svdecomp-symenv-p fty::newx).

    Note that in the execution this is just an inline identity function.

    Definitions and Theorems

    Function: svdecomp-symenv-fix$inline

    (defun svdecomp-symenv-fix$inline (x)
      (declare (xargs :guard (svdecomp-symenv-p x)))
      (let ((__function__ 'svdecomp-symenv-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (let ((rest (svdecomp-symenv-fix (cdr x))))
                 (if (and (consp (car x)) (svar-p (caar x)))
                     (let ((fty::first-key (caar x))
                           (fty::first-val (pseudo-term-fix (cdar x))))
                       (cons (cons fty::first-key fty::first-val)
                             rest))
                   rest)))
             :exec x)))

    Theorem: svdecomp-symenv-p-of-svdecomp-symenv-fix

    (defthm svdecomp-symenv-p-of-svdecomp-symenv-fix
      (b* ((fty::newx (svdecomp-symenv-fix$inline x)))
        (svdecomp-symenv-p fty::newx))
      :rule-classes :rewrite)

    Theorem: svdecomp-symenv-fix-when-svdecomp-symenv-p

    (defthm svdecomp-symenv-fix-when-svdecomp-symenv-p
      (implies (svdecomp-symenv-p x)
               (equal (svdecomp-symenv-fix x) x)))

    Function: svdecomp-symenv-equiv$inline

    (defun svdecomp-symenv-equiv$inline (x y)
      (declare (xargs :guard (and (svdecomp-symenv-p x)
                                  (svdecomp-symenv-p y))))
      (equal (svdecomp-symenv-fix x)
             (svdecomp-symenv-fix y)))

    Theorem: svdecomp-symenv-equiv-is-an-equivalence

    (defthm svdecomp-symenv-equiv-is-an-equivalence
      (and (booleanp (svdecomp-symenv-equiv x y))
           (svdecomp-symenv-equiv x x)
           (implies (svdecomp-symenv-equiv x y)
                    (svdecomp-symenv-equiv y x))
           (implies (and (svdecomp-symenv-equiv x y)
                         (svdecomp-symenv-equiv y z))
                    (svdecomp-symenv-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: svdecomp-symenv-equiv-implies-equal-svdecomp-symenv-fix-1

    (defthm svdecomp-symenv-equiv-implies-equal-svdecomp-symenv-fix-1
      (implies (svdecomp-symenv-equiv x x-equiv)
               (equal (svdecomp-symenv-fix x)
                      (svdecomp-symenv-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svdecomp-symenv-fix-under-svdecomp-symenv-equiv

    (defthm svdecomp-symenv-fix-under-svdecomp-symenv-equiv
      (svdecomp-symenv-equiv (svdecomp-symenv-fix x)
                             x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svdecomp-symenv-fix-1-forward-to-svdecomp-symenv-equiv

    (defthm
        equal-of-svdecomp-symenv-fix-1-forward-to-svdecomp-symenv-equiv
      (implies (equal (svdecomp-symenv-fix x) y)
               (svdecomp-symenv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-svdecomp-symenv-fix-2-forward-to-svdecomp-symenv-equiv

    (defthm
        equal-of-svdecomp-symenv-fix-2-forward-to-svdecomp-symenv-equiv
      (implies (equal x (svdecomp-symenv-fix y))
               (svdecomp-symenv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: svdecomp-symenv-equiv-of-svdecomp-symenv-fix-1-forward

    (defthm svdecomp-symenv-equiv-of-svdecomp-symenv-fix-1-forward
      (implies (svdecomp-symenv-equiv (svdecomp-symenv-fix x)
                                      y)
               (svdecomp-symenv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: svdecomp-symenv-equiv-of-svdecomp-symenv-fix-2-forward

    (defthm svdecomp-symenv-equiv-of-svdecomp-symenv-fix-2-forward
      (implies (svdecomp-symenv-equiv x (svdecomp-symenv-fix y))
               (svdecomp-symenv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: cons-of-pseudo-term-fix-v-under-svdecomp-symenv-equiv

    (defthm cons-of-pseudo-term-fix-v-under-svdecomp-symenv-equiv
      (svdecomp-symenv-equiv
           (cons (cons acl2::k (pseudo-term-fix acl2::v))
                 x)
           (cons (cons acl2::k acl2::v) x)))

    Theorem: cons-pseudo-term-equiv-congruence-on-v-under-svdecomp-symenv-equiv

    (defthm
     cons-pseudo-term-equiv-congruence-on-v-under-svdecomp-symenv-equiv
     (implies (pseudo-term-equiv acl2::v v-equiv)
              (svdecomp-symenv-equiv (cons (cons acl2::k acl2::v) x)
                                     (cons (cons acl2::k v-equiv) x)))
     :rule-classes :congruence)

    Theorem: cons-of-svdecomp-symenv-fix-y-under-svdecomp-symenv-equiv

    (defthm cons-of-svdecomp-symenv-fix-y-under-svdecomp-symenv-equiv
      (svdecomp-symenv-equiv (cons x (svdecomp-symenv-fix y))
                             (cons x y)))

    Theorem: cons-svdecomp-symenv-equiv-congruence-on-y-under-svdecomp-symenv-equiv

    (defthm
     cons-svdecomp-symenv-equiv-congruence-on-y-under-svdecomp-symenv-equiv
     (implies (svdecomp-symenv-equiv y y-equiv)
              (svdecomp-symenv-equiv (cons x y)
                                     (cons x y-equiv)))
     :rule-classes :congruence)

    Theorem: svdecomp-symenv-fix-of-acons

    (defthm svdecomp-symenv-fix-of-acons
      (equal (svdecomp-symenv-fix (cons (cons acl2::a acl2::b) x))
             (let ((rest (svdecomp-symenv-fix x)))
               (if (and (svar-p acl2::a))
                   (let ((fty::first-key acl2::a)
                         (fty::first-val (pseudo-term-fix acl2::b)))
                     (cons (cons fty::first-key fty::first-val)
                           rest))
                 rest))))

    Theorem: hons-assoc-equal-of-svdecomp-symenv-fix

    (defthm hons-assoc-equal-of-svdecomp-symenv-fix
      (equal (hons-assoc-equal acl2::k (svdecomp-symenv-fix x))
             (let ((fty::pair (hons-assoc-equal acl2::k x)))
               (and (svar-p acl2::k)
                    fty::pair
                    (cons acl2::k
                          (pseudo-term-fix (cdr fty::pair)))))))

    Theorem: svdecomp-symenv-fix-of-append

    (defthm svdecomp-symenv-fix-of-append
      (equal (svdecomp-symenv-fix (append std::a std::b))
             (append (svdecomp-symenv-fix std::a)
                     (svdecomp-symenv-fix std::b))))

    Theorem: consp-car-of-svdecomp-symenv-fix

    (defthm consp-car-of-svdecomp-symenv-fix
      (equal (consp (car (svdecomp-symenv-fix x)))
             (consp (svdecomp-symenv-fix x))))