• 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
          • Isodata
          • Simplify-defun
          • Tailrec
          • Schemalg
          • Restrict
          • Expdata
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
          • Solve
          • Wrap-output
          • Propagate-iso
          • Simplify
          • Finite-difference
          • Drop-irrelevant-params
          • Copy-function
          • Lift-iso
          • Rename-params
          • Utilities
            • Defaults-table
            • Xdoc::apt-constructors
            • Input-processors
            • Transformation-table
            • Find-base-cases
              • Find-a-base-case-translated-aux
              • Find-a-base-case-aux
              • Find-a-base-case
              • Find-a-base-case-translated
                • Untranslated-expr-calls-some-fn
              • Untranslate-specifier-utilities
              • Print-specifier-utilities
              • Hints-specifier-utilities
            • Simplify-term-programmatic
            • Simplify-defun-sk-programmatic
            • Simplify-defun-programmatic
            • Simplify-defun+
            • Common-options
            • Common-concepts
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • C
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • 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
    • Find-base-cases

    Find-a-base-case-translated

    Find a base-case within a translated term.

    Signature
    (find-a-base-case-translated term fns prefer-then) → base-case
    Arguments
    term — Guard (pseudo-termp term).
    fns — Guard (symbol-listp fns).
    prefer-then — Guard (booleanp prefer-then).
    Returns
    base-case — Either a pseudo-termp representing the base-case, or a hard error. A hard error should not occur if term is the translated body of a valid function, and fns includes only symbols corresponding to the function or functions defined in mutual recursion with the function.

    Definitions and Theorems

    Function: find-a-base-case-translated

    (defun find-a-base-case-translated (term fns prefer-then)
      (declare (xargs :guard (and (pseudo-termp term)
                                  (symbol-listp fns)
                                  (booleanp prefer-then))))
      (let ((__function__ 'find-a-base-case-translated))
        (declare (ignorable __function__))
        (mv-let (erp all-base largest)
                (find-a-base-case-translated-aux term fns prefer-then)
          (cond (erp (hard-error 'find-a-base-case-translated
                                 "Cannot find a base case!" nil))
                (all-base term)
                (t largest)))))