Filtering...

baselists

books/centaur/fty/baselists

Included Books

other
(in-package "ACL2")
include-book
(include-book "deftypes")
include-book
(include-book "basetypes")
include-book
(include-book "std/strings/eqv" :dir :system)
other
(defxdoc baselists
  :parents (fty)
  :short "A book that associates various built-in ACL2 list recognizers with
suitable fixing functions and equivalence relations, for use in the @(see
fty::fty-discipline)."
  :long "<p>This is similar in spirit to the @(see fty::basetypes) book: it
arranges so that various list recognizers like @(see integer-listp), @(see
boolean-listp), etc., can be directly used with FTY.</p>

<p>Special note: even though @(see character-listp) and @(see string-listp)
aren't listed below, you will still be able to use them with FTY after
including the @('baselists') book.  For historical reasons these types are
defined in a special way in the @(see std/strings) library, see in particular
@(see str::equivalences).</p>")
local
(local (set-default-parents baselists))
other
(deflist acl2-number-list
  :elt-type acl2-number
  :pred acl2-number-listp
  :true-listp t
  :elementp-of-nil nil)
other
(deflist boolean-list
  :elt-type bool
  :pred boolean-listp
  :true-listp t
  :elementp-of-nil t)
other
(deflist integer-list
  :elt-type int
  :pred integer-listp
  :true-listp t
  :elementp-of-nil nil)
other
(deflist nat-list
  :elt-type nat
  :pred nat-listp
  :true-listp t
  :elementp-of-nil nil)
other
(deflist rational-list
  :elt-type rational
  :pred rational-listp
  :true-listp t
  :elementp-of-nil nil)
other
(deflist symbol-list
  :elt-type symbol
  :pred symbol-listp
  :true-listp t
  :elementp-of-nil t)
other
(deffixtype true-list
  :pred true-listp
  :fix list-fix
  :equiv list-equiv
  :forward t)
other
(deflist true-list-list
  :elt-type true-list
  :true-listp t
  :pred true-list-listp
  :elementp-of-nil t)
other
(defrefinement list-equiv
  true-list-list-equiv
  :hints (("goal" :induct (fast-list-equiv x y)
     :in-theory (enable fast-list-equiv true-list-list-fix))))