A three-valued logic (also trinary logic, trivalent, ternary, or trilean, sometimes abbreviated 3VL) is any of several many-valued logic systems in which there are three truth values indicating true, false, and some third value. This is contrasted with the more commonly known bivalent logics (such as classical sentential or Boolean logic) which provide only for true and false. Emil Leon Post is credited with first introducing additional logical truth degrees in his 1921 theory of elementary propositions. The conceptual form and basic ideas of three-valued logic were initially published by Jan Łukasiewicz and Clarence Irving Lewis. These were then re-formulated by Grigore Constantin Moisil in an axiomatic algebraic form, and also extended to n-valued logics in 1945.
Pre-discovery Around 1910, Charles Sanders Peirce defined a many-valued logic system, but never published it. Peirce soundly rejected the idea that all propositions must be either true or false; boundary-propositions, he writes, are "at the limit between P and not P." However, as confident as he was that "Triadic Logic is universally true," he also jotted down that "All this is mighty close to nonsense." Only in 1966, when Max Fisch and Atwell Turquette began publishing what they rediscovered in his unpublished manuscripts, did Peirce's triadic ideas become widely known.
Motivation Broadly speaking, the primary motivation for research of three-valued logic is to represent the truth value of a statement that cannot be represented as true or false. Łukasiewicz initially developed three-valued logic for the problem of future contingents to represent the truth value of statements about the undetermined future. Bruno de Finetti used a third value to represent when "a given individual does not know the [correct] response, at least at a given moment." Hilary Putnam used it to represent values that cannot physically be decided:
For example, if we have verified (by using a speedometer) that the velocity of a motor car is such and such, it might be impossible in such a world to verify or falsify certain statements concerning its position at that moment. If we know by reference to a physical law together with certain observational data that a statement as to the position of a motor car can never be falsified or verified, then there may be some point to not regarding the statement as true or false, but regarding it as "middle". It is only because, in macrocosmic experience, everything that we regard as an empirically meaningful statement seems to be at least potentially verifiable or falsifiable that we prefer the convention according to which we say that every such statement is either true or false, but in many cases we don't know which. Similarly, Stephen Cole Kleene used a third value to represent predicates that are "undecidable by [any] algorithms whether true or false"
Representation of values As with bivalent logic, truth values in ternary logic may be represented numerically using various representations of the ternary numeral system. A few of the more common examples are:
in balanced ternary, each digit has one of 3 values: −1, 0, or +1; these values may also be simplified to −, 0, +, respectively; in the redundant binary representation, each digit can have a value of −1, 0, 0/1 (the value 0/1 has two different representations); in the ternary numeral system, each digit is a trit (trinary digit) having a value of: 0, 1, or 2; in the skew binary number system, only the least-significant non-zero digit can have a value of 2, and the remaining digits have a value of 0 or 1; 1 for true, 2 for false, and 0 for unknown, unknowable, undecidable, irrelevant, or both; 0 for false, 1 for true, and a third non-integer "maybe" symbol such as ?, #, 1/2, or xy. Inside a ternary computer, ternary values are represented by ternary signals. This article mainly illustrates a system of ternary propositional logic using the truth values {false, unknown, true}, and extends conventional Boolean connectives to a trivalent context.
Logics Boolean logic allows 22 = 4 unary operators; the addition of a third value with two inputs is 32 = 9 and with a third input in ternary logic leads to a total of 33 = 27 distinct operators on a single input set. (This may be made clear by considering all possible truth tables for an arbitrary unary operator. Given 2 possible values TF of the single Boolean input, there are four different patterns of output TT, TF, FT, FF resulting from the following unary operators acting on each value: always T, Identity, NOT, always F. Given three possible values of a ternary variable, each times three possible results of a unary operation, there are 27 different output patterns: TTT, TTU, TTF, TUT, TUU, TUF, TFT, TFU, TFF, UTT, UTU, UTF, UUT, UUU, UUF, UFT, UFU, UFF, FTT, FTU, FTF, FUT, FUU, FUF, FFT, FFU, and FFF.) Similarly, where Boolean logic has 22×2 = 16 distinct binary operators (operators with 2 inputs) possible, ternary logic has 33×3 = 19,683 such operators. While the nontrivial Boolean operators can be named ( NOT, AND, NAND, OR, NOR, XOR, XNOR (equivalence), and 4 variants of implication or inequality), with six trivial operators considering 0 or 1 inputs only, it is unreasonable to attempt to name all but a small fraction of the possible ternary operators. Just as in bivalent logic, where not all operators are given names and subsets of functionally complete operators are used, there may be functionally complete sets of ternary-valued operators.
Kleene and Priest logics
Below is a set of truth tables showing the logic operations for Stephen Cole Kleene's strong logic of indeterminacy and Graham Priest's logic of paradox.
If the truth values 1, 0, and −1 are interpreted as integers, these operations may be expressed with the ordinary operations of arithmetic (where x + y uses addition, xy uses multiplication, and x2 uses exponentiation), or by the minimum/maximum functions:
… excerpt ends here. Continue reading the full article.