Four-valued logic
In logic, a four-valued logic is any logic with four truth values. Multiple such logics were invented to deal with various practical problems.
Belnap
Nuel Belnap considered the challenge of question answering by computer in 1975. Noting human fallibility, he was concerned with the case where two contradictory facts were loaded into memory, and then a query was made. "We all know about the fecundity of contradictions in two-valued logic: contradictions are never isolated, infecting as they do the whole system."[1] Belnap proposed a four-valued logic as a means of containing contradiction.[2][3]
He called the table of values A4: Its possible values are true, false, both (true and false), and neither (true nor false). Belnap's logic is designed to cope with multiple information sources such that if only true is found then true is assigned, if only false is found then false is assigned, if some sources say true and others say false then both is assigned, and if no information is given by any information source then neither is assigned. These four values correspond to the elements of the power set based on {T, F}.
T is the supremum and F the infimum in the logical lattice where None and Both are in the wings. Belnap has this interpretation: "The worst thing is to be told something is false simpliciter. You are better off (it is one of your hopes) in either being told nothing about it, or being told both that it is true and also that it is false; while of course best of all is to be told that it is true." Belnap notes that "paradoxes of implication" (A&~A)→B and A→(B∨~B) are avoided in his 4-valued system.
Logical connectives
Belnap addressed the challenge of extending logical connectives to A4. Since it is the power set on {T, F}, the elements of A4 are ordered by inclusion making it a lattice with Both at the supremum and None at the infimum, and T and F on the wings. Referring to Dana Scott, he assumes the connectives are Scott-continuous or monotonic functions. First he expands negation by deducing that ¬Both = Both and ¬None = None. To expand And and Or the monotonicity goes only so far. Belnap uses equivalence (a&b = a iff avb = b) to fill out the tables for these connectives. He finds None & Both = F while None v Both = T.
& | N | F | T | B |
---|---|---|---|---|
N | N | F | N | F |
F | F | F | F | F |
T | N | F | T | B |
B | F | F | B | B |
v | N | F | T | B |
---|---|---|---|---|
N | N | N | T | T |
F | N | F | T | B |
T | T | T | T | T |
B | T | B | T | B |
The result is a second lattice L4 called the "logical lattice", where A4 is the "approximation lattice" determining Scott continuity.
Implementation using two bits
Let one bit be assigned for each truth value: 01=T and 10=F with 00=N and 11=B.[4]
Then the subset relation in the power set on {T, F} corresponds to order ab<cd iff a<c and b<d in two-bit representation. Belnap calls the lattice associated with this order the "approximation lattice".
The logic associated with two-bit variables can be incorporated into computer hardware.[5]
Applications
A four-valued logic was established by IEEE with the standard IEEE 1364: It models signal values in digital circuits. The four values are 1, 0, Z and X. 1 and 0 stand for boolean true and false, Z stands for high impedance or open circuit and X stands for don't care (e.g., the value has no effect). This logic is itself a subset of the 9-valued logic standard called IEEE 1164 and implemented in Very High Speed Integrated Circuit Hardware Description Language, VHDL's std_logic.
One should not confuse four-valued mathematical logic (using operators, truth tables, syllogisms, propositional calculus, theorems and so on) with communication protocols built using binary logic and displaying responses with four possible states implemented with boolean-like type of values : for instance, the SAE J1939 standard, used for CAN data transmission in heavy road vehicles, which has four logical (boolean) values: False, True, Error Condition, and Not installed (represented by values 0–3). Error Condition means there is a technical problem obstructing data acquisition. The logics for that is for example True and Error Condition=Error Condition. Not installed is used for a feature that does not exist in this vehicle, and should be disregarded for logical calculation. On CAN, usually fixed data messages are sent containing many signal values each, so a signal representing a not-installed feature will be sent anyway.
References
- This feature of two-valued logic has been termed the principle of explosion.
- N. Belnap (1975) "How Computers Should Think", pages 30 to 56 in Contemporary Aspects of Philosophy, Gilbert Ryle editor, Oriel Press ISBN 0-85362-161-6
- N. Belnap (1977) A Useful Four-Valued Logic, in Modern Uses of Multiple-Valued Logic, edited by J. Michael Dunn and George Epstein, Springer books
- Henryk Greniewski, Krystyn Bochenek & Romuald Marczynski (1955) Application of bi-elemental Boolean algebra to electronic circuits, Studia Logica 2(1) 7–75.
- Ben Choi (2013) "Advancing from two to four valued logic circuits", International Conference on Industrial Technology, IEEE, doi:10.1109/ICIT.2013.6505818
Further reading
- Arieli, Ofer; Avron, Arnon (December 2017). "Four-valued paradefinite logics" (PDF). Studia Logica (published 10 April 2017). 105 (6): 1087–1122. doi:10.1007/s11225-017-9721-4.
- Bimbo, Katalin; Dunn, J. Michael (Summer 2001). "Four-valued Logic". Notre Dame Journal of Formal Logic. 42 (3): 171–192. doi:10.1305/ndjfl/1063372199. MR 2010180. Zbl 1034.03021 – via Project Euclid.
- Ferreira, J. Ulisses (September 30 – October 1, 2017). A Four-Valued Logic (PDF). 9th International Conference on Networks & Communications (NeCoM 2017). Computer Science & Information Technology. 7 (4). Dubai. pp. 71–84. doi:10.5121/csit.2017.71206. ISBN 978-1-921987-72-4.