Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Three-valued logic
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Short description|System including an indeterminate value}} {{Distinguish|Three-state logic}} {{more citations needed|date=January 2011}} In [[logic]], a '''three-valued logic''' (also '''trinary logic''', '''trivalent''', '''ternary''', or '''trilean''',<ref>{{cite web|title=Trilean (Stanford JavaNLP API) |url=https://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/util/Trilean.html|website=Stanford University|publisher=Stanford NLP Group |url-status=live |archive-url=https://web.archive.org/web/20230503011712/https://nlp.stanford.edu/nlp/javadoc/javanlp/edu/stanford/nlp/util/Trilean.html |archive-date= May 3, 2023 }}</ref> sometimes abbreviated '''3VL''') is any of several [[many-valued logic]] systems in which there are three [[truth value]]s indicating ''true'', ''false'', and some third value. This is contrasted with the more commonly known [[Principle of bivalence|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.<ref>{{Cite journal|last=Post|first=Emil L.|date=1921|title=Introduction to a General Theory of Elementary Propositions|journal=American Journal of Mathematics|volume=43|issue=3|pages=163–185|doi=10.2307/2370324|jstor=2370324|hdl=2027/uiuo.ark:/13960/t9j450f7q|issn=0002-9327|hdl-access=free |jstor-access=free |doi-access=free }}</ref> 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|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.<ref>{{Cite web |title=Peirce's Deductive Logic > Peirce's Three-Valued Logic (Stanford Encyclopedia of Philosophy/Summer 2020 Edition) |url=https://plato.stanford.edu/archIves/sum2020/entries/peirce-logic/three-valued-logic.html |access-date=2024-05-15 |website=plato.stanford.edu}}</ref> 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."<ref>{{Cite web|last=Lane|first=R.|date=2001|title=Triadic Logic|url=http://www.commens.org/encyclopedia/article/lane-robert-triadic-logic |website=Commens |url-status=live |archive-url=https://web.archive.org/web/20231206040847/http://commens.org/encyclopedia/article/lane-robert-triadic-logic |archive-date= Dec 6, 2023 }}</ref> However, as confident as he was that "Triadic Logic is universally true,"<ref>{{cite web | url = https://iiif.lib.harvard.edu/manifests/view/drs:15255301$645i | title = Logic : autograph manuscript notebook, November 12, 1865-November 1, 1909 | last = Peirce | first = Charles S. | date = 1839–1914 | website = hollisarchives.lib.harvard.edu/repositories/24/digital_objects/63983 | publisher = Houghton Library, Harvard University | access-date = May 15, 2023 | quote = Triadic Logic is universally true. But Dyadic Logic is not aboslutely false }}</ref> he also jotted down that "All this is mighty close to nonsense."<ref>{{cite web | url = https://iiif.lib.harvard.edu/manifests/view/drs:15255301$638i | title = Logic : autograph manuscript notebook, November 12, 1865-November 1, 1909 | last = Peirce | first = Charles S. | date = 1839–1914 | website = hollisarchives.lib.harvard.edu/repositories/24/digital_objects/63983 | publisher = Houghton Library, Harvard University | access-date = May 15, 2023 }}</ref> 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.<ref>{{Cite web|last=Lane|first=Robert|title=Triadic Logic|url=http://www.digitalpeirce.fee.unicamp.br/lane/p-trilan.htm|access-date=2020-07-30|website=www.digitalpeirce.fee.unicamp.br}}</ref> == 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.<ref name="Cobreros">{{cite journal |last1=Cobreros |first1=Pablo |last2=Égré |first2=Paul |last3=Ripley |first3=David |last4=Rooij |first4=Robert van |title=Foreword: Three-valued logics and their applications |journal=Journal of Applied Non-Classical Logics |date=2 January 2014 |volume=24 |issue=1-2 |pages=1–11 |doi=10.1080/11663081.2014.909631}}</ref> Łukasiewicz initially developed three-valued logic for the [[problem of future contingents]] to represent the truth value of statements about the undetermined future.<ref name="Prior">{{cite journal |last1=Prior |first1=A. N. |title=Three-Valued Logic and Future Contingents |journal=The Philosophical Quarterly |date=1953 |volume=3 |issue=13 |pages=317–326 |doi=10.2307/2217099 |url=https://www.jstor.org/stable/2217099 |issn=0031-8094|url-access=subscription }}</ref><ref name="Taylor">{{cite journal |last1=Taylor |first1=Richard |title=The Problem of Future Contingencies |journal=The Philosophical Review |date=1957 |volume=66 |issue=1 |pages=1–28 |doi=10.2307/2182851 |url=https://www.jstor.org/stable/2182851 |issn=0031-8108|url-access=subscription }}</ref><ref name="Rybaříková">{{cite journal |last1=Rybaříková |first1=Zuzana |title=Łukasiewicz, determinism, and the four-valued system of logic |journal=Semiotica |date=1 May 2021 |volume=2021 |issue=240 |pages=129–143 |doi=10.1515/sem-2019-0115}}</ref> [[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."<ref name="de Finetti">{{cite journal |last1=de Finetti |first1=Bruno |title=The logic of probability (translated) |journal=Philosophical Studies |date=1 January 1995 |volume=77 |issue=1 |pages=181–190 |doi=10.1007/BF00996317 |quote=But there is a second possible way to conceive of many-valued logics: that while a proposition, in itself, can have only two values, true or false, that is to say two responses, yes or no, it may happen that a given individual does not know the [correct] response, at least at a given moment; therefore, for the individual there is a third attitude possible toward a proposition. This third attitude does not correspond to a distinct third value of yes or of no, but simply to a doubt between yes or no}}</ref><ref name="Cobreros" /> [[Hilary Putnam]] used it to represent values that cannot physically be decided:<ref name="Putnam">{{cite journal |last1=Putnam |first1=Hilary |title=Three-valued logic |journal=Philosophical Studies |date=1 October 1957 |volume=8 |issue=5 |pages=73–80 |doi=10.1007/BF02304905 |quote=However, it is not the case that 'middle' means "neither verified nor falsified at the present time". As we have seen, 'verified' and 'falsified' are epistemic predicates--that is to say, they are relative to the evidence at a particular time--whereas 'middle,' like 'true' and 'false' is not relative to the evidence.}}</ref> {{Blockquote |text=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 [[Predicate (mathematical logic)|predicates]] that are "undecidable by [any] algorithms whether true or false"<ref name="Kleene">{{cite book |last1=Kleene |first1=Stephen Cole |title=Introduction to metamathematics |date=1952 |publisher=North-Holland Publishing Co., Amsterdam, and P. Noordhoff, Groningen |page=336 |quote=The strong 3-valued logic can be applied to completely defined predicates Q(x) and R(x), from which composite predicates are formed using ̅, V, &, ->, ≡ in the usual 2-valued meanings, thus, (iii) Suppose that there are fixed algorithms which decide the truth or falsity of Q(x) and of R(x), each on a subset of the natural numbers (as occurs e.g. after completing the definitions of any two partial recursive predicates classically). Let t, f, u mean 'decidable by the algorithms (i.e. by use of only such information about Q(x) and R(x) as can be obtained by the algorithms) to be true', 'decidable by the algorithms to be false', 'undecidable by the algorithms whether true or false'. (iv) Assume a fixed state of knowledge about Q(x) and R(x) (as occurs e.g. after pursuing algorithms for each of them up to a given stage). Let t, f, u mean 'known to be true', 'known to be false', 'unknown whether true or false'.}}</ref><ref name="Cobreros" /> == 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;<ref>{{cite book | last = Knuth | first = Donald E. | author-link = Donald Knuth | title = The Art of Computer Programming Vol. 2 | publisher = Addison-Wesley Publishing Company | year = 1981 | location = Reading, Mass. | pages = 190 }}</ref> * 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 [[numerical digit|digit]] is a ''[[trit (computing)|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 problem|undecidable]]'', ''irrelevant'', or ''both'';<ref>{{Cite journal |author-first=Brian |author-last=Hayes |author-link=Brian Hayes (scientist) |title=Third base |journal=[[American Scientist]] |publisher=[[Sigma Xi]], the Scientific Research Society |date=November–December 2001 |volume=89 |issue=6 |pages=490–494 |doi=10.1511/2001.40.3268 |url=http://bit-player.org/wp-content/extras/bph-publications/AmSci-2001-11-Hayes-ternary.pdf |access-date=2020-04-12 |url-status=live |archive-url=https://web.archive.org/web/20191030114823/http://bit-player.org/wp-content/extras/bph-publications/AmSci-2001-11-Hayes-ternary.pdf |archive-date=2019-10-30}}</ref> * 0 for ''false'', 1 for ''true'', and a third non-integer "maybe" symbol such as ?, #, {{sfrac|1|2}},<ref>{{cite book|url=https://books.google.com/books?id=ud3sEeVdTIwC&pg=PT1113|title=The Penguin Dictionary of Mathematics. Fourth Edition.|last=Nelson|first=David|publisher=Penguin Books|year=2008|isbn=9780141920870|location=London, England|at=Entry for 'three-valued logic'}}</ref> or xy. Inside a [[ternary computer]], ternary values are represented by [[ternary signal]]s. 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 2<sup>2</sup> = 4 [[unary operator]]s; the addition of a third value in ternary logic leads to a total of 3<sup>3</sup> = 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<sup>2×2</sup> = 16 distinct binary operators (operators with 2 inputs) possible, ternary logic has 3<sup>3×3</sup> = 19,683 such operators. Where the nontrival Boolean operators can be named ([[And (logic)|AND]], [[Logical NAND|NAND]], [[Or (logic)|OR]], [[logical NOR|NOR]], [[XOR]], [[XNOR]] ([[Material equivalence|equivalence]]), and 4 variants of [[Material conditional|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.<ref>Douglas W. Jones, [http://homepage.cs.uiowa.edu/~jones/ternary/logic.shtml Standard Ternary Logic], Feb. 11, 2013.</ref> 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<!--Linked from 'Semantic theory of truth'--> === {{See also|Kleene algebra (with involution)}} Below is a set of [[truth table]]s showing the logic operations for [[Stephen Cole Kleene]]'s "strong logic of indeterminacy" and [[Graham Priest]]'s "logic of paradox". {| style="border-spacing: 10px 0;" align="center" | colspan="4" style="text-align:center;" | (F, false; U, unknown; T, true) |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ NOT(A) ! width="25" | A ! width="25" | ¬A |- ! scope="row" {{no|F}} | {{yes|T}} |- ! scope="row" | U | U |- ! scope="row" {{yes|T}} | {{no|F}} |} | {| class="wikitable" style="text-align:center;" |+ AND(A, B) ! rowspan="2" colspan="2" | A ∧ B ! colspan="3" | B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" {{no|F}} | {{no|F}} | {{no|F}} | {{no|F}} |- ! scope="row" | U | {{no|F}} | U | U |- ! scope="row" {{yes|T}} | {{no|F}} | U | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" |+ OR(A, B) ! rowspan="2" colspan="2" | A ∨ B ! colspan="3" | B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" {{no|F}} | {{no|F}} | U | {{yes|T}} |- ! scope="row" | U | U | U | {{yes|T}} |- ! scope="row" {{yes|T}} | {{yes|T}} | {{yes|T}} | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" |+ XOR(A, B) ! rowspan="2" colspan="2" | A ⊕ B ! colspan="3" | B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" {{no|F}} | {{no|F}} | U | {{yes|T}} |- ! scope="row" | U | U | U | U |- ! scope="row" {{yes|T}} | {{yes|T}} | U | {{no|F}} |} |} {| style="border-spacing: 10px 0;" align="center" | colspan="4" style="text-align:center;" | (−1, false; 0, unknown; +1, true) |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ NEG(A) ! width="25" | A ! width="25" | ¬A |- ! scope="row" | −1 | +1 |- ! scope="row" | 0 | 0 |- ! scope="row" | +1 | −1 |} | {| class="wikitable" style="text-align:center;" |+ MIN(A, B) ! rowspan="2" colspan="2" | A ∧ B ! colspan="3" | B |- ! width="25" | −1 ! width="25" | 0 ! width="25" | +1 |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" | −1 | −1 | −1 | −1 |- ! scope="row" | 0 | −1 | 0 | 0 |- ! scope="row" | +1 | −1 | 0 | +1 |} | {| class="wikitable" style="text-align:center;" |+ MAX(A, B) ! rowspan="2" colspan="2" | A ∨ B ! colspan="3" | B |- ! width="25" | −1 ! width="25" | 0 ! width="25" | +1 |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" | −1 | −1 | 0 | +1 |- ! scope="row" | 0 | 0 | 0 | +1 |- ! scope="row" | +1 | +1 | +1 | +1 |} | {| class="wikitable" style="text-align:center;" |+ MIN(MAX(A, B), NEG(MIN(A, B))) ! rowspan="2" colspan="2" | A ⊕ B ! colspan="3" | B |- ! width="25" | −1 ! width="25" | 0 ! width="25" | +1 |- ! scope="row" rowspan="3" width="25" | A ! scope="row" width="25" | −1 | −1 | 0 | +1 |- ! scope="row" | 0 | 0 | 0 | 0 |- ! scope="row" | +1 | +1 | 0 | −1 |} |} 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 ''x<sup>2</sup>'' uses exponentiation), or by the minimum/maximum functions: :<math> \begin{align} x \wedge y & = \frac{1}{2} (x+y-x^2-y^2+xy+x^2y^2) = \min(x,y)\\ x \vee y & = \frac{1}{2} (x+y+x^2+y^2-xy-x^2y^2) = \max(x,y)\\ \neg x & = -x \end{align} </math> 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: <math> A \rightarrow B \ \overset{\underset{\mathrm{def}}{}}{=} \ \mbox{OR} ( \ \mbox{NOT}(A), \ B ) </math>, and its truth table is {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|K}}(A, B), OR(¬A, B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! rowspan="3" |A ! scope="row" {{no|F}} | {{yes|T}} | {{yes|T}} | {{yes|T}} |- ! scope="row" | U | U | U | {{yes|T}} |- ! scope="row" width="25" {{yes|T}} | {{no|F}} | U | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|K}}(A, B), MAX(−A, B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" | −1 ! width="25" | 0 ! width="25" | +1 |- ! rowspan="3" |A ! scope="row" | −1 | +1 | +1 | +1 |- ! scope="row" | 0 | 0 | 0 | +1 |- ! scope="row" width="25" | +1 | −1 | 0 | +1 |} |} 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 [[paraconsistent logic|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).<ref>[http://www.uky.edu/~look/Phi520-Lecture7.pdf "Beyond Propositional Logic"]</ref> === Łukasiewicz logic === {{further|Ł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.<ref>Grzegorz Malinowski, "[https://books.google.com/books?id=3TNj1ZkP3qEC&dq=%22Many-valued+Logic+and+its+Philosophy%22&pg=PA13 Many-valued Logic and its Philosophy]" in Dov M. Gabbay, John Woods (eds.) ''Handbook of the History of Logic Volume 8. The Many Valued and Nonmonotonic Turn in Logic'', Elsevier, 2009</ref> Material implication for Łukasiewicz logic truth table is {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|Ł}}(A, B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! rowspan="3" |A ! scope="row" {{no|F}} | {{yes|T}} | {{yes|T}} | {{yes|T}} |- ! scope="row" | U | U | {{yes|T}} | {{yes|T}} |- ! scope="row" width="25" {{yes|T}} | {{no|F}} | U | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|Ł}}(A, B), MIN(1, 1−A+B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" | −1 ! width="25" | 0 ! width="25" | +1 |- ! rowspan="3" |A ! scope="row" | −1 | +1 | +1 | +1 |- ! scope="row" | 0 | 0 | +1 | +1 |- ! scope="row" width="25" | +1 | −1 | 0 | +1 |} |} In fact, using Łukasiewicz's implication and negation, the other usual connectives may be derived as: * {{math|1=''A'' ∨ ''B'' = (''A'' → ''B'') → ''B''}} * {{math|1=''A'' ∧ ''B'' = ¬(¬''A'' ∨ ¬ ''B'')}} * {{math|1=''A'' ⇔ ''B'' = (''A'' → ''B'') ∧ (''B'' → ''A'')}} It is also possible to derive a few other useful unary operators (first derived by Tarski in 1921): {{citation needed|date=June 2021}} * {{math|1='''M'''''A'' = ¬''A'' → ''A''}} * {{math|1='''L'''''A'' = ¬'''M'''¬''A''}} * {{math|1='''I'''''A'' = '''M'''''A'' ∧ ¬'''L'''''A''}} They have the following truth tables: {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" ! width="25" | {{mvar|A}} ! width="25" | {{math|1=M''A''}} |- ! scope="row" {{no|F}} | {{no|F}} |- ! scope="row" | U | {{yes|T}} |- ! scope="row" {{yes|T}} | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" ! width="25" | {{mvar|A}} ! width="25" | {{math|1=L''A''}} |- ! scope="row" {{no|F}} | {{no|F}} |- ! scope="row" | U | {{no|F}} |- ! scope="row" {{yes|T}} | {{yes|T}} |} | {| class="wikitable" style="text-align:center;" ! width="25" | {{mvar|A}} ! width="25" | {{math|1=I''A''}} |- ! scope="row" {{no|F}} | {{no|F}} |- ! scope="row" | U | {{yes|T}} |- ! scope="row" {{yes|T}} | {{no|F}} |} |} M is read as "it is not false that..." or in the (unsuccessful) Tarski–Łukasiewicz attempt to axiomatize [[modal logic]] 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 (logic)|tautology]]. For example, {{math|1=''A'' → ''A''}} and {{math|1=''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]], {{math|1=''A'' ∨ ¬''A''}}, and the [[law of non-contradiction]], {{math|1=¬(''A'' ∧ ¬''A'')}} are not tautologies in Ł3. However, using the operator {{math|1='''I'''}} defined above, it is possible to state tautologies that are their analogues: * {{math|1=''A'' ∨ '''I'''''A'' ∨ ¬''A''}} ([[law of excluded fourth]]) * {{math|1=¬(''A'' ∧ ¬'''I'''''A'' ∧ ¬''A'')}} ([[extended contradiction principle]]). === RM3 logic === The truth table for the material implication of R-mingle 3 (RM3) is {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|RM3}}(A, B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" {{no|F}} ! width="25" | U ! width="25" {{yes|T}} |- ! rowspan="3" |A ! scope="row" {{no|F}} | {{yes|T}} | {{yes|T}} | {{yes|T}} |- ! scope="row" | U | {{no|F}} | U | {{yes|T}} |- ! scope="row" width="25" {{yes|T}} | {{no|F}} | {{no|F}} | {{yes|T}} |} |} A defining characteristic of RM3 is the lack of the axiom of Weakening: * {{math|(''A'' → (''B'' → ''A''))}} which, by adjointness, is equivalent to the projection from the product: * {{math|(''A'' ⊗ ''B'') → ''A''}} RM3 is a non-cartesian symmetric monoidal closed category; the product, which is left-adjoint to the implication, lacks valid projections, and has {{math|''U''}} as the monoid identity. This logic is equivalent to an [[Paraconsistent logic#An ideal three-valued paraconsistent logic|"ideal" paraconsistent logic]] which also obeys the contrapositive. === HT logic === {{further|Intermediate logic}} {{further|Many-valued logic#Gödel logics Gk and G∞}} The logic of here and there ('''HT''', also referred as Smetanov logic '''SmT''' or as [[Gödel]] G3 logic), introduced by [[Heyting]] in 1930<ref>{{cite journal |last1=Heyting |title=Die formalen Regeln der intuitionistischen Logik. |journal=Sitz. Berlin |date=1930 |volume=42–56}}</ref> as a model for studying [[intuitionistic logic]], is a three-valued [[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. {| style="border-spacing: 10px 0;" align="center" | colspan="3" style="text-align:center;" | (F, false; NF, not false; T, true) |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ NOT{{sub|HT}}(A) ! width="25" | A ! width="25" | ¬A |- ! scope="row" {{no|F}} | {{yes|T}} |- ! scope="row" | NF | {{no|F}} |- ! scope="row" {{yes|T}} | {{no|F}} |} |} {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ IMP{{sub|HT}}(A, B) ! rowspan="2" colspan="2" | A → B ! colspan="3" |B |- ! width="25" {{no|F}} ! width="25" | NF ! width="25" {{yes|T}} |- ! rowspan="3" |A ! scope="row" {{no|F}} | {{yes|T}} | {{yes|T}} | {{yes|T}} |- ! scope="row" | NF | {{no|F}} | {{yes|T}} | {{yes|T}} |- ! scope="row" width="25" {{yes|T}} | {{no|F}} | NF | {{yes|T}} |} |} It may be defined either by appending one of the two equivalent axioms {{nowrap|(¬''q'' → ''p'') → (((''p'' → ''q'') → ''p'') → ''p'')}} or equivalently {{nowrap|''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 [[atom (order theory)|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 === {{Main|Many-valued logic#Bochvar's internal three-valued logic}} This logic is also known as a weak form of Kleene's three-valued logic. {{empty section|date=August 2014}} === Ternary Post logic === : Ternary Post Logic, a particular instance of the more General family of [[Many-valued logic#Post logics Pm|Post Logics]], is a three-valued logic which uses a cyclic negation operation, defined as: {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ NEG(A) ! width="25" | A ! width="25" | ¬A |- ! scope="row" | 0 | 1 |- ! scope="row" | 1/2 | 0 |- ! scope="row" | 1 | 1/2 |} |} :Along with minimum and maximum functions to define conjunction and disjunction connectives, respectively: {| style="border-spacing: 10px 0;" align="center" |- valign="bottom" | {| class="wikitable" style="text-align:center;" |+ MIN(A, B) ! colspan="2" rowspan="2" | A ∧ B ! colspan="3" | B |- ! width="25" | 0 ! width="25" | 1/2 ! width="25" | 1 |- ! rowspan="3" scope="row" width="25" | A ! scope="row" width="25" | 0 | 0 | 0 | 0 |- ! scope="row" | 1/2 | 0 | 1/2 | 1/2 |- ! scope="row" | 1 | 0 | 1/2 | 1 |} | {| class="wikitable" style="text-align:center;" |+ MAX(A, B) ! colspan="2" rowspan="2" | A ∨ B ! colspan="3" | B |- ! width="25" | 0 ! width="25" | 1/2 ! width="25" | 1 |- ! rowspan="3" scope="row" width="25" | A ! scope="row" width="25" | 0 | 0 | 1/2 | 1 |- ! scope="row" | 1/2 | 1/2 | 1/2 | 1 |- ! scope="row" | 1 | 1 | 1 | 1 |} |} These functions may also be expressed with arithmetic expressions. Given the set of truth values is <math>\{0, \frac{1}{2}, 1\}</math> they are: :<math>\begin{align} {\neg} x &:= \frac{1}{2}(6x^2 - 7x + 2) := (1,0, \frac{1}{2})\\ x \wedge y &:= 4y^2x^2 - 4yx^2 - 4y^2x + 5yx := \min(x,y) \\[6pt] x \vee y &:= -4y^2x^2 + 4yx^2 + 4y^2x - 5yx + x + y := \max(x,y) \end{align}</math> :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 <math>\{0,\frac{1}{2},1\}^n \rightarrow \{0,\frac{1}{2},1\} : n \in \mathbb{N^+} </math> 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 [[modular arithmetic|modulars arithmetics]] have been introduced more recently, motivated by circuit problems rather than philosophical issues:<ref>{{cite book|first1=D. Michael|last1=Miller|first2=Mitchell A.|last2=Thornton|title=Multiple valued logic: concepts and representations|year=2008|publisher=Morgan & Claypool Publishers|isbn=978-1-59829-190-2|series=S{{lc:YNTHESIS LECTURES ON DIGITAL CIRCUITS AND SYSTEMS}}|volume=12|pages=41–42}}</ref> * Cohn algebra * Pradhan algebra * Dubrova<ref>Dubrova, Elena (2002). [http://dl.acm.org/citation.cfm?id=566849 Multiple-Valued Logic Synthesis and Optimization], in Hassoun S. and Sasao T., editors, ''Logic Synthesis and Verification'', Kluwer Academic Publishers, pp. 89-114</ref> and Muzio algebra == Applications == === SQL === {{Main|Null (SQL)}} The database query language [[SQL]] implements ternary logic as a means of handling comparisons with [[Null (SQL)|NULL]] field content. SQL uses a common fragment of the Kleene K3 logic, restricted to AND, OR, and NOT tables. == See also == {{Portal|Philosophy}} * [[Binary logic (disambiguation)]] * [[Boolean algebra (structure)]] * [[Boolean function]] * [[Digital circuit]] * [[Four-valued logic]] * [[Homogeneity (linguistics)]] * {{Section link|Paraconsistent logic#An ideal three-valued paraconsistent logic}} * [[Setun]] – an experimental Russian computer which was based on ternary logic * [[Strawson entailment]] * [[Ternary numeral system]] (and [[Balanced ternary]]) * [[Three-state logic]] ([[tri-state buffer]]) * [[The World of Null-A]] == References == {{reflist|30em}} == Further reading == * {{cite book |last=Bergmann |first=Merrie |title=An Introduction to Many-Valued and Fuzzy Logic: Semantics, Algebras, and Derivation Systems |year=2008 |publisher=Cambridge University Press |isbn=978-0-521-88128-9 |url=http://www.cambridge.org/us/academic/subjects/philosophy/logic/introduction-many-valued-and-fuzzy-logic-semantics-algebras-and-derivation-systems?format=PB |access-date=24 August 2013}}, 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). {{doi|10.1016/s0049-237x(08)70262-3}} * Reichenbach, Hans (1944). ''Philosophic Foundations of Quantum Mechanics''. University of California Press. Dover 1998: {{ISBN|0-486-40459-5}} {{Non-classical logic}} {{Mathematical logic}} {{DEFAULTSORT:Ternary Logic}} [[Category:Many-valued logic]] [[Category:Ternary computers]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Blockquote
(
edit
)
Template:Citation needed
(
edit
)
Template:Cite book
(
edit
)
Template:Cite journal
(
edit
)
Template:Cite web
(
edit
)
Template:Comma separated entries
(
edit
)
Template:Distinguish
(
edit
)
Template:Doi
(
edit
)
Template:Empty section
(
edit
)
Template:Further
(
edit
)
Template:ISBN
(
edit
)
Template:Main
(
edit
)
Template:Main other
(
edit
)
Template:Math
(
edit
)
Template:Mathematical logic
(
edit
)
Template:More citations needed
(
edit
)
Template:Mvar
(
edit
)
Template:No
(
edit
)
Template:Non-classical logic
(
edit
)
Template:Nowrap
(
edit
)
Template:Portal
(
edit
)
Template:Reflist
(
edit
)
Template:Section link
(
edit
)
Template:See also
(
edit
)
Template:Sfrac
(
edit
)
Template:Short description
(
edit
)
Template:Sub
(
edit
)
Template:Yes
(
edit
)