This article needs additional citations for verification .(January 2011) 
In logic, a threevalued logic (also trinary logic, trivalent, ternary, or trilean,^{ [1] } sometimes abbreviated 3VL) is any of several manyvalued 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.^{ [2] } The conceptual form and basic ideas of threevalued logic were initially published by Jan Łukasiewicz and Clarence Irving Lewis. These were then reformulated by Grigore Constantin Moisil in an axiomatic algebraic form, and also extended to nvalued logics in 1945.
Around 1910, Charles Sanders Peirce defined a manyvalued logic system. He never published it. In fact, he did not even number the three pages of notes where he defined his threevalued operators.^{ [3] } Peirce soundly rejected the idea all propositions must be either true or false; boundarypropositions, he writes, are "at the limit between P and not P."^{ [4] } However, as confident as he was that "Triadic Logic is universally true,"^{ [5] } he also jotted down that "All this is mighty close to nonsense."^{ [6] } 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.^{ [7] }
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:
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.
Boolean logic allows 2^{2} = 4 unary operators; the addition of a third value in ternary logic leads to a total of 3^{3} = 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 2^{2×2} = 16 distinct binary operators (operators with 2 inputs) possible, ternary logic has 3^{3×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.^{ [11] } 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 ternaryvalued operators.
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".
(F, false; U, unknown; T, true)  




(−1, false; 0, unknown; +1, true)  




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 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:
, 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 wellformed 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).^{ [12] }
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.^{ [13] }
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): ^{[ citation needed ]}
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 using a threevalued 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, A → A and A ↔ A 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, A ∨ ¬A, and the law of noncontradiction, ¬(A ∧ ¬A) are not tautologies in Ł3. However, using the operator I defined above, it is possible to state tautologies that are their analogues:
The truth table for the material implication of Rmingle 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 noncartesian symmetric monoidal closed category; the product, which is leftadjoint to the implication, lacks valid projections, and has U as the monoid identity. This logic is equivalent to an "ideal" paraconsistent logic which also obeys the contrapositive.
The logic of here and there (HT, also referred as Smetanov logic SmT or as Gödel G3 logic), introduced by Heyting in 1930^{ [14] } as a model for studying intuitionistic logic, is a threevalued intermediate logic 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.
(F, false; NF, not false; T, true)  


