Or

e1||e2||

is the logical OR function. It evaluates its arguments in order, giving True immediately if any of them are True, and False if they are all False.

Details

  • Or[e1,e2,] can be input in StandardForm and InputForm as e_(1)∨e_(2)∨.... The character ∨ can be entered as ||, or, or \[Or].
  • Or has attribute HoldAll, and explicitly controls the evaluation of its arguments. In e_(1)||e_(2)||... the e_(i) are evaluated in order, stopping if any of them are found to be True.
  • Or gives symbolic results when necessary, removing initial arguments that are False.

Examples

open allclose all

Basic Examples  (4)

Combine assertions with ||:

In[1]:=
Click for copyable input
Out[1]=

A symbolic disjunction:

In[1]:=
Click for copyable input
Out[1]=

A system of equations:

In[1]:=
Click for copyable input
Out[1]=

Enter using or:

In[1]:=
Click for copyable input
Out[1]=

Scope  (5)

Applications  (6)

Properties & Relations  (7)

See Also

Xor  BooleanConvert  LogicalExpand  BitOr  Nor  And  Not  Disjunction  Union  BooleanCountingFunction  AnyTrue

Tutorials

Introduced in 1988
(1.0)
| Updated in 1996
(3.0)