Misplaced Pages

Logical connective: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 12:48, 20 September 2007 editPhilogo (talk | contribs)Extended confirmed users7,483 editsmNo edit summary← Previous edit Latest revision as of 13:21, 18 December 2024 edit undo97.102.205.224 (talk) Overview: If we;re going to have 10 rows in the binary section of the table, then drop the two unary operations (since we're missing two, and the zero-ary), and include the two missing truly binary ones. 
(812 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Short description|Symbol connecting sentential formulas in logic}}
{{logic-stub}}
{{CS1 config|mode=cs1}}
{{expert-subject|Mathematics}}
{{For|other logical symbols|List of logic symbols}}
{{Mergefrom|Logical constant|date=June 2007}}
{{Logical connectives sidebar}}
In ], a '''logical connective''', also called a '''truth-functional connective''', ' '''logical operator''' or '''propositional operator,''' is a ] which represents a syntactic operation on a ], or the symbol for ''such an operation that corresponds to'' an operation on the ]s of those sentences. A logical connective serves to produce a compound sentence from one or two other sentences. The truth value of the resultant compound sentence is determined by the truth-values(s) of the one or two other sentences. Consequently a logical connective can be seen as a function which when applied to sentences as arguments whose values are '''True''' or '''False''' returns in turn the value '''True''' or '''False'''; consequently '''logical connectives''' are called '''truth-functional connectives'''.
] of logical connectives.]]


In ], a '''logical connective''' (also called a '''logical operator''', '''sentential connective''', or '''sentential operator''') is a ]. Connectives can be used to connect logical formulas. For instance in the ] of ], the ] connective <math> \lor </math> can be used to join the two ]s <math> P</math> and <math> Q</math>, rendering the complex formula <math> P \lor Q </math>.
For example the statements, ''"it is raining,"'' and, ''"I am indoors"'', can be reformed using various different connectives to form sentences that relate the two in ways which augment their meaning:


Common connectives include ], ], ], ], and ]. In standard systems of ], these connectives are ] as ]s, though they receive a variety of alternative interpretations in ]s. Their classical interpretations are similar to the meanings of natural language expressions such as ] "not", "or", "and", and "if", but not identical. Discrepancies between natural language connectives and those of classical logic have motivated nonclassical approaches to natural language meaning as well as approaches which pair a classical ] with a robust ].


A logical connective is similar to, but not equivalent to, a syntax commonly used in programming languages called a ].<ref>{{cite web|last1=Cogwheel|title=What is the difference between logical and conditional /operator/|url=https://stackoverflow.com/questions/3154132/what-is-the-difference-between-logical-and-conditional-and-or-in-c|website=Stack Overflow|access-date=9 April 2015}}</ref>{{Better source needed|date=March 2021}}
::* It is raining '''and''' I am indoors. (])
::* '''If''' it is raining '''then''' I am indoors. (])
::* It is raining '''if''' I am indoors. (] )
::* It is raining '''if and only if''' I am indoors. (] )
::* '''It is not the case that''' it is raining. (])


== Overview ==
If we write ''''''P'''''' for ''''It is raining'''' and ''''''Q'''''' for ''''I am indoors'''' and we use the usual symbols for logical connectives, then the above examples could be represent in symbols like this:
In ]s, truth functions are represented by unambiguous symbols. This allows logical statements to not be understood in an ambiguous way. These symbols are called ''logical connectives'', ''logical operators'', ''propositional operators'', or, in ], ''] connectives''. For the rules which allow new well-formed formulas to be constructed by joining other well-formed formulas using truth-functional connectives, see ].
:: ''P''{{and}}''Q'' (It is raining '''and''' I am indoors.)
:: ''P''{{imp}}''Q'' ('''If''' it is raining '''then''' I am indoors.)
:: ''Q''{{imp}}''P'' (It is raining '''if''' I am indoors.)
:: ''P''{{eqv}}''Q'' (It is raining '''if and only if''' I am indoors.)
::{{not}}''P'' ('''It is not the case that''' it is raining.)


Logical connectives can be used to link zero or more statements, so one can speak about ''] logical connectives''. The ] constants ''True'' and ''False'' can be thought of as zero-ary operators. Negation is a unary connective, and so on.
{| width="100%"
|- valign=top
| width=50% |
The basic logical operators are :


{| class="floatright" style="margin-left:2em; margin-bottom:1ex; text-align:center; border: 1px solid #a2a9b1; color: black; padding:0.2em; background-color: #f8f9fa; font-size:90%;"
*] (&not; or ~)
! colspan=2 | Symbol, name
*] (<math>\wedge</math> or &)
! colspan=4 | Truth<br/>table
*] (<math>\vee</math>)
! | Venn<br/><small>diagram</small>
*] (<math>\rightarrow</math>, <math>\Rightarrow</math> or <math>\supset</math>)
|-
*] (<math>\equiv</math> or <math>\leftrightarrow</math>)
! colspan=7 | Zeroary connectives (constants)
|-
| ⊤ || style="text-align:left; | ]/]
| colspan=4 | 1
| ]
|-
| ⊥ || style="text-align:left; | ]/]
| colspan=4 | 0
| ]
|-
! colspan=7 | Unary connectives
|- style="background-color:#ffff66;"
| colspan=2 style="text-align:right;" | <math>p</math>&nbsp;=
| colspan=2 | 0
| colspan=2 | 1
|-
| || style="text-align:left; | Proposition <math>p</math>
| colspan=2 | 0
| colspan=2 | 1
| ]
|-
| ¬ || style="text-align:left; | ]
| colspan=2 | 1
| colspan=2 | 0
| ]


|-
| width=50% |
! colspan=9 | Binary connectives
Some others are:
|- style="background-color:#ffff66;"
*] (<math>\not\equiv</math>)
| colspan=2 style="text-align:right;" | <math>p</math>&nbsp;=
*] (↓)
| 0 || 0 || 1 || 1
*] (↑)
|- style="background-color:#ffff66;"
*] (⊅)
| colspan=2 style="text-align:right;" | <math>q</math>&nbsp;=
*] (⊄)
| 0 || 1 || 0 || 1
*] (⊂)
|-
*] (<math>\top</math>)
| ∧ || style="text-align:left;" | ]
*] (<math>\bot</math>)
|0||0||0||1|| ]
|}
|-
| ↑ || style="text-align:left;" | ]
|1||1||1||0|| ]
|-
| ∨ || style="text-align:left; | ]
|0||1||1||1|| ]
|-
| ↓ || style="text-align:left; | ]
|1||0||0||0|| ]
|-
| <math>\nleftrightarrow</math> || style="text-align:left; | ]
|0||1||1||0|| ]
|-
| ↔ || style="text-align:left; | ]
|1||0||0||1|| ]
|-
| → || style="text-align:left; | ]
|1||1||0||1|| ]
|-
| ↛ || style="text-align:left; | ]
|0||0||1||0|| ]
|-
| ← || style="text-align:left; | ]
|1||0||1||1|| ]
|-
| ↚ || style="text-align:left; | ]
|0||1||0||0|| ]
|-
| colspan=7" | ]
|}


===List of common logical connectives===
==Definitions==
Commonly used logical connectives include the following ones.<ref name="chao2023">{{cite book |last1=Chao |first1=C. |title=数理逻辑:形式化方法的应用 |trans-title=Mathematical Logic: Applications of the Formalization Method |date=2023 |publisher=Preprint. |location=Beijing |pages=15–28 |language=Chinese}}</ref>
===Truth tables===
* ]: <math>\neg</math>, <math>\sim</math>, <math>N</math> (prefix) in which <math>\neg</math> is the most modern and widely used, and <math>\sim</math> is also common;
<center>
* ]: <math>\wedge</math>, <math>\&</math>, <math>K</math> (prefix) in which <math>\wedge</math> is the most modern and widely used;
{| border="1" cellpadding="1" cellspacing="0" style="text-align:center;"
* ]: <math>\vee</math>, <math>A</math> (prefix) in which <math>\vee</math> is the most modern and widely used;
|+ '''The 16 binary logical operators can be defined by ] as follows:'''
* ]: <math>\to</math>, <math>\supset</math>, <math>\Rightarrow</math>, <math>C</math> (prefix) in which <math>\to</math> is the most modern and widely used, and <math>\supset</math> is also common;
! style="width:35px;background:#aaaaaa;" | p
* ]: <math>\leftrightarrow</math>, <math>\subset\!\!\!\supset</math>, <math>\Leftrightarrow</math>, <math>\equiv</math>, <math>E</math> (prefix) in which <math>\leftrightarrow</math> is the most modern and widely used, and <math>\subset\!\!\!\supset</math> is commonly used where <math>\supset</math> is also used.
! style="width:35px;background:#aaaaaa;" | q

! style="width:35px" | T
For example, the meaning of the statements ''it is raining'' (denoted by <math>p</math>) and ''I am indoors'' (denoted by <math>q</math>) is transformed, when the two are combined with logical connectives:
! style="width:35px" | ↑
* It is '''''not''''' raining (<math>\neg p</math>);
! style="width:35px" | →
* It is raining '''''and''''' I am indoors (<math>p \wedge q</math>);
! style="width:35px" | ~p
* It is raining '''''or''''' I am indoors (<math>p \lor q</math>);
! style="width:35px" | ←
* '''''If''''' it is raining, '''''then''''' I am indoors (<math>p \rightarrow q</math>);
! style="width:35px" | ~q
* '''''If''''' I am indoors, '''''then''''' it is raining (<math>q \rightarrow p</math>);
! style="width:35px" | <math>\equiv</math>
* I am indoors '''''if and only if''''' it is raining (<math>p \leftrightarrow q</math>).
! style="width:35px" | ↓

! style="width:35px" | ∨
It is also common to consider the ''always true'' formula and the ''always false'' formula to be connective (in which case they are ]).
! style="width:35px" | <math>\not\equiv</math>
* ] formula: <math>\top</math>, <math>1</math>, <math>V</math> (prefix), or <math>\mathrm{T}</math>;
! style="width:35px" | q
* ] formula: <math>\bot</math>, <math>0</math>, <math>O</math> (prefix), or <math>\mathrm{F}</math>.
! style="width:35px" | ⊄

! style="width:35px" | p
This table summarizes the terminology:
! style="width:35px" | ⊅

! style="width:35px" | &
{| class="wikitable" style="margin:1em auto; text-align:left;"
! style="width:35px" | F
|-
! Connective
! In English
! Noun for parts
! Verb phrase
|-
! Conjunction
| Both A and B
| conjunct
| A and B are conjoined
|- |-
! Disjunction
| T || T || T || F || T || F || T || F || T || F || T || F || T || F || T || F || T || F
| Either A or B, or both
| disjunct
| A and B are disjoined
|- |-
! Negation
| T || F || T || T || F || F || T || T || F || F || T || T || F || F || T || T || F || F
| It is not the case that A
| negatum/negand
| A is negated
|- |-
! Conditional
| F || T || T || T || T || T || F || F || F || F || T || T || T || T || F || F || F || F
| If A, then B
| antecedent, consequent
| B is implied by A
|- |-
! Biconditional
| F || F || T || T || T || T || T || T || T || T || F || F || F || F || F || F || F || F
| A if, and only if, B
| equivalents
| A and B are equivalent
|} |}
</center>


===History of notations===
* Negation: the symbol <math>\neg</math> appeared in ] in 1930<ref name="heyting1930">{{cite journal |last1=Heyting |first1=A. |title=Die formalen Regeln der intuitionistischen Logik |journal=Sitzungsberichte der Preussischen Akademie der Wissenschaften, Physikalisch-mathematische Klasse |date=1930 |pages=42–56 |language=German}}</ref><ref>Denis Roegel (2002),
'''' (see chart on page 2).</ref> (compare to ]'s symbol ⫟ in his ]<ref name="frege1879a">{{cite book |last1=Frege |first1=G. |title=Begriffsschrift, eine der arithmetischen nachgebildete Formelsprache des reinen Denkens |date=1879 |publisher=Verlag von Louis Nebert |location=Halle a/S. |page=10}}</ref>); the symbol <math>\sim</math> appeared in ] in 1908;<ref name="autogenerated222">] (1908) ''Mathematical logic as based on the theory of types'' (American Journal of Mathematics 30, p222–262, also in From Frege to Gödel edited by van Heijenoort).</ref> an alternative notation is to add a horizontal line on top of the formula, as in <math>\overline{p}</math>; another alternative notation is to use a ] as in <math>p'</math>.
* Conjunction: the symbol <math>\wedge</math> appeared in Heyting in 1930<ref name="heyting1930"/> (compare to ]'s use of the set-theoretic notation of ] <math>\cap</math><ref>] (1889) '']''.</ref>); the symbol <math>\&</math> appeared at least in ] in 1924;<ref name="autogenerated1924">] (1924) '' Über die Bausteine der mathematischen Logik'', translated as ''On the building blocks of mathematical logic'' in From Frege to Gödel edited by van Heijenoort.</ref> the symbol <math>\cdot</math> comes from ]'s interpretation of logic as an ].
* Disjunction: the symbol <math>\vee</math> appeared in ] in 1908<ref name="autogenerated222"/> (compare to ]'s use of the set-theoretic notation of ] <math>\cup</math>); the symbol <math>+</math> is also used, in spite of the ambiguity coming from the fact that the <math>+</math> of ordinary ] is an ] when interpreted logically in a two-element ]; punctually in the history a <math>+</math> together with a dot in the lower right corner has been used by ].<ref>] (1867) ''On an improvement in Boole's calculus of logic.</ref>
* Implication: the symbol <math>\to</math> appeared in ] in 1918;<ref name="hilbert1918">{{cite book |last1=Hilbert |first1=D. |editor1-last=Bernays |editor1-first=P. |title=Prinzipien der Mathematik |date=1918 |others=Lecture notes at Universität Göttingen, Winter Semester, 1917-1918 |postscript=none}}; Reprinted as {{cite encyclopedia |title=Prinzipien der Mathematik |last=Hilbert |first=D. |encyclopedia=David Hilbert's Lectures on the Foundations of Arithmetic and Logic 1917–1933 |date=2013 |editor1-last=Ewald |editor1-first=W. |editor2-last=Sieg |editor2-first=W. |publisher=Springer |location=Heidelberg, New York, Dordrecht and London |pages=59–221}}</ref>{{rp|page=76}} <math>\supset</math> was used by Russell in 1908<ref name="autogenerated222"/> (compare to Peano's Ɔ the inverted C); <math>\Rightarrow</math> appeared in ] in 1954.<ref name="bourbaki1954a">{{cite book |last1=Bourbaki |first1=N. |title=Théorie des ensembles |date=1954 |publisher=Hermann & Cie, Éditeurs |location=Paris |page=14}}</ref>
* Equivalence: the symbol <math>\equiv</math> in ] in 1879;<ref name="frege1879b">{{cite book |last1=Frege |first1=G. |title=Begriffsschrift, eine der arithmetischen nachgebildete Formelsprache des reinen Denkens |date=1879 |publisher=Verlag von Louis Nebert |location=Halle a/S. |page=15 |language=German}}</ref> <math>\leftrightarrow</math> in Becker in 1933 (not the first time and for this see the following);<ref name="becker1933">{{cite book |last1=Becker |first1=A. |title=Die Aristotelische Theorie der Möglichkeitsschlösse: Eine logisch-philologische Untersuchung der Kapitel 13-22 von Aristoteles' Analytica priora I |date=1933 |publisher=Junker und Dünnhaupt Verlag |location=Berlin |page=4 |language=German}}</ref> <math>\Leftrightarrow</math> appeared in ] in 1954;<ref name="bourbaki1954b">{{cite book |last1=Bourbaki |first1=N. |title=Théorie des ensembles |date=1954 |publisher=Hermann & Cie, Éditeurs |location=Paris |page=32 |language=French}}</ref> other symbols appeared punctually in the history, such as <math>\supset\subset</math> in ],<ref>] (1934) ''Untersuchungen über das logische Schließen''.</ref> <math>\sim</math> in Schönfinkel<ref name="autogenerated1924"/> or <math>\subset\supset</math> in Chazal, <ref>Chazal (1996) : Éléments de logique formelle.</ref>
* True: the symbol <math>1</math> comes from ]'s interpretation of logic as an ] over the ]; other notations include <math>\mathrm{V}</math> (abbreviation for the Latin word "verum") to be found in Peano in 1889.
* False: the symbol <math>0</math> comes also from Boole's interpretation of logic as a ring; other notations include <math>\Lambda</math> (rotated <math>\mathrm{V}</math>) to be found in Peano in 1889.


Some authors used letters for connectives: <math>\operatorname{u.}</math> for conjunction (German's "und" for "and") and <math>\operatorname{o.}</math> for disjunction (German's "oder" for "or") in early works by Hilbert (1904);<ref name="hilbert1904">{{cite encyclopedia |last1=Hilbert |first1=D. |title=Über die Grundlagen der Logik und der Arithmetik |encyclopedia=Verhandlungen des Dritten Internationalen Mathematiker Kongresses in Heidelberg vom 8. bis 13. August 1904 |editor1-last=Krazer |editor1-first=K. |orig-date=1904 |date=1905 |pages=174–185}}</ref> <math>Np</math> for negation, <math>Kpq</math> for conjunction, <math>Dpq</math> for alternative denial, <math>Apq</math> for disjunction, <math>Cpq</math> for implication, <math>Epq</math> for biconditional in ] in 1929.


