• 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-alistlist
                  • Svar/4vec-alistlist-fix
                    • Svar/4vec-alistlist-equiv
                    • Svar/4vec-alistlist-p
                  • 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-alistlist

    Svar/4vec-alistlist-fix

    (svar/4vec-alistlist-fix x) is a usual fty list fixing function.

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

    In the logic, we apply svar/4vec-alist-fix to each member of the x. In the execution, none of that is actually necessary and this is just an inlined identity function.

    Definitions and Theorems

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

    (defun svar/4vec-alistlist-fix$inline (x)
      (declare (xargs :guard (svar/4vec-alistlist-p x)))
      (let ((__function__ 'svar/4vec-alistlist-fix))
        (declare (ignorable __function__))
        (mbe :logic
             (if (atom x)
                 nil
               (cons (svar/4vec-alist-fix (car x))
                     (svar/4vec-alistlist-fix (cdr x))))
             :exec x)))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Theorem: car-of-svar/4vec-alistlist-fix-x-under-svar/4vec-alist-equiv

    (defthm car-of-svar/4vec-alistlist-fix-x-under-svar/4vec-alist-equiv
      (svar/4vec-alist-equiv (car (svar/4vec-alistlist-fix x))
                             (car x)))

    Theorem: car-svar/4vec-alistlist-equiv-congruence-on-x-under-svar/4vec-alist-equiv

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

    Theorem: cdr-of-svar/4vec-alistlist-fix-x-under-svar/4vec-alistlist-equiv

    (defthm
       cdr-of-svar/4vec-alistlist-fix-x-under-svar/4vec-alistlist-equiv
      (svar/4vec-alistlist-equiv (cdr (svar/4vec-alistlist-fix x))
                                 (cdr x)))

    Theorem: cdr-svar/4vec-alistlist-equiv-congruence-on-x-under-svar/4vec-alistlist-equiv

    (defthm
     cdr-svar/4vec-alistlist-equiv-congruence-on-x-under-svar/4vec-alistlist-equiv
     (implies (svar/4vec-alistlist-equiv x x-equiv)
              (svar/4vec-alistlist-equiv (cdr x)
                                         (cdr x-equiv)))
     :rule-classes :congruence)

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

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

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

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

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

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

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

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

    Theorem: consp-of-svar/4vec-alistlist-fix

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

    Theorem: svar/4vec-alistlist-fix-under-iff

    (defthm svar/4vec-alistlist-fix-under-iff
      (iff (svar/4vec-alistlist-fix x)
           (consp x)))

    Theorem: svar/4vec-alistlist-fix-of-cons

    (defthm svar/4vec-alistlist-fix-of-cons
      (equal (svar/4vec-alistlist-fix (cons a x))
             (cons (svar/4vec-alist-fix a)
                   (svar/4vec-alistlist-fix x))))

    Theorem: len-of-svar/4vec-alistlist-fix

    (defthm len-of-svar/4vec-alistlist-fix
      (equal (len (svar/4vec-alistlist-fix x))
             (len x)))

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

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

    Theorem: svar/4vec-alistlist-fix-of-repeat

    (defthm svar/4vec-alistlist-fix-of-repeat
      (equal (svar/4vec-alistlist-fix (repeat acl2::n x))
             (repeat acl2::n (svar/4vec-alist-fix x))))

    Theorem: list-equiv-refines-svar/4vec-alistlist-equiv

    (defthm list-equiv-refines-svar/4vec-alistlist-equiv
      (implies (list-equiv x y)
               (svar/4vec-alistlist-equiv x y))
      :rule-classes :refinement)

    Theorem: nth-of-svar/4vec-alistlist-fix

    (defthm nth-of-svar/4vec-alistlist-fix
      (equal (nth acl2::n (svar/4vec-alistlist-fix x))
             (if (< (nfix acl2::n) (len x))
                 (svar/4vec-alist-fix (nth acl2::n x))
               nil)))

    Theorem: svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-append-1

    (defthm
     svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-append-1
     (implies (svar/4vec-alistlist-equiv x fty::x-equiv)
              (svar/4vec-alistlist-equiv (append x y)
                                         (append fty::x-equiv y)))
     :rule-classes (:congruence))

    Theorem: svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-append-2

    (defthm
     svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-append-2
     (implies (svar/4vec-alistlist-equiv y fty::y-equiv)
              (svar/4vec-alistlist-equiv (append x y)
                                         (append x fty::y-equiv)))
     :rule-classes (:congruence))

    Theorem: svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-nthcdr-2

    (defthm
     svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-nthcdr-2
     (implies (svar/4vec-alistlist-equiv acl2::l l-equiv)
              (svar/4vec-alistlist-equiv (nthcdr acl2::n acl2::l)
                                         (nthcdr acl2::n l-equiv)))
     :rule-classes (:congruence))

    Theorem: svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-take-2

    (defthm
     svar/4vec-alistlist-equiv-implies-svar/4vec-alistlist-equiv-take-2
     (implies (svar/4vec-alistlist-equiv acl2::l l-equiv)
              (svar/4vec-alistlist-equiv (take acl2::n acl2::l)
                                         (take acl2::n l-equiv)))
     :rule-classes (:congruence))