Propositional connectives [002V]
- December 16, 2025
Now we will see how to put propositions together to build up more complex propositions.
Negation (NOT) [003D]
- January 21, 2026
The first and simplest connective we will consider is negation, which flips a proposition from true to false and vice versa.
Definition Negation [002W]
- December 16, 2025
If P is any proposition, the negation of P is written \neg P (or sometimes \overline {P}) and read as "not P" or "It is not the case that P." \neg P is true whenever P is false, and vice versa.
Remark Truth table for negation [002Y]
- December 16, 2025
We can summarize the definition of negation with a truth table showing the truth value of \neg P for each possible value of P: \begin {array}{cc}P & \neg P \\ \hline \mathsf {T} & \mathsf {F} \\ \mathsf {F} & \mathsf {T} \end {array}
In general, a truth table is a table showing the value of some expression for every possible combination of values for some variables. In this case, there is only one variable, so the table only has two rows—one for P = \mathsf {T} and one for P = \mathsf {F}.
Remark Disco :table command [002X]
- December 16, 2025
We can also get Disco to show us the truth table for
negation, using the :table command:
Disco> :table not F T T F
Conjunction (AND) [003E]
- January 21, 2026
The next connective we consider is conjunction, commonly known as AND.
Definition Conjunction [002Z]
- December 16, 2025
The conjunction of propositions P and Q is written P \land Q, and pronounced "P and Q". It is true when both P and Q are true, and false otherwise.
Remark [0030]
- December 16, 2025
One way you can remember the symbol \land is by noticing that it looks a bit like a capital letter A (for "And") without the crossbar.
Remark Truth table for conjunction [0031]
- December 16, 2025
Let's make a truth table. Notice that the truth table for \neg P needed two rows, one for \mathsf {T} and one for \mathsf {F}. The truth table for P \land Q will need four rows, one for each possible combination of truth values for P and Q. \begin {array}{ccc} P & Q & P \land Q \\ \hline \mathsf {T} & \mathsf {T} & \mathsf {T} \\ \mathsf {T} & \mathsf {F} & \mathsf {F} \\ \mathsf {F} & \mathsf {T} & \mathsf {F} \\ \mathsf {F} & \mathsf {F} & \mathsf {F} \\ \end {array}
Conjunction in Disco [003P]
- January 28, 2026
In Disco, conjunction can be written /\, or and, or &&:
Disco> T and F F Disco> (1 < 5) && (6 <= 6) T Disco> true /\ (99 == 990) F
As before, we can also get Disco to show us a truth table:
Disco> :table /\ F F F F T F T F F T T TThe rows are in a different order than the table shown previously, but the order of the rows doesn't really matter.
Example [003G]
- January 21, 2026
Conjunction works just like we expect in natural language. Consider: "It is not raining today and I had eggs for breakfast."
This is true if both parts are true. If it's raining, the statement is false. If I ate something other than eggs, it's false. Of course it's definitely false when it's raining and I ate something other than eggs.
If we let r = "It is raining today" and e = "I had eggs for breakfast", then we can translate this sentence into propositional logic as \neg r \land e. Note that negation has "higher precedence" than conjunction (it has "stickier glue") so this is unambiguous. It does not mean \neg (r \land e), which would be different. If in doubt, just use parentheses: (\neg r) \land e.
Disjunction (OR) [003F]
- January 21, 2026
We next consider disjunction, commonly known as OR.
Definition Disjunction [003H]
- January 21, 2026
The disjunction of P and Q is written P \lor Q, and pronounced "P or Q". It is true when at least one of P and Q are true, and false when both are false.
Remark Truth table for disjunction [003I]
- January 21, 2026
We can make a truth table for disjunction as follows: \begin {array}{ccc} P & Q & P \lor Q \\ \hline \mathsf {T} & \mathsf {T} & \mathsf {T} \\ \mathsf {T} & \mathsf {F} & \mathsf {T} \\ \mathsf {F} & \mathsf {T} & \mathsf {T} \\ \mathsf {F} & \mathsf {F} & \mathsf {F} \\ \end {array}
Remark Notation for conjunction vs disjunction [003J]
- January 21, 2026
The symbols \land and \lor are easy to mix up. Just remember that \land looks like a capital "A" for "And", \lor looks like a capital "V" for "Vote" (a vote is when you choose between options).
Remark Duality of conjunction and disjunction [003K]
- January 21, 2026
There's a good reason the symbols for conjunction and disjunction are upside down versions of each
other: they are "opposite" (the mathy word is "dual") in the
sense that if we consider an opposite world where everything false
becomes true and vice versa, then \land becomes \lor and vice
versa. Consider the following alternative definition of disjunction:
The disjunction of propositions P and Q is false when both P
and Q are false, and true otherwise.Definition Disjunction (alternative) [003L]
Disjunction in Disco [003Q]
- January 28, 2026
In Disco, disjunction can be written \/, or or, or ||:
Disco> T or F T Disco> (1 < 5) || (6 <= 6) T Disco> false \/ (99 == 990) F
Remark Disjunction in English: inclusive and exclusive OR [003M]
- January 21, 2026
Unlike the word "and", whose English meaning corresponds pretty exactly with its meaning in logic, we use the English word "or" in at least two logically distinct ways. Consider the following English sentences:
- The prerequisite for Algorithms is MATH 240 or permission of the instructor.
- Each entree is served with your choice of soup or a salad.
In the first example, it's OK for both things to be true: it is fine if you pass MATH 240 and also (for some reason) get the instructor's permission to take Algorithms. This is called inclusive or, and corresponds to disjunction (\lor ).
In the other example, you can choose soup, or a salad, but not both (you would be charged extra, at the very least). This is called exclusive or, sometimes written P \oplus Q. It is true when exactly one of P, Q is true, and false otherwise. (Put another way, it is true when P and Q are different, and false when they are the same.) Exclusive or is very important in computer science, but rarely comes up in mathematical logic.
Example [003N]
- January 21, 2026
Let r = "It is raining today", e = "I had eggs for breakfast", and c = "I had cereal for breakfast." Consider the sentence "Either it is raining, or I ate cereal and not eggs for breakfast." We can translate this sentence into propositional logic as follows: r \lor (c \land \neg e) Note that it's not necessarily clear which kind of or to use here; it doesn't matter too much. Also, the parenthesis may technically not be required, but it's probably best to include them.
Implication (IF-THEN) [003R]
- January 28, 2026
The last major connective we will consider is implication, which may be less familiar but is no less important.
Definition Implication [003S]
- January 28, 2026
Let P and Q be propositions. The conditional or implication "if P, then Q" is written P \to Q. It is true if Q is true whenever P is true.
Remark Terminology for the parts of an implication [003T]
- January 28, 2026
In an implication P \to Q, the left-hand proposition P is called the premise or hypothesis. Q is called the conclusion.
You do not need to memorize these terms, but you should be familiar with them.
Truth table for implication [003U]
- January 28, 2026
Let's figure out what the truth table for implication should be. I like to think of it this way: if someone makes you a promise of the form "if ... then ...", in what scenarios have they lied to you?
Consider the propositions
- P = "You fulfill all the requirements for an A."
- Q = "You get an A."
- You complete all the requirements and get an A. This is great; I have kept my promise.
- You complete all the requirements but don't get an A. Obviously in this scenario I lied and you should be super mad at me, and probably complain to my department chair or the Provost.
- Let's next consider the scenario where you don't complete the requirements for an A, and don't get an A. You might be mad at yourself but you certainly can't be mad at me. I still made a true statement.
- The last case is the one that sometimes trips people up: what if you don't complete the requirements, but you get an A anyway? You obviously won't be upset in this scenario (though other students might!), but did I lie? Actually, I didn't. I only said what would happen if you DO complete the requirements. I am free to do whatever I want (including giving you an A anyway) if you don't. (In fact, I occasionally do this in special circumstances!)
So overall we have the following truth table: \begin {array}{ccc} P & Q & P \to Q \\ \hline \mathsf {T} & \mathsf {T} & \mathsf {T} \\ \mathsf {T} & \mathsf {F} & \mathsf {F} \\ \mathsf {F} & \mathsf {T} & \mathsf {T} \\ \mathsf {F} & \mathsf {F} & \mathsf {T} \\ \end {array}
In other words, the only scenario in which an implication P \to Q is false is when P is true but Q is false. It is true in all other cases. "If the premise is false, anything goes!"
Implication in English [003V]
- January 28, 2026
There are lots of ways to express conditionals in English besides just "if P then Q". For example:
- if P, Q
- P implies Q
- Q if P
- P only if Q
- Q whenever P
Again, you need not memorize this list, but it's good to be aware of these.
Definition Related conditionals [003W]
- January 28, 2026
Given an implication P \to Q, we have:
- the converse is Q \to P
- the inverse is \neg P \to \neg Q
- the contrapositive is \neg Q \to \neg P (the contrapositive is the inverse of the converse or vice versa)
Theorem Relationship of an implication to its variants [003X]
- January 28, 2026
An implication and its contrapositive always have the same truth value. On the other hand, an implication does not always have the same truth value as its inverse or converse.
Definition Biconditional [003Y]
- January 28, 2026
Let P and Q be propositions. The biconditional P \leftrightarrow Q (pronounced "P if and only if Q") is true when P and Q have the same truth value, and false otherwise.
Remark If and only if [003Z]
- January 28, 2026
We often abbreviate "if and only if" as "iff".