=== Venn diagrams === ===Redundancy===


Such a logical connective as ] "<math>\leftarrow</math>" is actually the same as ] with swapped arguments; thus, the symbol for converse implication is redundant. In some logical calculi (notably, in ]), certain essentially different compound statements are ]. A less ] example of a redundancy is the classical equivalence between <math>\neg p\vee q</math> and <math>p\to q</math>. Therefore, a classical-based logical system does not need the conditional operator "<math>\to</math>" if "<math>\neg</math>" (not) and "<math>\vee</math>" (or) are already in use, or may use the "<math>\to</math>" only as a ] for a compound having one negation and one disjunction.
The binary logical operators may be expressed as ]s. The white area of each figure corresponds to "true" and the black to "false".


There are sixteen ]s associating the input ]s <math>p</math> and <math>q</math> with four-digit ] outputs.<ref>] (1959), ''A Précis of Mathematical Logic'', passim.</ref> These correspond to possible choices of binary logical connectives for ]. Different implementations of classical logic can choose different ] subsets of connectives.
<table>


One approach is to choose a ''minimal'' set, and define other connectives by some logical form, as in the example with the material conditional above.
<tr>
The following are the ] in classical logic whose arities do not exceed 2:
<td>
;One element: <math>\{\uparrow\}</math>, <math>\{\downarrow\}</math>.
]
;Two elements: <math>\{\vee, \neg\}</math>, <math>\{\wedge, \neg\}</math>, <math>\{\to, \neg\}</math>, <math>\{\gets, \neg\}</math>, <math>\{\to, \bot\}</math>, <math>\{\gets, \bot\}</math>, <math>\{\to, \nleftrightarrow\}</math>, <math>\{\gets, \nleftrightarrow\}</math>, <math>\{\to, \nrightarrow\}</math>, <math>\{\to, \nleftarrow\}</math>, <math>\{\gets, \nrightarrow\}</math>, <math>\{\gets, \nleftarrow\}</math>, <math>\{\nrightarrow, \neg\}</math>, <math>\{\nleftarrow, \neg\}</math>, <math>\{\nrightarrow, \top\}</math>, <math>\{\nleftarrow, \top\}</math>, <math>\{\nrightarrow, \leftrightarrow\}</math>, <math>\{\nleftarrow, \leftrightarrow\}</math>.
</td>
;Three elements: <math>\{\lor, \leftrightarrow, \bot\}</math>, <math>\{\lor, \leftrightarrow, \nleftrightarrow\}</math>, <math>\{\lor, \nleftrightarrow, \top\}</math>, <math>\{\land, \leftrightarrow, \bot\}</math>, <math>\{\land, \leftrightarrow, \nleftrightarrow\}</math>, <math>\{\land, \nleftrightarrow, \top\}</math>.


