9 ms·
Anyone know the story behind the converse implication operator? What it's useful for, and why it's undocumented?
by ksikka 11y ago
Anyone know the story behind the converse implication operator? What it's useful for, and why it's undocumented?
- mxmul 11y agoRemember that booleans are integers in python. This is just the regular exponential operator.
- johnsoft 11y ago∗∗ is the exponentiation operator. True is implicitly converted to 1, and False to 0. It's a coincidence that 0^0, 0^1, 1^0, and 1^1 line up with converse implication.
- asgard1024 11y agoMaybe someone can explain better, but I don't think it's a coincidence.. In category theory, there is a general notion of "exponential object". This works like normal exponentiation in various categories of numbers, and like modus ponens (and also reversed - given exponent and power, you can deduce the base) in various categories of logic.
- Veedrac 11y agoThere's no coercion - True is just an alias for 1, and False for 0. True <pow> False is just an ugly way of writing 1 <pow> 0.