In logic, disjunction is a logical connective typically notated whose meaning either refines or corresponds to that of natural language expressions such as "or". In classical logic, it is given a truth functional semantics on which is true unless both and are false. Because this semantics allows a disjunctive formula to be true when both of its disjuncts are true, it is an inclusive interpretation of disjunction, in contrast with exclusive disjunction. Classical proof theoretical treatments are often given in terms of rules such as disjunction introduction and disjunction elimination. Disjunction has also been given numerous non-classical treatments, motivated by problems including Aristotle's sea battle argument, Heisenberg's uncertainty principle, as well the numerous mismatches between classical disjunction and its nearest equivalents in natural language.
In logic and related fields, disjunction is customarily notated with an infix operator . Alternative notations include , used mainly in electronics, as well as and in many programming languages. The English word "or" is sometimes used as well, often in capital letters. In Jan Łukasiewicz's prefix notation for logic, the operator is A, short for Polish alternatywa (English: alternative).
- if or or both
Defined by other operators
In systems where logical disjunction is not a primitive, it may be defined as
This can be checked by the following truth table:
The following properties apply to disjunction:
- 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 disjunction.
- 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 disjunction.
Applications in computer science
This section needs expansion. You can help by adding to it. (February 2021)
Disjunction is often used for bitwise operations. Examples:
- 0 or 0 = 0
- 0 or 1 = 1
- 1 or 0 = 1
- 1 or 1 = 1
- 1010 or 1100 = 1110
or operator can be used to set bits in a bit field to 1, by
or-ing the field with a constant field with the relevant bits set to 1. For example,
x = x | 0b00000001 will force the final bit to 1, while leaving other bits unchanged.
Many languages distinguish between bitwise and logical disjunction by providing two distinct operators; in languages following C, bitwise disjunction is performed with the single pipe operator (
|), and logical disjunction with the double pipe (
Logical disjunction is usually short-circuited; that is, if the first (left) operand evaluates to
true, then the second (right) operand is not evaluated. The logical disjunction operator thus usually constitutes a sequence point.
In a parallel (concurrent) language, it is possible to short-circuit both sides: they are evaluated in parallel, and if one terminates with value true, the other is interrupted. This operator is thus called the parallel or.
Although the type of a logical disjunction expression is boolean in most languages (and thus can only have the value
This section needs expansion. You can help by adding to it. (February 2021)
The membership of an element of a union set in set theory is defined in terms of a logical disjunction: if and only if . Because of this, logical disjunction satisfies many of the same identities as set-theoretic union, such as associativity, commutativity, distributivity, and de Morgan's laws, identifying logical conjunction with set intersection, logical negation with set complement.
The classical denotation for does not precisely match the denotation of disjunctive statements in natural languages such as English. Notably, classical disjunction is inclusive while natural language disjunction is often understood exclusively.
- 1. Mary is patriotic or quixotic.
- Mary is not both patriotic and quixotic.
This inference has sometimes been understood as an entailment, for instance by Alfred Tarski, who suggested that natural language disjunction is ambiguous between a classical and a nonclassical interpretation. More recent work in pragmatics has shown that this inference can be derived as a conversational implicature on the basis of a semantic denotation which behaves classically. However, disjunctive constructions including Hungarian vagy... vagy and French soit... soit have been argued to be inherently exclusive, rendering ungrammaticality in contexts where an inclusive reading would otherwise be forced.
Similar deviations from classical logic have been noted in cases such as free choice disjunction and simplification of disjunctive antecedents, where certain modal operators trigger a conjunction-like interpretation of disjunction. As with exclusivity, these inferences have been analyzed both as implicatures and as entailments arising from a nonclassical interpretation of disjunction.
- 2. You can have an apple or a pear.
- You can have an apple and you can have a pear (but you can't have both)
In many languages, disjunctive expressions play a role in question formation. For instance, while the following English example can be interpreted as a polar question asking whether it's true that Mary is either a philosopher or a linguist, it can also be interpreted as an alternative question asking which of the two professions is hers. The role of disjunction in these cases has be analyzed using nonclassical logics such as alternative semantics and inquisitive semantics, which have also been adopted to explain the free choice and simplification inferences.
- 3. Is Mary a philosopher or a linguist?
In English, as in many other languages, disjunction is expressed by a coordinating conjunction. Other languages express disjunctive meanings in a variety of ways, though it is unknown whether disjunction itself is a linguistic universal. In many languages such as Dyirbal and Maricopa, disjunction is marked using a verb suffix. For instance, in the Maricopa example below, disjunction is marked by the suffix šaa.
Johnš Billš v?aawuumšaa
John-NOM Bill-NOM 3-come-PL-FUT-INFER
'John or Bill will come.'
- Affirming a disjunct
- Bitwise OR
- Boolean algebra (logic)
- Boolean algebra topics
- Boolean domain
- Boolean function
- Boolean-valued function
- Disjunctive syllogism
- Disjunction elimination
- Disjunction introduction
- First-order logic
- Fréchet inequalities
- Free choice inference
- Hurford disjunction
- Logical graph
- Logical value
- Operator (programming)
- OR gate
- Propositional calculus
- Simplification of disjunctive antecedents
- George Boole, closely following analogy with ordinary mathematics, premised, as a necessary condition to the definition of "x + y", that x and y were mutually exclusive. Jevons, and practically all mathematical logicians after him, advocated, on various grounds, the definition of "logical addition" in a form which does not necessitate mutual exclusiveness.
- "Comprehensive List of Logic Symbols". Math Vault. 2020-04-06. Retrieved 2020-09-03.
- Aloni, Maria (2016), Zalta, Edward N. (ed.), "Disjunction", The Stanford Encyclopedia of Philosophy (Winter 2016 ed.), Metaphysics Research Lab, Stanford University, retrieved 2020-09-03
- "Disjunction | logic". Encyclopedia Britannica. Retrieved 2020-09-03.
- Józef Maria Bocheński (1959), A Précis of Mathematical Logic, translated by Otto Bird from the French and German editions, Dordrecht, North Holland: D. Reidel, passim.
- For the sake of generality across classical systems, this entry suppresses the parameters of evaluation. The "double turnstile" symbol here is intended to mean "semantically entails".
- Walicki, Michał (2016). Introduction to Mathematical Logic. WORLD SCIENTIFIC. p. 150. ISBN 9814343870.
|Wikimedia Commons has media related to Logical disjunction.|