• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Semantics
        • Lifting
        • R1cs-subset
        • Well-formedness
        • Abstract-syntax
          • Syntax-abstraction
          • Abstract-syntax-trees
          • Abstract-syntax-operations
            • Names-indexed-below
            • Expression-var-list
            • Name-simple-list
              • Lookup-definition
              • Constrel
              • Constraint-constrels
              • Constraint-list-constrels
              • Constraint-rels
              • Constraint-list-rels
              • Expression-list-vars
              • Constraint-list-vars
              • Expression-const/var-listp
              • Expression-var-listp
              • Expression-vars
              • Definition-free-vars
              • Constraint-vars
              • Constrel-set
            • Convenience-constructors
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • C
        • Proof-checker-array
        • Soft
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Abstract-syntax-operations

    Name-simple-list

    Lift name-simple to lists.

    Signature
    (name-simple-list x) → names
    Returns
    names — Type (name-listp names).

    This is an ordinary std::defprojection.

    Definitions and Theorems

    Function: name-simple-list-exec

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

    Function: name-simple-list-nrev

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

    Function: name-simple-list

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

    Theorem: name-listp-of-name-simple-list

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

    Theorem: name-simple-list-of-take

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

    Theorem: set-equiv-congruence-over-name-simple-list

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

    Theorem: subsetp-of-name-simple-list-when-subsetp

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

    Theorem: member-of-name-simple-in-name-simple-list

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

    Theorem: name-simple-list-nrev-removal

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

    Theorem: name-simple-list-exec-removal

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

    Theorem: name-simple-list-of-rev

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

    Theorem: name-simple-list-of-list-fix

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

    Theorem: name-simple-list-of-append

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

    Theorem: cdr-of-name-simple-list

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

    Theorem: car-of-name-simple-list

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

    Theorem: name-simple-list-under-iff

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

    Theorem: consp-of-name-simple-list

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

    Theorem: len-of-name-simple-list

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

    Theorem: true-listp-of-name-simple-list

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

    Theorem: name-simple-list-when-not-consp

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

    Theorem: name-simple-list-of-cons

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