• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
          • Name-database
            • Vl-namedb
            • Vl-namedb-plain-name
            • Vl-namedb-pset-fix
            • Vl-namedb-plain-names
            • Vl-namedb-indexed-name
            • Vl-namedb-pmap-fix
            • Vl-unlike-any-prefix-p
            • Vl-namedb-pmap-okp
            • Vl-namedb-allnames
            • Vl-starting-namedb
            • Vl-pgenstr-highest
            • Vl-namedb-pset-okp
            • Vl-pgenstr-p
            • Vl-pgenstr->val
            • Vl-free-namedb
            • Vl-namedb-plain-name-quiet
            • Vl-pgenstr-highest-of-alist-keys
            • Vl-pgenstr
            • Vl-empty-namedb
            • Vl-namedb-nameset
            • Vl-unlike-any-prefix-p-of-alist-keys
            • Vl-namedb-prefixmap
              • Vl-namedb-prefixmap-p
              • Vl-namedb-prefixmap-fix
                • Vl-namedb-prefixmap-equiv
            • Vl-gc
            • Symbol-list-names
            • Ints-from
            • Nats-from
            • Make-lookup-alist
            • Redundant-mergesort
            • Longest-common-prefix
            • Vl-plural-p
            • Vl-remove-keys
            • Vl-merge-contiguous-indices
            • Vl-edition-p
            • Sum-nats
            • Vl-maybe-integer-listp
            • Fast-memberp
            • Nat-listp
            • Max-nats
            • Longest-common-prefix-list
            • Character-list-listp
            • Vl-character-list-list-values-p
            • Remove-from-alist
            • Prefix-of-eachp
            • Vl-string-keys-p
            • Vl-maybe-nat-listp
            • Vl-string-list-values-p
            • String-list-listp
            • Vl-string-values-p
            • True-list-listp
            • Symbol-list-listp
            • Explode-list
            • All-have-len
            • Pos-listp
            • Min-nats
            • Debuggable-and
            • Vl-starname
            • Remove-equal-without-guard
            • Vl-maybe-string-list
            • String-fix
            • Longer-than-p
            • Anyp
            • Fast-alist-free-each-alist-val
            • Not*
            • Free-list-of-fast-alists
            • *nls*
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-namedb-prefixmap

    Vl-namedb-prefixmap-fix

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

    Signature
    (vl-namedb-prefixmap-fix x) → fty::newx
    Arguments
    x — Guard (vl-namedb-prefixmap-p x).
    Returns
    fty::newx — Type (vl-namedb-prefixmap-p fty::newx).

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

    Definitions and Theorems

    Function: vl-namedb-prefixmap-fix$inline

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

    Theorem: vl-namedb-prefixmap-p-of-vl-namedb-prefixmap-fix

    (defthm vl-namedb-prefixmap-p-of-vl-namedb-prefixmap-fix
      (b* ((fty::newx (vl-namedb-prefixmap-fix$inline x)))
        (vl-namedb-prefixmap-p fty::newx))
      :rule-classes :rewrite)

    Theorem: vl-namedb-prefixmap-fix-when-vl-namedb-prefixmap-p

    (defthm vl-namedb-prefixmap-fix-when-vl-namedb-prefixmap-p
      (implies (vl-namedb-prefixmap-p x)
               (equal (vl-namedb-prefixmap-fix x) x)))

    Function: vl-namedb-prefixmap-equiv$inline

    (defun vl-namedb-prefixmap-equiv$inline (acl2::x acl2::y)
      (declare (xargs :guard (and (vl-namedb-prefixmap-p acl2::x)
                                  (vl-namedb-prefixmap-p acl2::y))))
      (equal (vl-namedb-prefixmap-fix acl2::x)
             (vl-namedb-prefixmap-fix acl2::y)))

    Theorem: vl-namedb-prefixmap-equiv-is-an-equivalence

    (defthm vl-namedb-prefixmap-equiv-is-an-equivalence
      (and (booleanp (vl-namedb-prefixmap-equiv x y))
           (vl-namedb-prefixmap-equiv x x)
           (implies (vl-namedb-prefixmap-equiv x y)
                    (vl-namedb-prefixmap-equiv y x))
           (implies (and (vl-namedb-prefixmap-equiv x y)
                         (vl-namedb-prefixmap-equiv y z))
                    (vl-namedb-prefixmap-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: vl-namedb-prefixmap-equiv-implies-equal-vl-namedb-prefixmap-fix-1

    (defthm
      vl-namedb-prefixmap-equiv-implies-equal-vl-namedb-prefixmap-fix-1
      (implies (vl-namedb-prefixmap-equiv acl2::x x-equiv)
               (equal (vl-namedb-prefixmap-fix acl2::x)
                      (vl-namedb-prefixmap-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: vl-namedb-prefixmap-fix-under-vl-namedb-prefixmap-equiv

    (defthm vl-namedb-prefixmap-fix-under-vl-namedb-prefixmap-equiv
      (vl-namedb-prefixmap-equiv (vl-namedb-prefixmap-fix acl2::x)
                                 acl2::x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-vl-namedb-prefixmap-fix-1-forward-to-vl-namedb-prefixmap-equiv

    (defthm
     equal-of-vl-namedb-prefixmap-fix-1-forward-to-vl-namedb-prefixmap-equiv
     (implies (equal (vl-namedb-prefixmap-fix acl2::x)
                     acl2::y)
              (vl-namedb-prefixmap-equiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: equal-of-vl-namedb-prefixmap-fix-2-forward-to-vl-namedb-prefixmap-equiv

    (defthm
     equal-of-vl-namedb-prefixmap-fix-2-forward-to-vl-namedb-prefixmap-equiv
     (implies (equal acl2::x
                     (vl-namedb-prefixmap-fix acl2::y))
              (vl-namedb-prefixmap-equiv acl2::x acl2::y))
     :rule-classes :forward-chaining)

    Theorem: vl-namedb-prefixmap-equiv-of-vl-namedb-prefixmap-fix-1-forward

    (defthm
         vl-namedb-prefixmap-equiv-of-vl-namedb-prefixmap-fix-1-forward
      (implies
           (vl-namedb-prefixmap-equiv (vl-namedb-prefixmap-fix acl2::x)
                                      acl2::y)
           (vl-namedb-prefixmap-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: vl-namedb-prefixmap-equiv-of-vl-namedb-prefixmap-fix-2-forward

    (defthm
         vl-namedb-prefixmap-equiv-of-vl-namedb-prefixmap-fix-2-forward
      (implies
           (vl-namedb-prefixmap-equiv acl2::x
                                      (vl-namedb-prefixmap-fix acl2::y))
           (vl-namedb-prefixmap-equiv acl2::x acl2::y))
      :rule-classes :forward-chaining)

    Theorem: cons-of-str-fix-k-under-vl-namedb-prefixmap-equiv

    (defthm cons-of-str-fix-k-under-vl-namedb-prefixmap-equiv
      (vl-namedb-prefixmap-equiv (cons (cons (str-fix acl2::k) acl2::v)
                                       acl2::x)
                                 (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-streqv-congruence-on-k-under-vl-namedb-prefixmap-equiv

    (defthm cons-streqv-congruence-on-k-under-vl-namedb-prefixmap-equiv
     (implies
      (streqv acl2::k k-equiv)
      (vl-namedb-prefixmap-equiv (cons (cons acl2::k acl2::v) acl2::x)
                                 (cons (cons k-equiv acl2::v) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-nfix-v-under-vl-namedb-prefixmap-equiv

    (defthm cons-of-nfix-v-under-vl-namedb-prefixmap-equiv
      (vl-namedb-prefixmap-equiv (cons (cons acl2::k (nfix acl2::v))
                                       acl2::x)
                                 (cons (cons acl2::k acl2::v) acl2::x)))

    Theorem: cons-nat-equiv-congruence-on-v-under-vl-namedb-prefixmap-equiv

    (defthm
         cons-nat-equiv-congruence-on-v-under-vl-namedb-prefixmap-equiv
     (implies
      (acl2::nat-equiv acl2::v v-equiv)
      (vl-namedb-prefixmap-equiv (cons (cons acl2::k acl2::v) acl2::x)
                                 (cons (cons acl2::k v-equiv) acl2::x)))
     :rule-classes :congruence)

    Theorem: cons-of-vl-namedb-prefixmap-fix-y-under-vl-namedb-prefixmap-equiv

    (defthm
      cons-of-vl-namedb-prefixmap-fix-y-under-vl-namedb-prefixmap-equiv
     (vl-namedb-prefixmap-equiv (cons acl2::x
                                      (vl-namedb-prefixmap-fix acl2::y))
                                (cons acl2::x acl2::y)))

    Theorem: cons-vl-namedb-prefixmap-equiv-congruence-on-y-under-vl-namedb-prefixmap-equiv

    (defthm
     cons-vl-namedb-prefixmap-equiv-congruence-on-y-under-vl-namedb-prefixmap-equiv
     (implies (vl-namedb-prefixmap-equiv acl2::y y-equiv)
              (vl-namedb-prefixmap-equiv (cons acl2::x acl2::y)
                                         (cons acl2::x y-equiv)))
     :rule-classes :congruence)

    Theorem: vl-namedb-prefixmap-fix-of-acons

    (defthm vl-namedb-prefixmap-fix-of-acons
      (equal (vl-namedb-prefixmap-fix (cons (cons acl2::a acl2::b) x))
             (cons (cons (str-fix acl2::a) (nfix acl2::b))
                   (vl-namedb-prefixmap-fix x))))

    Theorem: vl-namedb-prefixmap-fix-of-append

    (defthm vl-namedb-prefixmap-fix-of-append
      (equal (vl-namedb-prefixmap-fix (append std::a std::b))
             (append (vl-namedb-prefixmap-fix std::a)
                     (vl-namedb-prefixmap-fix std::b))))

    Theorem: consp-car-of-vl-namedb-prefixmap-fix

    (defthm consp-car-of-vl-namedb-prefixmap-fix
      (equal (consp (car (vl-namedb-prefixmap-fix x)))
             (consp (vl-namedb-prefixmap-fix x))))