HOME

TheInfoList



OR:

In
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
, a three-valued logic (also trinary logic, trivalent, ternary, or trilean, sometimes abbreviated 3VL) is any of several
many-valued logic Many-valued logic (also multi- or multiple-valued logic) is a propositional calculus in which there are more than two truth values. Traditionally, in Aristotle's Term logic, logical calculus, there were only two possible values (i.e., "true" and ...
systems in which there are three
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
s indicating ''true'', ''false'', and some third value. This is contrasted with the more commonly known bivalent logics (such as classical sentential or
Boolean logic In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
) which provide only for ''true'' and ''false''.
Emil Leon Post Emil Leon Post (; February 11, 1897 – April 21, 1954) was an American mathematician and logician. He is best known for his work in the field that eventually became known as computability theory. Life Post was born in Augustów, Suwałki Gove ...
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 Jan Łukasiewicz (; 21 December 1878 – 13 February 1956) was a Polish logician and philosopher who is best known for Polish notation and Łukasiewicz logic. His work centred on philosophical logic, mathematical logic and history of logi ...
and
Clarence Irving Lewis Clarence Irving Lewis (April 12, 1883 – February 3, 1964) was an American academic philosopher. He is considered the progenitor of modern modal logic and the founder of conceptual pragmatism. First a noted logician, he later branched into epis ...
. 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 Charles Sanders Peirce ( ; September 10, 1839 – April 19, 1914) was an American scientist, mathematician, logician, and philosopher who is sometimes known as "the father of pragmatism". According to philosopher Paul Weiss (philosopher), Paul ...
defined a many-valued logic system. He never published it. In fact, he did not even number the three pages of notes where he defined his three-valued operators. Peirce soundly rejected the idea 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 Future contingent propositions (or simply, future contingents) are statements about states of affairs in the future that are '' contingent:'' neither necessarily true nor necessarily false. The problem of future contingents seems to have been fi ...
to represent the truth value of statements about the undetermined future.
Bruno de Finetti Bruno de Finetti (13 June 1906 – 20 July 1985) was an Italian probabilist statistician and actuary, noted for the "operational subjective" conception of probability. The classic exposition of his distinctive theory is the 1937 , which discuss ...
used a third value to represent when "a given individual does not know the orrectresponse, at least at a given moment."
Hilary Putnam Hilary Whitehall Putnam (; July 31, 1926 – March 13, 2016) was an American philosopher, mathematician, computer scientist, and figure in analytic philosophy in the second half of the 20th century. He contributed to the studies of philosophy of ...
used it to represent values that cannot physically be decided: Similarly,
Stephen Cole Kleene Stephen Cole Kleene ( ; January 5, 1909 – January 25, 1994) was an American mathematician. One of the students of Alonzo Church, Kleene, along with Rózsa Péter, Alan Turing, Emil Post, and others, is best known as a founder of the branch of ...
used a third value to represent predicates that are "undecidable by nyalgorithms 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 ternary numeral system (also called base 3 or trinary) has 3 (number), three as its radix, base. Analogous to a bit, a ternary numerical digit, digit is a trit (trinary digit). One trit is equivalent to binary logarithm, log2 3 (about 1.5 ...
. A few of the more common examples are: * in
balanced ternary Balanced ternary is a ternary numeral system (i.e. base 3 with three Numerical digit, digits) that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the stand ...
, 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 A ternary numeral system (also called base 3 or trinary) has 3 (number), three as its radix, base. Analogous to a bit, a ternary numerical digit, digit is a trit (trinary digit). One trit is equivalent to binary logarithm, log2 3 (about 1.5 ...
, each digit is a '' trit'' (trinary digit) having a value of: 0, 1, or 2; * in the
skew binary number system The skew binary number system is a non-standard positional numeral system in which the ''n''th digit contributes a value of 2^ - 1 times the digit (digits are indexed from 0) instead of 2^ times as they do in binary. Each digit has a value of 0, ...
, 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 ?, #, , or xy. Inside a ternary computer, ternary values are represented by ternary signals. This article mainly illustrates a system of ternary
propositional logic The propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zeroth-order logic. Sometimes, it is called ''first-order'' propositional logic to contra ...
using the truth values , and extends conventional Boolean connectives to a trivalent context.


Logics

Boolean logic In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denot ...
allows 22 = 4 unary operators; the addition of a third value in ternary logic leads to a total of 33 = 27 distinct operators on a single input value. (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. Where the nontrival Boolean operators can be named ( 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 table A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
s showing the logic operations for
Stephen Cole Kleene Stephen Cole Kleene ( ; January 5, 1909 – January 25, 1994) was an American mathematician. One of the students of Alonzo Church, Kleene, along with Rózsa Péter, Alan Turing, Emil Post, and others, is best known as a founder of the branch of ...
'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: : \begin x \wedge y & = \frac (x+y-x^2-y^2+xy+x^2y^2) = \min(x,y)\\ x \vee y & = \frac (x+y+x^2+y^2-xy-x^2y^2) = \max(x,y)\\ \neg x & = -x \end In these truth tables, the ''unknown'' state can be thought of as neither true nor false in Kleene logic, or thought of as both true and false in Priest logic. The difference lies in the definition of tautologies. Where Kleene logic's only designated truth value is T, Priest logic's designated truth values are both T and U. In Kleene logic, the knowledge of whether any particular ''unknown'' state secretly represents ''true'' or ''false'' at any moment in time is not available. However, certain logical operations can yield an unambiguous result, even if they involve an ''unknown'' operand. For example, because ''true'' OR ''true'' equals ''true'', and ''true'' OR ''false'' also equals ''true'', then ''true'' OR ''unknown'' equals ''true'' as well. In this example, because either bivalent state could be underlying the ''unknown'' state, and either state also yields the same result, ''true'' results in all three cases. If numeric values, e.g.
balanced ternary Balanced ternary is a ternary numeral system (i.e. base 3 with three Numerical digit, digits) that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the stand ...
values, are assigned to ''false'', ''unknown'' and ''true'' such that ''false'' is less than ''unknown'' and ''unknown'' is less than ''true'', then A AND B AND C... = MIN(A, B, C ...) and A OR B OR C ... = MAX(A, B, C...). Material implication for Kleene logic can be defined as: A \rightarrow B \ \overset \ \mbox ( \ \mbox(A), \ B ) , and its truth table is which differs from that for Łukasiewicz logic (described below). Kleene logic has no tautologies (valid formulas) because whenever all of the atomic components of a well-formed formula are assigned the value Unknown, the formula itself must also have the value Unknown. (And the only ''designated'' truth value for Kleene logic is True.) However, the lack of valid formulas does not mean that it lacks valid arguments and/or inference rules. An argument is semantically valid in Kleene logic if, whenever (for any interpretation/model) all of its premises are True, the conclusion must also be True. (The Logic of Paradox (LP) has the same truth tables as Kleene logic, but it has two ''designated'' truth values instead of one; these are: True and Both (the analogue of Unknown), so that LP does have tautologies but it has fewer valid inference rules).


Łukasiewicz logic

The Łukasiewicz Ł3 has the same tables for AND, OR, and NOT as the Kleene logic given above, but differs in its definition of implication in that "unknown implies unknown" is true. This section follows the presentation from Malinowski's chapter of the ''Handbook of the History of Logic'', vol 8. Material implication for Łukasiewicz logic truth table is In fact, using Łukasiewicz's implication and negation, the other usual connectives may be derived as: * * * It is also possible to derive a few other useful unary operators (first derived by Tarski in 1921): * * * They have the following truth tables: M is read as "it is not false that..." or in the (unsuccessful) Tarski–Łukasiewicz attempt to axiomatize
modal logic Modal logic is a kind of logic used to represent statements about Modality (natural language), necessity and possibility. In philosophy and related fields it is used as a tool for understanding concepts such as knowledge, obligation, and causality ...
using a three-valued logic, "it is possible that..." L is read "it is true that..." or "it is necessary that..." Finally I is read "it is unknown that..." or "it is contingent that..." In Łukasiewicz's Ł3 the designated value is True, meaning that only a proposition having this value everywhere is considered a tautology. For example, and are tautologies in Ł3 and also in classical logic. Not all tautologies of classical logic lift to Ł3 "as is". For example, the
law of excluded middle In logic, the law of excluded middle or the principle of excluded middle states that for every proposition, either this proposition or its negation is true. It is one of the three laws of thought, along with the law of noncontradiction and t ...
, , and the law of non-contradiction, are not tautologies in Ł3. However, using the operator defined above, it is possible to state tautologies that are their analogues: * ( law of excluded fourth) * ( extended contradiction principle).


RM3 logic

The truth table for the material implication of R-mingle 3 (RM3) is A defining characteristic of RM3 is the lack of the axiom of Weakening: * which, by adjointness, is equivalent to the projection from the product: * RM3 is a non-cartesian symmetric monoidal closed category; the product, which is left-adjoint to the implication, lacks valid projections, and has as the monoid identity. This logic is equivalent to an "ideal" paraconsistent logic which also obeys the contrapositive.


HT logic

The logic of here and there (HT, also referred as Smetanov logic SmT or as Gödel G3 logic), introduced by Heyting in 1930 as a model for studying
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems ...
, is a three-valued
intermediate logic In mathematical logic, a superintuitionistic logic is a propositional logic extending intuitionistic logic. Classical logic is the strongest consistent superintuitionistic logic; thus, consistent superintuitionistic logics are called intermediate ...
where the third truth value NF (not false) has the semantics of a proposition that can be intuitionistically proven to not be false, but does not have an intuitionistic proof of correctness. It may be defined either by appending one of the two equivalent axioms or equivalently to the axioms of
intuitionistic logic Intuitionistic logic, sometimes more generally called constructive logic, refers to systems of symbolic logic that differ from the systems used for classical logic by more closely mirroring the notion of constructive proof. In particular, systems ...
, or by explicit truth tables for its operations. In particular, conjunction and disjunction are the same as for Kleene's and Łukasiewicz's logic, while the negation is different. HT logic is the unique coatom in the lattice of intermediate logics. In this sense it may be viewed as the "second strongest" intermediate logic after classical logic.


Bochvar logic

This logic is also known as a weak form of Kleene's three-valued logic.


Ternary Post logic

: Ternary Post Logic, a particular instance of the more General family of Post Logics, is a three-valued logic which uses a cyclic negation operation, defined as: :Along with minimum and maximum functions to define conjunction and disjunction connectives, respectively: These functions may also be expressed with arithmetic expressions. Given the set of truth values is \ they are: :\begin x &:= \frac(6x^2 - 7x + 2) := (1,0, \frac)\\ x \wedge y &:= 4y^2x^2 - 4yx^2 - 4y^2x + 5yx := \min(x,y) \\ pt x \vee y &:= -4y^2x^2 + 4yx^2 + 4y^2x - 5yx + x + y := \max(x,y) \end :Unlike the previous system of three-valued logics, Post's 3-valued logic is functionally complete using only the NEG operation and at least one of MIN or MAX operations. This means that any function \^n \rightarrow \ : n \in \mathbb can be expressed as a composition of using only the three functions defined above (or any two, as long as one of them is negation).


Modular algebras

Some 3VL modulars arithmetics have been introduced more recently, motivated by circuit problems rather than philosophical issues: * Cohn algebra * Pradhan algebra * DubrovaDubrova, Elena (2002)
Multiple-Valued Logic Synthesis and Optimization
in Hassoun S. and Sasao T., editors, ''Logic Synthesis and Verification'', Kluwer Academic Publishers, pp. 89-114
and Muzio algebra


Applications


SQL

The database query language SQL implements ternary logic as a means of handling comparisons with
NULL Null may refer to: Science, technology, and mathematics Astronomy *Nuller, an optical tool using interferometry to block certain sources of light Computing *Null (SQL) (or NULL), a special marker and keyword in SQL indicating that a data value do ...
field content. SQL uses a common fragment of the Kleene K3 logic, restricted to AND, OR, and NOT tables.


See also

*
Binary logic (disambiguation) Binary logic may refer to: * Boolean logic, a two-valued formal logic ** Logic gates implementing Boolean logic in digital electronics * Bivalent logic or two-valued logic, a logic satisfying the principle of bivalence See also * Binary numeral s ...
*
Boolean algebra (structure) In abstract algebra, a Boolean algebra or Boolean lattice is a complemented distributive lattice. This type of algebraic structure captures essential properties of both set operations and logic operations. A Boolean algebra can be seen as a gen ...
*
Boolean function In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually , or ). Alternative names are switching function, used especially in older computer science literature, and truth functi ...
*
Digital circuit In theoretical computer science, a circuit is a model of computation in which input values proceed through a sequence of gates, each of which computes a function. Circuits of this kind provide a generalization of Boolean circuits and a mathematica ...
* Four-valued logic * Homogeneity (linguistics) * * Setun – an experimental Russian computer which was based on ternary logic * Strawson entailment *
Ternary numeral system A ternary numeral system (also called base 3 or trinary) has 3 (number), three as its radix, base. Analogous to a bit, a ternary numerical digit, digit is a trit (trinary digit). One trit is equivalent to binary logarithm, log2 3 (about 1.5 ...
(and
Balanced ternary Balanced ternary is a ternary numeral system (i.e. base 3 with three Numerical digit, digits) that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the stand ...
) * Three-state logic ( tri-state buffer) * The World of Null-A


References


Further reading

* , chapters 5-9 * Mundici, D. The C*-Algebras of Three-Valued Logic. Logic Colloquium '88, Proceedings of the Colloquium held in Padova 61–77 (1989). * Reichenbach, Hans (1944). ''Philosophic Foundations of Quantum Mechanics''. University of California Press. Dover 1998: {{DEFAULTSORT:Ternary Logic Many-valued logic Ternary computers