AI Glossary / Natural language and speech / Intermediate
Disjunction
Definition
Disjunction is the logical operation commonly expressed as “or.” In classical two-valued logic, P ∨ Q is true when at least one of P and Q is true, including when both are true. It is false only when both are false. The component statements are called disjuncts.
What it means
The standard logical meaning is inclusive: one condition, the other, or both can satisfy the expression. This differs from exclusive-or, which is true when exactly one of two conditions is true.
Natural-language “or” can be interpreted differently depending on context. “Use a coupon or a voucher” might permit both, or it might describe a choice that excludes combining them. An AI system translating that sentence into a formal rule must resolve the intended policy rather than silently assuming exclusivity.
Disjunction is useful for representing alternative ways a condition can hold. It does not by itself explain why either condition is true or which alternative actually holds.
How it works
First define the propositions or tests being combined. Evaluate their truth values under the intended interpretation, then apply the inclusive-or rule.
For two inputs, there are four combinations: false/false gives false; false/true gives true; true/false gives true; true/true gives true. Larger expressions can combine several alternatives, and parentheses clarify grouping when “and,” “not,” or other operators also appear.
This entry uses classical Boolean semantics. Systems with missing values or additional truth states may define evaluation differently. A project should specify that behavior instead of treating “unknown” as automatically equivalent to false.
Three practical examples
- A search filter includes a document when it contains either of two requested topics, allowing documents that contain both.
- A workflow rule sends a case for review when its amount exceeds a threshold or its category is marked unusual.
- A language-understanding exercise translates a stated choice into inclusive-or or exclusive-or only after establishing whether both alternatives may apply.
Think of it this way
Think of a room with two independently sufficient entry passes. Having either pass opens the door, and having both still opens it. That resembles inclusive disjunction. The analogy concerns a defined logical rule; real access policies may include additional conditions that must be represented separately.
Worked example
Consider an invented review rule: flag a record when P = “amount exceeds 500” or Q = “category is unusual.” Assume every record has known values and the comparison is strictly greater than 500.
Record A has amount 700 and an ordinary category: P is true, Q is false, so P ∨ Q is true. Record B has amount 200 and an unusual category: false or true is true.
Record C has amount 700 and an unusual category: both inputs are true, and inclusive disjunction still flags it. Record D has amount 200 and an ordinary category: both inputs are false, so it is not flagged. A record with amount exactly 500 and an ordinary category is also not flagged under the stated strict threshold.
If the implementation mistakenly uses exclusive-or, it fails to flag C, precisely the case satisfying both conditions. This example tests the logical rule only; it does not claim that the threshold or category policy is appropriate for a real business.
Illustrative case study
Fictional case: FilterForge builds a dashboard for reviewing customer feedback. A requirement says to include comments mentioning delivery or packaging. One developer interprets the instruction as exactly one topic and excludes comments mentioning both.
During review, the team writes examples for all four combinations and confirms that combined-topic comments should be included. It records the requirement as inclusive-or and keeps the overlap case in the acceptance examples.
The issue was an ambiguity in translating ordinary wording into a precise rule. This fictional case illustrates specification and verification; it does not claim that the resulting filter understands the full meaning or sentiment of the feedback.
Common misconceptions and mistakes
Do not equate logical “or” with “exactly one” unless exclusivity is explicitly intended.
Do not infer P solely from knowing P ∨ Q: Q might be the true alternative. Similarly, the expression does not require the alternatives to be mutually exclusive.
Avoid ambiguous mixtures of “and” and “or” without parentheses or explicit wording. Also remember that satisfying a Boolean rule does not establish the quality, fairness, or factual correctness of the inputs used by that rule.
Business use
Disjunction appears in filters, eligibility conditions, monitoring rules, and symbolic reasoning. For teams converting written requirements into software, it highlights a small wording distinction with potentially large behavioral effects.
A practical review should include the overlap case where all alternatives hold, the case where none hold, and any boundary values within the component tests. These examples reveal whether the implementation matches the intended rule. Handling missing input values should be specified separately from the basic truth table.
People also ask
Can both sides of a disjunction be true?
Yes. Standard inclusive disjunction remains true when both disjuncts are true.
Does “P or Q” tell us which one is true?
No. It states that at least one is true without identifying a unique alternative.
Is natural-language “or” always inclusive?
No. Context can imply an exclusive choice. Formalization should make the intended interpretation explicit rather than relying on the word alone.
Check your understanding
A rule accepts a request if it has approval A or approval B. Both approvals are present. Under inclusive disjunction, should this satisfy the approval condition?
Answer: Yes. Both true is a true case for inclusive-or. Any requirement for exactly one approval would need a different, explicitly exclusive rule.
Related terms
- Conjunction
- Negation
- Logical connectives
- exclusive-or
- Boolean logic
- truth table
- proposition
- logical connective
- rule-based system
Learn next
Build truth tables for P ∨ Q, P ∧ Q, and exclusive-or. Then compare (P ∨ Q) ∧ R with P ∨ (Q ∧ R) using concrete inputs to see why grouping must be explicit.
More in Natural language and speech
- Discourse relation - Definition: A discourse relation is a meaning-based connection between stretches of text, such as explanation, contrast, elaboration or temporal sequence.
- Discovery procedure - In the linguistic context of this glossary, a discovery procedure is a systematic method intended to derive a description of a language's structure from...
- Disfluency - A disfluency is an interruption, hesitation, repetition, or revision in the flow of speech.
- Distributional - relational database - A distributional - relational database is a database approach that combines structured relations with distributional representations of meaning.
- Distributional semantics - Distributional semantics is an approach to representing meaning through patterns of language use, especially the contexts in which words or other...
- Document-rotation denoising - Document-rotation denoising is a language-model pretraining task in which a document is cyclically shifted to start at a randomly chosen token, and the...
Sources
Sources: Jurafsky and Martin, Speech and Language Processing, Logical Representations of Sentence Meaning, truth-table and logical-connective discussion: https://web.stanford.edu/~jurafsky/slp3/H.pdf Figure H.4 and its surrounding interpretation were independently checked. All four truth combinations and the strict amount-threshold example, including equality at500 and the both-true case, were exhaustively verified.
Previous: Disjoint pattern databases Next: Disjunctive constraint