1/42
Propositional Logic: Equivalence
Alice Gao
Lecture 5 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour,
- D. Maftuleac, C. Roberts, R. Trefmer, and P. Van Beek
Propositional Logic: Equivalence Alice Gao Lecture 5 Based on - - PowerPoint PPT Presentation
1/42 Propositional Logic: Equivalence Alice Gao Lecture 5 Based on work by J. Buss, L. Kari, A. Lubiw, B. Bonakdarpour, D. Maftuleac, C. Roberts, R. Trefmer, and P. Van Beek 2/42 Outline Propositional Logic: Equivalence Learning goals
1/42
2/42
3/42
▶ Prove that two formulas are logically equivalent using logical
▶ Translate a condition in a block of code into a propositional
▶ Write down a truth table given a problem description. ▶ Convert a truth table to a propositional formula. ▶ Convert a propositional formula to a circuit diagram using
4/42
▶ Prove that a connective is defjnable in terms of a set of
▶ Prove that a set of connectives is adequate. ▶ Prove that a set of connectives is not adequate.
5/42
▶ αt = βt, for every valuation t. ▶ α and β have the same fjnal column in their truth tables. ▶ (α ↔ β) is a tautology.
6/42
▶ Do these two formulas have the same meaning? ▶ Do these two circuits behave the same way? ▶ Do these two pieces of code fragments behave the same way?
7/42
▶ Truth tables ▶ Logical identities
8/42
9/42
10/42
11/42
12/42
13/42
▶ Try getting rid of → and ↔. ▶ Try moving negations inward using De Morgan’s law.
▶ Work from the more complex side fjrst. ▶ Switch to difgerent strategies/sides when you get stuck. ▶ In the end, write the proof in clean “one-side-to-the-other”
14/42
15/42
16/42
17/42
18/42
19/42
▶ Write down the condition leading to P2 in your code fragment. ▶ Prove that P2 is dead code. That is, the conditions leading to
20/42
▶ Write down the condition leading to P3 in your code fragment. ▶ Prove that P3 is executed if and only if i, u and q are all true.
21/42
▶ Write down the condition leading to P4 in your code fragment. ▶ Prove that P4 is executed if and only if i is false and u is true.
22/42
▶ An electronic computer is made up of a number of circuits. ▶ The basic elements of circuits are called logic gates. ▶ A gate is an electronic device that operates on a collection of
23/42
24/42
25/42
26/42
27/42
28/42
▶ Convert each row of the truth table to a conjunction.
▶ ((x ∧ y) ∧ z) ▶ ((x ∧ y) ∧ (¬z)) ▶ ((x ∧ (¬y)) ∧ z) ▶ (((¬x) ∧ y) ∧ z)
▶ Connect all formulas to form a disjunction.
29/42
30/42
▶ Converts rows 1-3 to a propositional formula.
▶ Convert row 5 to a propositional formula.
▶ Connect all formulas into a disjunction.
31/42
32/42
▶ Convert rows 1 and 5 into a propositional formula.
▶ Convert rows 2 and 3 into a propositional formula.
▶ Connect all formulas into a disjunction.
33/42
34/42
▶ Why did we learn these fjve connectives ¬, ∧, ∨, → and ↔? ▶ Using these connectives, can we express every propositional
▶ Are there any connectives in this set that are not necessary? ▶ Are there other connectives that we could defjne and use? Is
35/42
▶ Why did we learn these fjve connectives ¬, ∧, ∨, → and ↔? ▶ Using these connectives, can we express every propositional
▶ Are there any connectives in this set that are not necessary?
▶ Are there other connectives that we could defjne and use?
▶ Is there another set of connectives that we should have
36/42
37/42
38/42
39/42
40/42
41/42
▶ Prove that two formulas are logically equivalent using logical
▶ Translate a condition in a block of code into a propositional
▶ Write down a truth table given a problem description. ▶ Convert a truth table to a propositional formula. ▶ Convert a propositional formula to a circuit diagram using
42/42
▶ Prove that a connective is defjnable in terms of a set of
▶ Prove that a set of connectives is adequate. ▶ Prove that a set of connectives is not adequate.