📘 CodingMarble Learn

Propositional Logic: From Statements to Valid Arguments

Propositional logic studies statements that are either true or false and the words that join them: not (¬), and (∧), or (∨), if…then (→) and if and only if (↔). A truth table lists every possible combination of truth values. An argument is valid when no row makes all premises true and the conclusion false. Valid forms such as modus ponens and modus tollens become inference rules for natural deduction.

🎬 Step-by-step story

  1. A proposition is a sentence that is either true or false. Each lamp is one proposition: on means true, off means false.
  2. Connectives join propositions: NOT flips a value, AND needs both true, OR needs at least one true.
  3. IF p THEN q is false in only one case: p true and q false. IF AND ONLY IF is true when both match.
  4. A truth table lists every row of values: 2 letters give 4 rows. Pick a connective to fill its column.
  5. An argument is valid if no row makes all premises true and the conclusion false. Test four famous forms.
  6. Free play: switch p and q and watch every connective change at once.

Tip: drag the 3D scene to turn it. Use two fingers to zoom.

🤔 Common doubts, cleared

Why is a question not a proposition?

A question cannot be true or false; only statements can.

Why does OR count as true when both parts are true?

In logic ∨ is the inclusive or: at least one true is enough, so both true is also T.

Why is 'if p then q' true when p is false?

The promise only talks about what happens when p is true. If p is false, the promise cannot be broken, so we count it as true.

How do I fill the rows without missing any?

First column: half T, half F. Each next column halves the block size. With 2 letters: TT, TF, FT, FF.

Why is affirming the consequent invalid if it sounds right?

Row 3 (p F, q T) makes both premises true but the conclusion false. One bad row is enough to make it invalid.

Is a valid argument always true?

No. It guarantees a true conclusion only when every premise is true.

Propositions and logical form

A proposition is a sentence that is either true (T) or false (F). "Delhi is in India" is a proposition. "Close the door!" and "Is it raining?" are not, because they are neither true nor false.

A simple proposition has no connective; we name it with a letter: p, q, r. A compound proposition joins simple ones with connectives. The logical form is the pattern left when we replace each simple proposition with a letter: "If it rains, the match stops" has the form p → q.

Tips for symbolising: "but" and "although" are ∧; "unless" is usually ∨; "p only if q" is p → q; "p if q" is q → p; "neither p nor q" is ¬p ∧ ¬q.

Connectives and truth functions

NameSymbolReadTrue when…
Negation¬pnot pp is false
Conjunctionp ∧ qp and qboth are true
Disjunctionp ∨ qp or qat least one is true
Conditionalp → qif p then qexcept when p is T and q is F
Biconditionalp ↔ qp if and only if qp and q have the same value

Each connective is a truth function: the value of the whole depends only on the values of its parts. In p → q, p is the antecedent and q is the consequent. The conditional is a promise; it is broken only when the antecedent is true and the consequent is false.

Useful equivalences: p → q ≡ ¬p ∨ q ≡ ¬q → ¬p (contrapositive). De Morgan: ¬(p ∧ q) ≡ ¬p ∨ ¬q and ¬(p ∨ q) ≡ ¬p ∧ ¬q.

Building truth tables

With n letters there are 2ⁿ rows: 2 letters → 4 rows, 3 letters → 8 rows. Fill the first column with half T then half F, the next column alternating in smaller blocks, and so on. Then work out each connective column from the inside out, like brackets in arithmetic.

A formula that is true in every row is a tautology (e.g. p ∨ ¬p). One that is false in every row is a contradiction (e.g. p ∧ ¬p). Otherwise it is contingent. Two formulas are equivalent if their columns are identical.

Testing validity

An argument is valid if it is impossible for all premises to be true and the conclusion false. Validity is about form, not about whether the premises are actually true. A valid argument with true premises is sound.

