• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
      • Std/util
      • Defdata
      • Defrstobj
      • Seq
      • Match-tree
      • Defrstobj
      • With-supporters
      • Def-partial-measure
      • Template-subst
      • Soft
        • Soft-future-work
        • Soft-macros
        • Updates-to-workshop-material
        • Soft-implementation
        • Soft-notions
          • Second-order-functions
          • Second-order-function-instances
          • Function-variable-instantiation
            • Second-order-theorems
            • Function-variable-dependency
            • Function-variables
            • Second-order-theorem-instances
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Soft-notions

    Function-variable-instantiation

    Notion of function variable instantiation.

    A function variable instantiation is an alist

    ((fvar1 . fun1) ... (fvarN . funN))

    where N is a non-negative integer, fvar1, ..., fvarN are distinct function variables, and fun1, ..., funN are named functions such that each funI has the same arity as the corresponding fvarI. The funI functions may be function variables, second-order functions, or ``regular'' first-order functions.

    An instantiation as above is applied to a term term by replacing each fvarI with funI. This involves not only explicit occurrences of fvarI, but also implicit occurrences as function variables upon which second-order functions occurring in term depend on. For the latter kind of occurrences, suitable instances of such second-order functions must exist; if they do not exist, the application of the instantiation fails.

    Examples

    Example 1

    Given

    (defunvar ?f (*) => *)
    (defunvar ?g (*) => *)
    (defun2 h[?f] (x) ...)
    (defun2 k[?f] (x) ...)
    (defun-inst h[consp] (h[?f] (?f . consp)))

    the alist ((?f . consp) (?g . k[?f])) is an instantiation, and the result of applying it to the term (h[?f] (?g a)) is the term (h[consp] (k[?f] a)).