Logical connective

For instance in the syntax of propositional logic, the binary connective

Common connectives include negation, disjunction, conjunction, implication, and equivalence.

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.

In formal languages, truth functions are represented by unambiguous symbols.

The boolean constants True and False can be thought of as zero-ary operators.

This table summarizes the terminology: Some authors used letters for connectives:

for disjunction (German's "oder" for "or") in early works by Hilbert (1904);[16]

" is actually the same as material conditional with swapped arguments; thus, the symbol for converse implication is redundant.

There are sixteen Boolean functions associating the input truth values

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: Another approach is to use with equal rights connectives of a certain convenient and functionally complete, but not minimal set.

Neither conjunction, disjunction, nor material conditional has an equivalent form constructed from the other four logical connectives.

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.

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.

Other apparent discrepancies between natural language and classical logic include the paradoxes of material implication, donkey anaphora and the problem of counterfactual conditionals.

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

Some many-valued logics may have incompatible definitions of equivalence and order (entailment).

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

[20] Sometimes precedence between conjunction and disjunction is unspecified requiring to provide it explicitly in given formula with parentheses.

The 16 logical connectives can be partially ordered to produce the following Hasse diagram.

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

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.

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

Hasse diagram of logical connectives.
input A input B output f(A,B) X and ¬X A and B ¬A and B B A and ¬B A A xor B A or B ¬A and ¬B A xnor B ¬A ¬A or B ¬B A or ¬B ¬A or ¬B X or ¬X
X or ¬X ¬A or ¬B A or ¬B ¬A or B A or B ¬B ¬A A xor B A xnor B A B ¬A and ¬B A and ¬B ¬A and B A and B X and ¬X