Is a function a relation?
Date: Mon, 22 Jun 2009 20:44:23 -0700 (PDT)
Message-ID: <7ffe9d54-5889-4006-b14b-947b535add51_at_l12g2000yqo.googlegroups.com>
Since Keith popped up recently, I'm interesting in reopening the question of whether a function is a relation (I have a small point to add).
I'm interpreting "is a" in the same way as D&D. i.e. the question is equivalent to asking whether every function value is a relation value.
D&D use the CIRCLE and ELLIPSE example to illustrate the idea of type inheritance as specialisation by constraint. CIRCLE is a subtype of ELLIPSE because every value of type CIRCLE is also a value of type ELLIPSE. Let E be a variable of type ELLIPSE that happens to hold a value of type CIRCLE. D&D mention that THE_R(E) is not permitted, and it is necessary to instead use THE_R(TREAT_DOWN_AS_CIRCLE(E)). Implicit in this idea is that when an ellipse value happens to also be a circle value, the interpretation of the ellipse as a circle is unambiguous.
Consider the binary relation with the following graph
{ (x,y) | y = x+1 }
and the following two functions
f(x) = x+1
g(y) = y-1
It seems to me that assuming D&D's interpretation of "is a", it cannot
be said that a function is a relation because TREAT_DOWN_AS_FUNCTION is ambiguous when provided with a relation variable that holds the value f. Received on Tue Jun 23 2009 - 05:44:23 CEST