Safekipedia
Formal semantics (natural language)Logical connectivesSemantics

Logical disjunction

Adapted from Wikipedia · Adventurer experience

A bust of the ancient Greek philosopher Socrates, known for his contributions to ethics and knowledge.

Logical disjunction, often called "logical OR," is a basic idea in logic that helps us combine statements. It is usually written with the symbol ∨ or simply the word "or." For example, if we say "it is sunny or it is warm," we are using a disjunction. In logic, this means that the statement is true if either "it is sunny" is true, "it is warm" is true, or both are true.

In classical logic, a disjunction is true unless both parts are false. This makes it an "inclusive" idea because it includes the case where both parts might be true at the same time. Disjunction is important in areas like computer science and mathematics because it helps build more complex logical statements and arguments.

Understanding disjunction gives us a foundation for thinking clearly and making sense of how ideas connect together.

Inclusive and exclusive disjunction

The logical "or" means a statement is true if either one part or both parts are true. This is called an inclusive disjunction. It is different from an exclusive disjunction, which is only true when one part is true, but not both. This is also called an exclusive or or XOR.

People sometimes use the phrase and/or to show that both parts can be true at the same time. In logic, this phrase works the same as "or."

Notation

In logic, disjunction is shown with the symbol ∨, which means "or." We use this symbol in many areas, like electronics and computer programming. Sometimes, the plus sign (+) stands for "or," especially in electronics. In some computer languages, two vertical lines (||) also mean "or."

Mathematicians have a special way to show "or" for many things together. They use a larger symbol ⋁, which means "or" repeated many times. For example, if you have several items a₁ through aₙ, you can write ⋁ from i=1 to n of aᵢ, which means a₁ or a₂ or … or aₙ.

Classical disjunction

In classical logic, disjunction—often called "logical or"—is a way to connect ideas. It says that if either idea is true, or both are true, then the whole statement is true. Only when both ideas are false is the whole statement false.

Disjunction can also be explained using other logic ideas. For example, "A or B" can be rewritten as "not (not A and not B)." This means that if A is not false and B is not false, then "A or B" is true. Disjunction has special rules, like switching the order (commutativity) or grouping differently (associativity), which help us understand how it works in different situations.

A {\displaystyle A} B {\displaystyle B} A ∨ B {\displaystyle A\lor B}
FFF
FTT
TFT
TTT
A {\displaystyle A} B {\displaystyle B} ¬ A {\displaystyle \neg A} ¬ A → B {\displaystyle \neg A\rightarrow B} A ∨ B {\displaystyle A\lor B}
FFTFF
FTTTT
TFFTT
TTFTT
A {\displaystyle A} B {\displaystyle B} A → B {\displaystyle A\rightarrow B} ( A → B ) → B {\displaystyle (A\rightarrow B)\rightarrow B} A ∨ B {\displaystyle A\lor B}
FFTFF
FTTTT
TFFTT
TTTTT

Applications in computer science

Operators that work like logical "or" are found in most programming languages. In computer programs, this "or" can be used with individual bits of data. For example, when you combine two numbers using "or," the result will keep a bit as 1 if either of the original numbers had that bit as 1.

Many languages use different symbols for "or" when working with bits compared to when making logical choices. This helps the computer understand exactly what you want it to do. Some languages also allow the computer to stop checking conditions once it finds one that is true, which can help programs run faster.

Set theory

In set theory, we can think of joining two groups together using a logical "or". This means an item is in the combined group if it is in the first group or in the second group. The way we use "or" in logic is similar to how we combine groups in set theory. This helps us understand rules like switching the order of groups or combining groups in different ways.

Natural language

Disjunction in natural languages, like when we say "or," can be different from how it works in formal logic. For example, if someone says, "Mary is eating an apple or a pear," we often think she is eating one of the two, not both. This shows how language can be more specific than logic rules.

In many languages, "or" helps us ask questions, like "Is Mary a philosopher or a linguist?" This can mean checking if one statement is true or choosing between two options. Different languages have unique ways to express "or," such as using special word endings. For example, in the language Maricopa, disjunction is shown by adding a suffix to verbs.

This article is a child-friendly adaptation of the Wikipedia article on Logical disjunction, available under CC BY-SA 4.0.

Images from Wikimedia Commons. Tap any image to view credits and license.