• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/io
      • Std/osets
      • Std/system
      • Std/basic
        • Maybe-stringp
        • Maybe-natp
        • Two-nats-measure
        • Impossible
        • Nat-list-measure
        • Bytep
        • Maybe-posp
        • Nibblep
        • Mbt$
        • Organize-symbols-by-pkg
        • Organize-symbols-by-name
        • Good-valuep
        • Lnfix
        • Streqv
        • Chareqv
        • Symbol-package-name-non-cl
        • Std/basic-extensions
        • Arith-equivs
        • Induction-schemes
        • Maybe-integerp
        • Char-fix
        • Symbol-package-name-lst
        • Pos-fix
        • Maybe-bitp
        • Good-pseudo-termp
        • Str-fix
        • Maybe-string-fix
        • Lifix
        • Bfix
          • Std/basic/if*
          • Impliez
          • Tuplep
          • Std/basic/symbol-name-lst
          • Std/basic/intern-in-package-of-symbol
          • Lbfix
          • True
          • Std/basic/member-symbol-name
          • False
        • Std/typed-lists
        • Std/bitsets
        • Std/testing
        • Std/typed-alists
        • Std/stobjs
        • Std-extensions
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Std/basic
    • Logops-definitions
    • Bitp

    Bfix

    Bit fix. (bfix b) is a fixing function for bitps. It coerces any object to a bit (0 or 1) by coercing non-1 objects to 0.

    See also lbfix.

    Definitions and Theorems

    Function: bfix$inline

    (defun bfix$inline (b)
           (declare (xargs :guard t))
           (if (eql b 1) 1 0))

    Theorem: bitp-bfix

    (defthm bitp-bfix (bitp (bfix b)))

    Theorem: bfix-bitp

    (defthm bfix-bitp
            (implies (bitp b) (equal (bfix b) b)))