• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • 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
          • Bip39
            • *bip39-english-words*
            • Bip39-mnemonic-to-seed
            • Bip39-entropy-to-word-indexes
            • Bip39-entropy
              • Bip39-entropyp
              • Bip39-entropy-fix
              • Bip39-word-indexes-to-words
              • Bip39-words-to-mnemonic
              • Bip39-entropy-to-seed
              • Bip39-entropy-to-mnemonic
              • Bip39-english-words-bound-p
              • Bip39-entropy-size-p
            • 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
    • Bip39-entropy

    Bip39-entropy-fix

    Fixer for bip39-entropy.

    Signature
    (bip39-entropy-fix x) → fixed-x
    Arguments
    x — Guard (bip39-entropyp x).
    Returns
    fixed-x — Type (bip39-entropyp fixed-x).

    Definitions and Theorems

    Function: bip39-entropy-fix

    (defun bip39-entropy-fix (x)
      (declare (xargs :guard (bip39-entropyp x)))
      (mbe :logic (if (bip39-entropyp x) x (repeat 128 0))
           :exec x))

    Theorem: bip39-entropyp-of-bip39-entropy-fix

    (defthm bip39-entropyp-of-bip39-entropy-fix
      (b* ((fixed-x (bip39-entropy-fix x)))
        (bip39-entropyp fixed-x))
      :rule-classes :rewrite)

    Theorem: bip39-entropy-fix-when-bip39-entropyp

    (defthm bip39-entropy-fix-when-bip39-entropyp
      (implies (bip39-entropyp x)
               (equal (bip39-entropy-fix x) x)))