• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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$
        • Defconst
        • Fast-alists
        • Defmacro
        • Loop$-primer
        • 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
            • Bits-as-digits-in-base-2
              • Lebits=>nat
              • Bebits=>nat
                • Bebits=>nat-injectivity+
                • Bebits=>nat-injectivity*
                • Bebits=>nat-injectivity
                • Nat=>bebits+-of-bebits=>nat
                • Nat=>bebits*-of-bebits=>nat
                • Nat=>bebits-of-bebits=>nat
                • Bebits=>nat-of-nat=>bebits+
                • Bebits=>nat-of-nat=>bebits*
                • Bebits=>nat-of-nat=>bebits
              • Nat=>lebits
              • Nat=>bebits
              • Nat=>lebits*
              • Nat=>bebits*
              • Nat=>lebits+
              • Nat=>bebits+
              • Bits/ubyte11s-digit-grouping
              • Bits/bytes-digit-grouping
            • Maybe-bitp
            • Bfix
            • Zbp
            • Lbfix
            • Bitp-basics
          • Zero-test-idioms
          • Nat-listp
          • Integerp
          • *
          • Zp
          • -
          • Signed-byte-p
          • Logbitp
          • Sharp-f-reader
          • Expt
          • Rationalp
          • Ash
          • <=
          • Logand
          • =
          • Nfix
          • Floor
          • Random$
          • Integer-listp
          • Complex
          • Numbers-introduction
          • Truncate
          • Code-char
          • Char-code
          • Logior
          • Integer-length
          • Zip
          • Sharp-u-reader
          • Mod
          • Unary--
          • Boole$
          • Logxor
          • /
          • Integer-range-p
          • Ifix
          • Lognot
          • Allocate-fixnum-range
          • ACL2-numberp
          • Sharp-d-reader
          • Mod-expt
          • Ceiling
          • Round
          • Evenp
          • Logeqv
          • Fix
          • Explode-nonnegative-integer
          • Max
          • Zerop
          • Abs
          • Nonnegative-integer-quotient
          • Rfix
          • 1+
          • Signum
          • Rem
          • Real/rationalp
          • Rational-listp
          • Pos-listp
          • >=
          • >
          • Logcount
          • ACL2-number-listp
          • /=
          • Unary-/
          • Realfix
          • Complex/complex-rationalp
          • Logtest
          • Logandc1
          • 1-
          • Logorc1
          • Logandc2
          • Denominator
          • Numerator
          • Logorc2
          • Lognor
          • The-number
          • Int=
          • Complex-rationalp
          • Min
          • Lognand
          • Zpf
          • Oddp
          • Minusp
          • 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
      • Miscellaneous
      • Output-controls
      • Bdd
      • Macros
      • Installation
      • Mailing-lists
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Bits-as-digits-in-base-2

Bebits=>nat

Convert a big-endian list of bits, seen as digits in base 2, to their value.

Signature
(bebits=>nat digits) → nat
Arguments
digits — Guard (bit-listp digits).
Returns
nat — Type (natp nat).

Definitions and Theorems

Function: bebits=>nat

(defun bebits=>nat (digits)
  (declare (xargs :guard (bit-listp digits)))
  (let ((__function__ 'bebits=>nat))
    (declare (ignorable __function__))
    (bendian=>nat 2 digits)))

Theorem: natp-of-bebits=>nat

(defthm natp-of-bebits=>nat
  (b* ((nat (bebits=>nat digits)))
    (natp nat))
  :rule-classes :rewrite)

Theorem: bebits=>nat-of-bit-list-fix-digits

(defthm bebits=>nat-of-bit-list-fix-digits
  (equal (bebits=>nat (bit-list-fix digits))
         (bebits=>nat digits)))

Theorem: bebits=>nat-bit-list-equiv-congruence-on-digits

(defthm bebits=>nat-bit-list-equiv-congruence-on-digits
  (implies (bit-list-equiv digits digits-equiv)
           (equal (bebits=>nat digits)
                  (bebits=>nat digits-equiv)))
  :rule-classes :congruence)

Subtopics

Bebits=>nat-injectivity+
Bebits=>nat-injectivity*
Bebits=>nat-injectivity
Nat=>bebits+-of-bebits=>nat
Nat=>bebits*-of-bebits=>nat
Nat=>bebits-of-bebits=>nat
Bebits=>nat-of-nat=>bebits+
Bebits=>nat-of-nat=>bebits*
Bebits=>nat-of-nat=>bebits