Another approach is to use with equal rights connectives of a certain convenient and functionally complete, but ''not minimal'' set. This approach requires more propositional ]s, and each equivalence between logical forms must be either an ] or provable as a theorem.
<td>
]
</td>


The situation, however, is more complicated in ]. Of its five connectives, {∧, ∨, →, ¬, ⊥}, only negation "¬" can be reduced to other connectives (see {{Section link|False (logic)|False, negation and contradiction}} for more). Neither conjunction, disjunction, nor material conditional has an equivalent form constructed from the other four logical connectives.
<td>
]
</td>


==Natural language==
<td>
]
</td>
</tr>


The standard logical connectives of classical logic have rough equivalents in the grammars of natural languages. In ], as in many languages, such expressions are typically ]s. However, they can also take the form of ]s, ] ]es, and ]s. The ]s of natural language connectives is a major topic of research in ], a field that studies the logical structure of natural languages.
<tr>
<td>
]
</td>


The meanings of natural language connectives are not precisely identical to their nearest equivalents in classical logic. In particular, disjunction can receive an ] in many languages. Some researchers have taken this fact as evidence that natural language ] is ]. However, others maintain classical semantics by positing ] accounts of exclusivity which create the illusion of nonclassicality. In such accounts, exclusivity is typically treated as a ]. Related puzzles involving disjunction include ]s, ], and the contribution of disjunction in ]s.
<td>
]
</td>


Other apparent discrepancies between natural language and classical logic include the ], ] and the problem of ]. These phenomena have been taken as motivation for identifying the denotations of natural language conditionals with logical operators including the ], the ], as well as various ] operators.
<td>
]
</td>


The following table shows the standard classically definable approximations for the English connectives.
<td>
]
</td>
</tr>


{| class="wikitable sortable"
<tr>
|-
<td>
! English word !! Connective !! Symbol !! Logical gate
]
|-
</td>
| not || ] || <math>\neg</math> || ]

|-
<td>
| and || ] || <math>\wedge</math> || ]
]
|-
</td>
| or || ] || <math>\vee</math> || ]

|-
<td>
| if...then || ] || <math>\to</math> || ]
]
|-
</td>
| ...if || ] || <math>\leftarrow</math> ||

|-
<td>
| either...or || ] || <math>\oplus</math> || ]
]
|-
</td>
| if and only if || ] || <math>\leftrightarrow</math> || ]
</tr>
|-

| not both || ] || <math>\uparrow</math> || ]
<tr>
|-
<td>
| neither...nor || ] || <math>\downarrow</math> || ]
]
|-
</td>
| but not || ] || <math>\not\to</math> || ]

|}
<td>
]
</td>

<td>
]
</td>

<td>
]
</td>
</tr>

</table>

Note the similarity between the symbols for "and" (<math>\wedge</math>) and ] (<math>\cap</math>); likewise for "or" (<math>\vee</math>) and ] (<math>\cup</math>). This is not a coincidence: the definition of the intersection uses "and" and the definition of union uses "or".

==Functional completeness==

{{mainarticle|Functional completeness}}

Not all of these operators are necessary for a ] logical calculus. Certain compound statements are ].
For example, &not;''P'' &or; ''Q'' is logically equivalent to ''P'' &rarr; ''Q'';.
So the conditional operator "&rarr;" is not necessary if you have "&not;" (not) and "&or;" (or).

The smallest set of operators which still expresses every statement which is expressible in the ] is called a minimal functionally complete set. A minimally complete set of operators is achieved by NAND alone '''{'''&nbsp;'''↓'''&nbsp;'''}''' and NOR alone '''{'''&nbsp;'''↑'''&nbsp;'''}'''.

All and only the following are functionally complete sets of operators:

'''{'''&nbsp;'''↓'''&nbsp;'''}''', '''{'''&nbsp;'''↑'''&nbsp;'''}''', '''{'''&nbsp;'''<math>\rightarrow</math>''',&nbsp;'''<math>\neg</math>'''&nbsp;'''}''', '''{'''&nbsp;'''<math>\rightarrow</math>''',&nbsp;'''<math>\not\equiv</math>'''&nbsp;'''}''', '''{'''&nbsp;'''<math>\neg</math>''',&nbsp;'''⊂'''&nbsp;'''}''',
'''{'''&nbsp;'''<math>\rightarrow</math>''',&nbsp;'''⊄'''&nbsp;'''}''',
'''{'''&nbsp;'''<math>\vee</math>''',&nbsp;'''<math>\neg</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''<math>\rightarrow</math>''',&nbsp;'''⊅'''&nbsp;'''}''',
'''{'''&nbsp;'''⊄''',&nbsp;'''<math>\neg</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊂''',&nbsp;'''<math>\not\equiv</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊅''',&nbsp;'''<math>\neg</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊂''',&nbsp;'''⊄'''&nbsp;'''}''',
'''{'''&nbsp;'''<math>\wedge</math>''',&nbsp;'''<math>\neg</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊂''',&nbsp;'''⊅'''&nbsp;'''}''',
'''{'''&nbsp;'''<math>\bot</math>''',&nbsp;'''<math>\rightarrow</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊄''',&nbsp;'''<math>\equiv</math>'''&nbsp;'''}''',
'''{'''&nbsp;'''⊅''',&nbsp;'''<math>\equiv</math>'''&nbsp;'''}'''


==Properties== ==Properties==
The logical connectives each possess different set of properties which may be expressed in the theorems containing the connective. Some of those properties that a logical connective may have are: Some logical connectives possess properties that may be expressed in the theorems containing the connective. Some of those properties that a logical connective may have are:


