• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
        • Term-level-reasoning
        • Glmc
        • Other-resources
        • Optimization
        • Reference
          • Def-gl-thm
          • Shape-specs
          • Symbolic-objects
          • Gl-aside
          • Def-gl-param-thm
          • Symbolic-arithmetic
          • Bfr
          • Def-gl-boolean-constraint
          • Gl-mbe
          • Bvec
            • Scdr
            • Bfr-list->s
            • Bfr-eval-list
            • Bfr-scons
            • Bfr-ucons
            • Bfr-list->u
            • Bfr-sterm
            • Bfr-snorm
            • Pbfr-list-depends-on
            • V2i
            • N2v
            • V2n
            • S-endp
            • I2v
              • First/rest/end
              • Bool->sign
            • Flex-bindings
            • Auto-bindings
            • Gl-interp
            • Gl-set-uninterpreted
            • Def-gl-clause-processor
            • Def-glcp-ctrex-rewrite
            • ACL2::always-equal
            • Gl-hint
            • Def-gl-rewrite
            • Def-gl-branch-merge
            • Gl-force-check
            • Gl-concretize
            • Gl-assert
            • Gl-param-thm
            • Gl-simplify-satlink-mode
            • Gl-satlink-mode
            • Gl-bdd-mode
            • Gl-aig-bddify-mode
            • Gl-fraig-satlink-mode
          • Debugging
          • Basic-tutorial
        • Esim
        • Vl2014
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Bvec

    I2v

    Convert an integer into a corresponding signed bvec (with constant bits).

    Signature
    (i2v n) → *

    Definitions and Theorems

    Function: i2v

    (defun i2v (n)
      (declare (xargs :guard t))
      (let ((__function__ 'i2v))
        (declare (ignorable __function__))
        (cond ((eql 0 (ifix n)) '(nil))
              ((eql n -1) '(t))
              (t (bfr-scons (equal (logcar n) 1)
                            (i2v (logcdr n)))))))

    Theorem: bfr-list->s-of-i2v

    (defthm bfr-list->s-of-i2v
      (equal (bfr-list->s (i2v n) env)
             (ifix n)))

    Theorem: pbfr-list-depends-on-of-i2v

    (defthm pbfr-list-depends-on-of-i2v
      (not (pbfr-list-depends-on k p (i2v n))))