• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
      • Std/lists
      • Std/alists
      • Obags
      • Std/util
      • Std/strings
      • Std/osets
      • Std/io
      • Std/basic
      • Std/system
        • Fresh-logical-name-with-$s-suffix
        • Irrelevant-formals-info
        • Std/system/function-queries
        • Std/system/term-queries
        • Std/system/term-transformations
        • Std/system/enhanced-utilities
        • Install-not-normalized-event
        • Install-not-normalized-event-lst
        • Std/system/term-function-recognizers
          • Pseudo-termfnp
          • Pseudo-lambdap
          • Lambdap
            • Lambda-listp
          • Termfnp
          • Pseudo-lambda-listp
          • Pseudo-termfn-listp
          • Termfn-listp
          • Lambda-listp
        • Genvar$
        • Std/system/event-name-queries
        • Pseudo-tests-and-call-listp
        • Maybe-pseudo-event-formp
        • Add-suffix-to-fn-or-const
        • Chk-irrelevant-formals-ok
        • Table-alist+
        • Pseudo-tests-and-callp
        • Add-suffix-to-fn-or-const-lst
        • Known-packages+
        • Add-suffix-to-fn-lst
        • Unquote-term
        • Event-landmark-names
        • Add-suffix-lst
        • Std/system/theorem-queries
        • Unquote-term-list
        • Std/system/macro-queries
        • Pseudo-command-landmark-listp
        • Install-not-normalized$
        • Pseudo-event-landmark-listp
        • Known-packages
        • Std/system/partition-rest-and-keyword-args
        • Rune-enabledp
        • Rune-disabledp
        • Included-books
        • Std/system/pseudo-event-formp
        • Std/system/plist-worldp-with-formals
        • Std/system/w
        • Std/system/geprops
        • Std/system/arglistp
        • Std/system/constant-queries
      • Std/typed-lists
      • Std/bitsets
      • Std/testing
      • Std/typed-alists
      • Std/stobjs
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Std/system/term-function-recognizers

Lambdap

Recognize valid translated lambda expression, i.e. lambda expressions in valid translated terms.

Signature
(lambdap x wrld) → yes/no
Arguments
wrld — Guard (plist-worldp-with-formals wrld).
Returns
yes/no — Type (booleanp yes/no).

This definition mirrors the relevant portion of the definition of termp.

Definitions and Theorems

Function: lambdap

(defun lambdap (x wrld)
  (declare (xargs :guard (plist-worldp-with-formals wrld)))
  (let ((__function__ 'lambdap))
    (declare (ignorable __function__))
    (and (true-listp x)
         (= (len x) 3)
         (eq (first x) 'lambda)
         (arglistp (second x))
         (termp (third x) wrld)
         (null (set-difference-eq (all-vars (third x))
                                  (second x))))))

Theorem: booleanp-of-lambdap

(defthm booleanp-of-lambdap
  (b* ((yes/no (lambdap x wrld)))
    (booleanp yes/no))
  :rule-classes :rewrite)

Theorem: lambdap-when-termp

(defthm lambdap-when-termp
  (implies (and (termp term wrld)
                (consp term)
                (consp (car term)))
           (lambdap (car term) wrld)))

Theorem: termp-when-lambdap

(defthm termp-when-lambdap
  (implies (and (lambdap lambd wrld)
                (term-listp terms wrld)
                (equal (len terms)
                       (len (lambda-formals lambd))))
           (termp (cons lambd terms) wrld)))

Theorem: not-lambdap-of-nil

(defthm not-lambdap-of-nil
  (not (lambdap nil wrld)))

Subtopics

Lambda-listp
Recognize true lists of translated lambda expressions.