• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
          • Bip32
            • Bip32-wallet-structure
              • Bip32-compliant-addresses-for-limit-p
              • Bip32-compliant-accounts-for-limit-p
              • Bip32-compliant-chains-p
              • Bip32-compliant-addresses-p
                • Bip32-compliant-tree-p
                • Bip32-compliant-depth-p
                • Bip32-compliant-accounts-p
              • Bip32-key-trees
              • Bip32-key-serialization
              • Bip32-key-derivation
              • Bip32-executable-attachments
              • Bip32-extended-keys
              • Bip32-master-key-generation
            • Bech32
            • Bip39
            • Bip44
            • Base58
            • Bip43
            • Bytes
            • Base58check
            • Cryptography
            • Bip-350
            • Bip-173
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Bip32-wallet-structure

    Bip32-compliant-addresses-p

    Check if the address keys under a given chain key in a tree comply with the BIP 32 wallet structure.

    This is obtained by existentially quantifying the address index limit in bip32-compliant-addresses-for-limit-p. See the documentation of that function for details.

    Definitions and Theorems

    Theorem: bip32-compliant-addresses-p-suff

    (defthm bip32-compliant-addresses-p-suff
     (implies
          (and (natp address-index-limit)
               (bip32-compliant-addresses-for-limit-p
                    tree account-index
                    chain-index address-index-limit))
          (bip32-compliant-addresses-p tree account-index chain-index)))

    Theorem: booleanp-of-bip32-compliant-addresses-p

    (defthm booleanp-of-bip32-compliant-addresses-p
     (b*
      ((yes/no
          (bip32-compliant-addresses-p tree account-index chain-index)))
      (booleanp yes/no))
     :rule-classes :rewrite)

    Theorem: bip32-compliant-addresses-p-of-bip32-key-tree-fix-tree

    (defthm bip32-compliant-addresses-p-of-bip32-key-tree-fix-tree
     (equal
          (bip32-compliant-addresses-p (bip32-key-tree-fix tree)
                                       account-index chain-index)
          (bip32-compliant-addresses-p tree account-index chain-index)))

    Theorem: bip32-compliant-addresses-p-bip32-key-tree-equiv-congruence-on-tree

    (defthm
     bip32-compliant-addresses-p-bip32-key-tree-equiv-congruence-on-tree
     (implies
       (bip32-key-tree-equiv tree tree-equiv)
       (equal
            (bip32-compliant-addresses-p tree account-index chain-index)
            (bip32-compliant-addresses-p
                 tree-equiv account-index chain-index)))
     :rule-classes :congruence)

    Theorem: bip32-compliant-addresses-p-of-ubyte32-fix-account-index

    (defthm bip32-compliant-addresses-p-of-ubyte32-fix-account-index
     (equal
          (bip32-compliant-addresses-p tree (ubyte32-fix account-index)
                                       chain-index)
          (bip32-compliant-addresses-p tree account-index chain-index)))

    Theorem: bip32-compliant-addresses-p-ubyte32-equiv-congruence-on-account-index

    (defthm
     bip32-compliant-addresses-p-ubyte32-equiv-congruence-on-account-index
     (implies
       (acl2::ubyte32-equiv account-index account-index-equiv)
       (equal
            (bip32-compliant-addresses-p tree account-index chain-index)
            (bip32-compliant-addresses-p
                 tree account-index-equiv chain-index)))
     :rule-classes :congruence)

    Theorem: bip32-compliant-addresses-p-of-ubyte32-fix-chain-index

    (defthm bip32-compliant-addresses-p-of-ubyte32-fix-chain-index
     (equal
          (bip32-compliant-addresses-p
               tree
               account-index (ubyte32-fix chain-index))
          (bip32-compliant-addresses-p tree account-index chain-index)))

    Theorem: bip32-compliant-addresses-p-ubyte32-equiv-congruence-on-chain-index

    (defthm
     bip32-compliant-addresses-p-ubyte32-equiv-congruence-on-chain-index
     (implies
       (acl2::ubyte32-equiv chain-index chain-index-equiv)
       (equal
            (bip32-compliant-addresses-p tree account-index chain-index)
            (bip32-compliant-addresses-p
                 tree account-index chain-index-equiv)))
     :rule-classes :congruence)