• 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
            • Svar
            • Least-fixpoint
            • Svex-p
            • Svex-select
              • Svex-select-staticify-assignment
              • Svex-select-fix
              • Svex-select-case
              • Svex-select-split-static
              • Svex-select-p
              • Svex-selects-merge
              • Svex-select-replace-indices
              • Svex-select-vars
              • Svex-select-to-svex-with-substitution
                • Svex-select-equiv
                • Svex-select-part
                • Svex-select-count
                • Svex-select-var
                • Svex-select-to-lhs
                • Svex-select-staticp
                • Svex-select-inner-var
                • Svex-select->indices
                • Svex-select-to-svex
                • Svex-select-inner-width
                • Svex-select->width
                • Svex-select-kind
              • Svex-alist
              • Svex-equiv
              • Svexlist
              • Svex-call
              • Fnsym
              • Svex-quote
              • Svex-var
              • Svcall-rw
              • Svcall
              • Svex-kind
              • Svcall*
              • Svex-fix
              • Svex-count
              • Svex-1z
              • Svex-1x
              • Svex-z
              • Svex-x
            • Bit-blasting
            • 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
    • Svex-select

    Svex-select-to-svex-with-substitution

    Signature
    (svex-select-to-svex-with-substitution x subst) → svex-x
    Arguments
    x — Guard (svex-select-p x).
    subst — Guard (svex-p subst).
    Returns
    svex-x — Type (svex-p svex-x).

    Definitions and Theorems

    Function: svex-select-to-svex-with-substitution

    (defun svex-select-to-svex-with-substitution (x subst)
     (declare (xargs :guard (and (svex-select-p x) (svex-p subst))))
     (let ((__function__ 'svex-select-to-svex-with-substitution))
      (declare (ignorable __function__))
      (svex-select-case
        x
        :var (svex-fix subst)
        :part
        (svcall
             partsel x.lsb (svex-int x.width)
             (svex-concat
                  (svex-select->width x.subexp)
                  (svex-select-to-svex-with-substitution x.subexp subst)
                  (svex-x))))))

    Theorem: svex-p-of-svex-select-to-svex-with-substitution

    (defthm svex-p-of-svex-select-to-svex-with-substitution
      (b* ((svex-x (svex-select-to-svex-with-substitution x subst)))
        (svex-p svex-x))
      :rule-classes :rewrite)

    Theorem: svex-select-to-svex-with-substitution-of-svex-select-fix-x

    (defthm svex-select-to-svex-with-substitution-of-svex-select-fix-x
      (equal (svex-select-to-svex-with-substitution (svex-select-fix x)
                                                    subst)
             (svex-select-to-svex-with-substitution x subst)))

    Theorem: svex-select-to-svex-with-substitution-svex-select-equiv-congruence-on-x

    (defthm
     svex-select-to-svex-with-substitution-svex-select-equiv-congruence-on-x
     (implies
          (svex-select-equiv x x-equiv)
          (equal (svex-select-to-svex-with-substitution x subst)
                 (svex-select-to-svex-with-substitution x-equiv subst)))
     :rule-classes :congruence)

    Theorem: svex-select-to-svex-with-substitution-of-svex-fix-subst

    (defthm svex-select-to-svex-with-substitution-of-svex-fix-subst
      (equal (svex-select-to-svex-with-substitution x (svex-fix subst))
             (svex-select-to-svex-with-substitution x subst)))

    Theorem: svex-select-to-svex-with-substitution-svex-equiv-congruence-on-subst

    (defthm
     svex-select-to-svex-with-substitution-svex-equiv-congruence-on-subst
     (implies
          (svex-equiv subst subst-equiv)
          (equal (svex-select-to-svex-with-substitution x subst)
                 (svex-select-to-svex-with-substitution x subst-equiv)))
     :rule-classes :congruence)