diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-06-12 22:08:11 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-06-12 22:08:11 -0400 |
| commit | 300adc3c5af5d13eba5b9419ad9e99507d9ba5e1 (patch) | |
| tree | d7bb1c98ff154d349b78e7e0cf4a67525c567729 | |
| parent | bbb36eadba736cb302c30540af82a7ad4287204a (diff) | |
Mention that identities work on both sides
| -rw-r--r-- | doc/logic.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/logic.md b/doc/logic.md index b3bfba25..d3bbde18 100644 --- a/doc/logic.md +++ b/doc/logic.md @@ -51,6 +51,6 @@ A secondary reason is that the GCD falls short as an extension of Or, because it It's common to apply `∧´` or `∨´` to a list (checking whether all elements are true and whether any are true, respectively), and so it's important for extensions to And and Or to share their identity element. Minimum and Maximum do match And and Or when restricted to booleans, but they have different identity elements. It would be dangerous to use Maximum to check whether any element of a list is true because `>⌈´⟨⟩` yields `¯∞` instead of `0`—a bug waiting to happen. Always using `0` as a left argument to `⌈´` fixes this problem but requires more work from the programmer, making errors more likely. -It is easy to prove that the bilinear extensions have the identity elements we want. Of course `1∧x` is `1×x`, or `x`, and `0∨x` is `0×⌾¬x`, or `¬1׬x`, giving `¬¬x` or `x` again. +It is easy to prove that the bilinear extensions have the identity elements we want. Of course `1∧x` is `1×x`, or `x`, and `0∨x` is `0×⌾¬x`, or `¬1׬x`, giving `¬¬x` or `x` again. Both functions are commutative, so these identities are double-sided. Other logical identities do not necessarily hold. For example, in boolean logic And distributes over Or and vice-versa: `a∧b∨c ←→ (a∧b)∨(a∧c)`. But substituting `×` for `∧` and `+-×` for `∨` we find that the left hand side is `(a×b)+(a×c)+(a×b×c)` while the right gives `(a×b)+(a×c)+(a×b×a×c)`. These are equivalent for arbitrary `b` and `c` only if `a=a×a`, that is, `a` is 0 or 1. In terms of probabilities the difference when `a` is not boolean is caused by failure of independence. On the left hand side, the two arguments of every logical function are independent. On the right hand side, each pair of arguments to `∧` are independent, but the two arguments to `∨`, `a∧b` and `a∧c`, are not. The relationship between these arguments means that logical equivalences no longer apply. |
