• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
        • Bip32
        • Bech32
          • Bech32-split-address
          • Bech32-hrp-expand
          • Valid-bech32-or-bech32m
          • Bech32-polymod-aux
          • Bech32-or-bech32m-verify-checksum
          • Bech32m-verify-checksum
          • Valid-bech32m
          • Valid-bech32
          • Bech32-verify-checksum
          • Bech32-collect-low-5-bits
            • Bech32-collect-high-3-bits
            • Bech32-polymod
            • Bech32-chars-to-octets
            • Hrp-valid-p
            • Mixed-case-stringp
            • Hrp-valid-string-length-p
            • Hrp-valid-char-code-p
            • *bech32-char-vals*
            • Bech32-index-of-last-1
            • *bech32m-const*
          • Bip39
          • Bip44
          • Base58
          • Bip43
          • Bytes
          • Base58check
          • Cryptography
          • Bip-350
          • Bip-173
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bech32

    Bech32-collect-low-5-bits

    Signature
    (bech32-collect-low-5-bits codes) → low-bits-codes
    Arguments
    codes — Guard (unsigned-byte-listp 8 codes).
    Returns
    low-bits-codes — Type (unsigned-byte-listp 8 low-bits-codes), given (warrant bvand).

    Definitions and Theorems

    Function: bech32-collect-low-5-bits

    (defun bech32-collect-low-5-bits (codes)
      (declare (xargs :guard (unsigned-byte-listp 8 codes)))
      (let ((__function__ 'bech32-collect-low-5-bits))
        (declare (ignorable __function__))
        (loop$ for code of-type (integer 0 255)
               in codes collect (bvand 8 code 31))))

    Theorem: return-type-of-bech32-collect-low-5-bits

    (defthm return-type-of-bech32-collect-low-5-bits
      (implies (warrant bvand)
               (b* ((low-bits-codes (bech32-collect-low-5-bits codes)))
                 (unsigned-byte-listp 8 low-bits-codes)))
      :rule-classes :rewrite)