• 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
        • Set
        • Soft
          • Soft-future-work
          • Soft-macros
          • Updates-to-workshop-material
          • Soft-implementation
          • Soft-notions
            • Second-order-functions
              • Defsoft
              • Defun2
              • Defun-sk2
              • Defchoose2
                • Defchoose2-implementation
              • Define-sk2
              • Defund-sk2
              • Define2
              • Defund2
            • Second-order-function-instances
            • Function-variable-instantiation
            • Second-order-theorems
            • Function-variable-dependency
            • Function-variables
            • Second-order-theorem-instances
        • 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
  • Soft-macros
  • Second-order-functions

Defchoose2

Introduce a second-order function via a second-order version of defchoose.

General Form

(defchoose2 sofun ...) ; same as defchoose

Inputs

The inputs are identical to defchoose.

The function sofun must satisfy all the requirements for defsoft, because defchoose2 generates (defsoft sofun) (see below).

Generated Events

(defchoose sofun ...) ; input form with defchoose2 replaced by defchoose
(defsoft sofun)

sofun is introduced as a first-order function using defchoose. It is also recorded as a second-order function via defsoft.

Examples

Example 1

;; A function constrained to return a fixed point of ?F, if any exists:
(defchoose2 fixpoint[?f] x ()
  (equal (?f x) x))

Subtopics

Defchoose2-implementation
Implementation of defchoose2.