*]: Within an expression containing two or more of the same associative operators in a row, the order of the operations does not matter as long as the sequence of the operands is not changed. ; ]: Within an expression containing two or more of the same associative connectives in a row, the order of the operations does not matter as long as the sequence of the operands is not changed.
*]: Each pair of variables connected by the operator may be exchanged for each other without affecting the truth-value of the expression. ; ]:The operands of the connective may be swapped, preserving logical equivalence to the original expression.
; ]: A connective denoted by · distributes over another connective denoted by +, if {{math|1=''a'' · (''b'' + ''c'') = (''a'' · ''b'') + (''a'' · ''c'')}} for all operands {{mvar|a}}, {{mvar|b}}, {{mvar|c}}.
*]:
; ]: Whenever the operands of the operation are the same, the compound is logically equivalent to the operand.
*]:
; ]: A pair of connectives &and;, &or; satisfies the absorption law if <math>a\land(a\lor b)=a</math> for all operands {{mvar|a}}, {{mvar|b}}.
*]:
; ]: If ''f''(''a''<sub>1</sub>, ..., ''a''<sub>''n''</sub>) ≤ ''f''(''b''<sub>1</sub>, ..., ''b''<sub>''n''</sub>) for all ''a''<sub>1</sub>, ..., ''a''<sub>''n''</sub>, ''b''<sub>1</sub>, ..., ''b''<sub>''n''</sub> ∈ {0,1} such that ''a''<sub>1</sub> ≤ ''b''<sub>1</sub>, ''a''<sub>2</sub> ≤ ''b''<sub>2</sub>, ..., ''a''<sub>''n''</sub> ≤ ''b''<sub>''n''</sub>. E.g., &or;, &and;, ⊤, ⊥.
; ]: Each variable always makes a difference in the truth-value of the operation or it never makes a difference.<!-- has this an appropriate generalization to non-classical logics? --> E.g., &not;, ↔, <math>\nleftrightarrow</math>, ⊤, ⊥.
; ]: To read the truth-value assignments for the operation from top to bottom on its ] is the same as taking the complement of reading the table of the same or another connective from bottom to top. Without resorting to truth tables it may be formulated as {{math|1=''g&#771;''(¬''a''<sub>1</sub>, ..., ¬''a''<sub>''n''</sub>) = ¬''g''(''a''<sub>1</sub>, ..., ''a''<sub>''n''</sub>)}}. E.g., &not;.
; Truth-preserving: The compound all those arguments are tautologies is a tautology itself. E.g., &or;, &and;, ⊤, →, ↔, ⊂ (see ]).
; Falsehood-preserving: The compound all those argument are ]s is a contradiction itself. E.g., &or;, &and;, <math>\nleftrightarrow</math>, ⊥, ⊄, ⊅ (see ]).
; ] (for unary connectives): {{math|1=''f''(''f''(''a'')) = ''a''}}. E.g. negation in classical logic.


For classical and intuitionistic logic, the "="<!-- BTW why not "⇔"? --> symbol means that corresponding implications "...→..." and "...←..." for logical compounds can be both proved as theorems, and the "≤"<!-- BTW why not "⇒"/"→"? --> symbol means that "...→..." for logical compounds is a consequence of corresponding "...→..." connectives for propositional variables. Some ]s may have incompatible definitions of equivalence and order (entailment).
A ] set of operators contains at least one member lacking each of these five qualities:


Both conjunction and disjunction are associative, commutative and idempotent in classical logic, most varieties of many-valued logic and intuitionistic logic. The same is true about distributivity of conjunction over disjunction and disjunction over conjunction, as well as for the absorption law.
*''']''' : If f(a<sub>1</sub>, ... , a<sub>n</sub>) ≤ f(b<sub>1</sub>, ... , b<sub>n</sub>) for all a<sub>1</sub>, ... , a<sub>n</sub> <math>\in</math> {0,1} such that a<sub>1</sub> ≤ b<sub>1</sub>, a<sub>2</sub> ≤ b<sub>2</sub>, ... , a<sub>n</sub> ≤ b<sub>n</sub> '''{''' '''<math>\vee</math>''', '''<math>\wedge</math>''', '''<math>\top</math>''', '''<math>\bot</math>''' '''}'''


In classical logic and some varieties of many-valued logic, conjunction and disjunction are dual, and negation is self-dual, the latter is also self-dual in intuitionistic logic. <!-- I am not sure about ∧ and ∨. Aforementioned definition of duality does not imply that one connective is equivalent to a form with two-layer negation, so such intuitionistic duality is plausible. But one should carefully verify such additions, at least because intuitionistic negation is not an involution and hence the duality relation is not symmetric. -->
*''']''' : Each variable always makes a difference in the truth-value of the operation or it never makes a difference '''{''' '''<math>\neg</math>''', '''<math>\equiv</math>''', '''<math>\not\equiv</math>''', '''<math>\top</math>''', '''<math>\bot</math>''' '''}'''


{{expand section|date=March 2012}}
*'''self dual''' : To read the truth-value assignments for the operation from top to bottom on its ] is the same as taking the compliment of reading it from bottom to top. '''{''' '''<math>\neg</math>''' '''}'''


==Order of precedence==
*'''truth-preserving''': The interpretation under which all variables are assigned a ] of 'true' produces a truth value of 'true' as a result of these operations. '''{''' '''<math>\vee</math>''', '''<math>\wedge</math>''', '''<math>\top</math>''', '''<math>\rightarrow</math>''', '''<math>\equiv</math>''', '''⊂''' '''}'''
As a way of reducing the number of necessary parentheses, one may introduce ]s: &not; has higher precedence than &and;, &and; higher than &or;, and &or; higher than →. So for example, <math>P \vee Q \wedge{\neg R} \rightarrow S</math> is short for <math>(P \vee (Q \wedge (\neg R))) \rightarrow S</math>.


Here is a table that shows a commonly used precedence of logical operators.<ref>{{cite book|title=Discrete Mathematics Using a Computer|first1=John|last1=O'Donnell|first2=Cordelia|last2=Hall|first3=Rex|last3=Page| publisher=Springer| year=2007| isbn=9781846285981|page=120|url=https://books.google.com/books?id=KKxyQQWQam4C&pg=PA120}}.</ref><ref name=":35">{{Cite book |last1=Allen |first1=Colin |title=Logic primer |last2=Hand |first2=Michael |date=2022 |publisher=The MIT Press |isbn=978-0-262-54364-4 |edition=3rd |location=Cambridge, Massachusetts}}</ref>
*'''falsehood-preserving''': The interpretation under which all variables are assigned a ] of 'false' produces a truth value of 'false' as a result of these operations. '''{''' '''<math>\vee</math>''', '''<math>\wedge</math>''', '''<math>\not\equiv</math>''', '''<math>\bot</math>''', '''⊄''', '''⊅''' '''}'''
{| class="wikitable" style="text-align: center;"
!Operator !!Precedence
|-
| <math>\neg</math> || 1
|-
| <math>\land</math> || 2
|-
| <math>\lor</math> || 3
|-
| <math>\to</math> || 4
|-
| <math>\leftrightarrow</math> || 5
|}
However, not all compilers use the same order; for instance, an ordering in which disjunction is lower precedence than implication or bi-implication has also been used.<ref>{{cite book|title=Software Abstractions: Logic, Language, and Analysis | first=Daniel|last=Jackson|publisher=MIT Press|year=2012|isbn=9780262017152|page=263| url=https://books.google.com/books?id=DDv8Ie_jBUQC&pg=PA263}}.</ref> Sometimes precedence between conjunction and disjunction is unspecified requiring to provide it explicitly in given formula with parentheses. The order of precedence determines which connective is the "main connective" when interpreting a non-atomic formula.


==Table and Hasse diagram==
==Arity==


The 16 logical connectives can be ] to produce the following ].
{{mainarticle|arity}}
The partial order is defined by declaring that <math>x \leq y</math> if and only if whenever <math>x</math> holds then so does <math>y.</math>


{{Logical connectives table and Hasse diagram}}
In two-valued logic there are 4 ], 16 ], and 256 ]. In three valued logic there are 9 ], 19683 ], and 7625597484987 ].


==Applications==
] is a ], it takes a single term (&not;''P''). The rest are ], taking two terms to make a compound statement (''P'' <math>\wedge</math> ''Q'', ''P'' <math>\vee</math> ''Q'', ''P'' &rarr; ''Q'', ''P'' &harr; ''Q'').
Logical connectives are used in ] and in ].


===Computer science===
The set of logical operators <math>\Omega\!</math> may be ]ed into disjoint subsets as follows:
{{Main article|Logic gate}}
A truth-functional approach to logical operators is implemented as ]s in ]s. Practically all digital circuits (the major exception is ]) are built up from ], ], ], and ]s; see more details in ]. Logical operators over ] (corresponding to finite ]) are ]s.


