• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
          • Functions
          • 4vmask
            • Svex-argmasks
            • 4vmask-p
            • 4vmask-subsumes
            • 4veclist-mask
            • 4vec-mask-to-zero
            • 4vec-mask
            • 4vmasklist-subsumes
            • 4vmask-union
            • 4vec-mask?
            • 4vmask-equiv
            • 4vmask-fix
              • 4vmask-alist
              • 4veclist-mask?
              • 4vmasklist
              • 4vmask-empty
            • Why-infinite-width
            • Svex-vars
            • Evaluation
            • Values
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • 4vmask

    4vmask-fix

    Fixing function for 4vmasks.

    Signature
    (4vmask-fix x) → x-fix
    Arguments
    x — Guard (4vmask-p x).
    Returns
    x-fix — Type (4vmask-p x-fix).

    This is unlike ifix because we return -1 (``all bits are relevant'') in the default case.

    Definitions and Theorems

    Function: 4vmask-fix$inline

    (defun 4vmask-fix$inline (x)
      (declare (xargs :guard (4vmask-p x)))
      (let ((__function__ '4vmask-fix))
        (declare (ignorable __function__))
        (mbe :logic (if (4vmask-p x) x -1)
             :exec x)))

    Theorem: 4vmask-p-of-4vmask-fix

    (defthm 4vmask-p-of-4vmask-fix
      (b* ((x-fix (4vmask-fix$inline x)))
        (4vmask-p x-fix))
      :rule-classes (:rewrite :type-prescription))

    Theorem: 4vmask-fix-when-4vmask-p

    (defthm 4vmask-fix-when-4vmask-p
      (implies (4vmask-p x)
               (equal (4vmask-fix x) x)))