1 / 24

The Foundations Logic and Proofs

The Foundations Logic and Proofs. by raed RASHEED 2014. 1.1 Propositional Logic. A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both . EXAMPLE 1 All the following declarative sentences are propositions.

wayde
Download Presentation

The Foundations Logic and Proofs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Foundations Logic and Proofs by raedRASHEED 2014

  2. 1.1 Propositional Logic A proposition is a declarative sentence (that is, a sentence that declares a fact) that is either true or false, but not both. EXAMPLE 1 All the following declarative sentences are propositions. • Washington, D.C., is the capital of the United States of America. • Toronto is the capital of Canada. • 1 + 1 = 2. • 2 + 2 = 3. Propositions 1 and 3 are true, whereas 2 and 4 are false.

  3. 1.1 Propositional Logic Some sentences that are not propositions are given in Example 2. EXAMPLE 2 Consider the following sentences. • What time is it? • Read this carefully. • x + 1 = 2 . • x + y = Z. Sentences 1 and 2 are not propositions because they are not declarative sentences. Sentences 3 and 4 are not propositions because they are neither true nor false.

  4. 1.1 Propositional Logic We use letters to denote propositional variables (or statement variables), that is, variables that represent propositions, just as letters are used to denote numerical variables. The conven­tional letters used for propositional variables are: , , , , . . . . The truth value of a proposition is true, denoted by T, if it is a true proposition and false, denoted by F, if it is a false proposition.

  5. 1.1 Propositional Logic DEFINITION 1 Let be a proposition. The negation of , denoted by (also denoted by ), is the statement "It is not the case that ." EXAMPLE 3 Find the negation of the proposition "Today is Friday." and express this in simple English. Solution: The negation is "It is not the case that today is Friday." This negation can be more simply expressed by "Today is not Friday," or "It is not Friday today."

  6. 1.1 Propositional Logic DEFINITION 2 Let and be propositions. The conjunction of and , denoted by , is the proposition “and ." The conjunction is true when both and are true and is false otherwise. EXAMPLE 5 Find the conjunction of the propositions and where is the proposition "Today is Friday" and is the proposition "It is raining today." Solution: The conjunction of these propositions,, is the proposition "Today is Friday and it is raining today." This proposition is true on rainy Fridays and is false on any day that is not a Friday and on Fridays when it does not rain.

  7. 1.1 Propositional Logic DEFINITION 2 Let and be propositions. The disjunction of and , denoted by , is the proposition "or ." The disjunction is false when both and are false and is true otherwise. EXAMPLE 6 What is the disjunction of the propositions and where and are the same propositions as in Example 5? Solution: The disjunction of and , , is the proposition "Today is Friday or it is raining today."

  8. 1.1 Propositional Logic The Truth Table for the Conjunction and Disjunction of Two Propositions

  9. 1.1 Propositional Logic DEFINITION 4 Let and be propositions. The exclusive or of and , denoted by , is the proposition that is true when exactly one of and is true and is false otherwise. DEFINITION 5 Let and be propositions. The conditional statement , is the proposition "if , then ." The conditional statement is false when is true and is false, and true otherwise. In the conditional statement , is called the hypothesis (or antecedent or premise) and is called the conclusion (or consequence).

  10. 1.1 Propositional Logic The Truth Table for the Exclusive Or and Conditional Statement of Two Propositions

  11. 1.1 Propositional Logic EXAMPLE 7 Let be the statement "Maria learns discrete mathematics" and the statement "Maria will find a good job." Express the statement as a statement in English. Solution: From the definition of conditional statements, we see that when is the statement "Maria learns discrete mathematics" and is the statement "Maria will find a good job," represents the statement "If Maria learns discrete mathematics, then she will find a good job.“ or "Maria will find a good job when she learns discrete mathematics.“

  12. 1.1 Propositional Logic EXAMPLE 8 What is the value of the variable x after the statement if then if before this statement is encountered? (The symbol stands for assignment. The statement means the assignment of the value of to .) Solution: Because is true, the assignment statement is executed. Hence, x has the value after this statement is encountered.

  13. 1.1 Propositional Logic CONVERSE, CONTRAPOSITIVE, AND INVERSE We can form some new conditional statements starting with a conditional statement . In particular, there are three related conditional statements that occur so often that they have special names. The proposition is called the converseof . The contrapositive of is the proposition . The proposition is called the inverse of . We will see that of these three conditional statements formed from , only the contrapositive always has the same truth valueas .

  14. 1.1 Propositional Logic EXAMPLE 9 What are the contrapositive, the converse, and the inverse of the conditional statement "The home team wins whenever it is raining."? Solution: Because “ whenever ” is one of the ways to express the conditional statement , the original statement can be rewritten as "If it is raining, then the home team wins“

  15. 1.1 Propositional Logic BICONDITIONALS We now introduce another way to combine propositions that expresses that two propositions have the same truth value. DEFINITION 6 Let and be propositions. The biconditionalstatement is the proposition " if and only if ." The biconditional statement is true when and have the same truth values, and is false otherwise. Biconditional statements are also called bi-implications.

  16. 1.1 Propositional Logic Truth Tables of Compound Propositions (𝒑⋁¬𝒒)→(𝒑⋀𝒒)

  17. 1.1 Propositional Logic Precedence of Logical Operators

  18. 1.1 Propositional Logic Translating English Sentences EXAMPLE 12 How can this English sentence be translated into a logical expression? "You can access the Internet from campus only if you are a computer science major or you are not a freshman." Solution: In particular, we let , , and represent "You can access the Internet from campus," "You are a computer science major," and "You are a freshman," respectively. Noting that "only if" is one way a conditional statement can be expressed, this sentence can be repre­sented as

  19. 1.1 Propositional Logic System Specifications EXAMPLE 14 Express the specification "The automated reply cannot be sent when the file system is full" using logical connectives. Solution: One way to translate this is to let denote "The automated reply can be sent" and denote "The file system is full." Then represents "It is not the case that the automated reply can be sent," which can also be expressed as "The automated reply cannot be sent." Consequently, our specification can be represented by the conditional statement

  20. 1.1 Propositional Logic Logic and Bit Operations DEFINITION 7 A bit string is a sequence of zero or more bits. The length of this string is the number of bits in the string.

  21. 1.1 Propositional Logic EXAMPLE 21 Find the bitwise OR, bitwise AND, and bitwise XOR of the bit strings 0110110110 and 1100011101 . (Here, and throughout this book, bit strings will be split into blocks of four bits to make them easier to read.) Solution: The bitwise OR, bitwise AND, and bitwise XOR of these strings are obtained by taking the OR, AND, and XOR of the corresponding bits, respectively. This gives us 01 1011 0110 11 0001 1101 11 1011 1111 bitwise OR 01 0001 0100 bitwise AND 10 1010 1011 bitwise XOR

  22. 1.2 Propositional Equivalences An important type of step used in a mathematical argument is the replacement of a statement with another statement with the same truth value. Because of this, methods that produce propo­sitions with the same truth value as a given compound proposition are used extensively in the construction of mathematical arguments. Note that we will use the term "compound propo­sition" to refer to an expression formed from propositional variables using logical operators, such as .

  23. 1.2 Propositional Equivalences DEFINITION 1 A compound proposition that is always true, no matter what the truth values of the propositions that occur in it, is called a tautology. A compound proposition that is always false is called a contradiction. A compound proposition that is neither a tautology nor a contradiction is called a contingency.

  24. 1.2 Propositional Equivalences DEFINITION 2 The compound propositions and are called logically equivalent if is a tautology. The notation denotes that and are logically equivalent. EXAMPLE 2 Show that and are logically equivalent. Solution: The truth tables for these compound propositions are <l:isplayed in Table 3. Because the truth values of the compound propositions ...... (p v q) and """p 1\ ...... q agree for all possible combinations ofthe truth values of p and q, it follows that ...... (p v q) � ( ...... p 1\ ...... q) is a tautology and that these compound propositions are logically equivalent.

More Related