• 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
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
            • Svex-focused-equivalence-checking
            • A4vec-operations
            • Svexlist-eval-gl
            • Aig-symbolic-arithmetic
            • Svex-varmasks/env->aig-env-rec
            • Svex-varmasks->a4env-rec
            • Svexlist/env-list-eval-gl
            • 4vmask-to-a4vec-rec-env
            • 4vmask-to-a4vec-rec
            • Svexlist->a4vecs-for-varlist
            • Svex-varmasks/env->aig-env-stats-rec
            • Svexlist->a4vec-nrev
            • A4veclist/svex-env-list-eval
            • A4vec
            • Svexlist-x-out-unused-vars
              • Svex->a4vec-memotable-correctp
              • A4vec/svex-env-eval
              • Svex-varmasks->a4env
              • Svex-varmasks/env->aig-env-rec-log
              • 4vmask-to-a4vec-env
              • 4veclist-from-bitlist-log-rec
              • Svex-apply-aig
              • Svexlist-vars-for-symbolic-eval
              • Nat-bool-a4env-upper-boundp
              • 4vmask-to-a4vec
              • Svexlist/env-list-vars-for-symbolic-eval
              • Svex-maskbits-for-vars
              • Svexlist->a4vec-aig-env-for-varlist
              • 4vec-from-bitlist
              • Svexlist-full-masks-p
              • Svex-varmasks/env->aig-env-stats
              • Svex-varmasks/env->aig-env
              • Svexlistlist->a4vec
              • Svex-const-concat-args
              • Svex-mask-alist-extract-vars
              • Svexlist->a4vec-top
              • Nat-bool-a4vec-upper-boundp
              • Nat-bool-a4env-lower-boundp
              • Maybe-a3vec-fix
              • Svex-maskbits-ok
              • Svex-envlist-check-boolmasks
              • Svex-env-check-boolmasks
              • Nat-bool-list-upper-boundp
              • Nat-bool-a4vec-lower-boundp
              • Maybe-svexlist-rewrite-fixpoint
              • 4vmask-to-a4vec-varcount
              • A4vec-eval
              • Svexlist-nth
              • A4veclist-nth
              • Nat-bool-list-lower-boundp
              • 4veclist-from-bitlist
              • V2i-first-n
              • A4veclist-eval-gl
              • Svex-envlist-keyset
              • Svex-a4vec-env-eval
              • A4veclist/env-list-eval
              • Svexlist-variable-mask-alist
              • Sparseint-nfix
              • A4veclist-length
              • A4veclist-eval
              • 4vec-boolmaskp
              • Nat-bool-list-nats
              • Nat-bool-a4env-p
              • Nat-bool-listp
              • A4veclist->aiglist
              • Svexlist-rewrite-fixpoint-memo
              • Nat-bool-a4vec-p
              • A4vec->aiglist
              • Svex-is-const-concat
              • Nat-bool-a4env-vars
              • Svexlist-mask-alist-memo
              • Nat-bool-a4vec-vars
              • Svexlist-vars-memo
              • A4vec-constantp
              • Svex-aig-memotable
              • Svex-a4vec-env
              • A4veclistlist
              • A4veclist
              • Symbolic-params-x-out-cond
            • Functions
            • 4vmask
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Bit-blasting

    Svexlist-x-out-unused-vars

    Signature
    (svexlist-x-out-unused-vars x svars do-it) → new-x
    Arguments
    x — Guard (svexlist-p x).
    svars — Guard (svarlist-p svars).
    Returns
    new-x — Type (svexlist-p new-x).

    Definitions and Theorems

    Function: svexlist-x-out-unused-vars

    (defun svexlist-x-out-unused-vars (x svars do-it)
     (declare (xargs :guard (and (svexlist-p x)
                                 (svarlist-p svars))))
     (let ((__function__ 'svexlist-x-out-unused-vars))
      (declare (ignorable __function__))
      (if do-it
       (b*
        ((subst (make-fast-alist (pairlis$ (svarlist-fix svars)
                                           (svarlist-svex-vars svars))))
         (ans (svexlist-fastsubst x subst)))
        (clear-memoize-table 'svex-fastsubst)
        (fast-alist-free subst)
        ans)
       (svexlist-fix x))))

    Theorem: svexlist-p-of-svexlist-x-out-unused-vars

    (defthm svexlist-p-of-svexlist-x-out-unused-vars
      (b* ((new-x (svexlist-x-out-unused-vars x svars do-it)))
        (svexlist-p new-x))
      :rule-classes :rewrite)

    Theorem: svex-alist-eval-of-svarlist-svex-vars

    (defthm svex-alist-eval-of-svarlist-svex-vars
      (equal (svex-alist-eval (pairlis$ (svarlist-fix svars)
                                        (svarlist-svex-vars svars))
                              env)
             (svex-env-extract svars env)))

    Theorem: svex-eval-of-svex-env-extract-when-intersection-subset

    (defthm svex-eval-of-svex-env-extract-when-intersection-subset
      (implies (subsetp (intersection$ (svex-vars x)
                                       (alist-keys (svex-env-fix env)))
                        (svarlist-fix svars))
               (equal (svex-eval x (svex-env-extract svars env))
                      (svex-eval x env))))

    Theorem: svexlist-eval-of-svex-env-extract-when-intersection-subset

    (defthm svexlist-eval-of-svex-env-extract-when-intersection-subset
      (implies (subsetp (intersection$ (svexlist-vars x)
                                       (alist-keys (svex-env-fix env)))
                        (svarlist-fix svars))
               (equal (svexlist-eval x (svex-env-extract svars env))
                      (svexlist-eval x env))))

    Theorem: svex-eval-of-svexlist-x-out-unused-vars

    (defthm svex-eval-of-svexlist-x-out-unused-vars
     (b* ((?new-x (svexlist-x-out-unused-vars x svars do-it)))
      (implies
       (double-rewrite
           (subsetp (intersection-equal (svexlist-vars x)
                                        (alist-keys (svex-env-fix env)))
                    (svarlist-fix svars)))
       (equal (svexlist-eval new-x env)
              (svexlist-eval x env)))))

    Theorem: svex-vars-of-svexlist-x-out-unused-vars

    (defthm svex-vars-of-svexlist-x-out-unused-vars
      (b* ((?new-x (svexlist-x-out-unused-vars x svars do-it)))
        (implies (not (member v (svexlist-vars x)))
                 (not (member v (svexlist-vars new-x))))))

    Theorem: len-of-svexlist-x-out-unused-vars

    (defthm len-of-svexlist-x-out-unused-vars
      (b* ((?new-x (svexlist-x-out-unused-vars x svars do-it)))
        (equal (len new-x) (len x))))

    Theorem: svexlist-x-out-unused-vars-of-svexlist-fix-x

    (defthm svexlist-x-out-unused-vars-of-svexlist-fix-x
      (equal (svexlist-x-out-unused-vars (svexlist-fix x)
                                         svars do-it)
             (svexlist-x-out-unused-vars x svars do-it)))

    Theorem: svexlist-x-out-unused-vars-svexlist-equiv-congruence-on-x

    (defthm svexlist-x-out-unused-vars-svexlist-equiv-congruence-on-x
      (implies (svexlist-equiv x x-equiv)
               (equal (svexlist-x-out-unused-vars x svars do-it)
                      (svexlist-x-out-unused-vars x-equiv svars do-it)))
      :rule-classes :congruence)

    Theorem: svexlist-x-out-unused-vars-of-svarlist-fix-svars

    (defthm svexlist-x-out-unused-vars-of-svarlist-fix-svars
      (equal (svexlist-x-out-unused-vars x (svarlist-fix svars)
                                         do-it)
             (svexlist-x-out-unused-vars x svars do-it)))

    Theorem: svexlist-x-out-unused-vars-svarlist-equiv-congruence-on-svars

    (defthm
          svexlist-x-out-unused-vars-svarlist-equiv-congruence-on-svars
      (implies (svarlist-equiv svars svars-equiv)
               (equal (svexlist-x-out-unused-vars x svars do-it)
                      (svexlist-x-out-unused-vars x svars-equiv do-it)))
      :rule-classes :congruence)