• 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
          • Omaps
          • Directed-untranslate
          • Include-book-paths
          • Ubi
          • Numbered-names
          • Digits-any-base
            • Defdigits
            • Nat=>lendian*
            • Group-lendian
            • Defdigit-grouping
            • Ungroup-lendian
            • Lendian=>nat
            • Defthm-dab-return-types
            • Bendian=>nat
            • Nat=>bendian*
            • Trim-bendian*
            • Trim-lendian*
            • Nat=>lendian
            • Dab-digit-list-fix
            • Nat=>bendian
            • Ungroup-bendian
            • Group-bendian
            • Digits=>nat-injectivity-theorems
            • Dab-digit-listp
            • Nat=>lendian+
            • Dab-basep
              • Nat=>bendian+
              • Digits=>nat=>digits-inverses-theorems
              • Trim-lendian+
              • Trim-bendian+
              • Nat=>digits=>nat-inverses-theorems
              • Dab-digitp
              • Group/ungroup-inverses-theorems
              • Dab-digit-fix
              • Nat=>digits-injectivity-theorems
              • Dab-base
              • Digits-any-base-pow2
              • Dab-base-fix
            • Context-message-pair
            • With-auto-termination
            • Make-termination-theorem
            • Theorems-about-true-list-lists
            • Checkpoint-list
            • Sublis-expr+
            • Integers-from-to
            • Prove$
            • Defthm<w
            • System-utilities-non-built-in
            • Integer-range-fix
            • Minimize-ruler-extenders
            • Add-const-to-untranslate-preprocess
            • Unsigned-byte-fix
            • Signed-byte-fix
            • Defthmr
            • Paired-names
            • Unsigned-byte-list-fix
            • Signed-byte-list-fix
            • Show-books
            • Skip-in-book
            • Typed-tuplep
            • List-utilities
            • Checkpoint-list-pretty
            • Defunt
            • Keyword-value-list-to-alist
            • Magic-macroexpand
            • Top-command-number-fn
            • Bits-as-digits-in-base-2
            • Show-checkpoint-list
            • Ubyte11s-as-digits-in-base-2048
            • Named-formulas
            • Bytes-as-digits-in-base-256
            • String-utilities
            • Make-keyword-value-list-from-keys-and-value
            • Defmacroq
            • Integer-range-listp
            • Apply-fn-if-known
            • Trans-eval-error-triple
            • Checkpoint-info-list
            • Previous-subsumer-hints
            • Fms!-lst
            • Zp-listp
            • Trans-eval-state
            • Injections
            • Doublets-to-alist
            • Theorems-about-osets
            • Typed-list-utilities
            • Book-runes-alist
            • User-interface
            • Bits/ubyte11s-digit-grouping
            • Bits/bytes-digit-grouping
            • Message-utilities
            • Subsetp-eq-linear
            • Oset-utilities
            • Strict-merge-sort-<
            • Miscellaneous-enumerations
            • Maybe-unquote
            • Thm<w
            • Defthmd<w
            • Io-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • 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
    • Digits-any-base

    Dab-basep

    Recognize valid bases for representing natural numbers as digits.

    Signature
    (dab-basep x) → yes/no
    Returns
    yes/no — Type (booleanp yes/no).

    The fixing function for this predicate is dab-base-fix and the fixtype for this predicate is dab-base.

    Any integer above 1 raised to a positive power is a valid base, e.g. binary, octal, and hexadecimal bases.

    Definitions and Theorems

    Function: dab-basep

    (defun dab-basep (x)
      (declare (xargs :guard t))
      (let ((__function__ 'dab-basep))
        (declare (ignorable __function__))
        (and (integerp x) (>= x 2))))

    Theorem: booleanp-of-dab-basep

    (defthm booleanp-of-dab-basep
      (b* ((yes/no (dab-basep x)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: posp-when-dab-basep

    (defthm posp-when-dab-basep
      (implies (dab-basep x) (posp x))
      :rule-classes :compound-recognizer)

    Theorem: dab-basep-of-expt

    (defthm dab-basep-of-expt
      (implies (and (integerp x) (> x 1) (posp n))
               (dab-basep (expt x n))))