In
logic, disjunction is a
logical connective typically notated as
and read aloud as "or". For instance, the
English language sentence "it is raining or it is snowing" can be represented in logic using the disjunctive formula
, assuming that
abbreviates "it is raining" and
abbreviates "it is snowing".
In
classical logic
Classical logic (or standard logic or Frege-Russell logic) is the intensively studied and most widely used class of deductive logic. Classical logic has had much influence on analytic philosophy.
Characteristics
Each logical system in this class ...
, disjunction is given a
truth functional semantics according to which a formula
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
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
. 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 neuropsychology, linguistics, and philosophy of language, a natural language or ordinary language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. Natural languages ...
s.
Inclusive and exclusive disjunction
Because the logical "or" means a formula is when either or both are true, it is referred to as an ''inclusive'' disjunction. This is in contrast with an
exclusive disjunction
Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false).
It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , , ...
, which is true when one or the other of the arguments are true, but not both (referred to as "''exclusive or''", or "XOR").
When it is necessary to clarify whether inclusive or exclusive "or" is intended, English speakers sometimes uses the phrase "
and/or". In terms of logic, this phrase is identical to "or", but makes the inclusion of both being true explicit.
Notation
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).
Classical disjunction
Semantics
In the
semantics of logic, classical disjunction is a
truth functional
operation which returns the
truth value "true" unless both of its arguments are "false". Its semantic entry is standardly given as follows:
::
if
or
or both
This semantics corresponds to the following
truth table:
Defined by other operators
In
classical logic
Classical logic (or standard logic or Frege-Russell logic) is the intensively studied and most widely used class of deductive logic. Classical logic has had much influence on analytic philosophy.
Characteristics
Each logical system in this class ...
systems where logical disjunction is not a primitive, it can be defined in terms of the primitive "
and" (
) and "
not" (
) as:
:
.
Alternatively, it may be defined in terms of "
implies" (
) and "not" as:
:
.
The latter can be checked by the following truth table:
Properties
The following properties apply to disjunction:
*
Associativity:
*
Commutativity
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
:
*
Distributivity:
:::
:::
:::
*
Idempotency:
*
Monotonicity:
:::
*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
Operators corresponding to logical disjunction exist in most
programming languages.
Bitwise operation
Disjunction is often used for
bitwise operation
In computer programming, a bitwise operation operates on a bit string, a bit array or a binary numeral (considered as a bit string) at the level of its individual bits. It is a fast and simple action, basic to the higher-level arithmetic operati ...
s. Examples:
* 0 or 0 = 0
* 0 or 1 = 1
* 1 or 0 = 1
* 1 or 1 = 1
* 1010 or 1100 = 1110
The
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.
Logical operation
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 (
, ,
) operator.
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
true
or
false
), in some languages (such as
Python and
JavaScript), the logical disjunction operator returns one of its operands: the first operand if it evaluates to a true value, and the second operand otherwise.
Constructive disjunction
The
Curry–Howard correspondence
In programming language theory and proof theory, the Curry–Howard correspondence (also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-programs and propositions- or formulae-as-types interpretation) is the direct relati ...
relates a
constructivist form of disjunction to
tagged union types.
Set theory
The
membership of an element of a
union set in
set theory is defined in terms of a logical disjunction:
. Because of this, logical disjunction satisfies many of the same identities as set-theoretic union, such as
associativity,
commutativity
In mathematics, a binary operation is commutative if changing the order of the operands does not change the result. It is a fundamental property of many binary operations, and many mathematical proofs depend on it. Most familiar as the name of ...
,
distributivity, and
de Morgan's laws, identifying
logical conjunction with
set intersection,
logical negation
In logic, negation, also called the logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P or \overline. It is interpreted intuitively as being true when P is false, and false ...
with
set complement.
Natural language
Disjunction in
natural language
In neuropsychology, linguistics, and philosophy of language, a natural language or ordinary language is any language that has evolved naturally in humans through use and repetition without conscious planning or premeditation. Natural languages ...
s does not precisely match the interpretation of
in classical logic. Notably, classical disjunction is inclusive while natural language disjunction is often understood
exclusively, as the following
English typically would be.
:1. Mary is eating an apple or a pear.
This inference has sometimes been understood as an
entailment, for instance by
Alfred Tarski, who suggested that natural language disjunction is
ambiguous
Ambiguity is the type of meaning (linguistics), meaning in which a phrase, statement or resolution is not explicitly defined, making several interpretations wikt:plausible#Adjective, plausible. A common aspect of ambiguity is uncertainty. It ...
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
Semantics (from grc, σημαντικός ''sēmantikós'', "significant") is the study of reference, meaning, or truth. The term can be used to refer to subfields of several distinct disciplines, including philosophy, linguistics and comput ...
denotation which behaves classically. However, disjunctive constructions including
Hungarian ''vagy... vagy'' and
French
French (french: français(e), link=no) may refer to:
* Something of, from, or related to France
** French language, which originated in France, and its various dialects and accents
** French people, a nation and ethnic group identified with Franc ...
''soit... soit'' have been argued to be inherently exclusive, rendering un
grammaticality
In linguistics, grammaticality is determined by the conformity to language usage as derived by the grammar of a particular speech variety. The notion of grammaticality rose alongside the theory of generative grammar, the goal of which is to form ...
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 been 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
In linguistics, a suffix is an affix which is placed after the stem of a word. Common examples are case endings, which indicate the grammatical case of nouns, adjectives, and verb endings, which form the conjugation of verbs. Suffixes can carry ...
. For instance, in the Maricopa example below, disjunction is marked by the suffix ''šaa''.
See also
*
Affirming a disjunct
*
Bitwise OR
*
Boolean algebra (logic)
In mathematics and mathematical logic, Boolean algebra is a branch of algebra. It differs from elementary algebra in two ways. First, the values of the variable (mathematics), variables are the truth values ''true'' and ''false'', usually denote ...
*
Boolean algebra topics
*
Boolean domain
*
Boolean function
*
Boolean-valued function
*
Disjunctive syllogism
*
Disjunction elimination
*
Disjunction introduction
*
First-order logic
*
Fréchet inequalities In probabilistic logic, the Fréchet inequalities, also known as the Boole–Fréchet inequalities, are rules implicit in the work of George BooleBoole, G. (1854). ''An Investigation of the Laws of Thought, On Which Are Founded the Mathematical Theo ...
*
Free choice inference
*
Hurford disjunction
*
Logical graph
*
Logical value
*
Operation
*
Operator (programming)
*
OR gate
*
Propositional calculus
*
Simplification of disjunctive antecedents
Notes
*
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 Jevons may refer to:
People
* Frank Byron Jevons (1858–1936), British academic and philosopher
* Frederic Jevons (born 1929), academic
* Marshall Jevons, the name of a fictitious crime writer invented and used by William Breit and Kenneth G. Elzi ...
, 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.
References
External links
*
*
*Eric W. Weisstein
"Disjunction."From MathWorld—A Wolfram Web Resource
{{Authority control
Disjunction
Semantics
Formal semantics (natural language)