4.3 Logic Basics

Introduction

What you’ll learn to do: Create truth tables to interpret statements and conditionals

In the previous section, we discussed fallacies (illogical arguments).  In this section, we focus on constructing logical statements and creating proper arguments.

Logic is a systematic way of thinking that allows us to deduce new information from old information and to parse the meanings of sentences. You use logic informally in everyday life and certainly also in doing mathematics. For example, suppose you are working with a certain circle, call it “Circle X,” and you have available the following two pieces of information.

  1. Circle X has radius equal to 3.
  2. If any circle has radius [latex]r[/latex], then its area is [latex]\pi{r}^{2}[/latex] square units.

You have no trouble putting these two facts together to get:

  1. Circle X has area [latex]9\pi[/latex] square units.

You are using logic to combine existing information to produce new information. Since a major objective in mathematics is to deduce new information, logic must play a fundamental role. This chapter is intended to give you a sufficient mastery of logic.

 

Learning Outcomes

  • Determine if a sentence is a statement.
  • Create new statements using connectors and negations.
  • Determine the truth value of a statement using a truth table.
  • Use a truth table to interpret complex statements or conditionals.
  • Write truth tables given a logical implication, and its related statements.
  • Determine whether two statements are logically equivalent.

 

Logical Statements

Statements

A statement (or proposition) is a sentence that makes a claim that is either true or false.

  • We will often use letters to stand for statements.  For example, the letter P could stand for the statement “An apple is a fruit.”

 

Example

Decide if each of the following sentences are statements.

  1. Whales are mammals.
  2. The Beatles were the best band of the 20th century.
  3. Millie West was the governor of Colorado in 2015.
  4. Why do you like spaghetti?
  5. Please stop doing that!

Try It

 

Negation

The logical opposite of a statement is called its negation.  Note that the negation of a statement will have the opposite truth value of the original statement.

  • If a statement is true, its negation will be false.  If a statement is false, its negation will be true.

Example

Give the negation of the statement: Whales are mammals.

 

Truth Tables

A truth table is a table showing what the resulting truth value of a complex statement is for all the possible truth values for the simple statements.  We can visualize the relationship between a statement and its negation with a truth table as shown below:

[latex]P[/latex] not [latex]P[/latex]
T F
F T

This first row of this table illustrates that when [latex]P[/latex]  is true,  “not [latex]P[/latex]” is false.  The second row shows that when “not [latex]{P}[/latex]” is true, [latex]P[/latex] is false.

 

Often, we connect two or more statements together to form a new statement.  For example, when searching the internet, we use terms like “and” and “or” to help us find specific web pages that fit in the categories we are interested in.   When we search for “mystery and comedy” we are looking for a book that satisfies both of these conditions at the same time.  If we were to search for “mystery or comedy” we are looking for a book that is a mystery, a comedy, or both.

Logical Connectors

Let and be statements.

  • The statement and Q is called their conjunction.  The conjunction is true when both statements and are true.
  • The statement P or Q is called their disjunction.  The disjunction is true when either statement P is true, OR statement is true, OR both statement and statement are true

Notice here that or is not exclusive. This is a difference between the logic use of the word and common everyday use. When your significant other asks “do you want to go to the park or the movies?” they are usually proposing an exclusive choice – one option or the other, but not both. In mathematical logic, the or is not exclusive – more like being asked at a restaurant “would you like fries or a drink with that?” Answering “both, please” is an acceptable answer.

To make truth tables for the conjunction “and Q,”  we must analyze all possible combinations of truth values for the individual statements, P and Q.   Since each of these two statements have two possible truth values (i.e.: either True or False), then there are a total of [latex]2\cdot 2[/latex] cases to consider, namely:

  1. is true and is true.
  2. is true and is false.
  3. is false and is true.
  4. is false and is false.

We analyze each of these four possibilities in the table below.

Truth Table – Conjunction

[latex]P[/latex] [latex]Q[/latex] [latex]P[/latex] and [latex]Q[/latex]
T T T
T F F
F T F
F F F

 

Similarly, there are four possible cases to consider for the disjunction “P or Q,”  as shown in the table below.

Truth Tables – Disjunction

[latex]P[/latex] [latex]Q[/latex] [latex]P[/latex] or [latex]Q[/latex]
T T T
T F T
F T T
F F F

 

Example

Suppose you’re picking out a new couch, and your significant other says “get a sectional or something with a chaise.” Construct a truth table that describes the elements of the conditions of this statement and whether the conditions are met.

 

Example

Suppose we are searching a library database for Mexican universities. Express a reasonable search using a logical connector.

 

In most internet search engines, it is not necessary to include the word and; the search engine assumes that if you provide two keywords you are looking for both. In Google’s search, the keyword or has to be capitalized as OR, and a negative sign in front of a word is used to indicate not. Quotes around a phrase indicate that the entire phrase should be looked for. The search from the previous example on Google could be written:

Mexico university -“New Mexico”

 

Example

Describe the numbers that meet the condition:

even and less than 10 and greater than 0

Try It

 

Which Comes First?

Sometimes statements made in English can be ambiguous. For this reason, mathematical logic uses parentheses to show precedent, just like in algebraic order of operations.

The English phrase “Go to the store and buy me eggs and bagels or cereal” is ambiguous; it is not clear whether the requestors is asking for eggs always along with either bagels or cereal, or whether they’re asking for either the combination of eggs and bagels, or just cereal.

For this reason, using parentheses clarifies the intent:

Eggs and (bagels or cereal) means Option 1: Eggs and bagels, Option 2: Eggs and cereal
(Eggs and bagels) or cereal means  Option 1: Eggs and bagels, Option 2: Cereal

 

Example

Describe the numbers that meet the condition:

odd number and less than 20 and greater than 0 and (multiple of 3 or multiple of 5)

Be aware that when a string of conditions is written without grouping symbols, it is often interpreted from the left to right, resulting in the latter interpretation.