










Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!











Propositional Logic
Definition: A proposition or statement is a sentence which is either true or false.
Definition:If a proposition is true, then we say its truth value is true, and if a proposition is false, we say its truth value is false.
Are these propositions?
Definition: A propositional variable represents an arbitrary proposition. We represent propositional variables with uppercase let- ters.
What is an Argument?
Definition: An argument consists of a sequence of statements called premises and a statement called a conclusion. An argu- ment is valid if the conclusion is true whenever the premises are all true.
Example: My program won’t compile or it produces a division by 0 error. My program does not produce a division by 0 error. Therefore my program will not compile.
Now: Rewrite this argument in its general form by defining appro- priate propositional variables.
This is one example of an argument form that is called disjunctive syllogism.
The First Three Logical Connectives
Order of Operations
Translating English Into Logic
Note: The word “but” in English is often translated as ∧.
Example: Today is is hot but it is not sunny. Because the second part of the sentence is a surprise, “but” is used instead of “and”.
Example: Write each sentence in symbols, assigning propositional variables to statements as follows: P: It is hot. Q: It is sunny.
Answers: (in class)
Inclusive vs. Exclusive Or
Note: The ∨ operation represents “inclusive” or. P ∨ Q is true if either P and Q are true, or if both P and Q are true.
“Or” has two meanings in English:
Make sure you are interpreting “or” correctly when translating En- glish statements into logic!!
Exercise: Write a truth table for exclusive or operation, some- times denoted ⊕ or ∨.
Implications
For propositions P and Q, the implication or condi- tional statement P → Q is false when P is true and Q is false, and is true otherwise. P is called the premise or hypothesis, and Q is called the conclusion.
Ways to read P → Q: If P then Q. P is sufficient for Q. Q is necessary for P. P implies Q. Q follows from P. P only if Q. Q if P.
More on the Meaning of Implications
Note: In English, a sentence of the form “if A then B” can have different meanings.
Example: If I finish my work early, then I will pick you up before lunch. The common-sense interpretation of this sentence is that the inverse statement is also true: If I do not finish my work early, then I will not pick you up before lunch. But this is not implied by the logical implication P → Q, where P is “I finish my work early” and Q is “I will pick you up before lunch”. English is not as precise as logic.
Example: If 2 is prime, then grape juice will pour from the sky today. Logical implication P → Q can be formed using propositions P and Q that are not related in any way. We would never say this in English.
Examples: Are these implications true or false?
Translating English into Logic
Example: You can use the microlab only if you are a cs major or not a fresh- man. P: You can use the microlab. Q: You are a cs major. R: You are a freshman. Rewrite the statement using logical connectives.
Example: If it snows or rains today, I will not go for a walk. Rewrite this proposition using logical connectives and propositional variables.
Rearrangements of an Implication
Definition: For conditional statement P → Q, the converse statement is Q → P , the contrapositive statement is ¬Q → ¬P , and the inverse statement is ¬P → ¬Q.
Note: As we saw in a previous example, we can use a truth table to determine if two compound propositions are logically equivalent, ie if they always have the same truth values. If two propositions R and S are logically equivalent, we write R ≡ S.
Example: Use a truth table to determine whether or not the con- verse, contrapositive and inverse statements are logically equivalent to P → Q.
Definition: If a compound proposition is always true, it is a tau- tology. Note that if R ↔ S is a tautology, then R ≡ S.
Note: ≡ is not a logical connective and R ≡ S is not a com- pound proposition. R ≡ S just means that R → S is a tautology. Alternate notation: R ⇔ S.
More on Propositional Equivalence
Recall: A compound proposition that is always true is a tautol- ogy. Example: P ∨ ¬P
Definition: A compound proposition that is always false is a con- tradiction. Example: P ∧ ¬P.
Definition: A compound proposition that is not a tautology or a contradiction is a contingency.
Homework: Look at the table of logical equivalences and become familiar with the laws and their names.
Example: P: Ann will go to the movie. Q: Scott will go to the movie. Using DeMorgan’s law, ¬(P ∨Q) ≡ ¬P ∧¬Q, write down ¬(P ∨Q).
Equivalence Proofs using the Logical Identities
Example - our first step by step equivalence proof Show P ∧ ¬Q ≡ ¬(P → Q). Hint: You will need to use the fact that P → Q ≡ ¬P ∨ Q (we just proved this).
Example: Show that (P ∧ Q) → P is a tautology.
Note: We can also use a truth table to prove a compound proposi- tion is a tautology, but this is only practical if the number of propo- sitional variables is small.
Exercise: Show ¬P → (P → Q) is a tautology, first using a truth table and then with an equivalence proof.