But not every usage of a logical connective in ] has a Boolean semantic. For example, ] is sometimes implemented for {{math|''P'' ∧ ''Q''}} and {{math|''P'' ∨ ''Q''}}, so these connectives are not commutative if either or both of the expressions {{mvar|P}}, {{mvar|Q}} have ]s. Also, a ], which in some sense corresponds to the ] connective, is essentially non-Boolean because for <code>if (P) then Q;</code>, the consequent&nbsp;Q is not executed if the ]&nbsp;P is false (although a compound as a whole is successful ≈ "true" in such case). This is closer to intuitionist and ] views on the material conditional— rather than to classical logic's views.
::: <math>\Omega = \Omega_0 \cup \Omega_1 \cup \ldots \cup \Omega_j \cup \ldots \cup \Omega_m \,.</math>


===Set theory===
In this partition, <math>\Omega_j\!</math> is the set of operator symbols of '']'' <math>j\!</math>.
{{Main article|Set theory|Axiomatic set theory}}
Logical connectives are used to define the fundamental operations of ],<ref>{{Cite book |last=Pinter |first=Charles C. |title=A book of set theory |date=2014 |publisher=Dover Publications, Inc |isbn=978-0-486-49708-2 |location=Mineola, New York |pages=26–29}}</ref> as follows:


{| class="wikitable" style="margin:1em auto; text-align:left;"
In the more familiar propositional calculi, <math>\Omega\!</math> is typically partitioned as follows:
|+Set theory operations and connectives

:::nullary operators: <math>\Omega_0 = \{\bot, \top \} \,</math>

:::unary operators: <math>\Omega_1 = \{ \lnot \} \,</math>

:::binary operators: <math>\Omega_2 \subseteq \{ \land, \lor, \rightarrow, \leftrightarrow \} \,</math>

==Order of precedence==
As a way of reducing the number of necessary parentheses, one may introduce precedence rules: &not; has higher precedence than &and;, &and; higher than &or;, and &or; higher than &rarr;. So for example, ''P'' &or; ''Q'' &and; &not;''R'' &rarr; ''S'' is short for (''P'' &or; (''Q'' &and; (&not;''R''))) &rarr; ''S''.

Here is a table that shows the usual precedence of logical operators.

{| class="wikitable" style="text-align:center"
|- |-
! Set operation
! ''Operator'' !! ''Precedence''
! Connective
! Definition
|- |-
| ]
| '''&not;''' || '''1'''
| ]
| <math>A \cap B = \{x : x \in A \land x \in B \}</math><ref name=":0">{{Cite web |title=Set operations |url=https://www.siue.edu/~jloreau/courses/math-223/notes/sec-set-operations.html |access-date=2024-06-11 |website=www.siue.edu}}</ref><ref name=":1">{{Cite web |title=1.5 Logic and Sets |url=https://www.whitman.edu/mathematics/higher_math_online/section01.05.html |access-date=2024-06-11 |website=www.whitman.edu}}</ref><ref>{{Cite web |title=Theory Set |url=https://mirror.clarkson.edu/isabelle/dist/library/HOL/HOL/Set.html |access-date=2024-06-11 |website=mirror.clarkson.edu}}</ref>
|- |-
| ]
| '''<math>\wedge</math>''' || '''2'''
| ]
| <math>A \cup B = \{x : x \in A \lor x \in B \}</math><ref>{{Cite web |title=Set Inclusion and Relations |url=https://autry.sites.grinnell.edu/csc208/readings/set-inclusion.html |access-date=2024-06-11 |website=autry.sites.grinnell.edu}}</ref><ref name=":0" /><ref name=":1" />
|- |-
| ]
| '''<math>\vee</math>''' || '''3'''
| ]
| <math>\overline{A} = \{x : x \notin A \}</math><ref>{{Cite web |title=Complement and Set Difference |url=https://web.mnstate.edu/peil/MDEV102/U1/S6/Complement3.htm |access-date=2024-06-11 |website=web.mnstate.edu}}</ref><ref name=":1" /><ref>{{Cite web |last=Cooper |first=A. |title=Set Operations and Subsets – Foundations of Mathematics |url=https://ma225.wordpress.ncsu.edu/set-operations-and-subsets/ |access-date=2024-06-11 |language=en-US}}</ref>
|- |-
| ]
| '''&rarr;''' || '''4'''
| ]
| <math>A \subseteq B \leftrightarrow (x \in A \rightarrow x \in B)</math><ref name=":2">{{Cite web |title=Basic concepts |url=https://www.siue.edu/~jloreau/courses/math-223/notes/sec-set-basics.html |access-date=2024-06-11 |website=www.siue.edu}}</ref><ref name=":1" /><ref>{{Cite web |last=Cooper |first=A. |title=Set Operations and Subsets – Foundations of Mathematics |url=https://ma225.wordpress.ncsu.edu/set-operations-and-subsets/ |access-date=2024-06-11 |language=en-US}}</ref>
|- |-
| ]
| '''&harr;''' || '''5'''
| ]
| <math>A = B \leftrightarrow (\forall X)</math><ref name=":2" /><ref name=":1" /><ref>{{Cite web |last=Cooper |first=A. |title=Set Operations and Subsets – Foundations of Mathematics |url=https://ma225.wordpress.ncsu.edu/set-operations-and-subsets/ |access-date=2024-06-11 |language=en-US}}</ref>
|} |}
This definition of set equality is equivalent to the ].

The order of precedence determines which connective is the "main connective" when interpreting a molecular formula.

==Applications in computer science==
Logical operators are implemented as ]s in ]s. Practically all digital circuits (the major exception is ]) are built up from ], ], ], and ]s. NAND and NOR gates with 3 or more inputs rather than the usual 2 inputs are fairly common, although they are logically equivalent to a cascade of 2-input gates. All other operators are implemented by breaking them down into a logically equivalent combination of 2 or more of the above logic gates.

The "logical equivalence" of "NAND alone", "NOR alone", and "NOT and AND" is similar to ].

Is some new technology (such as ], ], or ]s computing) "functionally complete", in that it can be used to build computers that can do all the sorts of computation that ]-based computers can do?
If it can implement the NAND operator, only then is it ].

That fact that all logical connectives can be expressed with NOR alone is demonstrated by the ].

==References==
* at the ].


==See also== ==See also==


{{Portal|Philosophy|Psychology}}
{{col-begin}}
{{col-break}} {{div col|colwidth=22em}}
* ]
* ]
* ]s
* ] * ]
* ] * ]
* ]
* ] * ]
* ] * ]
* ] * ]
* ]
{{col-break}}
* ]
* ]
* ]
* ]
* ]
* ] * ]
* ]
{{col-end}}
* ]
* ]
* ]
* ]s
{{div col end}}

==References==
{{Reflist}}

==Sources==

* ] (1959), ''A Précis of Mathematical Logic'', translated from the French and German editions by Otto Bird, D. Reidel, Dordrecht, South Holland.
* {{cite book |last1=Chao |first1=C. |title=数理逻辑:形式化方法的应用 |trans-title=Mathematical Logic: Applications of the Formalization Method |date=2023 |publisher=Preprint. |location=Beijing |pages=15–28 |language=Chinese}}
* {{cite book | last1=Enderton | first1=Herbert |author1-link=Herbert Enderton| title=A Mathematical Introduction to Logic | publisher=Academic Press | location=Boston, MA | edition=2nd | isbn=978-0-12-238452-3 | year=2001}}
* {{cite book |last=Gamut|first=L.T.F|author-link=L. T. F. Gamut|title=Logic, Language and Meaning|publisher=University of Chicago Press|year=1991|volume=1|pages=54&ndash;64|contribution=Chapter 2|oclc=21372380}}
* {{cite book |author=Rautenberg, W.|author-link=Wolfgang Rautenberg|doi=10.1007/978-1-4419-1221-3|title=A Concise Introduction to Mathematical Logic|publisher=] |location=]|edition=3rd|isbn=978-1-4419-1220-6|year=2010}}.
* {{cite book|first=Lloyd|last=Humberstone|title=The Connectives|year=2011|publisher=MIT Press|isbn=978-0-262-01654-4}}

==External links==

{{Commons category}}
*{{springer|title=Propositional connective|id=p/p075490}}
*Lloyd Humberstone (2010), "", ] (An ] approach to connectives.)
*John MacFarlane (2005), "", ].


{{Logical connectives}}
{{portalpar|Logic}}
{{Mathematical logic}}
{{Logical Operators}}
{{Formal semantics}}
{{Logic}}
{{Authority control}}


{{DEFAULTSORT:Logical Connective}}
]
] ]
]


] ]
]
]
]
]
]
]
]
]
]
]
]
]
]

Latest revision as of 13:21, 18 December 2024

Symbol connecting sentential formulas in logic

