• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
              • Svex-alist-alist-p
              • Svex-alist-alist-fix
                • Svex-alist-alist-equiv
              • Svdecomp-symenv
              • 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
    • Svex-alist-alist

    Svex-alist-alist-fix

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

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

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

    Definitions and Theorems

    Function: svex-alist-alist-fix$inline

    (defun svex-alist-alist-fix$inline (x)
      (declare (xargs :guard (svex-alist-alist-p x)))
      (let ((__function__ 'svex-alist-alist-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 x
               (if (consp (car x))
                   (cons (cons (caar x)
                               (svex-alist-fix (cdar x)))
                         (svex-alist-alist-fix (cdr x)))
                 (svex-alist-alist-fix (cdr x))))
             :exec x)))

    Theorem: svex-alist-alist-p-of-svex-alist-alist-fix

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

    Theorem: svex-alist-alist-fix-when-svex-alist-alist-p

    (defthm svex-alist-alist-fix-when-svex-alist-alist-p
      (implies (svex-alist-alist-p x)
               (equal (svex-alist-alist-fix x) x)))

    Function: svex-alist-alist-equiv$inline

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

    Theorem: svex-alist-alist-equiv-is-an-equivalence

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

    Theorem: svex-alist-alist-equiv-implies-equal-svex-alist-alist-fix-1

    (defthm svex-alist-alist-equiv-implies-equal-svex-alist-alist-fix-1
      (implies (svex-alist-alist-equiv x x-equiv)
               (equal (svex-alist-alist-fix x)
                      (svex-alist-alist-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svex-alist-alist-fix-under-svex-alist-alist-equiv

    (defthm svex-alist-alist-fix-under-svex-alist-alist-equiv
      (svex-alist-alist-equiv (svex-alist-alist-fix x)
                              x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svex-alist-alist-fix-1-forward-to-svex-alist-alist-equiv

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

    Theorem: equal-of-svex-alist-alist-fix-2-forward-to-svex-alist-alist-equiv

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

    Theorem: svex-alist-alist-equiv-of-svex-alist-alist-fix-1-forward

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

    Theorem: svex-alist-alist-equiv-of-svex-alist-alist-fix-2-forward

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

    Theorem: cons-of-svex-alist-fix-v-under-svex-alist-alist-equiv

    (defthm cons-of-svex-alist-fix-v-under-svex-alist-alist-equiv
      (svex-alist-alist-equiv
           (cons (cons acl2::k (svex-alist-fix acl2::v))
                 x)
           (cons (cons acl2::k acl2::v) x)))

    Theorem: cons-svex-alist-equiv-congruence-on-v-under-svex-alist-alist-equiv

    (defthm
     cons-svex-alist-equiv-congruence-on-v-under-svex-alist-alist-equiv
     (implies (svex-alist-equiv acl2::v v-equiv)
              (svex-alist-alist-equiv (cons (cons acl2::k acl2::v) x)
                                      (cons (cons acl2::k v-equiv) x)))
     :rule-classes :congruence)

    Theorem: cons-of-svex-alist-alist-fix-y-under-svex-alist-alist-equiv

    (defthm cons-of-svex-alist-alist-fix-y-under-svex-alist-alist-equiv
      (svex-alist-alist-equiv (cons x (svex-alist-alist-fix y))
                              (cons x y)))

    Theorem: cons-svex-alist-alist-equiv-congruence-on-y-under-svex-alist-alist-equiv

    (defthm
     cons-svex-alist-alist-equiv-congruence-on-y-under-svex-alist-alist-equiv
     (implies (svex-alist-alist-equiv y y-equiv)
              (svex-alist-alist-equiv (cons x y)
                                      (cons x y-equiv)))
     :rule-classes :congruence)

    Theorem: svex-alist-alist-fix-of-acons

    (defthm svex-alist-alist-fix-of-acons
      (equal (svex-alist-alist-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons acl2::a (svex-alist-fix acl2::b))
                   (svex-alist-alist-fix x))))

    Theorem: svex-alist-alist-fix-of-append

    (defthm svex-alist-alist-fix-of-append
      (equal (svex-alist-alist-fix (append std::a std::b))
             (append (svex-alist-alist-fix std::a)
                     (svex-alist-alist-fix std::b))))

    Theorem: consp-car-of-svex-alist-alist-fix

    (defthm consp-car-of-svex-alist-alist-fix
      (equal (consp (car (svex-alist-alist-fix x)))
             (consp (svex-alist-alist-fix x))))