MODULE 4: Logic

Inverse

Converse

The converse of the proposition “p —→ q” is the proposition “q —→p”

Contrapositive

DEFINITIONS

  • Logic: Study of valid reasoning

  • Statement: Declarative sentence that is either TRUE or FALSE, but not both.

  • A statement is the basic building block of logic.

  • Logical Statements = Propositions

  • A statement cannot be true & false as the same time, nor can there be any uncertainty about the truth of a statement

Examples of Logical Statements (Propositions)

  • Washington, D.C., is the capital of the United States of America. —> True

  • Toronto is the capital of Canada. —> False

  • 1 + 1 = 2. —> True

  • 2 + 2 = 4. —> False

Examples of sentences that are NOT logical statements:

  • What times is it? —> This is a declaration, not a statement

  • Read this carefully —> This is a declaration, not a statement

  • x + 1 = 2 —> Neither true nor positive

  • x + y = z —> Neither true nor positive

Compound Statement

  • Def: Statement created by connecting/joining two or more simple statements together using one or more connectives (e.g. AND)

  • Example:

    • Statement A —> 2 is an even number

    • Statement B —> 2 is a prime number

    • Compound Statement (A + B) —> If 2 is an even number then 2 is a prime number

Propositional Variables

  • Def: Lower case letter used to represent a simple statement

  • Can be combined using connectives to form/represent a compound statement

  • Examples:

    • Let p represent the statement “She is rich”

    • Let q represent the statement “She is famous”

    • p AND q —→ “She is rich AND famous”

    • p OR q —→ “She is rich OR famous”

    • NOT p —→ “She is NOT rich”

Connectives/Operators

Several connectives are used to combine simple statements (to form compound statements)

Truth Tables

  • Def: Tool used to identify all the possible true & false combinations for a statement.

  • Number of Combinations

    • In general, there are 2n possible truth value combinations where ‘n’ is the number of simple statements involved

    • A simple statement has 2 possible combinations

    • A compound statement formed from two simple statements has 4 possible combinations

Converse, Contrapositive, and Inverse

Converse

  • Def: Creating a new proposition from a pre-existing proposition, by switching the positions of the condition and outcome.

  • Examples

    • The converse of the proposition q → p is the proposition p → q

    • The converse of “If you receive a grade above 95 in the final exam, then you will pass this course” is “If you pass this course, then you received a grade above 95”

Contrapositive

  • Def: The proposition related to a pre-existing proposition that has the same logical meaning.

  • Examples:

    • The contrapositive p —> q is ¬q → ¬ p

    • The contrapositive of “If you receive a grade above 95 in the final exam, then you will pass this course” is “If you don’t receive a grade above 95 in the final exam, then you won’t pass this course.

Inverse

  • Def: Creating a new proposition from a pre-existing por

From p → q we can form new conditional statements…

  • q → p is the converse of p → q

  • ¬q → ¬ p is the contrapositive of p → q

  • ¬p → ¬ q is the inverse of p → q

From the following compound statement, we can form new conditional statements…

“If it rains, then I will not go to town.”

Let a = “It rains”

Let b = “I will not go to town”