% --------------------------------------------------------------------- %
% DIRECTORY: cpo                                                        %
%                                                                       %
% DESCRIPTION: theory of CPO's and lattices.                            %
%                                                                       %
% AUTHOR: Wishnu Prasetya                                               %
%                                                                       %
% ADDRESS: Dept. of Comp. Science                                       %
%          Utrecht University                                           %
%          the Netherlands                                              %
%                                                                       %
%          email: wishnu@cs.ruu.nl                                      %
%                                                                       %
% DATE: 94.06.01                                                        %
% --------------------------------------------------------------------- %

cpo is a HOL library that provides the definitions and various
theorems of CPO (Complete Partial Orders) and lattice. Up to now there
is no ML tools provided but perhaps this may change for the benefit of
the users in the future.

The library is originally called CPO, written by Albert Camilleri,
which is based on library all_sets, which no longer standard in HOL. I
update the library to make it compatible with the current standard
sets library. Unfortunately I cannot dodge the temptation to also
rewrite Albert's definitions to suit my style. In any case, if this is
the first time you need CPO or lattice in your HOL proofs, then the
new cpo may be a better option for its compatibility. Below we give an
overview of the definitions and style that I use, and main results
provided by the library.

To build the library: simply type make all.
--------------------

In addition the file thms_list.txt provides a list of all definitions
& theorems provided.


I hope this is of any use to you.

Wishnu Prasetya
Dept. of Comp. Science
Utrecht University
the Netherlands
wishnu@cs.ruu.nl

==========================================================================

Theory CPO:
-----------

Let in the sequel r be a relation on type A, s a relation on type B, 
f a function from A to B, and X a set on type A.

Partial Orders:

  REFL r       : r is a reflexive 
  ANTISYM r    : r is anti-symmetric
  TRANS r      : r is transitive
  PO r         : r is a partial order 


Upper & lower bounds:

  isUB  r X a  : a is an upper bound of set X wrt ordering r
  isLB  r X a  : a is an lower bound of set X wrt ordering r
  isCUP r X a  : a is the least upper bound of set X wrt r
  isCAP r X a  : a is the greatest lower bound of set X wrt r
  CUP r X      : the least upper bound of X wrt r, if exists
  CAP r X      : the greatest lower bound of X wrt r, if exists
  Bot r        : the least element in type A according to 
  Top r        : the greatest element in type A according to r

Complete Partial Orders:

  Directed r X : X is a `directed` set wrt r
  CPO r        : r is a complete partial order
 
Monotonic, Continous functions & fix points:

  Mono r s f   : f is a monotonic function wrt r and s
  Cont r s f   : f is a continous function wrt r and s
  isLFP r f a  : a is the least fix point of f wrt r 
  LFP r f      : the least fix point of f wrt r, if exists
  ITER n f     : n times application of f

Main results supported by this theory:

  A continous function is monotonic.
  Composition of monotonic/continous functions are monotonic/continous.
  {f^n Bot | 0<=n} is the least fix point of f.


==========================================================================

Theory Cla:
-----------
Let in the sequel r be a relation on type A, s a relation on type B, 
f a function from A to B, and X a set on type A.
Concepts/definitions supported:


Complete Lattice:

  CLa r        : r is a complete lattice
 
Distributivity of a function over CUP and CAP:

  CUP_Junc r s f   : f distributes over CUP (least upper bound) of
                     any non-empty set X
  CAP_Junc r s f   : f distributes over CAP (greatest lower bound) of
                     any non-empty set X
  CUP_Distr r s f  : f distributes over CUP of any set X
  CAP_Distr r s f  : f distributes over CAP of any set X

Main results supported by this theory:

  - Knaster-Tarski fix point theorem for monotonic functions.
  - Rolling Rule of fix point.
  - Plotkin's lemma for fix point fusion of monotonic functions.


==========================================================================

Theory galois:
--------------
Let in the sequel:

    r : A->A->bool (ie, a relation on A)
    s : B->B->bool
    f : A->B
    g : B->A

Concepts/definitions supported:

  Galois r s f g   : f and g form a Galois connection wrt r and s
                     with f as the lower adjoint and g as the upper
                     adjoint. That is, they satisfy:

                     r (f x) y  =  s x (g y)

Galois connection usually assumes that r and s are partial orders and
are lattices.

Main results supported by this theory:

  - Plotkin's lemma on fix point fusion, given a lower adjoint of a
    galois connection.


(END)