
4 Aug
2012
4 Aug
'12
5:59 p.m.
Hi Miguel, First note that I am very much a beginner at Category Theory. I am just sharing what I learn.
How do you know that a Haskell function is injective? I don't think it's possible to write a function which checks if another function is injective or not .
A function is injective if each input value (domain) yields a different output value (codomain). So if the set of inputs is finite, then it should be possible to write a function that loops over each input value and checks that its output is distinct from all other outputs.
How to automatically get the inverse of a Haskell function?
That's a great question. I don't know the answer to that. Anyone else have an idea? /Roger