Filtering...

cons-pos-alistp

books/std/typed-alists/cons-pos-alistp

Included Books

other
(in-package "ACL2")
include-book
(include-book "std/util/defalist" :dir :system)
other
(defalist cons-pos-alistp
  (x)
  :parents (std/typed-alists)
  :short "Recognize alists from @(tsee cons) pairs to positive integers."
  :key (consp x)
  :val (posp x)
  :true-listp t
  :keyp-of-nil nil
  :valp-of-nil nil
  ///
  (defthm posp-of-cdr-of-assoc-equal-when-cons-pos-alistp
    (implies (cons-pos-alistp alist)
      (iff (posp (cdr (assoc-equal key alist)))
        (assoc-equal key alist)))))