evan's notes
cal 3discreteodeenv systems

On this page

  • Propositions and truth values
  • Basic logical connectives
  • Basic connective table
  • Logical equivalence
  • De Morgan's law
  • Logical identities
  • First distributive law
  • Second distributive law
  • Example: simplifying a proposition
  • Exclusive OR
  • Conditional and biconditional statements
  • Conditional
  • Biconditional
  • Negating “only if”
  • Campus Wi-Fi example

Discrete Structures

§5 Propositional Logic

Evan Luo · Sep 22, 2026

Discrete Structures

§5 Propositional Logic

Evan LuoYesterday

7 min read

Propositional logic studies statements that are either true or false and the rules for combining them. Truth tables make those rules concrete by listing every possible set of truth values.

Propositions and truth values

A proposition is a declarative statement that is either true or false, but not both. For example:

  • ppp: “424242 is divisible by 333” is true.
  • qqq: “2+2=52+2=52+2=5” is false.
  • rrr: “Extraterrestrial life exists” has a truth value even though we do not currently know what it is.

A proposition's truth value belongs to the Boolean set

B={0,1}={false,true}.\mathbb B=\{0,1\}=\{\text{false},\text{true}\}. B={0,1}={false,true}.

Here, 000 means false and 111 means true.

Basic logical connectives

A logical connective combines or changes propositions.

NotationNameRead asWhen it is true
¬p\neg p¬pnegation“not ppp”when ppp is false
p∧qp\land qp∧qconjunction“ppp and qqq”when both propositions are true
p∨qp\lor qp∨qdisjunction“ppp or qqq”when at least one proposition is true
p⊕qp\oplus qp⊕qexclusive OR“ppp or qqq, but not both”when exactly one proposition is true

The word “or” in p∨qp\lor qp∨q is inclusive, so it includes the case where both propositions are true. Negation has higher priority than the binary connectives on this page, but parentheses are the clearest way to show the intended order.

Basic connective table

pppqqq¬p\neg p¬p¬q\neg q¬qp∧qp\land qp∧qp∨qp\lor qp∨qp⊕qp\oplus qp⊕q
0011000
0110011
1001011
1100110

Logical equivalence

Two propositions are logically equivalent when they have the same truth value in every possible case. We write

P≡Q.P\equiv Q. P≡Q.

A truth table proves an equivalence when the final columns for the two expressions match row by row.

De Morgan's law

Consider

¬(¬p∧¬q).\neg(\neg p\land\neg q). ¬(¬p∧¬q).

Build it from the inside out: first calculate ¬p\neg p¬p and ¬q\neg q¬q, then their conjunction, and finally negate that conjunction.

pppqqq¬p\neg p¬p¬q\neg q¬q¬p∧¬q\neg p\land\neg q¬p∧¬q¬(¬p∧¬q)\neg(\neg p\land\neg q)¬(¬p∧¬q)p∨qp\lor qp∨q
0011100
0110011
1001011
1100011

The final two columns match, so

¬(¬p∧¬q)≡p∨q.\boxed{\neg(\neg p\land\neg q)\equiv p\lor q}. ¬(¬p∧¬q)≡p∨q​.

This is one form of De Morgan's law. The two forms are

¬(p∧q)≡¬p∨¬q,¬(p∨q)≡¬p∧¬q.\neg(p\land q)\equiv\neg p\lor\neg q, \qquad \neg(p\lor q)\equiv\neg p\land\neg q. ¬(p∧q)≡¬p∨¬q,¬(p∨q)≡¬p∧¬q.

Logical identities

Logical identities closely parallel set identities. Conjunction acts like intersection, disjunction like union, and negation like taking a complement.

Set notationLogical notation
A∩BA\cap BA∩Bp∧qp\land qp∧q
A∪BA\cup BA∪Bp∨qp\lor qp∨q
A‾\overline AA¬p\neg p¬p
∅\varnothing∅000
UUU111

For example, the set identity A∩U=AA\cap U=AA∩U=A corresponds to

p∧1≡p.p\land1\equiv p. p∧1≡p.

Some useful identities are

¬¬p≡pdouble negation,p∨(p∧q)≡pabsorption,p∧(p∨q)≡pabsorption.\begin{aligned} \neg\neg p&\equiv p &&\text{double negation},\\ p\lor(p\land q)&\equiv p &&\text{absorption},\\ p\land(p\lor q)&\equiv p &&\text{absorption}. \end{aligned} ¬¬pp∨(p∧q)p∧(p∨q)​≡p≡p≡p​​double negation,absorption,absorption.​

First distributive law

Conjunction distributes over disjunction:

p∧(q∨r)≡(p∧q)∨(p∧r).p\land(q\lor r)\equiv(p\land q)\lor(p\land r). p∧(q∨r)≡(p∧q)∨(p∧r).

The intermediate columns show how each side is built. The two final expression columns match in every row.

pppqqqrrrq∨rq\lor rq∨rp∧(q∨r)p\land(q\lor r)p∧(q∨r)p∧qp\land qp∧qp∧rp\land rp∧r(p∧q)∨(p∧r)(p\land q)\lor(p\land r)(p∧q)∨(p∧r)
00000000
00110000
01010000
01110000
10000000
10111011
11011101
11111111

Second distributive law

Disjunction also distributes over conjunction:

p∨(q∧r)≡(p∨q)∧(p∨r).p\lor(q\land r)\equiv(p\lor q)\land(p\lor r). p∨(q∧r)≡(p∨q)∧(p∨r).
pppqqqrrrq∧rq\land rq∧rp∨(q∧r)p\lor(q\land r)p∨(q∧r)p∨qp\lor qp∨qp∨rp\lor rp∨r(p∨q)∧(p∨r)(p\lor q)\land(p\lor r)(p∨q)∧(p∨r)
00000000
00100010
01000100
01111111
10001111
10101111
11001111
11111111

