
Am Freitag 08 Mai 2009 15:51:28 schrieb Miguel Mitrofanov:
j.waldmann wrote on 08.05.2009 17:39:
Wow. This is really a bikeshed discussion. My post contained praise for the book, a critique of one of its design decisions (intermediate language not explicitely typed), and a syntactical remark. Guess what the discussion is about. (This is also known as http://www.haskell.org/haskellwiki/Wadlers_Law)
If you're advocating (f.g) = \ x -> f(g(x)), then:
I'm not advocating it, just objecting to you calling it wrong, because that's the common definition.
1. Define composition of relations.
R1 . R2 = {(x, y) | \exists z : (x, z) \in R2 & (z, y) \in R1}
That's the definition I've usually seen. (If I'm not mistaken).
Same here, I can't remember having seen any other definition. But I won't deny that it would flow more easily if it were the other way round.
2. Is a function a special case of a relation?
In set theory, a function is usually *defined* as a relation R where R[{a}] has at most one element, so yes.