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 editNext edit →Content deleted Content addedVisualWikitext
Revision as of 12:48, 20 September 2007 editPhilogo (talk | contribs)Extended confirmed users7,483 editsmNo edit summary← Previous edit Revision as of 11:12, 28 September 2007 edit undoCullinane (talk | contribs)454 edits Venn diagrams: Added reference to source of diagram's arrangement.Next edit →
Line 156: Line 156:
</td> </td>
</tr> </tr>



</table> </table>

The above arrangement of Venn Diagrams is from .


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". 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".

Revision as of 11:12, 28 September 2007

Stub icon

This logic-related article is a stub. You can help Misplaced Pages by expanding it.

This article needs attention from an expert in Mathematics. Please add a reason or a talk parameter to this template to explain the issue with the article. WikiProject Mathematics may be able to help recruit an expert.
It has been suggested that Logical constant be merged into this article. (Discuss) Proposed since June 2007.

In logic, a logical connective, also called a truth-functional connective, ' logical operator or propositional operator, is a logical constant which represents a syntactic operation on a sentence, or the symbol for such an operation that corresponds to an operation on the logical values 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.

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:


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:

P {\displaystyle \wedge } Q (It is raining and I am indoors.)
P {\displaystyle \to } Q (If it is raining then I am indoors.)
Q {\displaystyle \to } P (It is raining if I am indoors.)
P {\displaystyle \leftrightarrow } Q (It is raining if and only if I am indoors.)
¬ {\displaystyle \neg } P (It is not the case that it is raining.)

The basic logical operators are :

Some others are:

Definitions

Truth tables

The 16 binary logical operators can be defined by Truth tables as follows:
p q T ~p ~q {\displaystyle \equiv } {\displaystyle \not \equiv } q p & F
T T T F T F T F T F T F T F T F T F
T F T T F F T T F F T T F F T T F F
F T T T T T F F F F T T T T F F F F
F F T T T T T T T T F F F F F F F F


Venn diagrams

The binary logical operators may be expressed as Venn diagrams. The white area of each figure corresponds to "true" and the black to "false".

File:Johnston Diagram- A or Not A.svg
tautology
File:Johnston Diagram- A nand B.png
a nand b
File:Johnston Diagram- A implies B.svg
if a then b
File:Johnston Diagram- Not A.svg
not-a
File:Johnston Diagram- B implies A.svg
if b then a
File:Johnston Diagram- Not B.svg
not-b
File:Johnston Diagram- A iff B.svg
a iff b
File:Johnston Diagram- Not A and Not B.svg
a nor b
File:Johnston Diagram- A or B.svg
a or b
a xor b
File:Johnston Diagram- B.svg
b is true
File:Johnston Diagram- Not Converse of If A then B.png
not the converse of if a then b
File:Johnston Diagram- A.svg
a is true
File:Johnston Diagram Not If a Then b.png
not if a then b
a and b
File:Johnston Diagram- A and Not A.svg
contradiction

The above arrangement of Venn Diagrams is from The Geometry of Logic.

Note the similarity between the symbols for "and" ( {\displaystyle \wedge } ) and set-theoretic intersection ( {\displaystyle \cap } ); likewise for "or" ( {\displaystyle \vee } ) and set-theoretic union ( {\displaystyle \cup } ). This is not a coincidence: the definition of the intersection uses "and" and the definition of union uses "or".

Functional completeness

Main article: Functional completeness

Not all of these operators are necessary for a functionally complete logical calculus. Certain compound statements are logically equivalent. For example, ¬PQ is logically equivalent to PQ;. So the conditional operator "→" is not necessary if you have "¬" (not) and "∨" (or).

The smallest set of operators which still expresses every statement which is expressible in the propositional calculus is called a minimal functionally complete set. A minimally complete set of operators is achieved by NAND alone {  } and NOR alone {  }.

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

