Lecture 1 - Logic - Logic (Computer Science Notes)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Logic (Computer Science Notes) Proposition A proposition is a statement which is true or false (but never both!). For example, “Urbana is in Illinois” or 2 < 15. It can’t be a question. It also can’t contain variables, e.g. x < 9 isn’t a proposition. Sentence fragments without verbs (e.g. “bright blue flowers”) or arithmetic expressions (e.g. 5 + 17), aren’t propositions because they don’t state a claim. Implication Two propositions p and q can also be joined into the conditional statement. “if p, then q.” The proposition after the “if” (p in this case) is called the “hypothesis” and the proposition after “then” (q in this example) is called the “conclusion.” As in normal English, there are a number of alternative ways to phrase the statement “if p, then q”, e.g. e.g. “p implies q” or “q follows from p”. The easiest way to remember the right output values for this operation is to remember that the value is false in exactly one case: when p is true and q is false. Converse, Contrapositive, Biconditional The converse of p q is q p. The two statements are not equivalent The converse mostly occurs in two contexts. First, getting the direction of implication backwards is a common bug in writing proofs. That is, using the converse rather than the original statement. This is a bug because implications frequently hold in only one direction. Second, the phrase “p implies q, and conversely” means that p and q are true under
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

Lecture 1 - Logic - Logic (Computer Science Notes)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online