1/35
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/35 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/35 Outline Propositional Logic: Equivalence Learning goals
1/35
2/35
3/35
▶ 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/35
▶ 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/35
▶ αt = βt, for every valuation t. ▶ α and β have the same fjnal column in their truth tables. ▶ (α ↔ β) is a tautology.
6/35
▶ 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/35
▶ Truth tables ▶ Logical identities
8/35
9/35
10/35
11/35
12/35
13/35
▶ 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/35
15/35
16/35
17/35
18/35
19/35
▶ Write down the condition leading to P2 in your code fragment. ▶ Prove that P2 is dead code. That is, the conditions leading to
20/35
▶ 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/35
▶ 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/35
▶ 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/35
24/35
25/35
26/35
27/35
▶ 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
28/35
▶ 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
29/35
30/35
31/35
32/35
33/35
34/35
▶ 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
35/35
▶ 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.