• 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
          • Defun-inst
          • Defequal
          • Defsoft
          • Defthm-inst
          • Defun2
          • Defunvar
          • Defun-sk2
            • Defun-sk2-implementation
          • Defchoose2
          • Defthm-2nd-order
          • Define-sk2
          • Defund-sk2
          • Define2
          • Defund2
        • Updates-to-workshop-material
        • Soft-implementation
        • Soft-notions
      • 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-macros
  • Second-order-functions

Defun-sk2

Introduce a second-order function via a second-order version of defun-sk.

General Form

(defun-sk sofun ...) ; same as defun-sk

Inputs

The inputs are identical to defun-sk.

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

Generated Events

(defun-sk sofun ...) ; input form with defun-sk2 replaced by defun-sk

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

Examples

Example 1

;; A predicate that recognizes injective functions:
(defun-sk2 injective[?f] ()
 (forall (x y) (implies (equal (?f x) (?f y)) (equal x y))))

Subtopics

Defun-sk2-implementation
Implementation of defun-sk2.