[Haskell-cafe] New to Haskell

Benja Fallenstein benja.fallenstein at gmail.com
Tue Dec 18 11:24:56 EST 2007

Hi Henning,

On Dec 18, 2007 5:17 PM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> The mathematical definition of "function" I know of, says that functions
> are special relations, and relations are sets of pairs. Their is nothing
> about intension.

That's the standard definition in set theory, but it's not the only
mathematical definition of function. It also doesn't suffice for
defining all Haskell functions-- consider

data T = T (T -> Int)

fn :: T -> Int
fn _ = 7

We have (fn (T fn) == 7), so in the graph of 'fn' we must have a pair
(T fn, 7). But if 'fn' is the same mathematical object as its graph,
that would mean that the graph of 'fn' would have to contain a pair
whose first element indirectly contains... the graph of fn!

This sort of circularity is not allowed in standard ZFC set theory, so
if we're going to be precise, we will have to choose a different
representation for functions than their graphs.

- Benja

More information about the Haskell-Cafe mailing list