• 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
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
              • Primitive-types
              • Reference-types
              • Unicode-characters
              • Keywords
              • Integer-literals
              • String-literals
              • Octal-digits
              • Hexadecimal-digits
                • Hex-digit
                • Hex-digit-value
                • Hexadecimal-digits-grammar-validation
                  • Grammar-hex-digitp
                  • Hex-digitp-when-grammar-hex-digitp
                  • Hex-digit-tree
                    • Grammar-hex-digitp-when-hex-digitp
                    • Hex-digitp-is-grammar-hex-digitp
                  • Hex-digit-list
                  • Hexadecimal-digits-std/strings-theorems
                • Decimal-digits
                • Binary-digits
                • Character-literals
                • Null-literal
                • Floating-point-literals
                • Boolean-literals
                • Package-names
                • Literals
              • Semantics
          • Riscv
          • Bitcoin
          • 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
    • Hexadecimal-digits-grammar-validation

    Hex-digit-tree

    Tree for a hexadecimal digit.

    Signature
    (hex-digit-tree digit) → tree
    Arguments
    digit — Guard (hex-digitp digit).
    Returns
    tree — Type (abnf-tree-with-root-p tree "hex-digit").

    This is used in grammar-hex-digitp-when-hex-digitp.

    Definitions and Theorems

    Function: hex-digit-tree

    (defun hex-digit-tree (digit)
     (declare (xargs :guard (hex-digitp digit)))
     (let ((__function__ 'hex-digit-tree))
      (declare (ignorable __function__))
      (abnf::tree-nonleaf
       (abnf::rulename "hex-digit")
       (list
           (list (abnf::tree-leafterm (list (hex-digit-fix digit))))))))

    Theorem: return-type-of-hex-digit-tree

    (defthm return-type-of-hex-digit-tree
      (b* ((tree (hex-digit-tree digit)))
        (abnf-tree-with-root-p tree "hex-digit"))
      :rule-classes :rewrite)

    Theorem: tree->string-of-hex-digit-tree

    (defthm tree->string-of-hex-digit-tree
      (equal (abnf::tree->string (hex-digit-tree digit))
             (list (hex-digit-fix digit))))

    Theorem: hex-digit-tree-of-hex-digit-fix-digit

    (defthm hex-digit-tree-of-hex-digit-fix-digit
      (equal (hex-digit-tree (hex-digit-fix digit))
             (hex-digit-tree digit)))

    Theorem: hex-digit-tree-hex-digit-equiv-congruence-on-digit

    (defthm hex-digit-tree-hex-digit-equiv-congruence-on-digit
      (implies (hex-digit-equiv digit digit-equiv)
               (equal (hex-digit-tree digit)
                      (hex-digit-tree digit-equiv)))
      :rule-classes :congruence)