• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
          • Svtv-data
            • Defsvtv$
            • Defcycle
            • Def-pipeline-thm
            • Def-svtv-data-export
            • Def-svtv-data-import
            • Svtv-name-lhs-map
              • Svtv-name-lhs-map-fix
                • Svtv-name-lhs-map-p
                • Svtv-namemap->lhsmap
                • Svtv-name-lhs-map-equiv
                • Svtv-namemap
              • Def-cycle-thm
              • Def-svtv-data-export/import
              • Defsvtv$-phasewise
            • Defsvtv$
            • Svtv-run
            • Defsvtv-phasewise
            • Svtv
            • Svtv-spec
            • Defsvtv
            • Process.lisp
            • Svtv-doc
            • Svtv-chase$
            • Svtv-versus-stv
            • Svtv-debug-fsm
            • Structure.lisp
            • Svtv-debug
            • Def-pipeline-thm
            • Expand.lisp
            • Def-cycle-thm
            • Svtv-utilities
            • Svtv-debug$
            • Defsvtv$-phasewise
          • Svex-decomposition-methodology
          • Sv-versus-esim
          • Svex-decomp
          • 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
    • Svtv-name-lhs-map

    Svtv-name-lhs-map-fix

    (svtv-name-lhs-map-fix x) is an fty alist fixing function that follows the drop-keys strategy.

    Signature
    (svtv-name-lhs-map-fix x) → fty::newx
    Arguments
    x — Guard (svtv-name-lhs-map-p x).
    Returns
    fty::newx — Type (svtv-name-lhs-map-p fty::newx).

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

    Definitions and Theorems

    Function: svtv-name-lhs-map-fix$inline

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

    Theorem: svtv-name-lhs-map-p-of-svtv-name-lhs-map-fix

    (defthm svtv-name-lhs-map-p-of-svtv-name-lhs-map-fix
      (b* ((fty::newx (svtv-name-lhs-map-fix$inline x)))
        (svtv-name-lhs-map-p fty::newx))
      :rule-classes :rewrite)

    Theorem: svtv-name-lhs-map-fix-when-svtv-name-lhs-map-p

    (defthm svtv-name-lhs-map-fix-when-svtv-name-lhs-map-p
      (implies (svtv-name-lhs-map-p x)
               (equal (svtv-name-lhs-map-fix x) x)))

    Function: svtv-name-lhs-map-equiv$inline

    (defun svtv-name-lhs-map-equiv$inline (x y)
      (declare (xargs :guard (and (svtv-name-lhs-map-p x)
                                  (svtv-name-lhs-map-p y))))
      (equal (svtv-name-lhs-map-fix x)
             (svtv-name-lhs-map-fix y)))

    Theorem: svtv-name-lhs-map-equiv-is-an-equivalence

    (defthm svtv-name-lhs-map-equiv-is-an-equivalence
      (and (booleanp (svtv-name-lhs-map-equiv x y))
           (svtv-name-lhs-map-equiv x x)
           (implies (svtv-name-lhs-map-equiv x y)
                    (svtv-name-lhs-map-equiv y x))
           (implies (and (svtv-name-lhs-map-equiv x y)
                         (svtv-name-lhs-map-equiv y z))
                    (svtv-name-lhs-map-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: svtv-name-lhs-map-equiv-implies-equal-svtv-name-lhs-map-fix-1

    (defthm
          svtv-name-lhs-map-equiv-implies-equal-svtv-name-lhs-map-fix-1
      (implies (svtv-name-lhs-map-equiv x x-equiv)
               (equal (svtv-name-lhs-map-fix x)
                      (svtv-name-lhs-map-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svtv-name-lhs-map-fix-under-svtv-name-lhs-map-equiv

    (defthm svtv-name-lhs-map-fix-under-svtv-name-lhs-map-equiv
      (svtv-name-lhs-map-equiv (svtv-name-lhs-map-fix x)
                               x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svtv-name-lhs-map-fix-1-forward-to-svtv-name-lhs-map-equiv

    (defthm
     equal-of-svtv-name-lhs-map-fix-1-forward-to-svtv-name-lhs-map-equiv
     (implies (equal (svtv-name-lhs-map-fix x) y)
              (svtv-name-lhs-map-equiv x y))
     :rule-classes :forward-chaining)

    Theorem: equal-of-svtv-name-lhs-map-fix-2-forward-to-svtv-name-lhs-map-equiv

    (defthm
     equal-of-svtv-name-lhs-map-fix-2-forward-to-svtv-name-lhs-map-equiv
     (implies (equal x (svtv-name-lhs-map-fix y))
              (svtv-name-lhs-map-equiv x y))
     :rule-classes :forward-chaining)

    Theorem: svtv-name-lhs-map-equiv-of-svtv-name-lhs-map-fix-1-forward

    (defthm svtv-name-lhs-map-equiv-of-svtv-name-lhs-map-fix-1-forward
      (implies (svtv-name-lhs-map-equiv (svtv-name-lhs-map-fix x)
                                        y)
               (svtv-name-lhs-map-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: svtv-name-lhs-map-equiv-of-svtv-name-lhs-map-fix-2-forward

    (defthm svtv-name-lhs-map-equiv-of-svtv-name-lhs-map-fix-2-forward
      (implies (svtv-name-lhs-map-equiv x (svtv-name-lhs-map-fix y))
               (svtv-name-lhs-map-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: cons-of-lhs-fix-v-under-svtv-name-lhs-map-equiv

    (defthm cons-of-lhs-fix-v-under-svtv-name-lhs-map-equiv
      (svtv-name-lhs-map-equiv (cons (cons acl2::k (lhs-fix acl2::v))
                                     x)
                               (cons (cons acl2::k acl2::v) x)))

    Theorem: cons-lhs-equiv-congruence-on-v-under-svtv-name-lhs-map-equiv

    (defthm cons-lhs-equiv-congruence-on-v-under-svtv-name-lhs-map-equiv
     (implies (lhs-equiv acl2::v v-equiv)
              (svtv-name-lhs-map-equiv (cons (cons acl2::k acl2::v) x)
                                       (cons (cons acl2::k v-equiv) x)))
     :rule-classes :congruence)

    Theorem: cons-of-svtv-name-lhs-map-fix-y-under-svtv-name-lhs-map-equiv

    (defthm
          cons-of-svtv-name-lhs-map-fix-y-under-svtv-name-lhs-map-equiv
      (svtv-name-lhs-map-equiv (cons x (svtv-name-lhs-map-fix y))
                               (cons x y)))

    Theorem: cons-svtv-name-lhs-map-equiv-congruence-on-y-under-svtv-name-lhs-map-equiv

    (defthm
     cons-svtv-name-lhs-map-equiv-congruence-on-y-under-svtv-name-lhs-map-equiv
     (implies (svtv-name-lhs-map-equiv y y-equiv)
              (svtv-name-lhs-map-equiv (cons x y)
                                       (cons x y-equiv)))
     :rule-classes :congruence)

    Theorem: svtv-name-lhs-map-fix-of-acons

    (defthm svtv-name-lhs-map-fix-of-acons
      (equal (svtv-name-lhs-map-fix (cons (cons acl2::a acl2::b) x))
             (let ((rest (svtv-name-lhs-map-fix x)))
               (if (and (svar-p acl2::a))
                   (let ((fty::first-key acl2::a)
                         (fty::first-val (lhs-fix acl2::b)))
                     (cons (cons fty::first-key fty::first-val)
                           rest))
                 rest))))

    Theorem: hons-assoc-equal-of-svtv-name-lhs-map-fix

    (defthm hons-assoc-equal-of-svtv-name-lhs-map-fix
      (equal (hons-assoc-equal acl2::k (svtv-name-lhs-map-fix x))
             (let ((fty::pair (hons-assoc-equal acl2::k x)))
               (and (svar-p acl2::k)
                    fty::pair
                    (cons acl2::k (lhs-fix (cdr fty::pair)))))))

    Theorem: svtv-name-lhs-map-fix-of-append

    (defthm svtv-name-lhs-map-fix-of-append
      (equal (svtv-name-lhs-map-fix (append std::a std::b))
             (append (svtv-name-lhs-map-fix std::a)
                     (svtv-name-lhs-map-fix std::b))))

    Theorem: consp-car-of-svtv-name-lhs-map-fix

    (defthm consp-car-of-svtv-name-lhs-map-fix
      (equal (consp (car (svtv-name-lhs-map-fix x)))
             (consp (svtv-name-lhs-map-fix x))))