• 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
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
          • Svstmt-case
          • Svstmt-while
          • Svstmt-p
          • Svstmt-if
          • Svstmt-equiv
          • Svstmt-xcond
          • Svstmt-scope
          • Svstmt-assign
          • Svstmt-compile
            • Svstmt-compile.lisp
              • Svstate-merge-branches
              • Svex-alist-merge-branches
              • Svstmt-assign->subst
              • Svstack-merge-branches
              • Svstacks-compatible
              • Svjumpstate-merge-svstate-branches
              • Svjumpstate-svstate-compatible
              • Svstmt-lhs-check-masks
              • Svjumpstate
              • Svjumpstates-compatible
              • Svstmtlist-compile-top
              • Svjumpstate-sequence-svstates
              • Constraintlist-merge-branches
              • Svjumpstate-merge-branches
              • Svex-replace-range
              • Svex-svstmt-ite
              • Svstmt-process-write
              • Svjumpstate-sequence
              • Svstmt-process-writelist
              • Svstack-assign
              • Svstmt-writelist-var-sizes
              • Svstates-compatible
              • 4vec-replace-range
              • Svstmt-write-var-sizes
              • Make-empty-svjumpstate
              • Constraintlist-add-pathcond
              • Svjumpstate-pop-scope
              • Constraintlist-compose-svstack
              • Svstack-to-svex-alist
              • Svstack-filter-global-lhs-vars
              • Svjumpstate-vars
              • Svex-svstmt-or
              • Svex-svstmt-andc1
              • Svstate-push-scope
              • Svstate-pop-scope
              • Svstate-vars
              • Svstack-lookup
              • Svar-subtract-delay
              • Svstmt-initialize-locals
              • Svstack-fork
              • Svstack-clean
              • Svstack-nonempty-fix
              • Svstate-fork
              • Svstate-clean
              • Svstack-globalp
              • Svjumpstate-fork
              • Svar-delayed-member
              • Svjumpstate-levels
              • Svjumpstate-free
              • Svstate-free
              • Svstack-free
              • Svstack
              • Svar-size-alist
                • Svar-size-alist-p
                • Svar-size-alist-fix
                  • Svar-size-alist-equiv
              • Svstate
            • Svstmt-constraints
            • Svstmt-jump
            • Svstmtlist
            • Svstmt-kind
            • Svstmt.lisp
            • Svstmt-fix
            • Svstmt-count
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svar-size-alist

    Svar-size-alist-fix

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

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

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

    Definitions and Theorems

    Function: svar-size-alist-fix$inline

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

    Theorem: svar-size-alist-p-of-svar-size-alist-fix

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

    Theorem: svar-size-alist-fix-when-svar-size-alist-p

    (defthm svar-size-alist-fix-when-svar-size-alist-p
      (implies (svar-size-alist-p x)
               (equal (svar-size-alist-fix x) x)))

    Function: svar-size-alist-equiv$inline

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

    Theorem: svar-size-alist-equiv-is-an-equivalence

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

    Theorem: svar-size-alist-equiv-implies-equal-svar-size-alist-fix-1

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

    Theorem: svar-size-alist-fix-under-svar-size-alist-equiv

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

    Theorem: equal-of-svar-size-alist-fix-1-forward-to-svar-size-alist-equiv

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

    Theorem: equal-of-svar-size-alist-fix-2-forward-to-svar-size-alist-equiv

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

    Theorem: svar-size-alist-equiv-of-svar-size-alist-fix-1-forward

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

    Theorem: svar-size-alist-equiv-of-svar-size-alist-fix-2-forward

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

    Theorem: cons-of-svar-fix-k-under-svar-size-alist-equiv

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

    Theorem: cons-svar-equiv-congruence-on-k-under-svar-size-alist-equiv

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

    Theorem: cons-of-nfix-v-under-svar-size-alist-equiv

    (defthm cons-of-nfix-v-under-svar-size-alist-equiv
      (svar-size-alist-equiv (cons (cons acl2::k (nfix acl2::v)) x)
                             (cons (cons acl2::k acl2::v) x)))

    Theorem: cons-nat-equiv-congruence-on-v-under-svar-size-alist-equiv

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

    Theorem: cons-of-svar-size-alist-fix-y-under-svar-size-alist-equiv

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

    Theorem: cons-svar-size-alist-equiv-congruence-on-y-under-svar-size-alist-equiv

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

    Theorem: svar-size-alist-fix-of-acons

    (defthm svar-size-alist-fix-of-acons
      (equal (svar-size-alist-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (svar-fix acl2::a) (nfix acl2::b))
                   (svar-size-alist-fix x))))

    Theorem: svar-size-alist-fix-of-append

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

    Theorem: consp-car-of-svar-size-alist-fix

    (defthm consp-car-of-svar-size-alist-fix
      (equal (consp (car (svar-size-alist-fix x)))
             (consp (svar-size-alist-fix x))))