Re: Is a function a relation?

From: Keith H Duggar <>
Date: Mon, 22 Jun 2009 22:09:27 -0700 (PDT)
Message-ID: <>

On Jun 22, 11:44 pm, David BL <> wrote:
> 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
> 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.

You considered the wrong relation values having the wrong attribute names. Here are the correct values

   f(x) = x+1 -> { (domain,range) | range = domain + 1 }    g(y) = y+1 -> { (domain,range) | range = domain - 1 }

corresponding to the f(x) and g(y) you gave.

KHD Received on Tue Jun 23 2009 - 07:09:27 CEST

Original text of this message