News for hackers. Stuff that matters.
Re:If-then-else had to be invented by tempodox on Sunday December 13, 2020 @03:38PM (#25410006)
Your formula `(A --> B) ^ (¬A --> C)` expands to `¬(A & B) & (A | ¬C)`. I would propose that `(A & B) ^ (¬A & C)`, which expands to `(¬A | B) & (A | C)`, comes closer to actual `if` semantics.
Re:If-then-else had to be invented by hollerith on Sunday December 13, 2020 @03:42PM (#25410042)
They are equivalent (assuming ^ is the same as &). In particular, A --> B is equivalent to ¬A | B.
Re:If-then-else had to be invented by tempodox on Sunday December 13, 2020 @04:54PM (#25410724)
I see. I interpreted `^` as XOR. The implication (`-->`) was clear enough to not be misunderstood.
Re:If-then-else had to be invented by chriskanan on Monday December 14, 2020 @03:51PM (#25423103)
The "ʌ" symbol (^ due to laziness) is commonly used to mean AND in propositional/formal logic in mathematics:

https://en.wikipedia.org/wiki/Propositional_calculus

Re:If-then-else had to be invented by tempodox on Monday December 14, 2020 @04:56PM (#25423919)
I know, but due to the use of “¬” for the negation I would have expected “∧” (‘LOGICAL AND’, U+2227), or at least something less ambiguous, like “&”. C conditioned me into thinking of ASCII caret as XOR.