_____________________________________________________________________

           Fully Ordered Finite Sets for ACL2, Version 0.81
               Copyright (C) 2003, 2004 by Jared Davis
_____________________________________________________________________


  This is a basic finite set theory library for ACL2.  Instructions
  for using the library, documentation about the library's design,
  and information about the current version are available from this
  web site:

     http://www.cs.utexas.edu/users/jared/osets/

  
  Quick Instructions:
 
     * Run make (this should take a few minutes, eventually produ-
       cing the files sets.cert, typed.cert, and set-order.cert)

     * Invoke ACL2 and use (include-book "sets") to load the library.  
       (Note: if you want to use the sets book within a new certified 
       book, you may want to use (ld "package.lisp") in your portcullis.
       This step is unnecessary if you are just using sets in a normal
       ACL2 session.)

     * Call (SETS::enable-set-reasoning) to turn on membership based 
       reasoning about equality and subset.

     * Use the set theory functions below.

  
  Quick Reference:  

   SETS::

     * (setp X) - test for if X is a set or not.
     * (sfix X) - identity on sets, nil on non-sets.

     * (empty X) - is X an empty set?
     * (head X) - "smallest" element in a set (think car)
     * (tail X) - "all but smallest" elements of a set (think cdr)
     * (insert a X) - insert a into X.
     * (delete a X) - delete a from X.

     * (in a X) - test if a is in X.
     * (subset X Y) - test if X is a subset of Y.

     * (union X Y) - union of X and Y.
     * (intersect X Y) - intersection of X and Y.
     * (difference X Y) - difference of X and Y.
     * (cardinality X) - number of elements in X.

     * (mergesort x) - efficiently build a set from an unsorted list
                       which may contain duplicates

  Typed Sets:  

     You can extend the sets library and reason about sets whose ele-
     menets all must satisfy some arbitrary predicate, e.g. "integer 
     sets" or "my-custom-type" sets.  See [typed.lisp] for details.

  
  Reasoning about Set Order:

     The set order is not directly visible from including "sets.lisp"
     unless you explicitly enable setp or insert.  This is not rec-
     ommended.  Normally you should never need to reason about the 
     order, but there are some legitimate reasons for doing so:
 
      (1) you want to make statements about the actual representation
          of sets, e.g. "(foop x) => (not (setp x))"

      (2) you want to build sets using non-set functions like cons,
          and need to show properties of the results.  Normally you
          should use the set primitives (head, tail, ...), but if you
          are making a "fast" version for use with MBE, etc., you may
          have just cause for using cons directly.

     To accomodate this, you can include set-order.lisp, which has 
     some theories to assist with this type of reasoning.  

_____________________________________________________________________
 
