aboutsummaryrefslogtreecommitdiff
path: root/docs/doc/logic.html
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2020-07-18 23:35:02 -0400
commit4b9b761cc990f9247083ea28a32d9123bb752818 (patch)
tree9e491c67662f8378ba39c8da90b6ae6a6783d596 /docs/doc/logic.html
parentc63290ae05990f54619207ac6ee0b3fbf6f9c145 (diff)
Add a main repository link to html files and titles to spec files
Diffstat (limited to 'docs/doc/logic.html')
-rw-r--r--docs/doc/logic.html1
1 files changed, 1 insertions, 0 deletions
diff --git a/docs/doc/logic.html b/docs/doc/logic.html
index 2235259a..7ac951d8 100644
--- a/docs/doc/logic.html
+++ b/docs/doc/logic.html
@@ -1,4 +1,5 @@
<head><link href="../style.css" rel="stylesheet"/></head>
+<div class="nav"><a href="https://github.com/mlochbaum/BQN">BQN</a></div>
<h1 id="logic-functions--and--or--not--also-span-">Logic functions: And, Or, Not (also Span)</h1>
<p>BQN retains the APL symbols <code><span class='Function'>∧</span></code> and <code><span class='Function'>∨</span></code> for logical <em>and</em> and <em>or</em>, and changed APL's <code><span class='Value'>~</span></code> to <code><span class='Function'>¬</span></code> for <em>not</em>, since <code><span class='Value'>~</span></code> looks too much like <code><span class='Modifier'>˜</span></code> and <code><span class='Function'>¬</span></code> is more common in mathematics today. Like J, BQN extends Not to the linear function <code><span class='Number'>1</span><span class='Modifier2'>⊸</span><span class='Function'>-</span></code>. However, it discards <a href="https://aplwiki.com/wiki/GCD">GCD</a> and <a href="https://aplwiki.com/wiki/LCM">LCM</a> as extensions of And and Or, and instead uses bilinear extensions: And is identical to Times (<code><span class='Function'>×</span></code>), while Or is <code><span class='Function'>×</span><span class='Modifier2'>⌾</span><span class='Function'>¬</span></code>, following De Morgan's laws (other ways of obtaining a function for Or give an equivalent result—there is only one bilinear extension).</p>
<p>If the arguments are probabilities of independent events, then an extended function gives the probability of the boolean function on their outcomes (for example, if <em>A</em> occurs with probability <code><span class='Value'>a</span></code> and <em>B</em> with probability <code><span class='Value'>b</span></code> independent of <em>A</em>, then <em>A</em> or <em>B</em> occurs with probability <code><span class='Value'>a</span><span class='Function'>∨</span><span class='Value'>b</span></code>). These extensions have also been used in complexity theory, because they allow mathematicians to transfer a logical circuit from the discrete to the continuous domain in order to use calculus on it.</p>