Re: Notions of Type
Date: 17 Aug 2006 00:53:08 -0700
Message-ID: <1155801188.313045.171990_at_75g2000cwc.googlegroups.com>
Bob Badour wrote:
> Keith H Duggar wrote:
> > When you have a chance I'd appreciate your thoughts. Oh,
> > and of course same goes for any other type theory
> > enthusiasts out there.
>
> I don't recall saying that type theory failed in any
> manner. Perhaps you could point to where you reached that
> conclusion? Perhaps I misspoke, or perhaps the comment
> applies within a limited context.
I was not able to find it. Either my search failed or I
confused a statement by another as yours or I imagined it.
My apologies. It was more a recollection that you had some
insight into what type theory should have been, or how it
could be improved, or how poor type theories had adversely
affected the art of programming, or something like that.
Hence my interest in further details.
> requirement for closure within a single type.
> For any type, we can define the algebra as the type and
> the subset of the type's operations that exhibit closure.
> In my view, the type includes the entire set of operations
> defined on the values of the type including those not
> exhibiting closure.
> For instance, an operation might have a single character
> string operand with non-negative integers as result as is
> the case with the length operation. That operation is
> certainly part of the character string type and arguably
> part of the non-negative integer type. It is not part of
> any algebraic structure. Or do I misunderstand something?
> Square root is part of the algebra for non-negative reals
> and for perfect squares but not for integers. It is,
> however, a valid operation on integers resulting in values
> of a different type.
I think that would be part of a larger algebra then. With
domains and signatures such as:
{ N N^2 Z R*+ C ... }
...
sqrt : R*+ -> R*+
sqrt : N^2 -> N
sqrt : Z -> C
> includes zero as one of its values. Or is it?
Division rings and fields (such as R) are considered
algebraic structures. But I'm not clear on how one would
express the signature for a division operator. This points
to a useful property: when there is trouble expressing the
algebraic structure there is a possibility of trouble in the
computer. In this case exceptions, divide-by-zero, etc.
Received on Thu Aug 17 2006 - 09:53:08 CEST