• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • 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
        • Zfc
        • Acre
        • Milawa
        • Smtlink
        • Abnf
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)))))