• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
        • 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
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Bech32

    Bech32-chars-to-octets

    Signature
    (bech32-chars-to-octets data-chars) → ret-val
    Arguments
    data-chars — Guard (character-listp data-chars).
    Returns
    ret-val — Type (true-listp ret-val).

    Definitions and Theorems

    Function: bech32-chars-to-octets

    (defun bech32-chars-to-octets (data-chars)
      (declare (xargs :guard (character-listp data-chars)))
      (let ((__function__ 'bech32-chars-to-octets))
        (declare (ignorable __function__))
        (if (endp data-chars)
            nil
          (cons (position (first data-chars)
                          *bech32-char-vals*)
                (bech32-chars-to-octets (rest data-chars))))))

    Theorem: true-listp-of-bech32-chars-to-octets

    (defthm true-listp-of-bech32-chars-to-octets
      (b* ((ret-val (bech32-chars-to-octets data-chars)))
        (true-listp ret-val))
      :rule-classes :rewrite)