From Paul Loewenstein Fri Dec  8 10:54:48 1989
Date: Thu, 7 Dec 89 14:50:03 PST
From: paul%tina.stanford.edu@murtoa.cs.mu.oz (Paul N. Loewenstein)
To: info-hol@clover.ucdavis.edu
Subject: Lists with elements of varying types
Status: R


Before I get shot down again by other replies, here is Elsa'a fatal salvo:


Dear Paul,
  I don't know lisp particularly, but I think you are wrong about the
statement "Surely LISP-style lists are equivalent to HOL-style lists
where the element type is a disjoint sum."  This supposed disjoint
sum, what is it a sum of?  Is it polymorphic or monomorphic?  Does it
admitt only 0-ary type constructors or are compound types allowed?  E.g.
is the type (num,(string,(integer,bool)fun)pair)pair allowed?  Infinte
disjoint sums do not exist as such in HOL.  If this is a finite
disjoint sum, I don't know what you are includung and what you are
excluding.  As soon as you have a 0-ary type constructor, such as
bool, and a non-0-ary type constructor, such as fun or pair, you have
an infinite collection of distinct types.  Another question, this
disjoint sum, is it included as a summand in itself?  Can one of these
lists be an element in another?  And finally does this type have the
type of functions from itself to itself as a summand?  For any given
heterogenous list we can build a disjoint sum over which we can build
the corresponding "homogenous" list.  But there is no one type that
can deal with all heterogenous lists, for it would have to have the
function space from itself to itself embedded in itself, and as Tom
has observed this is not possible.
                                ---Elsa