It may be defined either by appending one of the two equivalent axioms (¬q → p) → (((p → q) → p) → p) or equivalently p∨(¬q)∨(p → q) to the axioms of intuitionistic logic, 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.
This logic is also known as a weak form of Kleene's threevalued logic.
This section is empty. You can help by adding to it. (August 2014) 
Some 3VL modular algebras have been introduced more recently, motivated by circuit problems rather than philosophical issues:^{ [15] }
The database structural query language SQL implements ternary logic as a means of handling comparisons with NULL field content. NULL was originally intended to be used as a sentinel value in SQL to represent missing data in a database, i.e. the assumption that an actual value exists, but that the value is not currently recorded in the database. SQL uses a common fragment of the Kleene K3 logic, restricted to AND, OR, and NOT tables.
In SQL, the intermediate value is intended to be interpreted as UNKNOWN. Explicit comparisons with NULL, including that of another NULL yields UNKNOWN. However this choice of semantics is abandoned for some set operations, e.g. UNION or INTERSECT, where NULLs are treated as equal with each other. Critics assert that this inconsistency deprives SQL of intuitive semantics in its treatment of NULLs.^{ [17] } The SQL standard defines an optional feature called F571, which adds some unary operators, among which is IS UNKNOWN
corresponding to the Łukasiewicz I in this article. The addition of IS UNKNOWN
to the other operators of SQL's threevalued logic makes the SQL threevalued logic functionally complete,^{ [18] } meaning its logical operators can express (in combination) any conceivable threevalued logical function.
In logic, mathematics and linguistics, and is the truthfunctional operator of conjunction or logical conjunction. The logical connective of this operator is typically represented as or or (prefix) or or in which is the most modern and widely used.
In logic, a logical connective is a logical constant. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary connective can be used to join the two atomic formulas and , rendering the complex formula .
Propositional calculus is a branch of logic. It is also called propositional logic, statement logic, sentential calculus, sentential logic, or sometimes zerothorder logic. It deals with propositions and relations between propositions, including the construction of arguments based on them. Compound propositions are formed by connecting propositions by logical connectives. Propositions that contain no logical connectives are called atomic propositions.
In logic, the semantic principleof bivalence states that every declarative sentence expressing a proposition has exactly one truth value, either true or false. A logic satisfying this principle is called a twovalued logic or bivalent logic.
Manyvalued logic is a propositional calculus in which there are more than two truth values. Traditionally, in Aristotle's logical calculus, there were only two possible values for any proposition. Classical twovalued logic may be extended to nvalued logic for n greater than 2. Those most popular in the literature are threevalued, fourvalued, ninevalued, the finitevalued with more than three values, and the infinitevalued (infinitelymanyvalued), such as fuzzy logic and probability logic.
Classical logic is the intensively studied and most widely used class of deductive logic. Classical logic has had much influence on analytic philosophy.
In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition to another proposition "not ", standing for " is not true", written , or . It is interpreted intuitively as being true when is false, and false when is true. Negation is thus a unary logical connective. It may be applied as an operation on notions, propositions, truth values, or semantic values more generally. In classical logic, negation is normally identified with the truth function that takes truth to falsity. In intuitionistic logic, according to the Brouwer–Heyting–Kolmogorov interpretation, the negation of a proposition is the proposition whose proofs are the refutations of .
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.
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 of intuitionistic logic do not assume the law of the excluded middle and double negation elimination, which are fundamental inference rules in classical logic.
In mathematics, a Heyting algebra (also known as pseudoBoolean algebra) is a bounded lattice (with join and meet operations written ∨ and ∧ and with least element 0 and greatest element 1) equipped with a binary operation a → b of implication such that (c ∧ a) ≤ b is equivalent to c ≤ (a → b). From a logical standpoint, A → B is by this definition the weakest proposition for which modus ponens, the inference rule A → B, A ⊢ B, is sound. Like Boolean algebras, Heyting algebras form a variety axiomatizable with finitely many equations. Heyting algebras were introduced by Arend Heyting (1930) to formalize intuitionistic logic.
In logic, a truth function is a function that accepts truth values as input and produces a unique truth value as output. In other words: the input and output of a truth function are all truth values; a truth function will always output exactly one truth value, and inputting the same truth value(s) will always output the same truth value. The typical example is in propositional logic, wherein a compound statement is constructed using individual statements connected by logical connectives; if the truth value of the compound statement is entirely determined by the truth value(s) of the constituent statement(s), the compound statement is called a truth function, and any logical connectives used are said to be truth functional.
In SQL, null or NULL is a special marker used to indicate that a data value does not exist in the database. Introduced by the creator of the relational database model, E. F. Codd, SQL null serves to fulfil the requirement that all true relational database management systems (RDBMS) support a representation of "missing information and inapplicable information". Codd also introduced the use of the lowercase Greek omega (ω) symbol to represent null in database theory. In SQL, NULL
is a reserved word used to identify this marker.
In abstract algebra, a branch of pure mathematics, an MValgebra is an algebraic structure with a binary operation , a unary operation , and the constant , satisfying certain axioms. MValgebras are the algebraic semantics of Łukasiewicz logic; the letters MV refer to the manyvalued logic of Łukasiewicz. MValgebras coincide with the class of bounded commutative BCK algebras.
In mathematical logic, a tautology is a formula or assertion that is true in every possible interpretation. An example is "x=y or x≠y". Similarly, "either the ball is green, or the ball is not green" is always true, regardless of the colour of the ball.
In mathematics and philosophy, Łukasiewicz logic is a nonclassical, manyvalued logic. It was originally defined in the early 20th century by Jan Łukasiewicz as a threevalued modal logic; it was later generalized to nvalued as well as infinitelymanyvalued (ℵ_{0}valued) variants, both propositional and first order. The ℵ_{0}valued version was published in 1930 by Łukasiewicz and Alfred Tarski; consequently it is sometimes called the Łukasiewicz–Tarski logic. It belongs to the classes of tnorm fuzzy logics and substructural logics.
Tnorm fuzzy logics are a family of nonclassical logics, informally delimited by having a semantics that takes the real unit interval [0, 1] for the system of truth values and functions called tnorms for permissible interpretations of conjunction. They are mainly used in applied fuzzy logic and fuzzy set theory as a theoretical basis for approximate reasoning.
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 arguments, that is, for each combination of values taken by their logical variables. In particular, truth tables can be used to show whether a propositional expression is true for all legitimate input values, that is, logically valid.
Łukasiewicz–Moisil algebras were introduced in the 1940s by Grigore Moisil in the hope of giving algebraic semantics for the nvalued Łukasiewicz logic. However, in 1956 Alan Rose discovered that for n ≥ 5, the Łukasiewicz–Moisil algebra does not model the Łukasiewicz logic. A faithful model for the ℵ_{0}valued (infinitelymanyvalued) Łukasiewicz–Tarski logic was provided by C. C. Chang's MValgebra, introduced in 1958. For the axiomatically more complicated (finite) nvalued Łukasiewicz logics, suitable algebras were published in 1977 by Revaz Grigolia and called MV_{n}algebras. MV_{n}algebras are a subclass of LM_{n}algebras, and the inclusion is strict for n ≥ 5. In 1982 Roberto Cignoli published some additional constraints that added to LM_{n}algebras produce proper models for nvalued Łukasiewicz logic; Cignoli called his discovery proper Łukasiewicz algebras.
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 variables are the truth values true and false, usually denoted 1 and 0, whereas in elementary algebra the values of the variables are numbers. Second, Boolean algebra uses logical operators such as conjunction (and) denoted as ∧, disjunction (or) denoted as ∨, and the negation (not) denoted as ¬. Elementary algebra, on the other hand, uses arithmetic operators such as addition, multiplication, subtraction, and division. Boolean algebra is therefore a formal way of describing logical operations, in the same way that elementary algebra describes numerical operations.
In logic, a finitevalued logic is a propositional calculus in which truth values are discrete. Traditionally, in Aristotle's logic, the bivalent logic, also known as binary logic was the norm, as the law of the excluded middle precluded more than two possible values for any proposition. Modern threevalued logic allows for an additional possible truth value.
Triadic Logic is universally true. But Dyadic Logic is not aboslutely false