HOME

TheInfoList



OR:

In
logic Logic is the study of correct reasoning. It includes both formal and informal logic. Formal logic is the study of deductively valid inferences or logical truths. It examines how conclusions follow from premises based on the structure o ...
, disjunction (also known as logical disjunction, logical or, logical addition, or inclusive disjunction) is a
logical connective 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 ...
typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is sunny or it is warm" can be represented in logic using the disjunctive formula S \lor W , assuming that S abbreviates "it is sunny" and W abbreviates "it is warm". 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 c ...
, disjunction is given a
truth function In logic, a truth function is a function that accepts truth values as input and produces a unique truth value as output. In other words: the input and output of a truth function are all truth values; a truth function will always output exactly ...
al semantics according to which a formula \phi \lor \psi is true unless both \phi and \psi 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, exclusive disjunction, exclusive alternation, logical non-equivalence, or Logical_equality#Inequality, logical inequality is a Logical connective, logical operator whose negation is the logical biconditional. With two inputs, X ...
. Classical proof theoretical treatments are often given in terms of rules such as
disjunction introduction Disjunction introduction or addition (also called or introduction) is a rule of inference of propositional logic and almost every other deduction system. The rule makes it possible to introduce disjunctions to logical proofs. It is the inferen ...
and disjunction elimination. Disjunction has also been given numerous non-classical treatments, motivated by problems including
Aristotle's sea battle argument Future contingent propositions (or simply, future contingents) are statements about states of affairs in the future that are '' contingent:'' neither necessarily true nor necessarily false. The problem of future contingents seems to have been fi ...
, Heisenberg's
uncertainty principle The uncertainty principle, also known as Heisenberg's indeterminacy principle, is a fundamental concept in quantum mechanics. It states that there is a limit to the precision with which certain pairs of physical properties, such as position a ...
, as well as the numerous mismatches between classical disjunction and its nearest equivalents in
natural language A natural language or ordinary language is a language that occurs naturally in a human community by a process of use, repetition, and change. It can take different forms, typically either a spoken language or a sign language. Natural languages ...
s. An
operand In mathematics, an operand is the object of a mathematical operation, i.e., it is the object or quantity that is operated on. Unknown operands in equalities of expressions can be found by equation solving. Example The following arithmetic expres ...
of a disjunction is a disjunct.


Inclusive and exclusive disjunction

Because the logical ''or'' means a disjunction formula is true when either one or both of its parts are true, it is referred to as an ''inclusive'' disjunction. This is in contrast with an
exclusive disjunction Exclusive or, exclusive disjunction, exclusive alternation, logical non-equivalence, or Logical_equality#Inequality, logical inequality is a Logical connective, logical operator whose negation is the logical biconditional. With two inputs, X ...
, 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 \lor (Unicode ). Alternative notations include +, used mainly in
electronics Electronics is a scientific and engineering discipline that studies and applies the principles of physics to design, create, and operate devices that manipulate electrons and other Electric charge, electrically charged particles. It is a subfield ...
, as well as \vert and \vert\!\vert in many
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s. The English word ''or'' is sometimes used as well, often in capital letters. In
Jan Łukasiewicz Jan Łukasiewicz (; 21 December 1878 – 13 February 1956) was a Polish logician and philosopher who is best known for Polish notation and Łukasiewicz logic. His work centred on philosophical logic, mathematical logic and history of logi ...
's prefix notation for logic, the operator is A, short for Polish ''alternatywa'' (English: alternative). In mathematics, the disjunction of an arbitrary number of elements a_1, \ldots, a_n can be denoted as an
iterated binary operation In mathematics, an iterated binary operation is an extension of a binary operation on a set ''S'' to a function on finite sequences of elements of ''S'' through repeated application. Common examples include the extension of the addition operation ...
using a larger ⋁ (Unicode ): \bigvee_^ a_i = a_1 \lor a_2 \lor \ldots a_ \lor a_


Classical disjunction


Semantics