For other logical symbols, see List of logic symbols.
Logical connectives
NOT ¬ A {\displaystyle \neg A} , A {\displaystyle -A} , A ¯ {\displaystyle {\overline {A}}} , A {\displaystyle \sim A}
AND A B {\displaystyle A\land B} , A B {\displaystyle A\cdot B} , A B {\displaystyle AB} , A & B {\displaystyle A\&B} , A & & B {\displaystyle A\&\&B}
NAND A ¯ B {\displaystyle A{\overline {\land }}B} , A B {\displaystyle A\uparrow B} , A B {\displaystyle A\mid B} , A B ¯ {\displaystyle {\overline {A\cdot B}}}
OR A B {\displaystyle A\lor B} , A + B {\displaystyle A+B} , A B {\displaystyle A\mid B} , A B {\displaystyle A\parallel B}
NOR A ¯ B {\displaystyle A{\overline {\lor }}B} , A B {\displaystyle A\downarrow B} , A + B ¯ {\displaystyle {\overline {A+B}}}
XNOR A   XNOR   B {\displaystyle A\ {\text{XNOR}}\ B}
equivalent A B {\displaystyle A\equiv B} , A B {\displaystyle A\Leftrightarrow B} , A B {\displaystyle A\leftrightharpoons B}
XOR A _ B {\displaystyle A{\underline {\lor }}B} , A B {\displaystyle A\oplus B}
└nonequivalent A B {\displaystyle A\not \equiv B} , A B {\displaystyle A\not \Leftrightarrow B} , A B {\displaystyle A\nleftrightarrow B}
implies A B {\displaystyle A\Rightarrow B} , A B {\displaystyle A\supset B} , A B {\displaystyle A\rightarrow B}
converse A B {\displaystyle A\Leftarrow B} , A B {\displaystyle A\subset B} , A B {\displaystyle A\leftarrow B}
Related concepts
Applications
Category
Hasse diagram of logical connectives.

In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary connective {\displaystyle \lor } can be used to join the two atomic formulas P {\displaystyle P} and Q {\displaystyle Q} , rendering the complex formula P Q {\displaystyle P\lor Q} .

Common connectives include negation, disjunction, conjunction, implication, and equivalence. In standard systems of classical logic, these connectives are interpreted as truth functions, though they receive a variety of alternative interpretations in nonclassical logics. Their classical interpretations are similar to the meanings of natural language expressions such as English "not", "or", "and", and "if", but not identical. Discrepancies between natural language connectives and those of classical logic have motivated nonclassical approaches to natural language meaning as well as approaches which pair a classical compositional semantics with a robust pragmatics.

A logical connective is similar to, but not equivalent to, a syntax commonly used in programming languages called a conditional operator.

Overview

In formal languages, truth functions are represented by unambiguous symbols. This allows logical statements to not be understood in an ambiguous way. These symbols are called logical connectives, logical operators, propositional operators, or, in classical logic, truth-functional connectives. For the rules which allow new well-formed formulas to be constructed by joining other well-formed formulas using truth-functional connectives, see well-formed formula.

Logical connectives can be used to link zero or more statements, so one can speak about n-ary logical connectives. The boolean constants True and False can be thought of as zero-ary operators. Negation is a unary connective, and so on.

Symbol, name Truth
table
Venn
diagram
Zeroary connectives (constants)
Truth/tautology 1
Falsity/contradiction 0
Unary connectives
p {\displaystyle p}  = 0 1
Proposition p {\displaystyle p} 0 1
¬ Negation 1 0
Binary connectives
p {\displaystyle p}  = 0 0 1 1
q {\displaystyle q}  = 0 1 0 1
Conjunction 0 0 0 1
Alternative denial 1 1 1 0
Disjunction 0 1 1 1
Joint denial 1 0 0 0
{\displaystyle \nleftrightarrow } Exclusive or 0 1 1 0
Biconditional 1 0 0 1
Material conditional 1 1 0 1
Material nonimplication 0 0 1 0
Converse implication 1 0 1 1
Converse nonimplication 0 1 0 0
More information

List of common logical connectives

Commonly used logical connectives include the following ones.

  • Negation (not): ¬ {\displaystyle \neg } , {\displaystyle \sim } , N {\displaystyle N} (prefix) in which ¬ {\displaystyle \neg } is the most modern and widely used, and {\displaystyle \sim } is also common;
  • Conjunction (and): {\displaystyle \wedge } , & {\displaystyle \&} , K {\displaystyle K} (prefix) in which {\displaystyle \wedge } is the most modern and widely used;
  • Disjunction (or): {\displaystyle \vee } , A {\displaystyle A} (prefix) in which {\displaystyle \vee } is the most modern and widely used;
  • Implication (if...then): {\displaystyle \to } , {\displaystyle \supset } , {\displaystyle \Rightarrow } , C {\displaystyle C} (prefix) in which {\displaystyle \to } is the most modern and widely used, and {\displaystyle \supset } is also common;
  • Equivalence (if and only if): {\displaystyle \leftrightarrow } , {\displaystyle \subset \!\!\!\supset } , {\displaystyle \Leftrightarrow } , {\displaystyle \equiv } , E {\displaystyle E} (prefix) in which {\displaystyle \leftrightarrow } is the most modern and widely used, and {\displaystyle \subset \!\!\!\supset } is commonly used where {\displaystyle \supset } is also used.

For example, the meaning of the statements it is raining (denoted by p {\displaystyle p} ) and I am indoors (denoted by q {\displaystyle q} ) is transformed, when the two are combined with logical connectives:

  • It is not raining ( ¬ p {\displaystyle \neg p} );
  • It is raining and I am indoors ( p q {\displaystyle p\wedge q} );
  • It is raining or I am indoors ( p q {\displaystyle p\lor q} );
  • If it is raining, then I am indoors ( p q {\displaystyle p\rightarrow q} );
  • If I am indoors, then it is raining ( q p {\displaystyle q\rightarrow p} );
  • I am indoors if and only if it is raining ( p q {\displaystyle p\leftrightarrow q} ).

It is also common to consider the always true formula and the always false formula to be connective (in which case they are nullary).

  • True formula: {\displaystyle \top } , 1 {\displaystyle 1} , V {\displaystyle V} (prefix), or T {\displaystyle \mathrm {T} } ;
  • False formula: {\displaystyle \bot } , 0 {\displaystyle 0} , O {\displaystyle O} (prefix), or F {\displaystyle \mathrm {F} } .

This table summarizes the terminology:

Connective In English Noun for parts Verb phrase
Conjunction Both A and B conjunct A and B are conjoined
Disjunction Either A or B, or both disjunct A and B are disjoined
Negation It is not the case that A negatum/negand A is negated
Conditional If A, then B antecedent, consequent B is implied by A
Biconditional A if, and only if, B equivalents A and B are equivalent