{  }, {  }, {  {\displaystyle \rightarrow } ¬ {\displaystyle \neg }  }, {  {\displaystyle \rightarrow } {\displaystyle \not \equiv }  }, {  ¬ {\displaystyle \neg }  }, {  {\displaystyle \rightarrow }  }, {  {\displaystyle \vee } ¬ {\displaystyle \neg }  }, {  {\displaystyle \rightarrow }  }, {  ¬ {\displaystyle \neg }  }, {  {\displaystyle \not \equiv }  }, {  ¬ {\displaystyle \neg }  }, {  }, {  {\displaystyle \wedge } ¬ {\displaystyle \neg }  }, {  }, {  {\displaystyle \bot } {\displaystyle \rightarrow }  }, {  {\displaystyle \equiv }  }, {  {\displaystyle \equiv }  }

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:

  • Associativity: 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.
  • Commutivity: Each pair of variables connected by the operator may be exchanged for each other without affecting the truth-value of the expression.
  • Distributivity:
  • Idempotency:
  • Absorption:

A functionally complete set of operators contains at least one member lacking each of these five qualities:

  • monotonic : If f(a1, ... , an) ≤ f(b1, ... , bn) for all a1, ... , an {\displaystyle \in } {0,1} such that a1 ≤ b1, a2 ≤ b2, ... , an ≤ bn { {\displaystyle \vee } , {\displaystyle \wedge } , {\displaystyle \top } , {\displaystyle \bot } }
  • linear : Each variable always makes a difference in the truth-value of the operation or it never makes a difference { ¬ {\displaystyle \neg } , {\displaystyle \equiv } , {\displaystyle \not \equiv } , {\displaystyle \top } , {\displaystyle \bot } }
  • self dual : To read the truth-value assignments for the operation from top to bottom on its truth table is the same as taking the compliment of reading it from bottom to top. { ¬ {\displaystyle \neg } }
  • truth-preserving: The interpretation under which all variables are assigned a truth value of 'true' produces a truth value of 'true' as a result of these operations. { {\displaystyle \vee } , {\displaystyle \wedge } , {\displaystyle \top } , {\displaystyle \rightarrow } , {\displaystyle \equiv } , }
  • falsehood-preserving: The interpretation under which all variables are assigned a truth value of 'false' produces a truth value of 'false' as a result of these operations. { {\displaystyle \vee } , {\displaystyle \wedge } , {\displaystyle \not \equiv } , {\displaystyle \bot } , , }

Arity

Main article: arity

In two-valued logic there are 4 unary operators, 16 binary operators, and 256 ternary operators. In three valued logic there are 9 unary operators, 19683 binary operators, and 7625597484987 ternary operators.

"Not" is a unary operator, it takes a single term (¬P). The rest are binary operators, taking two terms to make a compound statement (P {\displaystyle \wedge } Q, P {\displaystyle \vee } Q, PQ, PQ).

The set of logical operators Ω {\displaystyle \Omega \!} may be partitioned into disjoint subsets as follows:

Ω = Ω 0 Ω 1 Ω j Ω m . {\displaystyle \Omega =\Omega _{0}\cup \Omega _{1}\cup \ldots \cup \Omega _{j}\cup \ldots \cup \Omega _{m}\,.}

In this partition, Ω j {\displaystyle \Omega _{j}\!} is the set of operator symbols of arity j {\displaystyle j\!} .

In the more familiar propositional calculi, Ω {\displaystyle \Omega \!} is typically partitioned as follows:

nullary operators: Ω 0 = { , } {\displaystyle \Omega _{0}=\{\bot ,\top \}\,}
unary operators: Ω 1 = { ¬ } {\displaystyle \Omega _{1}=\{\lnot \}\,}
binary operators: Ω 2 { , , , } {\displaystyle \Omega _{2}\subseteq \{\land ,\lor ,\rightarrow ,\leftrightarrow \}\,}

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, PQ ∧ ¬RS is short for (P ∨ (Q ∧ (¬R))) → S.

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

Operator Precedence
¬ 1
{\displaystyle \wedge } 2
{\displaystyle \vee } 3
4
5

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 logic gates in digital circuits. Practically all digital circuits (the major exception is DRAM) are built up from NAND, NOR, NOT, and transmission gates. 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 Turing equivalence.

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

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

References

See also

Template:Logical Operators

Logic
Major fields
Logics
Theories
Foundations
Lists
topics
other
Categories: