Filtering...

isort

books/std/strings/isort
other
(in-package "STR")
other
(include-book "iless")
other
(include-book "defsort/defsort" :dir :system)
other
(local (include-book "std/typed-lists/string-listp" :dir :system))
other
(defsort :comparablep stringp
  :compare< istr<
  :prefix istr)
other
(defthm istr-list-p-removal
  (equal (istr-list-p x)
    (string-listp (list-fix x)))
  :hints (("Goal" :in-theory (enable istr-list-p))))
other
(defthm string-listp-of-istr-sort
  (implies (force (string-listp x))
    (string-listp (istr-sort x)))
  :hints (("Goal" :in-theory (disable istr-sort-creates-comparable-listp)
     :use ((:instance istr-sort-creates-comparable-listp)))))
other
(defsection istrsort
  :parents (ordering)
  :short "Case-insensitively sort a string list."
  :long "<p>This is an efficient, stable mergesort for string lists based on
@(see istr<) and implemented with the @(see acl2::defsort) book.</p>"
  (defmacro istrsort (x) `(istr-sort ,STR::X)))
other
(add-macro-alias istrsort istr-sort)