4 ms·
Another consequence is that exponentiation a^b can be considered the same thing as b -> a. In the case where a and b are not strictly boolean (supposing they a
by spyrja 1y ago
Another consequence is that exponentiation a^b can be considered the same thing as b -> a.
In the case where a and b are not strictly boolean (supposing they are instead probabilities for example) you could even generalize it somewhat in terms of "pure" mathematical operations.
double implies(double a, double b) {
double dif = a - b;
double abx = sqrt(dif * dif);
return 1 + pow(0, abx - dif) - pow(1, abx + dif);
}
Kind of silly, I know, but it does work.
- gettingoverit 1y agoNice to know! I thought about it in terms of cardinalities of types. If A and B are types with |A| and |B| values correspondingly, there are |B|^|A| possible functions A -> B. Another funny thing is that if you consider forall a. (a -> a) -> (a -> a) the type of natural numbers (weird, I know, but basically we encode numbers in unary with number of times we compose (a -> a) to itself), then exponentiation on such numbers will be a ^ b = b a