• 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
          • Syntax-for-tools
          • Atc
          • Transformation-tools
          • Language
            • Abstract-syntax
              • Tyspecseq
              • Expr
              • Binop
              • Fileset
              • Obj-declor
              • Abstract-syntax-operations
                • Stmts/blocks-nocallsp
                • Tyspec+declor-to-ident+params+tyname
                • Fundef-list-to-fun-declon-list
                • Fundef-list->name-list
                  • Ident+tyname-to-tyspec+declor
                  • Tyspec+declor-to-ident+tyname
                  • Obj-declon-to-ident+scspec+tyname+init
                  • Ident+adeclor-to-obj-declor
                  • Ident+adeclor-to-fun-declor
                  • Fun-adeclor-to-params+declor
                  • Param-declon-list-to-ident+tyname-lists
                  • Obj-declor-to-ident+adeclor
                  • Fun-declor-to-ident+adeclor
                  • Expr-constp
                  • Fundef-to-fun-declon
                  • Param-declon-to-ident+tyname
                  • Ext-declon-list->fundef-list
                  • Struct-declon-to-ident+tyname
                  • Unop-nonpointerp
                  • Initer-option-nocallsp
                  • Expr-nocallsp
                  • Expr-list-nocallsp
                  • Binop-strictp
                  • Expr-purep
                  • Expr-option-nocallsp
                  • Expr-list-constp
                  • Binop-purep
                  • Obj-declon-nocallsp
                  • Initer-nocallsp
                  • Label-nocallsp
                  • Fundef->name
                  • Expr-list-purep
                  • Block-item-nocallsp
                  • Block-item-list-nocallsp
                  • Stmt-nocallsp
                • Iconst
                • Obj-adeclor
                • Const
                • Fundef
                • Unop
                • File
                • Tag-declon
                • Fun-declor
                • Obj-declon
                • Iconst-length
                • Label
                • Struct-declon
                • Initer
                • Ext-declon
                • Fun-adeclor
                • Expr-option
                • Iconst-base
                • Initer-option
                • Iconst-option
                • Tyspecseq-option
                • Stmt-option
                • Scspecseq
                • Param-declon
                • Obj-declon-option
                • File-option
                • Tyname
                • Transunit
                • Fun-declon
                • Transunit-result
                • Param-declon-list
                • Struct-declon-list
                • Expr-list
                • Tyspecseq-list
                • Identifiers
                • Ext-declon-list
                • Unop-list
                • Tyname-list
                • Fundef-list
                • Fun-declon-list
                • Binop-list
                • Stmt-fixtypes
                • Expr-fixtypes
              • Integer-ranges
              • Implementation-environments
              • Dynamic-semantics
              • Static-semantics
              • Grammar
              • Types
              • Integer-formats-definitions
              • Computation-states
              • Portable-ascii-identifiers
              • Values
              • Integer-operations
              • Object-designators
              • Operations
              • Errors
              • Tag-environments
              • Function-environments
              • Character-sets
              • Flexible-array-member-removal
              • Arithmetic-operations
              • Pointer-operations
              • Real-operations
              • Array-operations
              • Scalar-operations
              • Structure-operations
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • 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-operations

    Fundef-list->name-list

    Lift fundef->name to lists.

    Signature
    (fundef-list->name-list x) → names
    Returns
    names — Type (ident-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)))
     (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)))
      (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)))
      (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: ident-listp-of-fundef-list->name-list

    (defthm ident-listp-of-fundef-list->name-list
      (b* ((names (fundef-list->name-list x)))
        (ident-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-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)