• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
        • 4v-sexprs
          • 4v-sexpr-vars
          • 4v-sexpr-eval
          • 4v-sexpr-to-faig
          • 4v-sexpr-restrict-with-rw
          • 4vs-constructors
          • 4v-sexpr-compose-with-rw
          • 4v-sexpr-restrict
          • 4v-sexpr-alist-extract
          • 4v-sexpr-compose
          • 4v-nsexpr-p
            • 4v-nsexpr-alist-p
              • 4v-nsexpr-p-4v-sexpr-compose
              • 4v-nsexpr-p-4v-sexpr-restrict
            • 4v-sexpr-purebool-p
            • 4v-sexpr-<=
            • Sfaig
            • Sexpr-equivs
            • 3v-syntax-sexprp
            • Sexpr-rewriting
            • 4v-sexpr-ind
            • 4v-alist-extract
          • 4v-monotonicity
          • 4v-operations
          • Why-4v-logic
          • 4v-<=
          • 4vp
          • 4vcases
          • 4v-fix
          • 4v-lookup
      • Debugging
      • Projects
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • 4v-nsexpr-p

    4v-nsexpr-alist-p

    (4v-nsexpr-p x) recognizes an alist where every value is an 4v-nsexpr-p.

    Definitions and Theorems

    Function: 4v-nsexpr-alist-p

    (defun 4v-nsexpr-alist-p (x)
      "Alist whose values are sexprs with natp variables."
      (declare (xargs :guard t))
      (or (atom x)
          (and (consp (car x))
               (4v-nsexpr-p (cdar x))
               (4v-nsexpr-alist-p (cdr x)))))

    Theorem: 4v-nsexpr-p-sexpr-fix-lookup-in-sexpr-alistp

    (defthm 4v-nsexpr-p-sexpr-fix-lookup-in-sexpr-alistp
     (implies (and (4v-nsexpr-alist-p x)
                   (hons-assoc-equal k x))
              (nat-listp (4v-sexpr-vars (cdr (hons-assoc-equal k x))))))

    Theorem: 4v-nsexpr-alist-p-fal-extract

    (defthm 4v-nsexpr-alist-p-fal-extract
      (implies (4v-nsexpr-alist-p x)
               (4v-nsexpr-alist-p (fal-extract keys x))))