History of notations

  • Negation: the symbol ¬ {\displaystyle \neg } appeared in Heyting in 1930 (compare to Frege's symbol ⫟ in his Begriffsschrift); the symbol {\displaystyle \sim } appeared in Russell in 1908; an alternative notation is to add a horizontal line on top of the formula, as in p ¯ {\displaystyle {\overline {p}}} ; another alternative notation is to use a prime symbol as in p {\displaystyle p'} .
  • Conjunction: the symbol {\displaystyle \wedge } appeared in Heyting in 1930 (compare to Peano's use of the set-theoretic notation of intersection {\displaystyle \cap } ); the symbol & {\displaystyle \&} appeared at least in Schönfinkel in 1924; the symbol {\displaystyle \cdot } comes from Boole's interpretation of logic as an elementary algebra.
  • Disjunction: the symbol {\displaystyle \vee } appeared in Russell in 1908 (compare to Peano's use of the set-theoretic notation of union {\displaystyle \cup } ); the symbol + {\displaystyle +} is also used, in spite of the ambiguity coming from the fact that the + {\displaystyle +} of ordinary elementary algebra is an exclusive or when interpreted logically in a two-element ring; punctually in the history a + {\displaystyle +} together with a dot in the lower right corner has been used by Peirce.
  • Implication: the symbol {\displaystyle \to } appeared in Hilbert in 1918; {\displaystyle \supset } was used by Russell in 1908 (compare to Peano's Ɔ the inverted C); {\displaystyle \Rightarrow } appeared in Bourbaki in 1954.
  • Equivalence: the symbol {\displaystyle \equiv } in Frege in 1879; {\displaystyle \leftrightarrow } in Becker in 1933 (not the first time and for this see the following); {\displaystyle \Leftrightarrow } appeared in Bourbaki in 1954; other symbols appeared punctually in the history, such as ⊃ ⊂ {\displaystyle \supset \subset } in Gentzen, {\displaystyle \sim } in Schönfinkel or ⊂ ⊃ {\displaystyle \subset \supset } in Chazal,
  • True: the symbol 1 {\displaystyle 1} comes from Boole's interpretation of logic as an elementary algebra over the two-element Boolean algebra; other notations include V {\displaystyle \mathrm {V} } (abbreviation for the Latin word "verum") to be found in Peano in 1889.
  • False: the symbol 0 {\displaystyle 0} comes also from Boole's interpretation of logic as a ring; other notations include Λ {\displaystyle \Lambda } (rotated V {\displaystyle \mathrm {V} } ) to be found in Peano in 1889.

Some authors used letters for connectives: u . {\displaystyle \operatorname {u.} } for conjunction (German's "und" for "and") and o . {\displaystyle \operatorname {o.} } for disjunction (German's "oder" for "or") in early works by Hilbert (1904); N p {\displaystyle Np} for negation, K p q {\displaystyle Kpq} for conjunction, D p q {\displaystyle Dpq} for alternative denial, A p q {\displaystyle Apq} for disjunction, C p q {\displaystyle Cpq} for implication, E p q {\displaystyle Epq} for biconditional in Łukasiewicz in 1929.

Redundancy

Such a logical connective as converse implication " {\displaystyle \leftarrow } " is actually the same as material conditional with swapped arguments; thus, the symbol for converse implication is redundant. In some logical calculi (notably, in classical logic), certain essentially different compound statements are logically equivalent. A less trivial example of a redundancy is the classical equivalence between ¬ p q {\displaystyle \neg p\vee q} and p q {\displaystyle p\to q} . Therefore, a classical-based logical system does not need the conditional operator " {\displaystyle \to } " if " ¬ {\displaystyle \neg } " (not) and " {\displaystyle \vee } " (or) are already in use, or may use the " {\displaystyle \to } " only as a syntactic sugar for a compound having one negation and one disjunction.

There are sixteen Boolean functions associating the input truth values p {\displaystyle p} and q {\displaystyle q} with four-digit binary outputs. These correspond to possible choices of binary logical connectives for classical logic. Different implementations of classical logic can choose different functionally complete subsets of connectives.

One approach is to choose a minimal set, and define other connectives by some logical form, as in the example with the material conditional above. The following are the minimal functionally complete sets of operators in classical logic whose arities do not exceed 2:

One element
{ } {\displaystyle \{\uparrow \}} , { } {\displaystyle \{\downarrow \}} .
Two elements
{ , ¬ } {\displaystyle \{\vee ,\neg \}} , { , ¬ } {\displaystyle \{\wedge ,\neg \}} , { , ¬ } {\displaystyle \{\to ,\neg \}} , { , ¬ } {\displaystyle \{\gets ,\neg \}} , { , } {\displaystyle \{\to ,\bot \}} , { , } {\displaystyle \{\gets ,\bot \}} , { , } {\displaystyle \{\to ,\nleftrightarrow \}} , { , } {\displaystyle \{\gets ,\nleftrightarrow \}} , { , } {\displaystyle \{\to ,\nrightarrow \}} , { , } {\displaystyle \{\to ,\nleftarrow \}} , { , } {\displaystyle \{\gets ,\nrightarrow \}} , { , } {\displaystyle \{\gets ,\nleftarrow \}} , { , ¬ } {\displaystyle \{\nrightarrow ,\neg \}} , { , ¬ } {\displaystyle \{\nleftarrow ,\neg \}} , { , } {\displaystyle \{\nrightarrow ,\top \}} , { , } {\displaystyle \{\nleftarrow ,\top \}} , { , } {\displaystyle \{\nrightarrow ,\leftrightarrow \}} , { , } {\displaystyle \{\nleftarrow ,\leftrightarrow \}} .
Three elements
{ , , } {\displaystyle \{\lor ,\leftrightarrow ,\bot \}} , { , , } {\displaystyle \{\lor ,\leftrightarrow ,\nleftrightarrow \}} , { , , } {\displaystyle \{\lor ,\nleftrightarrow ,\top \}} , { , , } {\displaystyle \{\land ,\leftrightarrow ,\bot \}} , { , , } {\displaystyle \{\land ,\leftrightarrow ,\nleftrightarrow \}} , { , , } {\displaystyle \{\land ,\nleftrightarrow ,\top \}} .

Another approach is to use with equal rights connectives of a certain convenient and functionally complete, but not minimal set. This approach requires more propositional axioms, and each equivalence between logical forms must be either an axiom or provable as a theorem.

The situation, however, is more complicated in intuitionistic logic. Of its five connectives, {∧, ∨, →, ¬, ⊥}, only negation "¬" can be reduced to other connectives (see False (logic) § False, negation and contradiction for more). Neither conjunction, disjunction, nor material conditional has an equivalent form constructed from the other four logical connectives.

Natural language

The standard logical connectives of classical logic have rough equivalents in the grammars of natural languages. In English, as in many languages, such expressions are typically grammatical conjunctions. However, they can also take the form of complementizers, verb suffixes, and particles. The denotations of natural language connectives is a major topic of research in formal semantics, a field that studies the logical structure of natural languages.

The meanings of natural language connectives are not precisely identical to their nearest equivalents in classical logic. In particular, disjunction can receive an exclusive interpretation in many languages. Some researchers have taken this fact as evidence that natural language semantics is nonclassical. However, others maintain classical semantics by positing pragmatic accounts of exclusivity which create the illusion of nonclassicality. In such accounts, exclusivity is typically treated as a scalar implicature. Related puzzles involving disjunction include free choice inferences, Hurford's Constraint, and the contribution of disjunction in alternative questions.

Other apparent discrepancies between natural language and classical logic include the paradoxes of material implication, donkey anaphora and the problem of counterfactual conditionals. These phenomena have been taken as motivation for identifying the denotations of natural language conditionals with logical operators including the strict conditional, the variably strict conditional, as well as various dynamic operators.

The following table shows the standard classically definable approximations for the English connectives.

English word Connective Symbol Logical gate
not negation ¬ {\displaystyle \neg } NOT
and conjunction {\displaystyle \wedge } AND
or disjunction {\displaystyle \vee } OR
if...then material implication {\displaystyle \to } IMPLY
...if converse implication {\displaystyle \leftarrow }
either...or exclusive disjunction {\displaystyle \oplus } XOR
if and only if biconditional {\displaystyle \leftrightarrow } XNOR
not both alternative denial {\displaystyle \uparrow } NAND
neither...nor joint denial {\displaystyle \downarrow } NOR
but not material nonimplication {\displaystyle \not \to } NIMPLY

Properties

Some logical connectives possess properties that may be expressed in the theorems containing the connective. Some of those properties that a logical connective may have are:

Associativity
Within an expression containing two or more of the same associative connectives in a row, the order of the operations does not matter as long as the sequence of the operands is not changed.
Commutativity
The operands of the connective may be swapped, preserving logical equivalence to the original expression.
Distributivity
A connective denoted by · distributes over another connective denoted by +, if a · (b + c) = (a · b) + (a · c) for all operands a, b, c.
Idempotence
Whenever the operands of the operation are the same, the compound is logically equivalent to the operand.
Absorption
A pair of connectives ∧, ∨ satisfies the absorption law if a ( a b ) = a {\displaystyle a\land (a\lor b)=a} for all operands a, b.
Monotonicity
If f(a1, ..., an) ≤ f(b1, ..., bn) for all a1, ..., an, b1, ..., bn ∈ {0,1} such that a1b1, a2b2, ..., anbn. E.g., ∨, ∧, ⊤, ⊥.
Affinity
Each variable always makes a difference in the truth-value of the operation or it never makes a difference. E.g., ¬, ↔, {\displaystyle \nleftrightarrow } , ⊤, ⊥.
Duality
To read the truth-value assignments for the operation from top to bottom on its truth table is the same as taking the complement of reading the table of the same or another connective from bottom to top. Without resorting to truth tables it may be formulated as a1, ..., ¬an) = ¬g(a1, ..., an). E.g., ¬.
Truth-preserving
The compound all those arguments are tautologies is a tautology itself. E.g., ∨, ∧, ⊤, →, ↔, ⊂ (see validity).
Falsehood-preserving
The compound all those argument are contradictions is a contradiction itself. E.g., ∨, ∧, {\displaystyle \nleftrightarrow } , ⊥, ⊄, ⊅ (see validity).
Involutivity (for unary connectives)
f(f(a)) = a. E.g. negation in classical logic.

For classical and intuitionistic logic, the "=" symbol means that corresponding implications "...→..." and "...←..." for logical compounds can be both proved as theorems, and the "≤" symbol means that "...→..." for logical compounds is a consequence of corresponding "...→..." connectives for propositional variables. Some many-valued logics may have incompatible definitions of equivalence and order (entailment).

Both conjunction and disjunction are associative, commutative and idempotent in classical logic, most varieties of many-valued logic and intuitionistic logic. The same is true about distributivity of conjunction over disjunction and disjunction over conjunction, as well as for the absorption law.

In classical logic and some varieties of many-valued logic, conjunction and disjunction are dual, and negation is self-dual, the latter is also self-dual in intuitionistic logic.

This section needs expansion. You can help by adding to it. (March 2012)

Order of precedence

As a way of reducing the number of necessary parentheses, one may introduce precedence rules: ¬ has higher precedence than ∧, ∧ higher than ∨, and ∨ higher than →. So for example, P Q ¬ R S {\displaystyle P\vee Q\wedge {\neg R}\rightarrow S} is short for ( P ( Q ( ¬ R ) ) ) S {\displaystyle (P\vee (Q\wedge (\neg R)))\rightarrow S} .

Here is a table that shows a commonly used precedence of logical operators.

Operator Precedence
¬ {\displaystyle \neg } 1
{\displaystyle \land } 2
{\displaystyle \lor } 3
{\displaystyle \to } 4
{\displaystyle \leftrightarrow } 5

However, not all compilers use the same order; for instance, an ordering in which disjunction is lower precedence than implication or bi-implication has also been used. Sometimes precedence between conjunction and disjunction is unspecified requiring to provide it explicitly in given formula with parentheses. The order of precedence determines which connective is the "main connective" when interpreting a non-atomic formula.

Table and Hasse diagram

The 16 logical connectives can be partially ordered to produce the following Hasse diagram. The partial order is defined by declaring that x y {\displaystyle x\leq y} if and only if whenever x {\displaystyle x} holds then so does y . {\displaystyle y.}

input Ainput Boutput f(A,B)X and ¬XA and B¬A and BBA and ¬BAA xor BA or B¬A and ¬BA xnor B¬A¬A or B¬BA or ¬B¬A or ¬BX or ¬X
X or ¬X¬A or ¬BA or ¬B¬A or BA or B¬B¬AA xor BA xnor BAB¬A and ¬BA and ¬B¬A and BA and BX and ¬X
  

Applications

Logical connectives are used in computer science and in set theory.

Computer science

Main article: Logic gate

A truth-functional approach to logical operators is implemented as logic gates in digital circuits. Practically all digital circuits (the major exception is DRAM) are built up from NAND, NOR, NOT, and transmission gates; see more details in Truth function in computer science. Logical operators over bit vectors (corresponding to finite Boolean algebras) are bitwise operations.

But not every usage of a logical connective in computer programming has a Boolean semantic. For example, lazy evaluation is sometimes implemented for P ∧ Q and P ∨ Q, so these connectives are not commutative if either or both of the expressions P, Q have side effects. Also, a conditional, which in some sense corresponds to the material conditional connective, is essentially non-Boolean because for if (P) then Q;, the consequent Q is not executed if the antecedent P is false (although a compound as a whole is successful ≈ "true" in such case). This is closer to intuitionist and constructivist views on the material conditional— rather than to classical logic's views.

Set theory

Main articles: Set theory and Axiomatic set theory

Logical connectives are used to define the fundamental operations of set theory, as follows:

Set theory operations and connectives
Set operation Connective Definition
Intersection Conjunction A B = { x : x A x B } {\displaystyle A\cap B=\{x:x\in A\land x\in B\}}
Union Disjunction A B = { x : x A x B } {\displaystyle A\cup B=\{x:x\in A\lor x\in B\}}
Complement Negation A ¯ = { x : x A } {\displaystyle {\overline {A}}=\{x:x\notin A\}}
Subset Implication A B ( x A x B ) {\displaystyle A\subseteq B\leftrightarrow (x\in A\rightarrow x\in B)}
Equality Biconditional A = B ( X ) [ A X B X ] {\displaystyle A=B\leftrightarrow (\forall X)}

This definition of set equality is equivalent to the axiom of extensionality.

See also

References

  1. Cogwheel. "What is the difference between logical and conditional /operator/". Stack Overflow. Retrieved 9 April 2015.
  2. Chao, C. (2023). 数理逻辑:形式化方法的应用 [Mathematical Logic: Applications of the Formalization Method] (in Chinese). Beijing: Preprint. pp. 15–28.
  3. ^ Heyting, A. (1930). "Die formalen Regeln der intuitionistischen Logik". Sitzungsberichte der Preussischen Akademie der Wissenschaften, Physikalisch-mathematische Klasse (in German): 42–56.
  4. Denis Roegel (2002), A brief survey of 20th century logical notations (see chart on page 2).
  5. Frege, G. (1879). Begriffsschrift, eine der arithmetischen nachgebildete Formelsprache des reinen Denkens. Halle a/S.: Verlag von Louis Nebert. p. 10.
  6. ^ Russell (1908) Mathematical logic as based on the theory of types (American Journal of Mathematics 30, p222–262, also in From Frege to Gödel edited by van Heijenoort).
  7. Peano (1889) Arithmetices principia, nova methodo exposita.
  8. ^ Schönfinkel (1924) Über die Bausteine der mathematischen Logik, translated as On the building blocks of mathematical logic in From Frege to Gödel edited by van Heijenoort.
  9. Peirce (1867) On an improvement in Boole's calculus of logic.
  10. Hilbert, D. (1918). Bernays, P. (ed.). Prinzipien der Mathematik. Lecture notes at Universität Göttingen, Winter Semester, 1917-1918; Reprinted as Hilbert, D. (2013). "Prinzipien der Mathematik". In Ewald, W.; Sieg, W. (eds.). David Hilbert's Lectures on the Foundations of Arithmetic and Logic 1917–1933. Heidelberg, New York, Dordrecht and London: Springer. pp. 59–221.
  11. Bourbaki, N. (1954). Théorie des ensembles. Paris: Hermann & Cie, Éditeurs. p. 14.
  12. Frege, G. (1879). Begriffsschrift, eine der arithmetischen nachgebildete Formelsprache des reinen Denkens (in German). Halle a/S.: Verlag von Louis Nebert. p. 15.
  13. Becker, A. (1933). Die Aristotelische Theorie der Möglichkeitsschlösse: Eine logisch-philologische Untersuchung der Kapitel 13-22 von Aristoteles' Analytica priora I (in German). Berlin: Junker und Dünnhaupt Verlag. p. 4.
  14. Bourbaki, N. (1954). Théorie des ensembles (in French). Paris: Hermann & Cie, Éditeurs. p. 32.
  15. Gentzen (1934) Untersuchungen über das logische Schließen.
  16. Chazal (1996) : Éléments de logique formelle.
  17. Hilbert, D. (1905) . "Über die Grundlagen der Logik und der Arithmetik". In Krazer, K. (ed.). Verhandlungen des Dritten Internationalen Mathematiker Kongresses in Heidelberg vom 8. bis 13. August 1904. pp. 174–185.
  18. Bocheński (1959), A Précis of Mathematical Logic, passim.
  19. O'Donnell, John; Hall, Cordelia; Page, Rex (2007). Discrete Mathematics Using a Computer. Springer. p. 120. ISBN 9781846285981..
  20. Allen, Colin; Hand, Michael (2022). Logic primer (3rd ed.). Cambridge, Massachusetts: The MIT Press. ISBN 978-0-262-54364-4.
  21. Jackson, Daniel (2012). Software Abstractions: Logic, Language, and Analysis. MIT Press. p. 263. ISBN 9780262017152..
  22. Pinter, Charles C. (2014). A book of set theory. Mineola, New York: Dover Publications, Inc. pp. 26–29. ISBN 978-0-486-49708-2.
  23. ^ "Set operations". www.siue.edu. Retrieved 2024-06-11.
  24. ^ "1.5 Logic and Sets". www.whitman.edu. Retrieved 2024-06-11.
  25. "Theory Set". mirror.clarkson.edu. Retrieved 2024-06-11.
  26. "Set Inclusion and Relations". autry.sites.grinnell.edu. Retrieved 2024-06-11.
  27. "Complement and Set Difference". web.mnstate.edu. Retrieved 2024-06-11.
  28. Cooper, A. "Set Operations and Subsets – Foundations of Mathematics". Retrieved 2024-06-11.
  29. ^ "Basic concepts". www.siue.edu. Retrieved 2024-06-11.
  30. Cooper, A. "Set Operations and Subsets – Foundations of Mathematics". Retrieved 2024-06-11.
  31. Cooper, A. "Set Operations and Subsets – Foundations of Mathematics". Retrieved 2024-06-11.

Sources

External links

Common logical connectives
Philosophy portal
Mathematical logic
General
Theorems (list)
 and paradoxes
Logics
Traditional
Propositional
Predicate
Set theory
Types of sets
Maps and cardinality
Set theories
Formal systems (list),
language and syntax
Example axiomatic
systems
 (list)
Proof theory
Model theory
Computability theory
Related
icon Mathematics portal
Formal semantics (natural language)
Central concepts
Topics
Areas
Phenomena
Formalism
Formal systems
Concepts
See also
Categories: