• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
          • Transformations
          • Language
            • Abstract-syntax
              • Escape
              • Swcase-list->value-list
              • Hex-digit-list->chars
              • Fundef-list->name-list
                • Literal
                • Path
                • Hex-string-rest-element
                • Plain-string
                • String-element
                • Hex-string-content-option
                • Hex-string-content
                • Identifier
                • Funcall-option
                • Expression-option
                • Statement-option
                • Literal-option
                • Identifier-option
                • Hex-string
                • Hex-quad
                • Hex-digit
                • Hex-pair
                • Data-value
                • Data-item
                • Statements-to-fundefs
                • String-element-list-result
                • Identifier-identifier-map-result
                • Swcase-result
                • String-element-result
                • Statement-result
                • Literal-result
                • Identifier-set-result
                • Identifier-result
                • Identifier-list-result
                • Fundef-result
                • Funcall-result
                • Expression-result
                • Escape-result
                • Path-result
                • Block-result
                • Objects
                • Statements/blocks/cases/fundefs
                • Identifier-list
                • Identifier-set
                • Identifier-identifier-map
                • Identifier-identifier-alist
                • Hex-string-rest-element-list
                • String-element-list
                • Path-list
                • Hex-digit-list
                • Literal-list
                • Fundef-list
                • Expressions/funcalls
                • Abstract-syntax-induction-schemas
              • Dynamic-semantics
              • Concrete-syntax
              • Static-soundness
              • Static-semantics
              • Errors
            • Yul-json
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Abstract-syntax

    Fundef-list->name-list

    Lift fundef->name to lists.

    Signature
    (fundef-list->name-list x) → names
    Arguments
    x — Guard (fundef-listp x).
    Returns
    names — Type (identifier-listp names).

    This is an ordinary std::defprojection.

    Definitions and Theorems

    Function: fundef-list->name-list-exec

    (defun fundef-list->name-list-exec (x acc)
     (declare (xargs :guard (fundef-listp x)))
     (declare (xargs :guard t))
     (let ((__function__ 'fundef-list->name-list-exec))
       (declare (ignorable __function__))
       (if
         (consp x)
         (fundef-list->name-list-exec (cdr x)
                                      (cons (fundef->name (car x)) acc))
         acc)))

    Function: fundef-list->name-list-nrev

    (defun fundef-list->name-list-nrev (x acl2::nrev)
      (declare (xargs :stobjs (acl2::nrev)))
      (declare (xargs :guard (fundef-listp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'fundef-list->name-list-nrev))
        (declare (ignorable __function__))
        (if (atom x)
            (acl2::nrev-fix acl2::nrev)
          (let ((acl2::nrev (acl2::nrev-push (fundef->name (car x))
                                             acl2::nrev)))
            (fundef-list->name-list-nrev (cdr x)
                                         acl2::nrev)))))

    Function: fundef-list->name-list

    (defun fundef-list->name-list (x)
      (declare (xargs :guard (fundef-listp x)))
      (declare (xargs :guard t))
      (let ((__function__ 'fundef-list->name-list))
        (declare (ignorable __function__))
        (mbe :logic
             (if (consp x)
                 (cons (fundef->name (car x))
                       (fundef-list->name-list (cdr x)))
               nil)
             :exec
             (if (atom x)
                 nil
               (acl2::with-local-nrev
                    (fundef-list->name-list-nrev x acl2::nrev))))))

    Theorem: identifier-listp-of-fundef-list->name-list

    (defthm identifier-listp-of-fundef-list->name-list
      (b* ((names (fundef-list->name-list x)))
        (identifier-listp names))
      :rule-classes :rewrite)

    Theorem: fundef-list->name-list-nrev-removal

    (defthm fundef-list->name-list-nrev-removal
      (equal (fundef-list->name-list-nrev acl2::x acl2::nrev)
             (append acl2::nrev
                     (fundef-list->name-list acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-exec-removal

    (defthm fundef-list->name-list-exec-removal
      (equal (fundef-list->name-list-exec acl2::x acl2::acc)
             (revappend (fundef-list->name-list acl2::x)
                        acl2::acc))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-take

    (defthm fundef-list->name-list-of-take
      (implies (<= (nfix acl2::n) (len acl2::x))
               (equal (fundef-list->name-list (take acl2::n acl2::x))
                      (take acl2::n
                            (fundef-list->name-list acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: set-equiv-congruence-over-fundef-list->name-list

    (defthm set-equiv-congruence-over-fundef-list->name-list
      (implies (set-equiv acl2::x acl2::y)
               (set-equiv (fundef-list->name-list acl2::x)
                          (fundef-list->name-list acl2::y)))
      :rule-classes ((:congruence)))

    Theorem: subsetp-of-fundef-list->name-list-when-subsetp

    (defthm subsetp-of-fundef-list->name-list-when-subsetp
      (implies (subsetp acl2::x acl2::y)
               (subsetp (fundef-list->name-list acl2::x)
                        (fundef-list->name-list acl2::y)))
      :rule-classes ((:rewrite)))

    Theorem: member-of-fundef->name-in-fundef-list->name-list

    (defthm member-of-fundef->name-in-fundef-list->name-list
      (implies (member acl2::k acl2::x)
               (member (fundef->name acl2::k)
                       (fundef-list->name-list acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-rev

    (defthm fundef-list->name-list-of-rev
      (equal (fundef-list->name-list (rev acl2::x))
             (rev (fundef-list->name-list acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-list-fix

    (defthm fundef-list->name-list-of-list-fix
      (equal (fundef-list->name-list (list-fix acl2::x))
             (fundef-list->name-list acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-append

    (defthm fundef-list->name-list-of-append
      (equal (fundef-list->name-list (append acl2::a acl2::b))
             (append (fundef-list->name-list acl2::a)
                     (fundef-list->name-list acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: cdr-of-fundef-list->name-list

    (defthm cdr-of-fundef-list->name-list
      (equal (cdr (fundef-list->name-list acl2::x))
             (fundef-list->name-list (cdr acl2::x)))
      :rule-classes ((:rewrite)))

    Theorem: car-of-fundef-list->name-list

    (defthm car-of-fundef-list->name-list
      (equal (car (fundef-list->name-list acl2::x))
             (and (consp acl2::x)
                  (fundef->name (car acl2::x))))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-under-iff

    (defthm fundef-list->name-list-under-iff
      (iff (fundef-list->name-list acl2::x)
           (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: consp-of-fundef-list->name-list

    (defthm consp-of-fundef-list->name-list
      (equal (consp (fundef-list->name-list acl2::x))
             (consp acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: len-of-fundef-list->name-list

    (defthm len-of-fundef-list->name-list
      (equal (len (fundef-list->name-list acl2::x))
             (len acl2::x))
      :rule-classes ((:rewrite)))

    Theorem: true-listp-of-fundef-list->name-list

    (defthm true-listp-of-fundef-list->name-list
      (true-listp (fundef-list->name-list acl2::x))
      :rule-classes :type-prescription)

    Theorem: fundef-list->name-list-when-not-consp

    (defthm fundef-list->name-list-when-not-consp
      (implies (not (consp acl2::x))
               (equal (fundef-list->name-list acl2::x)
                      nil))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-cons

    (defthm fundef-list->name-list-of-cons
      (equal (fundef-list->name-list (cons acl2::a acl2::b))
             (cons (fundef->name acl2::a)
                   (fundef-list->name-list acl2::b)))
      :rule-classes ((:rewrite)))

    Theorem: fundef-list->name-list-of-fundef-list-fix-x

    (defthm fundef-list->name-list-of-fundef-list-fix-x
      (equal (fundef-list->name-list (fundef-list-fix x))
             (fundef-list->name-list x)))

    Theorem: fundef-list->name-list-fundef-list-equiv-congruence-on-x

    (defthm fundef-list->name-list-fundef-list-equiv-congruence-on-x
      (implies (fundef-list-equiv x x-equiv)
               (equal (fundef-list->name-list x)
                      (fundef-list->name-list x-equiv)))
      :rule-classes :congruence)