• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
          • Svtv-data
          • Defsvtv$
          • Svtv-run
          • Defsvtv-phasewise
          • Svtv
            • Svtv-chase
            • Svtv-p
            • Svtv-to-fsm
              • Svtv-to-fsm-defs
                • Svtv-spec-fsm-bindings-for-alist
                • Svtv-spec-fsm-bindings-for-alists
                • Svtv-spec-fsm-constraints-for-alist
                • Svtv-spec-fsm-constraints-for-alists
                • Lhprobe
                • Svtv-spec-fsm-bindings-for-lhprobe
                • Svtv-spec-fsm-constraints-for-lhprobe
                • Lhprobe-map-overridemux-eval
                • Svtv-fsm-namemap-alistlist
                • Lhprobe-constraintlist-overridemux-eval
                • Lhs-overridemux-eval-signx
                • Svtv-fsm-namemap-envlist
                • Lhprobe/4vec-overridemux-eval
                • Lhprobe-constraintlist-max-stage
                • Lhprobe-constraint-overridemux-eval
                • Svex-envlists-agree
                • Lhprobe-overridemux-eval
                • Lhs-overridemux-eval-zero
                • Lhatom-overridemux-eval
                • Svar/4vec-alist-eval
                • Svtv-probealist-to-lhprobe-map
                • Svex-envlists-ovtestsimilar
                • Lhprobe-map-max-stage
                • Lhprobe-constraint
                • Svar/4vec-alistlist-eval
                • Lhprobe-map-eval
                • Lhprobe-constraint-max-stage
                • Lhprobe/4vec-change-override
                • Lhprobe-constraintlist-eval
                • Svtv-probe-to-lhprobe
                • Svar/4vec-eval
                • Lhs-eval-signx
                • Lhprobe-signedness-for-alist
                • Lhprobe-change-override
                • Svtv-spec-fsm-bindings
                • Svtv-spec-cycle-fsm-inputsubsts
                • Lhprobe/4vec-p
                • Lhprobe-constraint-eval
                • Svtv-spec-fsm-constraints
                • Svex-envlist-keys-list
                • Svtv-spec-non-test-vars
                • Svar/4vec-p
                • Svtv-spec->override-val-alists*
                • Svtv-spec->override-test-alists*
                • Svtv-spec->in-alists*
                • Lhprobe-map
                • Svar/4vec-alist
                  • Svar/4vec-alist-fix
                    • Svar/4vec-alist-p
                    • Svar/4vec-alist-equiv
                  • Svar/4vec-alistlist
                  • Lhprobe-constraintlist
                  • Force-execute
                • Defnamemap
                • Parse-svtv-to-fsm-thm
                • Svex-envs-check-ovtests-ok-rec
                • Svtv-to-fsm-final-thm-var-bindings
                • Svex-envlists-ovtests-ok
                • Svtv-override-triplemaplist-relevant-vars
                • Svtv-override-triplemap-relevant-vars
                • Svex-envlists-check-ovtests-ok
                • Svtv-override-triple-relevant-vars
                • Svtv-override-triplemaplist-test-only-p
                • Svex-envlists-ovtestequiv
                • Svtv-override-triplemap-test-only-p
                • Svex-envlists-ovtestsubsetp
                • Svtv-override-triple-test-only-p
                • Svex-envlists-check-ovtests-ok-rec
                • Svex-envs-check-ovtests-ok
                • Svex-alistlist-removekeys
                • Svtv-to-fsm-final-thm
                • Svtv-to-fsm-first-thm-input-var-bindings
                • Svtv-to-fsm-first-thm
                • Svtv-to-fsm-thm-fn
              • Make-svtv
              • Svtv-fix
              • Change-svtv
              • Svtv-equiv
              • Svtv->orig-overrides
              • Svtv->orig-internals
              • Svtv->expanded-overrides
              • Svtv->states
              • Svtv->nextstate
              • Svtv->expanded-ins
              • Svtv->outmasks
              • Svtv->outexprs
              • Svtv->orig-outs
              • Svtv->orig-ins
              • Svtv->inmasks
              • Svtv->nphases
              • Svtv->name
              • Svtv->labels
              • Svtv->inmap
              • Svtv->form
            • 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
    • Svar/4vec-alist

    Svar/4vec-alist-fix

    (svar/4vec-alist-fix x) is an fty alist fixing function that follows the drop-keys strategy.

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

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

    Definitions and Theorems

    Function: svar/4vec-alist-fix$inline

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

    Theorem: svar/4vec-alist-p-of-svar/4vec-alist-fix

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

    Theorem: svar/4vec-alist-fix-when-svar/4vec-alist-p

    (defthm svar/4vec-alist-fix-when-svar/4vec-alist-p
      (implies (svar/4vec-alist-p x)
               (equal (svar/4vec-alist-fix x) x)))

    Function: svar/4vec-alist-equiv$inline

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

    Theorem: svar/4vec-alist-equiv-is-an-equivalence

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

    Theorem: svar/4vec-alist-equiv-implies-equal-svar/4vec-alist-fix-1

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

    Theorem: svar/4vec-alist-fix-under-svar/4vec-alist-equiv

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

    Theorem: equal-of-svar/4vec-alist-fix-1-forward-to-svar/4vec-alist-equiv

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

    Theorem: equal-of-svar/4vec-alist-fix-2-forward-to-svar/4vec-alist-equiv

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

    Theorem: svar/4vec-alist-equiv-of-svar/4vec-alist-fix-1-forward

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

    Theorem: svar/4vec-alist-equiv-of-svar/4vec-alist-fix-2-forward

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

    Theorem: cons-of-svar/4vec-fix-v-under-svar/4vec-alist-equiv

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

    Theorem: cons-svar/4vec-equiv-congruence-on-v-under-svar/4vec-alist-equiv

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

    Theorem: cons-of-svar/4vec-alist-fix-y-under-svar/4vec-alist-equiv

    (defthm cons-of-svar/4vec-alist-fix-y-under-svar/4vec-alist-equiv
      (svar/4vec-alist-equiv (cons x (svar/4vec-alist-fix y))
                             (cons x y)))

    Theorem: cons-svar/4vec-alist-equiv-congruence-on-y-under-svar/4vec-alist-equiv

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

    Theorem: svar/4vec-alist-fix-of-acons

    (defthm svar/4vec-alist-fix-of-acons
      (equal (svar/4vec-alist-fix (cons (cons acl2::a acl2::b) x))
             (let ((rest (svar/4vec-alist-fix x)))
               (if (and (svar-p acl2::a))
                   (let ((fty::first-key acl2::a)
                         (fty::first-val (svar/4vec-fix acl2::b)))
                     (cons (cons fty::first-key fty::first-val)
                           rest))
                 rest))))

    Theorem: hons-assoc-equal-of-svar/4vec-alist-fix

    (defthm hons-assoc-equal-of-svar/4vec-alist-fix
      (equal (hons-assoc-equal acl2::k (svar/4vec-alist-fix x))
             (let ((fty::pair (hons-assoc-equal acl2::k x)))
               (and (svar-p acl2::k)
                    fty::pair
                    (cons acl2::k
                          (svar/4vec-fix (cdr fty::pair)))))))

    Theorem: svar/4vec-alist-fix-of-append

    (defthm svar/4vec-alist-fix-of-append
      (equal (svar/4vec-alist-fix (append std::a std::b))
             (append (svar/4vec-alist-fix std::a)
                     (svar/4vec-alist-fix std::b))))

    Theorem: consp-car-of-svar/4vec-alist-fix

    (defthm consp-car-of-svar/4vec-alist-fix
      (equal (consp (car (svar/4vec-alist-fix x)))
             (consp (svar/4vec-alist-fix x))))