• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Debugging
    • Projects
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
          • Name-database
          • Vl-gc
          • Symbol-list-names
          • Ints-from
          • Nats-from
          • Make-lookup-alist
          • Redundant-mergesort
          • Longest-common-prefix
          • Vl-remove-keys
          • Vl-plural-p
          • Vl-merge-contiguous-indices
          • Sum-nats
          • Vl-edition-p
          • Vl-maybe-integer-listp
          • Fast-memberp
          • Nat-listp
          • Max-nats
          • Longest-common-prefix-list
          • Character-list-listp
          • Vl-character-list-list-values-p
          • Remove-from-alist
          • Prefix-of-eachp
          • Vl-string-keys-p
            • Vl-maybe-nat-listp
            • Vl-string-list-values-p
            • String-list-listp
            • Vl-string-values-p
            • Explode-list
            • True-list-listp
            • Symbol-list-listp
            • All-have-len
            • Pos-listp
            • Min-nats
            • Debuggable-and
            • Vl-starname
            • Remove-equal-without-guard
            • String-fix
            • Anyp
            • Vl-maybe-string-list
            • Longer-than-p
            • Fast-alist-free-each-alist-val
            • Not*
            • Free-list-of-fast-alists
            • *nls*
          • Printer
          • Kit
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Testing-utilities
      • Math
    • Utilities

    Vl-string-keys-p

    Recognizer for alists whose keys are strings.

    Definitions and Theorems

    Function: vl-string-keys-p

    (defun vl-string-keys-p (x)
           (declare (xargs :guard t))
           (if (consp x)
               (and (consp (car x))
                    (stringp (caar x))
                    (vl-string-keys-p (cdr x)))
               (not x)))

    Theorem: vl-string-keys-p-when-not-consp

    (defthm vl-string-keys-p-when-not-consp
            (implies (not (consp x))
                     (equal (vl-string-keys-p x) (not x))))

    Theorem: vl-string-keys-p-of-cons

    (defthm vl-string-keys-p-of-cons
            (equal (vl-string-keys-p (cons a x))
                   (and (consp a)
                        (stringp (car a))
                        (vl-string-keys-p x))))

    Theorem: vl-string-keys-p-of-hons-shrink-alist

    (defthm vl-string-keys-p-of-hons-shrink-alist
            (implies (and (vl-string-keys-p x)
                          (vl-string-keys-p ans))
                     (vl-string-keys-p (hons-shrink-alist x ans))))

    Theorem: string-listp-of-strip-cars-when-vl-string-keys-p

    (defthm string-listp-of-strip-cars-when-vl-string-keys-p
            (implies (vl-string-keys-p x)
                     (string-listp (strip-cars x))))

    Theorem: vl-string-keys-p-of-make-lookup-alist

    (defthm vl-string-keys-p-of-make-lookup-alist
            (equal (vl-string-keys-p (make-lookup-alist x))
                   (string-listp (list-fix x))))