Example: simplifying a proposition

Simplify

p∨¬(¬p∨¬¬q).p\lor\neg(\neg p\lor\neg\neg q). p∨¬(¬p∨¬¬q).

Work from the inner negations outward:

p∨¬(¬p∨¬¬q)≡p∨¬(¬p∨q)double negation≡p∨(¬¬p∧¬q)De Morgan’s law≡p∨(p∧¬q)double negation≡pabsorption.\begin{aligned} p\lor\neg(\neg p\lor\neg\neg q) &\equiv p\lor\neg(\neg p\lor q) &&\text{double negation}\\ &\equiv p\lor(\neg\neg p\land\neg q) &&\text{De Morgan's law}\\ &\equiv p\lor(p\land\neg q) &&\text{double negation}\\ &\equiv p &&\text{absorption.} \end{aligned} p∨¬(¬p∨¬¬q)​≡p∨¬(¬p∨q)≡p∨(¬¬p∧¬q)≡p∨(p∧¬q)≡p​​double negationDe Morgan’s lawdouble negationabsorption.​

Exclusive OR

Exclusive OR can be written using conjunction, disjunction, and negation:

p⊕q≡(p∨q)∧¬(p∧q).p\oplus q\equiv(p\lor q)\land\neg(p\land q). p⊕q≡(p∨q)∧¬(p∧q).

The first factor requires at least one true proposition. The second rules out the case where both are true.

pppqqqp∨qp\lor qp∨qp∧qp\land qp∧q¬(p∧q)\neg(p\land q)¬(p∧q)(p∨q)∧¬(p∧q)(p\lor q)\land\neg(p\land q)(p∨q)∧¬(p∧q)p⊕qp\oplus qp⊕q
0000100
0110111
1010111
1111000

Conditional and biconditional statements

Conditional

The conditional

p⇒qp\Rightarrow q p⇒q

can be read in three equivalent ways:

  • “If ppp, then qqq.”
  • “qqq if ppp.”
  • “ppp only if qqq.”

Here, ppp is the antecedent and qqq is the consequent. A conditional makes one promise: whenever ppp is true, qqq must also be true. It is therefore false only when p=1p=1p=1 and q=0q=0q=0. When ppp is false, the conditional is true regardless of qqq; this is called vacuous truth.

For example, “If I pay 1,000 dollars, then you bring me a coffee” is false only if I pay the money and no coffee arrives.

A conditional has the equivalent form

p⇒q≡¬p∨q.p\Rightarrow q\equiv\neg p\lor q. p⇒q≡¬p∨q.
pppqqq¬p\neg p¬p¬p∨q\neg p\lor q¬p∨qp⇒qp\Rightarrow qp⇒q
00111
01111
10000
11011

Biconditional

The biconditional p⇔qp\Leftrightarrow qp⇔q means that each proposition implies the other:

p⇔q≡(p⇒q)∧(q⇒p)≡¬(p⊕q).p\Leftrightarrow q \equiv(p\Rightarrow q)\land(q\Rightarrow p) \equiv\neg(p\oplus q). p⇔q≡(p⇒q)∧(q⇒p)≡¬(p⊕q).

It is true exactly when ppp and qqq have the same truth value.

pppqqqp⇒qp\Rightarrow qp⇒qq⇒pq\Rightarrow pq⇒p(p⇒q)∧(q⇒p)(p\Rightarrow q)\land(q\Rightarrow p)(p⇒q)∧(q⇒p)p⊕qp\oplus qp⊕q¬(p⊕q)\neg(p\oplus q)¬(p⊕q)p⇔qp\Leftrightarrow qp⇔q
00111011
01100100
10010100
11111011

Negating “only if”

Campus Wi-Fi example

Let

  • WWW: you can access campus Wi-Fi;
  • SSS: you are a student;
  • EEE: you are an employee.

The statement

You can access campus Wi-Fi only if you are a student or an employee.

becomes

W⇒(S∨E).W\Rightarrow(S\lor E). W⇒(S∨E).

Its negation is

¬[W⇒(S∨E)]≡¬[¬W∨(S∨E)]≡W∧¬(S∨E)≡W∧¬S∧¬E.\begin{aligned} \neg[W\Rightarrow(S\lor E)] &\equiv\neg[\neg W\lor(S\lor E)]\\ &\equiv W\land\neg(S\lor E)\\ &\equiv W\land\neg S\land\neg E. \end{aligned} ¬[W⇒(S∨E)]​≡¬[¬W∨(S∨E)]≡W∧¬(S∨E)≡W∧¬S∧¬E.​
WWWSSSEEES∨ES\lor ES∨EW⇒(S∨E)W\Rightarrow(S\lor E)W⇒(S∨E)¬[W⇒(S∨E)]\neg[W\Rightarrow(S\lor E)]¬[W⇒(S∨E)]¬S\neg S¬S¬E\neg E¬EW∧¬S∧¬EW\land\neg S\land\neg EW∧¬S∧¬E
000010110
001110100
010110010
011110000
100001111
101110100
110110010
111110000

The only row where the negation is true is W=1W=1W=1, S=0S=0S=0, and E=0E=0E=0. In words: you can access the Wi-Fi even though you are neither a student nor an employee.

Source: https://notes.ohevan.com/notes/discrete-structures/05-propositional-logic

© 2026 Evan Luo. All rights reserved.

Back to Discrete Structures

0 reads

·Last edited Today
  • stay up to date

  • about me

  • coffee

© 2026 Evan Luo. All rights reserved.