In the
semantics of logic In logic, the semantics of logic or formal semantics is the study of the meaning and interpretation of formal languages, formal systems, and (idealizations of) natural languages. This field seeks to provide precise mathematical models tha ...
, classical disjunction is a
truth function In logic, a truth function is a function that accepts truth values as input and produces a unique truth value as output. In other words: the input and output of a truth function are all truth values; a truth function will always output exactly ...
al operation which returns the
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
''true'' unless both of its arguments are ''false''. Its semantic entry is standardly given as follows: :: \models \phi \lor \psi     if     \models \phi     or     \models \psi     or     both This semantics corresponds to the following
truth table A truth table is a mathematical table used in logic—specifically in connection with Boolean algebra, Boolean functions, and propositional calculus—which sets out the functional values of logical expressions on each of their functional arg ...
:


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 c ...
systems where logical disjunction is not a primitive, it can be defined in terms of the primitive '' and'' (\land) and '' not'' (\lnot) as: :A \lor B = \neg ((\neg A) \land (\neg B)). Alternatively, it may be defined in terms of '' implies'' (\to) and ''not'' as: :A \lor B = (\lnot A) \to B. The latter can be checked by the following truth table: It may also be defined solely in terms of \to: :A \lor B = (A \to B) \to B. It can be checked by the following truth table:


Properties