Full truth-table method: make columns for every premise and the conclusion; look for a row where all premises are T and the conclusion is F. If such a row exists, the argument is invalid (that row is a counterexample); if not, it is valid.

Short method (reduction to absurdity): assume the conclusion is F and all premises are T, and work out the values. If this leads to a contradiction, the argument is valid; if you find consistent values, you have built a counterexample.

FormPatternVerdict
Modus ponensp → q, p ∴ qvalid
Modus tollensp → q, ¬q ∴ ¬pvalid
Hypothetical syllogismp → q, q → r ∴ p → rvalid
Disjunctive syllogismp ∨ q, ¬p ∴ qvalid
Affirming the consequentp → q, q ∴ pinvalid
Denying the antecedentp → q, ¬p ∴ ¬qinvalid

Natural deduction and other proof methods

Truth tables grow fast (5 letters = 32 rows). Natural deduction proves a conclusion step by step using valid rules. Each line is a premise or follows from earlier lines by a rule.

Example: premises p → q, q → r, p. 1) p → q (premise) 2) q → r (premise) 3) p (premise) 4) q (MP 1, 3) 5) r (MP 2, 4).

Other methods: an axiomatic system starts from a few axioms and one rule (modus ponens); semantic tableaux (truth trees) break formulas into branches and close a branch when it contains a contradiction.

Try it: the light-switch truth table

Use the free-play step: before each tap, predict whether p → q will be on or off, then switch p or q and check. Next, on paper, write the truth table for (p → q) ∧ p → q and show that every row is T: you have proved modus ponens is a tautology.

Key formulas and definitions

Worked examples

1. Symbolise: "If it is a holiday and the sun shines, we go to the beach." (h, s, b)

(h ∧ s) → b.

2. Find the value of (p ∨ q) → ¬p when p is T and q is F.

p ∨ q = T. ¬p = F. T → F = F. So the whole formula is F.

3. Show that p ∨ ¬p is a tautology.

p = T: T ∨ F = T. p = F: F ∨ T = T. True in both rows, so it is a tautology.

4. Is this valid? "If the phone is charged, it turns on. It turns on. So it is charged."

Form: p → q, q ∴ p (affirming the consequent). Row p = F, q = T: premises T, T; conclusion F. Invalid: it may turn on because it is plugged in.

5. Test with the short method: p → q, ¬q ∴ ¬p.

Assume conclusion F: ¬p = F, so p = T. Premise ¬q = T, so q = F. Then p → q = T → F = F, but it should be T. Contradiction, so the argument is valid (modus tollens).

6. Prove by natural deduction: from p ∧ q and q → r, derive r.

1) p ∧ q (premise) 2) q → r (premise) 3) q (∧-elim 1) 4) r (MP 2, 3).

Common mistakes

Practice quiz

1. Which of these is a proposition?
2. p → q is false when:
3. How many rows does a truth table with 3 letters have?
4. p → q, ¬q ∴ ¬p is called:
5. A formula true in every row is a:

Practice: answer these yourself

Type or choose your answer, then press Check. Use a hint if you are stuck; the full solution appears after you answer.

Frequently asked questions

What is propositional logic?

The part of logic that studies true-or-false statements and how connectives like not, and, or, if-then join them.

How do you test validity with a truth table?

Look for a row where all premises are true and the conclusion is false. If there is none, the argument is valid.

What is the difference between modus ponens and modus tollens?

Modus ponens: p → q and p, so q. Modus tollens: p → q and not q, so not p. Both are valid.

Where this is taught

NetherlandsHAVO 5 (eindexamenjaar)Elective theme: Algorithms, computability and logic
NetherlandsVWO 6 (eindexamenjaar)Elective theme: Algorithms, computability and logic
RomaniaClasa a IX-aFormal deductive logic: propositional logic
South Korea고등학교 2학년Symbols and logic
South Korea고등학교 3학년Deductive arguments

Learn first

Learn next

Related lessons

All Maths lessons