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
(section)
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!
== 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
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)