The following properties apply to disjunction: *
Associativity In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a Validity (logic), valid rule of replaceme ...
: a \lor (b \lor c) \equiv (a \lor b) \lor c *
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. Perhaps most familiar as a p ...
: a \lor b \equiv b \lor a *
Distributivity In mathematics, the distributive property of binary operations is a generalization of the distributive law, which asserts that the equality x \cdot (y + z) = x \cdot y + x \cdot z is always true in elementary algebra. For example, in elementary ...
: (a \land (b \lor c)) \equiv ((a \land b) \lor (a \land c)) :::(a \lor (b \land c)) \equiv ((a \lor b) \land (a \lor c)) :::(a \lor (b \lor c)) \equiv ((a \lor b) \lor (a \lor c)) :::(a \lor (b \equiv c)) \equiv ((a \lor b) \equiv (a \lor c)) *
Idempotency Idempotence (, ) is the property of certain operations in mathematics and computer science whereby they can be applied multiple times without changing the result beyond the initial application. The concept of idempotence arises in a number of pl ...
: a \lor a \equiv a * Monotonicity: (a \rightarrow b) \rightarrow ((c \lor a) \rightarrow (c \lor b)) :::(a \rightarrow b) \rightarrow ((a \lor c) \rightarrow (b \lor c)) *''Truth-preserving'': The interpretation under which all variables are assigned a
truth value In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
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 In logic and mathematics, a truth value, sometimes called a logical value, is a value indicating the relation of a proposition to truth, which in classical logic has only two possible values ('' true'' or '' false''). Truth values are used in ...
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 language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s.


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 operatio ...
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 A bit field is a data structure that maps to one or more adjacent bits which have been allocated for specific purposes, so that any single bit or group of bits within the structure can be set or inspected. A bit field is most commonly used to repre ...
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 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 operat ...
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 JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
), the logical disjunction operator returns one of its operands: the first operand if it evaluates to a true value, and the second operand otherwise. This allows it to fulfill the role of the
Elvis operator In certain computer programming languages, the Elvis operator, often written ?:, is a binary operator that evaluates its first operand and returns it if its value is ''logically true'' (according to a language-dependent convention, in other word ...
.


Constructive disjunction

The
Curry–Howard correspondence In programming language theory and proof theory, the Curry–Howard correspondence is the direct relationship between computer programs and mathematical proofs. It is also known as the Curry–Howard isomorphism or equivalence, or the proofs-as-p ...
relates a constructivist form of disjunction to
tagged union In computer science, a tagged union, also called a variant, variant record, choice type, discriminated union, disjoint union, sum type, or coproduct, is a data structure used to hold a value that could take on several different, but fixed, types. ...
types.


Set theory

The
membership Member may refer to: * Military jury, referred to as "Members" in military jargon * Element (mathematics), an object that belongs to a mathematical set * In object-oriented programming, a member of a class ** Field (computer science), entries in ...
of an element of a union set in
set theory Set theory is the branch of mathematical logic that studies Set (mathematics), sets, which can be informally described as collections of objects. Although objects of any kind can be collected into a set, set theory – as a branch of mathema ...
is defined in terms of a logical disjunction: x\in A\cup B\Leftrightarrow (x\in A)\vee(x\in B). Because of this, logical disjunction satisfies many of the same identities as set-theoretic union, such as
associativity In mathematics, the associative property is a property of some binary operations that rearranging the parentheses in an expression will not change the result. In propositional logic, associativity is a Validity (logic), valid rule of replaceme ...
,
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. Perhaps most familiar as a p ...
,
distributivity In mathematics, the distributive property of binary operations is a generalization of the distributive law, which asserts that the equality x \cdot (y + z) = x \cdot y + x \cdot z is always true in elementary algebra. For example, in elementary ...
, and
de Morgan's laws In propositional calculus, propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both Validity (logic), valid rule of inference, rules of inference. They are nam ...
, identifying
logical conjunction In logic, mathematics and linguistics, ''and'' (\wedge) is the Truth function, truth-functional operator of conjunction or logical conjunction. The logical connective of this operator is typically represented as \wedge or \& or K (prefix) or ...
with
set intersection In set theory, the intersection of two sets A and B, denoted by A \cap B, is the set containing all elements of A that also belong to B or equivalently, all elements of B that also belong to A. Notation and terminology Intersection is writt ...
,
logical negation In logic, negation, also called the logical not or logical complement, is an operation that takes a proposition P to another proposition "not P", written \neg P, \mathord P, P^\prime or \overline. It is interpreted intuitively as being true ...
with
set complement In set theory, the complement of a set , often denoted by A^c (or ), is the set of elements not in . When all elements in the universe, i.e. all elements under consideration, are considered to be members of a given set , the absolute complemen ...
.


Natural language

Disjunction in
natural language A natural language or ordinary language is a language that occurs naturally in a human community by a process of use, repetition, and change. It can take different forms, typically either a spoken language or a sign language. Natural languages ...
s does not precisely match the interpretation of \lor in classical logic. Notably, classical disjunction is inclusive while natural language disjunction is often understood exclusively, as the following English example typically would be. :* Mary is eating an apple or a pear. This inference has sometimes been understood as an
entailment Logical consequence (also entailment or logical implication) is a fundamental concept in logic which describes the relationship between statements that hold true when one statement logically ''follows from'' one or more statements. A valid l ...
, for instance by
Alfred Tarski Alfred Tarski (; ; born Alfred Teitelbaum;School of Mathematics and Statistics, University of St Andrews ''School of Mathematics and Statistics, University of St Andrews''. January 14, 1901 – October 26, 1983) was a Polish-American logician ...
, who suggested that natural language disjunction is
ambiguous Ambiguity is the type of meaning in which a phrase, statement, or resolution is not explicitly defined, making for several interpretations; others describe it as a concept or statement that has no real reference. A common aspect of ambiguit ...
between a classical and a nonclassical interpretation. More recent work in
pragmatics In linguistics and the philosophy of language, pragmatics is the study of how Context (linguistics), context contributes to meaning. The field of study evaluates how human language is utilized in social interactions, as well as the relationship ...
has shown that this inference can be derived as a conversational implicature on the basis of a
semantic Semantics is the study of linguistic Meaning (philosophy), meaning. It examines what meaning is, how words get their meaning, and how the meaning of a complex expression depends on its parts. Part of this process involves the distinction betwee ...
denotation which behaves classically. However, disjunctive constructions including Hungarian ''vagy... vagy'' and French ''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 formu ...
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 In formal semantics (natural language), formal semantics and philosophical logic, simplification of disjunctive antecedents (SDA) is the phenomenon whereby a disjunction in the antecedent of a conditional sentence, conditional appears to distributiv ...
, 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. :* You can have an apple or a pear. ::\rightsquigarrow You can have an apple and you can have a pear (but you cannot have both) In many languages, disjunctive expressions play a role in question formation. :* Is Mary a philosopher or a linguist? For instance, while the above English example can be interpreted as a
polar question In linguistics, a yes–no question, also known as a binary question, a polar question, or a general question, is a closed-ended question whose expected answer is one of two choices, one that provides an affirmative answer to the question versus o ...
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 Alternative semantics (or Hamblin semantics) is a framework in formal semantics and logic. In alternative semantics, expressions denote ''alternative sets'', understood as sets of objects of the same semantic type. For instance, while the word "L ...
and
inquisitive semantics Inquisitive semantics is a framework in logic and Formal semantics (linguistics), natural language semantics. In inquisitive semantics, the semantic content of a sentence captures both the information that the sentence conveys and the issue that it ...
, which have also been adopted to explain the free choice and simplification inferences. In English, as in many other languages, disjunction is expressed by a
coordinating conjunction In grammar, a conjunction ( abbreviated or ) is a part of speech that connects words, phrases, or clauses'','' which are called its conjuncts. That description is vague enough to overlap with those of other parts of speech because what consti ...
. 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 and adjectives, and verb endings, which form the conjugation of verbs. Suffixes can ca ...
. For instance, in the Maricopa example below, disjunction is marked by the suffix ''šaa''.


See also

*
Affirming a disjunct The formal fallacy of affirming a disjunct also known as the fallacy of the alternative disjunct or a false exclusionary disjunct occurs when a deductive argument takes the following logical form: :A or B :A :Therefore, not B Or in logical op ...
*
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 denot ...
* Boolean algebra topics *
Boolean domain In mathematics and abstract algebra, a Boolean domain is a set consisting of exactly two elements whose interpretations include ''false'' and ''true''. In logic, mathematics and theoretical computer science, a Boolean domain is usually written ...
*
Boolean function In mathematics, a Boolean function is a function whose arguments and result assume values from a two-element set (usually , or ). Alternative names are switching function, used especially in older computer science literature, and truth functi ...
*
Boolean-valued function A Boolean-valued function (sometimes called a predicate or a proposition) is a function of the type f : X → B, where X is an arbitrary set and where B is a Boolean domain, i.e. a generic two-element set, (for example B = ), whose elements ar ...
* Conjunction/disjunction duality *
Disjunctive syllogism In classical logic, disjunctive syllogism (historically known as ''modus tollendo ponens'' (MTP), Latin for "mode that affirms by denying") is a valid argument form which is a syllogism having a disjunctive statement for one of its premises. ...
* Fréchet inequalities *
Free choice inference Free choice is a phenomenon in natural language where a linguistic disjunction appears to receive a logical conjunctive interpretation when it interacts with a modal operator. For example, the following English sentences can be interpreted to me ...
* Hurford disjunction *
Logical graph An existential graph is a type of diagrammatic or visual notation for logical expressions, created by Charles Sanders Peirce, who wrote on graphical logic as early as 1882, and continued to develop the method until his death in 1914. They include ...
*
Simplification of disjunctive antecedents In formal semantics (natural language), formal semantics and philosophical logic, simplification of disjunctive antecedents (SDA) is the phenomenon whereby a disjunction in the antecedent of a conditional sentence, conditional appears to distributiv ...


Notes

*
George Boole George Boole ( ; 2 November 1815 – 8 December 1864) was a largely self-taught English mathematician, philosopher and logician, most of whose short career was spent as the first professor of mathematics at Queen's College, Cork in Ireland. H ...
, 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 that does not necessitate mutual exclusiveness.


References


External links

* * *Eric W. Weisstein
"Disjunction."
From MathWorld—A Wolfram Web Resource {{Authority control
Disjunction In logic, disjunction (also known as logical disjunction, logical or, logical addition, or inclusive disjunction) is a logical connective typically notated as \lor and read aloud as "or". For instance, the English language sentence "it is ...
Semantics Formal semantics (natural language)