Hacker News new | past | comments | ask | show | jobs | submit login

> A function is a relationship between two sets

Ok then what is relationship? There's a whole theory of relations, and I'd rather not dive into that for the article. Also, drawing arrows can give misleading intuition.

It's better to define a function as a set of pairs, then you don't need to use anything else not introduced yet.




> It's better to define a function as a set of pairs, then you don't need to use anything else not introduced yet.

If you're looking towards category theory, it may arguably be better to think in terms of abstract arrows as much as possible, so as not to get confused by non-"concrete" categories where there's no obvious "function semantics" for morphisms.


Is there a simple example you could use to illustrate the point? This is interesting.


Let (X,≤) be a partially ordered set. Define a category C whose objects are the elements of X, while for the morphisms there is a single arrow x→y iff x≤y. Those are called posetal categories and are often used as examples



That makes perfect sense and is very helpful. Thank you.


A relationship between two sets is a set of pairs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: