Re: Notions of Type

From: erk <eric.kaun_at_gmail.com>
Date: 17 Aug 2006 06:03:30 -0700
Message-ID: <1155819810.871255.259900_at_i42g2000cwa.googlegroups.com>


Bob Badour wrote:
> Keith H Duggar wrote:
> My only objection to "type = algebraic structure" is the 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?

Sorry if this is obvious to everyone else, but does an algebra include only operations defined on values of the type in question? I ask because in relational algebra, at least the rename operator involves a different type ("attribute name") than the "core type" (relation).

> Division is not part of the algebra for any type that includes zero as
> one of its values. Or is it?

As division by zero is undefined, either its denominator type is restricted to nonzero, or its range includes "undefined" as a value. If there's another option, I can't think of it.  

Received on Thu Aug 17 2006 - 15:03:30 CEST

Original text of this message