• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
        • Defun
        • Declare
        • System-utilities
        • Stobj
        • State
        • Mutual-recursion
        • Memoize
        • Mbe
        • Io
        • Defpkg
        • Apply$
        • Loop$
        • Programming-with-state
        • Arrays
        • Characters
        • Time$
        • Defmacro
        • Loop$-primer
        • Fast-alists
        • Defconst
        • Evaluation
        • Guard
        • Equality-variants
        • Compilation
        • Hons
        • ACL2-built-ins
        • Developers-guide
        • System-attachments
        • Advanced-features
        • Set-check-invariant-risk
        • Numbers
          • Df
          • Unsigned-byte-p
          • Posp
          • Natp
          • <
          • +
          • Bitp
            • Bit-listp
            • Logops-bit-functions
              • Simplify-bit-functions
              • B-eqv
              • B-orc2
              • B-orc1
              • B-nor
              • B-nand
              • B-ite
              • B-ior
              • B-andc2
              • B-andc1
              • B-and
              • B-xor
              • B-not
            • Bits-as-digits-in-base-2
            • Maybe-bitp
            • Bfix
            • Zbp
            • Lbfix
            • Bitp-basics
          • Zero-test-idioms
          • Nat-listp
          • Integerp
          • *
          • -
          • Zp
          • Signed-byte-p
          • Logbitp
          • Sharp-f-reader
          • Expt
          • <=
          • Ash
          • Rationalp
          • =
          • Nfix
          • Logand
          • Floor
          • Random$
          • Integer-listp
          • Complex
          • Numbers-introduction
          • Truncate
          • Code-char
          • Char-code
          • Integer-length
          • Zip
          • Logior
          • Sharp-u-reader
          • Mod
          • Unary--
          • Boole$
          • /
          • Logxor
          • Ifix
          • Lognot
          • Integer-range-p
          • Allocate-fixnum-range
          • ACL2-numberp
          • Sharp-d-reader
          • Mod-expt
          • Ceiling
          • Round
          • Logeqv
          • Fix
          • Explode-nonnegative-integer
          • Max
          • Evenp
          • Zerop
          • Abs
          • Nonnegative-integer-quotient
          • Rfix
          • 1+
          • Pos-listp
          • Signum
          • Rem
          • Real/rationalp
          • Rational-listp
          • >=
          • >
          • Logcount
          • ACL2-number-listp
          • /=
          • Unary-/
          • Realfix
          • Complex/complex-rationalp
          • Logtest
          • Logandc1
          • Logorc1
          • Logandc2
          • Denominator
          • 1-
          • Numerator
          • Logorc2
          • The-number
          • Int=
          • Complex-rationalp
          • Min
          • Lognor
          • Zpf
          • Oddp
          • Minusp
          • Lognand
          • Imagpart
          • Conjugate
          • Realpart
          • Plusp
        • Efficiency
        • Irrelevant-formals
        • Introduction-to-programming-in-ACL2-for-those-who-know-lisp
        • Redefining-programs
        • Lists
        • Invariant-risk
        • Errors
        • Defabbrev
        • Conses
        • Alists
        • Set-register-invariant-risk
        • Strings
        • Program-wrapper
        • Get-internal-time
        • Basics
        • Packages
        • Oracle-eval
        • Defmacro-untouchable
        • <<
        • Primitive
        • Revert-world
        • Unmemoize
        • Set-duplicate-keys-action
        • Symbols
        • Def-list-constructor
        • Easy-simplify-term
        • Defiteration
        • Fake-oracle-eval
        • Defopen
        • Sleep
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Logops-definitions
  • Bitp

Logops-bit-functions

Versions of the standard logical operations that operate on single bits.

We provide versions of the non-trivial standard logical operations that operate on single bits.

One reason that it is useful to introduce these operations separately from the standard operations is the fact that lognot applied to a bitp object never returns a bitp.

All arguments to these functions must be bitp, and we prove that each returns a bitp integer, i.e., 0 or 1. We define each function explicitly in terms of 0 and 1 to simplify reasoning.

Subtopics

Simplify-bit-functions
Rewrite: Simplification rules for all binary b- functions including commutative rules, reductions with 1 explicit value, and reductions for identical agruments and complemented arguments.
B-eqv
Equivalence (a.k.a. if and only if, xnor) for bitps.
B-orc2
Inclusive or of bitps, complementing the second.
B-orc1
Inclusive or of bitps, complementing the first.
B-nor
Negated or for bitps.
B-nand
Negated and for bitps.
B-ite
If-then-else for bitps.
B-ior
Inclusive or for bitps.
B-andc2
And of bitps, complementing the second.
B-andc1
And of bitps, complementing the first.
B-and
Conjunction for bitps.
B-xor
Exclusive or for bitps.
B-not
Negation for bitps.