Re: Function

From: Bob Badour <bbadour_at_pei.sympatico.ca>
Date: Tue, 15 Jan 2008 21:56:40 -0400
Message-ID: <478d645a$0$4035$9a566e8b_at_news.aliant.net>


Kira Yamato wrote:

> On 2008-01-15 13:22:50 -0500, Bob Badour <bbadour_at_pei.sympatico.ca> said:
>

>> Kira Yamato wrote:
>>
>>> On 2008-01-15 09:26:01 -0500, mAsterdam <mAsterdam_at_vrijdag.org> said:
>>>
>>>> vldm10 wrote:
>>>>
>>>>> [...]
>>>>>
>>>>>> 2. A domain is a set of values: for example
>>>>>> "integers between 0 and 255",
>>>>>> "character strings less than 10 characters long",
>>>>>> "dates".
>>>>>> Sometimes used synonymously with type.
>>>
>>> This seems right.  A domain is just a set of values.  In relational 
>>> algebra, this set is required to be non-empty since attributes are 
>>> non-null.
>>
>> Theoretically, the universal subtype has an empty set of values and 
>> the union of all operations.

>
> Can you explain a bit more what you mean here?

I suspect _Third Manifesto_ mentions the universal subtype. Or see Marshall's reply.

> What is the universal subtype? If it is an empty set, where is it used?

You know what it means to be universal, right? You know what a subtype is, right?

The universal subtype is not an empty set. It has an empty set of values and the union of all operations.

> Can this type be an attribute in a relation? I would think not, since
> relational algebra requires all values in the tuples be non-null.

Yes, as Marshall observed, it can be an attribute in an empty relation.

> What do you mean by union of all operations?

You know what a set is, right? You know what a union of sets is, right? If a data type has a set of values and a set of operations defined on those values, the universal subtype's set of operations is the union of the sets of operations for all of its supertypes, which is all data types because it is a universal subtype.

>>>>>> 3. Domain of a function. See function, math context.
>>>
>>> On the other hand, mathematics does not require a domain to be 
>>> non-empty.
>>>
>>>>>> [Function]
>>>>>> For now we have to live with different meanings
>>>>>> of _function_ when talking about databases:
>>>>>> "The function of this function is to get the tuples from B
>>>>>> that are functionally dependant on A."
>>>
>>> No, there is always just one meaning of function in database.
>>
>> I got "and", "but", and "or". They'll get you pretty far. (Apologies 
>> to our European friends and the younger crowd in the audience for the 
>> inside joke.)

>
> Hmm... Apparently, I'm an outsider. :)

http://www.youtube.com/watch?v=7TQByv_xkuc

It was one of the first primers on boolean logic operations I recall seeing.

>>>>>> Three different contexts, but just about the same meaning:
>>>>>>
>>>>>> 1. General
>>>>>> A purpose or use.
>>>>>>
>>>>>> 2. Math
>>>>>> A binary mathematical relation over two sets D and C that 
>>>>>> associates with each element in D exactly one element in C.
>>>>>> Set D is called the domain of the function, C its codomain.
>>>
>>> Essentially correct, although to be rigorous you need to define how 
>>> such binary relation can define the meaning of "associating each 
>>> element in D exactly one element in C."
>>>
>>> Not all binary relation has this property.
>>>
>>>>>> 3. Software
>>>>>> A subroutine, procedure, or method.
>>>
>>> Yea.  It's really an abused use of the term in software design.  
>>> Subroutines in software has no clear domain since same input 
>>> arguments can product different outputs.
>>
>> If one considers internal state an input, I am not entirely sure what 
>> you said is true.

>
> Well if you go that far, then since all Turing machines are
> deterministic, hence it's just one big function.
>
>>>>>> In both the math and software context, there is a sense of
>>>>>> direction from domain (input) to codomain (output).
>>>>>> For most purposes, this intuitive picture is good enough:
>>>>>>
>>>>>>             |------------|
>>>>>> --- x ---- >| f-machine  |------ f(x) ----- >
>>>>>>             |------------|
>>>>>>
>>>>>> Where x is input in the "f-machine" and f(x) is output.
>>>
>>> Fair.
>>>
>>>>>> notes:
>>>>>>     every operator is a function
>>>>>>     every function is a relation
>>>
>>> Yes.
>>
>> Technically, in the standard vocabularies, every operator is a symbol 
>> not a function.

>
> But every operator is also a function though.

No, in the standard vocabularies, every operator is only a symbol. The symbol can stand for a function, but 'operator' signifies the symbol and not the function.

[snip] Received on Wed Jan 16 2008 - 02:56:40 CET

Original text of this message