CS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.
|
|
- Paul Dawson
- 5 years ago
- Views:
Transcription
1 3: Logic
2 Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1
3 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
4 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
5 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
6 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
7 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
8 Why logic? (continued) If I don t buy a lottery ticket on Saturday I won t win the jackpot. If I win the lottery jackpot on Saturday then I must have bought a ticket. If I don t buy a lottery ticket on Saturday I won t win the jackpot. So, if I buy a ticket I will win the jackpot. If it is raining then there are clouds in the sky. Today is cloudy, so it must be raining. If I don t work on this course I won t pass the exams. I m not doing a thing, I wonder what will happen? Logic 3-2
9 Why logic? (continued) Can formalize the rules of reasoning used symbolic logic Helps to clarify the process of reasoning Gives possibility of mechanizing reasoning process Logic 3-3
10 Applications of Logic in Computer Science Programming statements like if...then...else use Boolean expressions Computer Design Logic gates used as basis of all hardware design Program Specification piece of mathematics that describes precisely the desired behaviour of a piece of software Program Verification proving that a program satisfies its specification Automated theorem proving proving that a mathematical theorem is the consequence of a number of assumptions Logic 3-4
11 Applications of Logic in Computer Science Programming statements like if...then...else use Boolean expressions Computer Design Logic gates used as basis of all hardware design Program Specification piece of mathematics that describes precisely the desired behaviour of a piece of software Program Verification proving that a program satisfies its specification Automated theorem proving proving that a mathematical theorem is the consequence of a number of assumptions Logic 3-4
12 Applications of Logic in Computer Science Programming statements like if...then...else use Boolean expressions Computer Design Logic gates used as basis of all hardware design Program Specification piece of mathematics that describes precisely the desired behaviour of a piece of software Program Verification proving that a program satisfies its specification Automated theorem proving proving that a mathematical theorem is the consequence of a number of assumptions Logic 3-4
13 Applications of Logic in Computer Science Programming statements like if...then...else use Boolean expressions Computer Design Logic gates used as basis of all hardware design Program Specification piece of mathematics that describes precisely the desired behaviour of a piece of software Program Verification proving that a program satisfies its specification Automated theorem proving proving that a mathematical theorem is the consequence of a number of assumptions Logic 3-4
14 Applications of Logic in Computer Science Programming statements like if...then...else use Boolean expressions Computer Design Logic gates used as basis of all hardware design Program Specification piece of mathematics that describes precisely the desired behaviour of a piece of software Program Verification proving that a program satisfies its specification Automated theorem proving proving that a mathematical theorem is the consequence of a number of assumptions Logic 3-4
15 Applications of Logic in Computer Science Data Bases need to be able to structure and efficiently execute queries Knowledge bases need to be able to make deductions from existing body of facts Semantic Web searches need to be able to search for web content by knowing something about the meaning of the content, rather than just the syntax. Logic programming can use particular forms of logic as programming languages in their own right Logic 3-5
16 Applications of Logic in Computer Science Data Bases need to be able to structure and efficiently execute queries Knowledge bases need to be able to make deductions from existing body of facts Semantic Web searches need to be able to search for web content by knowing something about the meaning of the content, rather than just the syntax. Logic programming can use particular forms of logic as programming languages in their own right Logic 3-5
17 Applications of Logic in Computer Science Data Bases need to be able to structure and efficiently execute queries Knowledge bases need to be able to make deductions from existing body of facts Semantic Web searches need to be able to search for web content by knowing something about the meaning of the content, rather than just the syntax. Logic programming can use particular forms of logic as programming languages in their own right Logic 3-5
18 Applications of Logic in Computer Science Data Bases need to be able to structure and efficiently execute queries Knowledge bases need to be able to make deductions from existing body of facts Semantic Web searches need to be able to search for web content by knowing something about the meaning of the content, rather than just the syntax. Logic programming can use particular forms of logic as programming languages in their own right Logic 3-5
19 Symbolic logic Simplest form is concerned with propositions Statements that can take value true or false Blue is a colour = = 22 All computer scientists have beards Logic 3-6
20 Symbolic logic Simplest form is concerned with propositions Statements that can take value true or false Blue is a colour = = 22 All computer scientists have beards Logic 3-6
21 Symbolic logic Simplest form is concerned with propositions Statements that can take value true or false Blue is a colour = = 22 All computer scientists have beards Logic 3-6
22 Symbolic logic Simplest form is concerned with propositions Statements that can take value true or false Blue is a colour = = 22 All computer scientists have beards Logic 3-6
23 Symbolic logic (continued) The following are not propositions 42 Is it raining? Manchester United Logic 3-7
24 Symbolic logic (continued) The following are not propositions 42 Is it raining? Manchester United Logic 3-7
25 Symbolic logic (continued) The following are not propositions 42 Is it raining? Manchester United Logic 3-7
26 Symbolic logic (continued) Can form compound propositions using logical connectives (or operators) Today is Wednesday and it s raining Either this is Manchester or I m a Dutchman If it s Wednesday at 11 this must be CS1021 Logic 3-8
27 Symbolic logic (continued) Can form compound propositions using logical connectives (or operators) Today is Wednesday and it s raining Either this is Manchester or I m a Dutchman If it s Wednesday at 11 this must be CS1021 Logic 3-8
28 Symbolic logic (continued) Can form compound propositions using logical connectives (or operators) Today is Wednesday and it s raining Either this is Manchester or I m a Dutchman If it s Wednesday at 11 this must be CS1021 Logic 3-8
29 Symbolic logic (continued) Can form compound propositions using logical connectives (or operators) Today is Wednesday and it s raining Either this is Manchester or I m a Dutchman If it s Wednesday at 11 this must be CS1021 Will introduce the full range of logical connectives and study their properties. Logic 3-9
30 The Logical Connectives name symbol translation negation not conjunction and disjunction or implication implies bi-implication iff and are often used instead of and. - unary - prefix p, q others - binary - infix (p q) Logic 3-10
31 The Logical Connectives (continued) - and, but - inclusive or some English translations of A B. A implies B If A then B A only if B B if A A is a sufficient case for B B is necessary for A - if and only if, abbreviated to iff. Logic 3-11
32 The Logical Connectives (continued) - and, but - inclusive or some English translations of A B. A implies B If A then B A only if B B if A A is a sufficient case for B B is necessary for A - if and only if, abbreviated to iff. Logic 3-11
33 The Logical Connectives (continued) - and, but - inclusive or some English translations of A B. A implies B If A then B A only if B B if A A is a sufficient case for B B is necessary for A - if and only if, abbreviated to iff. Logic 3-11
34 The Logical Connectives (continued) - and, but - inclusive or some English translations of A B. A implies B If A then B A only if B B if A A is a sufficient case for B B is necessary for A - if and only if, abbreviated to iff. Logic 3-11
35 The Logical Connectives (continued) - and, but - inclusive or some English translations of A B. A implies B If A then B A only if B B if A A is a sufficient case for B B is necessary for A - if and only if, abbreviated to iff. Logic 3-11
36 Truth Tables Negation p p T F F T Logic 3-12
37 Truth Tables (continued) p 1 p 2 p 1 p 2 p 1 p 2 p 1 p 2 p 1 p 2 T T T T T T T F F T F F F T F T T F F F F F T T Logic 3-13
38 Why the table for? x > 3 implies x > 1 where x is an integer variable. Surely this sentence is universally true; i.e. it is true whatever integer value x may have. Now let us give x the values 4,2,0 in turn x x > 3 x > 1 x > 3 x > 1 4 T T T 2 F T T 0 F F T Logic 3-14
39 Some properties p 1 p 2 p 1 p 2 p 1 p 2 p 2 p 1 p 2 p 1 T T T T T T T F F T F T F T F T F T F F F F F F Both and are commutative They are also associative (p 1 p 2 ) p 3 = p 1 (p 2 p 3 ) Logic 3-15
40 Formulae Propositions denoted by names such as p,q, p 3,r 7 1. Every proposition is a formula (in fact an atomic formula). 2. If A is a formula then so is A. 3. If A,B are formulae then so are (A B),(A B),(A B) and (A B). Another formal language. Language PL of Propositional Logic Logic 3-16
41 Formulae (continued) ((p 1 p 2 ) ( p 3 p 4 )) has parse tree p 1 (p 1 p 2 ) p 2 ( ) p 3 ( ) p 3 p 4 ( ) ( p 3 p 4 ) ( ) ((p 1 p 2 ) ( p 3 p 4 )) ( ) ((p 1 p 2 ) ( p 3 p 4 )) Logic 3-17
42 Formulae (continued) or p 1. p 2 ( ).. p 3 ( ). p 4 ( ) ( ). ( ) Logic 3-18
43 Some syntactic conventions 1. When using formulae it is standard practice to leave off the outermost parentheses. 2. Leave out internal parentheses from repeated use of and repeated use of. e.g. p q abbreviates (p q) (p q (q r)) p abbreviates (((p q) (q r)) p). Logic 3-19
44 Truth Valuations Let p 1,..., p n be a list of n distinct atomic formulae. A truth valuation for the list is an allocation of a truth value x i to each p i in the list. (p 1 = x 1,..., p n = x n ) e.g. (p = T,q = F,r = F) is a truth valuation for p,q,r. Logic 3-20
45 Truth Valuations (continued) Can also think of a truth valuation as a function {p 1, p 2,... p n } {T,F} If all the atomic formulae occurring in a formula A are in the list p 1,... p n. Then given a truth valuation for the list, A can be evaluated. Logic 3-21
46 Truth Valuations (continued) This truth value is determined following the way the formula has been built up, using the truth tables for the connectives that are involved. If the formula is atomic then the truth valuation itself determines its truth value. For a compound (i.e. non-atomic) formula the truth value can be found using the truth tables for the connectives. Logic 3-22
47 Truth Valuations (continued) e.g. at the valuation (p = T,q = F,r = F) p q is F, (p q) r is T, ((p q) r) is F. Logic 3-23
48 Truth Valuations (continued) Instead of the truth tables truth schemes can be used. In each scheme the compound formula gets the truth value false if it is not true. Truth scheme just a description of the corresponding truth table. Logic 3-24
49 The Truth Schemes Negation Conjunction Disjunction Implication A is true iff A is false. A 1 A 2 is true iff both A 1,A 2 are true. A 1 A 2 is true iff at least one of A 1,A 2 are true. A 1 A 2 is true iff either A 1 is false or A 2 is true (or both). Bi-implication A 1 A 2 is true iff A 1,A 2 have the same truth value. Logic 3-25
50 Tautologies and Contradictions Let A be a formula and let p 1,..., p n be a list of atomic formulae that include all those occurring in A. Then A is a tautology if it evaluates to T in every truth valuation for the list. A is contradictory if it is always false; i.e. it gets the truth value F at every truth valuation for the list p 1,..., p n. Logic 3-26
51 Tautologies and Contradictions Let A be a formula and let p 1,..., p n be a list of atomic formulae that include all those occurring in A. Then A is a tautology if it evaluates to T in every truth valuation for the list. A is contradictory if it is always false; i.e. it gets the truth value F at every truth valuation for the list p 1,..., p n. Logic 3-26
52 Tautologies and Contradictions (continued) e.g. let p be an atomic formula. Then p p is a tautology. p p is contradictory. p p p p p p T F F T F T F T Logic 3-27
53 Tautologies and Contradictions (continued) If a formula is not contradictory then that means that it must be true at some truth valuations. We then sometimes write that the formula is satisfiable. For example p q is satisfiable Logic 3-28
54 Truth Tables p 1 p 2 p 3 p 1 p 2 p 3 p 1 (p 2 p 3 ) T T T F T T T T F F F F T F T F F F T F F F F F F T T T T T F T F T F T F F T T F T F F F T F T p 1 (p 2 p 3 ) is not a tautology. It is satisfiable. Logic 3-29
55 Logical Equivalence Two formulae, A,B, are logically equivalent if they have the same truth value at every truth valuation for any list of atomic formulae that includes those occurring in either A or B; i.e. A,B have the same truth tables. Logic 3-30
56 Logical Equivalence (continued) For example: p 1 p 2 p 1 p 1 p 2 p 1 p 2 T T F T T T F F F F F T T T T F F T T T So p 1 p 2 is logically equivalent to p 1 p 2. Logic 3-31
57 Notation: Write = A for A is a tautology. A is contradictory iff = A. A is satisfiable iff = A. Write A == B for A is logically equivalent to B. A == B iff = A B. Logic 3-32
58 Commutativity Logical Equivalence Laws A 1 A 2 == A 2 A 1 Associativity A 1 A 2 == A 2 A 1 A 1 (A 2 A 3 ) == (A 1 A 2 ) A 3 Distributivity A 1 (A 2 A 3 ) == (A 1 A 2 ) A 3 A (B 1 B 2 ) == (A B 1 ) (A B 2 ) A (B 1 B 2 ) == (A B 1 ) (A B 2 ) (B 1 B 2 ) A == (B 1 A) (B 2 A) Logic 3-33
59 Idempotency (B 1 B 2 ) A == (B 1 A) (B 2 A) A A == A Absorbtion A A == A Double Negation (Involution) A (A B) == A A (A B) == A A == A Logic 3-34
60 De Morgan (A 1 A 2 ) == A 1 A 2 (A 1 A 2 ) == A 1 A 2 A 1 A 2 == ( A 1 A 2 ) Redundancy If = B and = C then A 1 A 2 == ( A 1 A 2 ) A B == A A C == A Logic 3-35
61 Implication A B == A B (A B) == A B A B == B A A B == B A Logic 3-36
62 Bi-implication A B == (A B) (B A) A B == ( A B) ( B A) A B == (A B) ( A B) (A B) == (A B) (B A) (A B) == (A B) (A B) Logic 3-37
63 Logical Equivalence Laws (continued) Any of the above can be checked using truth tables. For example A (B 1 B 2 ) == (A B 1 ) (A B 2 ) A B 1 B 2 B 1 B 2 A (B 1 B 2 ) A B 1 A B 2 (A B 1 ) (A B 2 ) T T T T T F T F T T F F F T T F T F F F T F F F Logic 3-38
64 Implication A B == B A This equivalence is one we use often in everyday reasoning If we know that a implies b, and we also know that b is false, then we can deduce the fact that a must be false as well B A is called the contrapositive of A B Logic 3-39
65 Normal Forms Can simplify a formula to produce an equivalent formula in some standard (or normal form) There are three useful kinds of normal form for propositional logic, NNF, CNF and DNF. We will describe algorithms which, for any formula A, find a formula A, in the normal form, such that A == A. Logic 3-40
66 Negation Normal Form (NNF) A formula that is either atomic or is the negation of an atomic formula is called a literal; e.g. if p is an atomic formula (proposition) then both p and p are literals. A formula is in Negation Normal Form, abbreviated NNF, if it is built up from literals using only conjunction and disjunction. So (( p 1 p 2 ) p 3 ) p 2 is in NNF, (p 1 p 2 ) p 3 is NOT in NNF Logic 3-41
67 Negation Normal Form (NNF) (continued) Every formula of PL is logically equivalent to a formula in NNF. To produce the NNF formula carry out the following procedures:- 1. Eliminate connectives, from the formula, using the two laws A B == A B, A B == ( A B) ( B A). Logic 3-42
68 Negation Normal Form (NNF) (continued) 2. The resulting formula will be built up using only,,. May still not be in NNF because negation may be applied to a non-literal; i.e. there may be occurrences of formulae having one of the forms A, (A 1 A 2 ), (A 1 A 2 ). In the first case the double negation can be eliminated using the double negation law A == A In other two cases the negation can be driven inside the binary connective using the two De Morgan Laws (A 1 A 2 ) == A 1 A 2, (A 1 A 2 ) == A 1 A 2. Repeat these steps until we have a formula in NNF. Logic 3-43
69 1. Examples == == == ((p 1 p 2 ) p 3 }{{} ) ( (p 1 p 2 ) p 3 ) (p 1 p 2 ) }{{} p 3 (p 1 p 2 ) p 3 Logic 3-44
70 2. == == == == ((p 2 p 1 ) }{{} p 3) (( p 2 p 1 ) p 3 ) ( p 2 p 1 ) }{{} p 3 }{{} ( p 2 }{{} p 1) p 3 (p 2 p 1 ) p 3 Logic 3-45
71 Conjunctive Normal Form (CNF) A (disjunctive) clause is a disjunction of one or more literals. For example p p q p q p 1 p 2 p 3 p 4 A formula is in Conjunctive Normal Form, abbreviated CNF, if it is a conjunction of clauses; Logic 3-46
72 Examples 1. p 1 p 2 2. (p 2 p 3 ) ( p 1 p 3 ) 3. (p 1 p 2 p 1 ) (p 2 p 3 p 1 ) 4. p 1 p 2 p 3 Logic 3-47
73 Examples (continued) Every formula of PL is logically equivalent to a formula in CNF. First put the formula in NNF. If the resulting formula is not in CNF then repeatedly use the following procedures until a formula in CNF is eventually obtained:- 1. Get rid of inner parentheses from repeated conjunctions and disjunctions, using the laws (A 1 A n ) A == A 1 A n A, A (A 1 A n ) == A A 1 A n, (A 1 A n ) A == A 1 A n A, A (A 1 A n ) == A A 1 A n, Logic 3-48
74 Examples (continued) 2. Bring disjunctions inside conjunctions using the distributivity laws (A 1 A n ) A == (A 1 A) (A n A), A (A 1 A n ) == (A A 1 ) (A A n ), where n 2. Logic 3-49
75 Example Put ((p 2 p 1 ) p 3 ) in CNF. ((p 2 p 1 ) }{{} p 3) == (by example 2 of 3.1) (p 2 p 1 ) p 3 == (by distributivity) (p 2 p 3 ) ( p 1 p 3 ) Logic 3-50
76 CNF test for tautologies The only way that a clause can be a tautology is if one of the literals in the clause is the negation of another literal in the clause. So, for example, p 1 p 2 p 1 p 3 is a clause that is a tautology, but p 1 p 2 p 3 is not a tautology because it is false at the valuation (p 1 = T, p 2 = F, p 3 = F). Also, a conjunction is a tautology exactly when all the conjuncts are tautologies. Logic 3-51
77 CNF test for tautologies (continued) For example (p 1 p 3 p 4 p 3 ) ( p 4 p 3 p 1 ) (p 2 p 1 p 2 p 1 ) is not a tautology because the second clause p 4 p 3 p 1 does not have a literal and its negation. Logic 3-52
78 Disjunctive Normal Form (DNF) Disjunctive Normal Form (DNF) is defined just like CNF except that the roles of conjunction and disjunction are interchanged. A formula is a conjunctive clause if it is a conjunction of one or more literals A formula is in disjunctive normal form (DNF) if it is a disjunction of one or more conjunctive clauses. The method we have described for putting a formula in CNF also applies for putting a formula in DNF, provided that we interchange the roles of and. Logic 3-53
79 Disjunctive Normal Form (DNF) (continued) Corresponding to the CNF test for tautologies we get the following DNF test for contradictions:- To test a formula in DNF for being contradictory check that for each conjunctive clause in the formula there is an occurrence of a literal and its negation. For example the DNF formula is easily seen to be contradictory. (p 3 p 4 p 3 ) (p 1 p 1 ) Logic 3-54
80 Functional Completeness In this section we discuss the possibility of other connectives than the particular connectives we have been considering. Perhaps there are missing connectives that could be added to Propositional Logic to get a more expressive Logic. (What does expressive mean?) We will show that in a precise sense that is not the case - Propositional Logic is Functionally Complete. Logic 3-55
81 Functional Completeness (continued) A connective can be specified by giving a truth table that spells out how the truth value of a formula built with the connective depends on the truth values of its components. For example consider a new binary connective #. We specify the connective using a truth table. For example:- So we have the truth scheme:- p 1 p 2 p 1 # p 2 T T F T F T F T T F F F A 1 # A 2 is true iff exactly one of A 1,A 2 is true and the other is false. Logic 3-56
82 Functional Completeness (continued) You may already have noticed that the formula (p 1 p 2 ) has the same truth table as the above table for p 1 # p 2 ; So the two formulae are logically equivalent This means that # is redundant - the occurrences of # in a formula can be systematically eliminated using the logical equivalence. Logic 3-57
83 Functional Completeness (continued) There is a systematic way to find, given any truth table, a formula in DNF having that truth table. Suppose the truth table involves the atomic formulae p 1,..., p n We may associate a conjunctive clause l 1 l n with any row of the truth table, where l i is p i if p i is T in that row and p i if p i is F in that row. Now let A be the disjunction of those conjunctive clauses corresponding to the rows where the truth table gives the value T in the right hand column. It should be obvious that the truth table of A is exactly the truth table we started with. In the case of the truth table for # we would get the DNF formula (p 1 p 2 ) ( p 1 p 2 ). Logic 3-58
84 Example Find a formula A in DNF whose truth table is:- p 1 p 2 p 3 A T T T F T T F T T F T T T F F F F T T F F T F F F F T F F F F T Logic 3-59
85 Example Find a formula A in DNF whose truth table is:- p 1 p 2 p 3 A T T T F T T F T p 1 p 2 p 3 T F T T T F F F F T T F F T F F F F T F F F F T Logic 3-59
86 Example Find a formula A in DNF whose truth table is:- p 1 p 2 p 3 A T T T F T T F T p 1 p 2 p 3 T F T T p 1 p 2 p 3 T F F F F T T F F T F F F F T F F F F T Logic 3-59
87 Example Find a formula A in DNF whose truth table is:- p 1 p 2 p 3 A T T T F T T F T p 1 p 2 p 3 T F T T p 1 p 2 p 3 T F F F F T T F F T F F F F T F F F F T p 1 p 2 p 3 Logic 3-59
88 Example (continued) There are three rows of this table which have T under A and these determine the conjunctive clauses p 1 p 2 p 3, p 1 p 2 p 3 and p 1 p 2 p 3. The formula A that we want is their disjunction:- (p 1 p 2 p 3 ) (p 1 p 2 p 3 ) ( p 1 p 2 p 3 ). Logic 3-60
89 Example (continued) So, for every possible truth table there is a formula having that truth table. Moreover that formula can be in DNF So it only involves the connectives,,. We say that {,, } is a functionally complete set of connectives. There is no truth table which can not be expressed as a formula involving only these connectives. Logic 3-61
90 Example (continued) In fact there is still some redundancy because only one of, is needed together with. This is because the De Morgan Laws allow one of them to be defined in terms of the other. For example, because of the law A B == ( A B), all the occurrences of in a formula in DNF can be systematically eliminated so as to get a logically equivalent formula involving only the connectives,. Logic 3-62
91 Example (continued) For example we have:- == (p 1 p 2 ) }{{} ( p 1 p 2 ) }{{} ( p 1 p 2 ) (p 1 p 2 ) Logic 3-63
92 Predicates and Quantifiers One of the limitations of propositional calculus is that it has no way of handling arguments such as the following All computer science students are witty and intelligent. Eve is a computer science student. Therefore Eve is witty and intelligent. Logic 3-64
93 Predicates and Quantifiers (continued) We can identify the three propositions here p q r All computer science students are witty and intelligent Eve is a computer science student Eve is witty and intelligent. We want to argue that p q r, but have no way of formalising the fact that q and r are both statements about the same individual. Logic 3-65
94 Predicates and Quantifiers (continued) To do this we need to introduce the notion of a predicate. A predicate is just a boolean valued function. In the above example we have two such predicates CS(x) W(x) x is a computer science student x is witty and intelligent The above argument can then be recast as For all x CS(x) W(x) CS(Eve) Therefore W(Eve) Logic 3-66
95 Quantifiers Given a predicate P, there are two ways of obtaining a truth value, Can apply predicate to a a particular individual (for example CS(Eve) above) Can also quantify it. Logic 3-67
96 Quantifiers (continued) Given a predicate P, we can assert that P(x) is true whatever the value of x. For all x, I(x). This statement has one of the values true or false, and does not depend on a particular value of x. The predicate has been universally quantified, by the use of the word For all. Logic 3-68
97 Quantifiers (continued) The universal quantifier is denoted symbolically by the symbol, Write things like x, P(x). The argument regarding CS students becomes x,cs(x) W(x) CS(Eve) Therefore W(Eve) Logic 3-69
98 Quantifiers (continued) Can also use existential quantification In English usually done using phrases such as there exists or for some. Write this symbolically as, x,p(x), read as there exists a value for x such that P(x) is true. Logic 3-70
99 Quantifiers (continued) If CS and W are the predicates as above, note the difference between the following statements. x CS(x) W(x) x CS(x) W(x) x CS(x) W(x) x W(x) CS(x) Logic 3-71
100 Quantifiers (continued) Predicates can involve more than one variable, and statements can be built using more than one quantifier, for example Every dog has its day can be written x Dog(x) d HasDay(x, d) Logic 3-72
101 Quantifiers (continued) and There is someone in this room who is at least as tall as anyone else in the room x InRoom(x) ( y InRoom(y) AsTallAs(x, y)) Logic 3-73
102 Quantifiers (continued) What about the following? x InRoom(x) ( y InRoom(y) AsTallAs(x, y)) Logic 3-74
103 Quantifiers (continued) The predicates F and O are defined by F(x) iff x is a Unix file O(x,y) iff x is the owner of y Explain in English the meaning of the following statements i) x (F(x) y O(y,x)) ii) x ( y (F(y) O(x,y))) iii) x (F(x) ( y z (O(y,x) O(z,x) y = z))) Which, if any, of these statements do you think are true? Give reasons Logic 3-75
104 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. Logic 3-76
105 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Logic 3-76
106 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. Logic 3-76
107 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Logic 3-76
108 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. Logic 3-76
109 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. b 1,b 2 (B(p 2,b 1 ) B(p 2,b 2 ) b 1 b 2 ) Logic 3-76
110 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. b 1,b 2 (B(p 2,b 1 ) B(p 2,b 2 ) b 1 b 2 ) No book has been borrowed by more than one person. Logic 3-76
111 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. b 1,b 2 (B(p 2,b 1 ) B(p 2,b 2 ) b 1 b 2 ) No book has been borrowed by more than one person. b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) Logic 3-76
112 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. b 1,b 2 (B(p 2,b 1 ) B(p 2,b 2 ) b 1 b 2 ) No book has been borrowed by more than one person. b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) If a book is overdue, then it must have been borrowed. Logic 3-76
113 Quantifiers (continued) In the design specification for a library system, B(p, b) denotes the predicate person p has borrowed book b and O(b) denotes the book b is overdue. Write the following sentences in symbolic form:- Person p 1 has borrowed at least one book. b B(p 1,b) Book b 1 has been borrowed. p B(p,b 1 ) Person p 2 has borrowed at least two books. b 1,b 2 (B(p 2,b 1 ) B(p 2,b 2 ) b 1 b 2 ) No book has been borrowed by more than one person. b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) If a book is overdue, then it must have been borrowed. b O(b) ( p B(p, b)) Logic 3-76
114 Negation of quantified statements If P is some predicate, then the expression x P(x), says that it is not the case that all x have the property described by P. This means that there must be at least one individual a, say, for which it is the case that P(a), is true. In other words x P(x). So negation turns the universal quantifier into the existential, and we have ( x P(x)) == ( x P(x)) Logic 3-77
115 Negation of quantified statements (continued) Similarly we have ( x P(x)) == ( x P(x)) If there is no x for which P(x) is true, it must be the case that, for all x, P(x) is true. Logic 3-78
116 Negation of quantified statements (continued) These rules of negation are an extension of the de Morgan Laws of propositional logic. How? Logic 3-79
117 Negation of quantified statements (continued) If X is a finite set {x 1,x 2,...x n } the statement x X p(x) can be rewritten as and can be rewritten as p(x 1 ) p(x 2 )... p(x n ) x X p(x) p(x 1 ) p(x 2 )... p(x n ) Logic 3-80
118 Some examples If CS and W are the predicates as above, x CS(x) W(x) All CS students are witty and intelligent x CS(x) W(x) There is a witty and intelligent CS student x W(x) CS(x) All witty and intelligent people are CS students We will construct the negations of these Logic 3-81
119 Some examples (continued) x CS(x) W(x) = x (CS(x) W(x)) = x CS(x) W(x)) Logic 3-82
120 Some examples (continued) x CS(x) W(x) = x (CS(x) W(x)) = x CS(x) W(x)) There is a CS student who is not witty and intlligent Logic 3-83
121 Some examples (continued) x CS(x) W(x) = x (CS(x) W(x)) = x CS(x) W(x) = x CS(x) W(x) = x CS(x) W(x) Logic 3-84
122 Some examples (continued) x CS(x) W(x) = x (CS(x) W(x)) = x CS(x) W(x) = x CS(x) W(x) = x CS(x) W(x) All CS students are not witty and intelligent Logic 3-85
123 Some examples (continued) x W(x) CS(x) = x (W(x) CS(x)) = x (W(x) CS(x)) Logic 3-86
124 Some examples (continued) x W(x) CS(x) = x (W(x) CS(x)) = x (W(x) CS(x)) There is someone who is not a CS student who is witty and intelligent Logic 3-87
125 Some examples (continued) The statement No book has been borrowed by more than one person can be rewritten as b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) = b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) = b p 1, p 2 ( B(p 1,b) B(p 2,b) p 1 = p 2 ) = b p 1, p 2 ((B(p 1,b) B(p 2,b)) p 1 = p 2 ) Logic 3-88
126 The statement No book has been borrowed by more than one person Some examples (continued) can be rewritten as b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) = b p 1, p 2 (B(p 1,b) B(p 2,b) p 1 p 2 ) = b p 1, p 2 ( B(p 1,b) B(p 2,b) p 1 = p 2 ) = b p 1, p 2 ((B(p 1,b) B(p 2,b)) p 1 = p 2 ) If two people have borrowed the same book, then they must have been the same person Logic 3-89
127 Some examples (continued) There is someone in this room who is at least as tall as anyone else in the room if we negate this statement, we get There is not someone in this room who is at least as tall as anyone else in the room Symbolically this becomes ( x InRoom(x) ( y InRoom(y) AsTallAs(x, y))) which can be rewritten as Logic 3-90
128 Some examples (continued) x (InRoom(x) ( y InRoom(y) AsTallAs(x, y))) = x (InRoom(x) ( y InRoom(y) AsTallAs(x, y))) = x( InRoom(x) ( y InRoom(y) AsTallAs(x, y))) = x( InRoom(x) ( y (InRoom(y) AsTallAs(x, y)))) = x( InRoom(x) ( y InRoom(y) AsTallAs(x, y))) = x(inroom(x) ( y InRoom(y) AsTallAs(x, y))) which in English is For everyone in the room there is someone in the room who they are not as tall as. Logic 3-91
Truth-Functional Logic
Truth-Functional Logic Syntax Every atomic sentence (A, B, C, ) is a sentence and are sentences With ϕ a sentence, the negation ϕ is a sentence With ϕ and ψ sentences, the conjunction ϕ ψ is a sentence
More informationLogic Overview, I. and T T T T F F F T F F F F
Logic Overview, I DEFINITIONS A statement (proposition) is a declarative sentence that can be assigned a truth value T or F, but not both. Statements are denoted by letters p, q, r, s,... The 5 basic logical
More information2/2/2018. CS 103 Discrete Structures. Chapter 1. Propositional Logic. Chapter 1.1. Propositional Logic
CS 103 Discrete Structures Chapter 1 Propositional Logic Chapter 1.1 Propositional Logic 1 1.1 Propositional Logic Definition: A proposition :is a declarative sentence (that is, a sentence that declares
More informationDiscrete Mathematical Structures. Chapter 1 The Foundation: Logic
Discrete Mathematical Structures Chapter 1 he oundation: Logic 1 Lecture Overview 1.1 Propositional Logic 1.2 Propositional Equivalences 1.3 Quantifiers l l l l l Statement Logical Connectives Conjunction
More informationLogic: Propositional Logic (Part I)
Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.
More information02 Propositional Logic
SE 2F03 Fall 2005 02 Propositional Logic Instructor: W. M. Farmer Revised: 25 September 2005 1 What is Propositional Logic? Propositional logic is the study of the truth or falsehood of propositions or
More informationLearning Goals of CS245 Logic and Computation
Learning Goals of CS245 Logic and Computation Alice Gao April 27, 2018 Contents 1 Propositional Logic 2 2 Predicate Logic 4 3 Program Verification 6 4 Undecidability 7 1 1 Propositional Logic Introduction
More informationLanguage of Propositional Logic
Logic A logic has: 1. An alphabet that contains all the symbols of the language of the logic. 2. A syntax giving the rules that define the well formed expressions of the language of the logic (often called
More informationThe Calculus of Computation: Decision Procedures with Applications to Verification. Part I: FOUNDATIONS. by Aaron Bradley Zohar Manna
The Calculus of Computation: Decision Procedures with Applications to Verification Part I: FOUNDATIONS by Aaron Bradley Zohar Manna 1. Propositional Logic(PL) Springer 2007 1-1 1-2 Propositional Logic(PL)
More informationcis32-ai lecture # 18 mon-3-apr-2006
cis32-ai lecture # 18 mon-3-apr-2006 today s topics: propositional logic cis32-spring2006-sklar-lec18 1 Introduction Weak (search-based) problem-solving does not scale to real problems. To succeed, problem
More informationTopic 1: Propositional logic
Topic 1: Propositional logic Guy McCusker 1 1 University of Bath Logic! This lecture is about the simplest kind of mathematical logic: propositional calculus. We discuss propositions, which are statements
More informationCS156: The Calculus of Computation
CS156: The Calculus of Computation Zohar Manna Winter 2010 It is reasonable to hope that the relationship between computation and mathematical logic will be as fruitful in the next century as that between
More informationA statement is a sentence that is definitely either true or false but not both.
5 Logic In this part of the course we consider logic. Logic is used in many places in computer science including digital circuit design, relational databases, automata theory and computability, and artificial
More informationKnowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.
Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes
More informationCS100: DISCRETE STRUCTURES. Lecture 5: Logic (Ch1)
CS100: DISCREE SRUCURES Lecture 5: Logic (Ch1) Lecture Overview 2 Statement Logical Connectives Conjunction Disjunction Propositions Conditional Bio-conditional Converse Inverse Contrapositive Laws of
More informationCompound Propositions
Discrete Structures Compound Propositions Producing new propositions from existing propositions. Logical Operators or Connectives 1. Not 2. And 3. Or 4. Exclusive or 5. Implication 6. Biconditional Truth
More informationDescription Logics. Foundations of Propositional Logic. franconi. Enrico Franconi
(1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge
More informationCSCI Homework Set 1 Due: September 11, 2018 at the beginning of class
CSCI 3310 - Homework Set 1 Due: September 11, 2018 at the beginning of class ANSWERS Please write your name and student ID number clearly at the top of your homework. If you have multiple pages, please
More informationMat 243 Exam 1 Review
OBJECTIVES (Review problems: on next page) 1.1 Distinguish between propositions and non-propositions. Know the truth tables (i.e., the definitions) of the logical operators,,,, and Write truth tables for
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics Statistics York University Sept 18, 2014 Outline 1 2 Tautologies Definition A tautology is a compound proposition
More informationPropositional Logic Basics Propositional Equivalences Normal forms Boolean functions and digital circuits. Propositional Logic.
Propositional Logic Winter 2012 Propositional Logic: Section 1.1 Proposition A proposition is a declarative sentence that is either true or false. Which ones of the following sentences are propositions?
More informationCS156: The Calculus of Computation Zohar Manna Autumn 2008
Page 3 of 52 Page 4 of 52 CS156: The Calculus of Computation Zohar Manna Autumn 2008 Lecturer: Zohar Manna (manna@cs.stanford.edu) Office Hours: MW 12:30-1:00 at Gates 481 TAs: Boyu Wang (wangboyu@stanford.edu)
More informationTecniche di Verifica. Introduction to Propositional Logic
Tecniche di Verifica Introduction to Propositional Logic 1 Logic A formal logic is defined by its syntax and semantics. Syntax An alphabet is a set of symbols. A finite sequence of these symbols is called
More informationA brief introduction to Logic. (slides from
A brief introduction to Logic (slides from http://www.decision-procedures.org/) 1 A Brief Introduction to Logic - Outline Propositional Logic :Syntax Propositional Logic :Semantics Satisfiability and validity
More informationCOMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof
More informationChapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm
Topics Chapter 16 Logic Programming Introduction Predicate Propositions Clausal Form Horn 2 Logic Programming Paradigm AKA Declarative Paradigm The programmer Declares the goal of the computation (specification
More informationEECS 1028 M: Discrete Mathematics for Engineers
EECS 1028 M: Discrete Mathematics for Engineers Suprakash Datta Office: LAS 3043 Course page: http://www.eecs.yorku.ca/course/1028 Also on Moodle S. Datta (York Univ.) EECS 1028 W 18 1 / 26 Why Study Logic?
More informationLogic and Proofs. (A brief summary)
Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations
More informationMAT2345 Discrete Math
Fall 2013 General Syllabus Schedule (note exam dates) Homework, Worksheets, Quizzes, and possibly Programs & Reports Academic Integrity Do Your Own Work Course Web Site: www.eiu.edu/~mathcs Course Overview
More informationAdvanced Topics in LP and FP
Lecture 1: Prolog and Summary of this lecture 1 Introduction to Prolog 2 3 Truth value evaluation 4 Prolog Logic programming language Introduction to Prolog Introduced in the 1970s Program = collection
More informationCOMP 2600: Formal Methods for Software Engineeing
COMP 2600: Formal Methods for Software Engineeing Dirk Pattinson Semester 2, 2013 What do we mean by FORMAL? Oxford Dictionary in accordance with convention or etiquette or denoting a style of writing
More information2. The Logic of Compound Statements Summary. Aaron Tan August 2017
2. The Logic of Compound Statements Summary Aaron Tan 21 25 August 2017 1 2. The Logic of Compound Statements 2.1 Logical Form and Logical Equivalence Statements; Compound Statements; Statement Form (Propositional
More informationThe statement calculus and logic
Chapter 2 Contrariwise, continued Tweedledee, if it was so, it might be; and if it were so, it would be; but as it isn t, it ain t. That s logic. Lewis Carroll You will have encountered several languages
More informationCOMP219: Artificial Intelligence. Lecture 20: Propositional Reasoning
COMP219: Artificial Intelligence Lecture 20: Propositional Reasoning 1 Overview Last time Logic for KR in general; Propositional Logic; Natural Deduction Today Entailment, satisfiability and validity Normal
More information3. Only sequences that were formed by using finitely many applications of rules 1 and 2, are propositional formulas.
1 Chapter 1 Propositional Logic Mathematical logic studies correct thinking, correct deductions of statements from other statements. Let us make it more precise. A fundamental property of a statement is
More information3/29/2017. Logic. Propositions and logical operations. Main concepts: propositions truth values propositional variables logical operations
Logic Propositions and logical operations Main concepts: propositions truth values propositional variables logical operations 1 Propositions and logical operations A proposition is the most basic element
More informationConjunction: p q is true if both p, q are true, and false if at least one of p, q is false. The truth table for conjunction is as follows.
Chapter 1 Logic 1.1 Introduction and Definitions Definitions. A sentence (statement, proposition) is an utterance (that is, a string of characters) which is either true (T) or false (F). A predicate is
More informationCOMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR 1 Overview Last time Expert Systems and Ontologies Today Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof
More informationChapter 1 Elementary Logic
2017-2018 Chapter 1 Elementary Logic The study of logic is the study of the principles and methods used in distinguishing valid arguments from those that are not valid. The aim of this chapter is to help
More informationOverview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR
COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural
More informationExample. Logic. Logical Statements. Outline of logic topics. Logical Connectives. Logical Connectives
Logic Logic is study of abstract reasoning, specifically, concerned with whether reasoning is correct. Logic focuses on relationship among statements as opposed to the content of any particular statement.
More informationChapter Summary. Propositional Logic. Predicate Logic. Proofs. The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.
Chapter 1 Chapter Summary Propositional Logic The Language of Propositions (1.1) Applications (1.2) Logical Equivalences (1.3) Predicate Logic The Language of Quantifiers (1.4) Logical Equivalences (1.4)
More informationLecture 4: Proposition, Connectives and Truth Tables
Discrete Mathematics (II) Spring 2017 Lecture 4: Proposition, Connectives and Truth Tables Lecturer: Yi Li 1 Overview In last lecture, we give a brief introduction to mathematical logic and then redefine
More informationPropositional Logic. Jason Filippou UMCP. ason Filippou UMCP) Propositional Logic / 38
Propositional Logic Jason Filippou CMSC250 @ UMCP 05-31-2016 ason Filippou (CMSC250 @ UMCP) Propositional Logic 05-31-2016 1 / 38 Outline 1 Syntax 2 Semantics Truth Tables Simplifying expressions 3 Inference
More informationLecture 2. Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits. Reading (Epp s textbook)
Lecture 2 Logic Compound Statements Conditional Statements Valid & Invalid Arguments Digital Logic Circuits Reading (Epp s textbook) 2.1-2.4 1 Logic Logic is a system based on statements. A statement (or
More informationAnnouncements. CS243: Discrete Structures. Propositional Logic II. Review. Operator Precedence. Operator Precedence, cont. Operator Precedence Example
Announcements CS243: Discrete Structures Propositional Logic II Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Tuesday 09/11 Weilin s Tuesday office hours are
More informationPropositional Logic: Methods of Proof (Part II)
Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short
More informationPropositional Logic. Spring Propositional Logic Spring / 32
Propositional Logic Spring 2016 Propositional Logic Spring 2016 1 / 32 Introduction Learning Outcomes for this Presentation Learning Outcomes... At the conclusion of this session, we will Define the elements
More informationFoundation of proofs. Jim Hefferon.
Foundation of proofs Jim Hefferon http://joshua.smcvt.edu/proofs The need to prove In Mathematics we prove things To a person with a mathematical turn of mind, the base angles of an isoceles triangle are
More informationOverview. 1. Introduction to Propositional Logic. 2. Operations on Propositions. 3. Truth Tables. 4. Translating Sentences into Logical Expressions
Note 01 Propositional Logic 1 / 10-1 Overview 1. Introduction to Propositional Logic 2. Operations on Propositions 3. Truth Tables 4. Translating Sentences into Logical Expressions 5. Preview: Propositional
More informationWarm-Up Problem. Is the following true or false? 1/35
Warm-Up Problem Is the following true or false? 1/35 Propositional Logic: Resolution Carmen Bruni Lecture 6 Based on work by J Buss, A Gao, L Kari, A Lubiw, B Bonakdarpour, D Maftuleac, C Roberts, R Trefler,
More informationTitle: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)
B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876
More informationUnit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9
Unit 1. Propositional Logic Reading do all quick-checks Propositional Logic: Ch. 2.intro, 2.2, 2.3, 2.4. Review 2.9 Typeset September 23, 2005 1 Statements or propositions Defn: A statement is an assertion
More informationLecture 7. Logic. Section1: Statement Logic.
Ling 726: Mathematical Linguistics, Logic, Section : Statement Logic V. Borschev and B. Partee, October 5, 26 p. Lecture 7. Logic. Section: Statement Logic.. Statement Logic..... Goals..... Syntax of Statement
More informationStrong AI vs. Weak AI Automated Reasoning
Strong AI vs. Weak AI Automated Reasoning George F Luger ARTIFICIAL INTELLIGENCE 6th edition Structures and Strategies for Complex Problem Solving Artificial intelligence can be classified into two categories:
More informationDeductive Systems. Lecture - 3
Deductive Systems Lecture - 3 Axiomatic System Axiomatic System (AS) for PL AS is based on the set of only three axioms and one rule of deduction. It is minimal in structure but as powerful as the truth
More informationPropositional Logic and Semantics
Propositional Logic and Semantics English is naturally ambiguous. For example, consider the following employee (non)recommendations and their ambiguity in the English language: I can assure you that no
More informationPropositional Logic: Part II - Syntax & Proofs 0-0
Propositional Logic: Part II - Syntax & Proofs 0-0 Outline Syntax of Propositional Formulas Motivating Proofs Syntactic Entailment and Proofs Proof Rules for Natural Deduction Axioms, theories and theorems
More informationChapter 4, Logic using Propositional Calculus Handout
ECS 20 Chapter 4, Logic using Propositional Calculus Handout 0. Introduction to Discrete Mathematics. 0.1. Discrete = Individually separate and distinct as opposed to continuous and capable of infinitesimal
More informationSection 1.1: Logical Form and Logical Equivalence
Section 1.1: Logical Form and Logical Equivalence An argument is a sequence of statements aimed at demonstrating the truth of an assertion. The assertion at the end of an argument is called the conclusion,
More informationPropositional Logic Language
Propositional Logic Language A logic consists of: an alphabet A, a language L, i.e., a set of formulas, and a binary relation = between a set of formulas and a formula. An alphabet A consists of a finite
More informationLogic and Inferences
Artificial Intelligence Logic and Inferences Readings: Chapter 7 of Russell & Norvig. Artificial Intelligence p.1/34 Components of Propositional Logic Logic constants: True (1), and False (0) Propositional
More informationLogic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies
Logic as a Tool Chapter 1: Understanding Propositional Logic 1.1 Propositions and logical connectives. Truth tables and tautologies Valentin Stockholm University September 2016 Propositions Proposition:
More informationPart I: Propositional Calculus
Logic Part I: Propositional Calculus Statements Undefined Terms True, T, #t, 1 False, F, #f, 0 Statement, Proposition Statement/Proposition -- Informal Definition Statement = anything that can meaningfully
More informationFormal Logic: Quantifiers, Predicates, and Validity. CS 130 Discrete Structures
Formal Logic: Quantifiers, Predicates, and Validity CS 130 Discrete Structures Variables and Statements Variables: A variable is a symbol that stands for an individual in a collection or set. For example,
More informationLogic and Proof. Aiichiro Nakano
Logic and Proof Aiichiro Nakano Collaboratory for Advanced Computing & Simulations Department of Computer Science Department of Physics & Astronomy Department of Chemical Engineering & Materials Science
More informationAI Programming CS S-09 Knowledge Representation
AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering
More informationAnnouncements. CS311H: Discrete Mathematics. Propositional Logic II. Inverse of an Implication. Converse of a Implication
Announcements CS311H: Discrete Mathematics Propositional Logic II Instructor: Işıl Dillig First homework assignment out today! Due in one week, i.e., before lecture next Wed 09/13 Remember: Due before
More informationIt rains now. (true) The followings are not propositions.
Chapter 8 Fuzzy Logic Formal language is a language in which the syntax is precisely given and thus is different from informal language like English and French. The study of the formal languages is the
More informationIntroduction to Decision Sciences Lecture 2
Introduction to Decision Sciences Lecture 2 Andrew Nobel August 24, 2017 Compound Proposition A compound proposition is a combination of propositions using the basic operations. For example (p q) ( p)
More informationIntroduction to Metalogic
Philosophy 135 Spring 2008 Tony Martin Introduction to Metalogic 1 The semantics of sentential logic. The language L of sentential logic. Symbols of L: Remarks: (i) sentence letters p 0, p 1, p 2,... (ii)
More informationPropositional Logic: Review
Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or
More informationLogic - recap. So far, we have seen that: Logic is a language which can be used to describe:
Logic - recap So far, we have seen that: Logic is a language which can be used to describe: Statements about the real world The simplest pieces of data in an automatic processing system such as a computer
More informationTHE LOGIC OF COMPOUND STATEMENTS
CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.1 Logical Form and Logical Equivalence Copyright Cengage Learning. All rights reserved. Logical Form
More informationLOGIC CONNECTIVES. Students who have an ACT score of at least 30 OR a GPA of at least 3.5 can receive a college scholarship.
LOGIC In mathematical and everyday English language, we frequently use logic to express our thoughts verbally and in writing. We also use logic in numerous other areas such as computer coding, probability,
More informationUNIT-I: Propositional Logic
1. Introduction to Logic: UNIT-I: Propositional Logic Logic: logic comprises a (formal) language for making statements about objects and reasoning about properties of these objects. Statements in a logical
More informationFirst Order Logic: Syntax and Semantics
CS1081 First Order Logic: Syntax and Semantics COMP30412 Sean Bechhofer sean.bechhofer@manchester.ac.uk Problems Propositional logic isn t very expressive As an example, consider p = Scotland won on Saturday
More informationArtificial Intelligence Knowledge Representation I
Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to
More informationIntroduction to Artificial Intelligence Propositional Logic & SAT Solving. UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010
Introduction to Artificial Intelligence Propositional Logic & SAT Solving UIUC CS 440 / ECE 448 Professor: Eyal Amir Spring Semester 2010 Today Representation in Propositional Logic Semantics & Deduction
More informationLogic and Proofs. (A brief summary)
Logic and Proofs (A brief summary) Why Study Logic: To learn to prove claims/statements rigorously To be able to judge better the soundness and consistency of (others ) arguments To gain the foundations
More informationChapter 1, Part I: Propositional Logic. With Question/Answer Animations
Chapter 1, Part I: Propositional Logic With Question/Answer Animations Chapter Summary Propositional Logic The Language of Propositions Applications Logical Equivalences Predicate Logic The Language of
More informationsoftware design & management Gachon University Chulyun Kim
Gachon University Chulyun Kim 2 Outline Propositional Logic Propositional Equivalences Predicates and Quantifiers Nested Quantifiers Rules of Inference Introduction to Proofs 3 1.1 Propositional Logic
More informationLogic. Propositional Logic: Syntax. Wffs
Logic Propositional Logic: Syntax Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about
More informationCS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach you about:
CS 70 Discrete Mathematics for CS Fall 2006 Papadimitriou & Vazirani Lecture 1 Course Outline CS70 is a course about on Discrete Mathematics for Computer Scientists. The purpose of the course is to teach
More informationPropositional and First-Order Logic
Propositional and irst-order Logic 1 Propositional Logic 2 Propositional logic Proposition : A proposition is classified as a declarative sentence which is either true or false. eg: 1) It rained yesterday.
More informationPropositional Logic Not Enough
Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks
More informationThe Importance of Being Formal. Martin Henz. February 5, Propositional Logic
The Importance of Being Formal Martin Henz February 5, 2014 Propositional Logic 1 Motivation In traditional logic, terms represent sets, and therefore, propositions are limited to stating facts on sets
More informationPropositional and Predicate Logic
Propositional and Predicate Logic CS 536-05: Science of Programming This is for Section 5 Only: See Prof. Ren for Sections 1 4 A. Why Reviewing/overviewing logic is necessary because we ll be using it
More informationCHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS
CHAPTER 4 CLASSICAL PROPOSITIONAL SEMANTICS 1 Language There are several propositional languages that are routinely called classical propositional logic languages. It is due to the functional dependency
More informationAutomated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic
Automated Program Verification and Testing 15414/15614 Fall 2016 Lecture 2: Propositional Logic Matt Fredrikson mfredrik@cs.cmu.edu October 17, 2016 Matt Fredrikson Propositional Logic 1 / 33 Propositional
More informationLogic. (Propositional Logic)
Logic (Propositional Logic) 1 REPRESENTING KNOWLEDGE: LOGIC Logic is the branch of mathematics / philosophy concerned with knowledge and reasoning Aristotle distinguished between three types of arguments:
More informationA. Propositional Logic
CmSc 175 Discrete Mathematics A. Propositional Logic 1. Statements (Propositions ): Statements are sentences that claim certain things. Can be either true or false, but not both. Propositional logic deals
More informationPredicate Calculus - Syntax
Predicate Calculus - Syntax Lila Kari University of Waterloo Predicate Calculus - Syntax CS245, Logic and Computation 1 / 26 The language L pred of Predicate Calculus - Syntax L pred, the formal language
More informationPropositional logic (revision) & semantic entailment. p. 1/34
Propositional logic (revision) & semantic entailment p. 1/34 Reading The background reading for propositional logic is Chapter 1 of Huth/Ryan. (This will cover approximately the first three lectures.)
More information15414/614 Optional Lecture 1: Propositional Logic
15414/614 Optional Lecture 1: Propositional Logic Qinsi Wang Logic is the study of information encoded in the form of logical sentences. We use the language of Logic to state observations, to define concepts,
More informationDiscrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1
EECS 70 Discrete Mathematics and Probability Theory Spring 2014 Anant Sahai Note 1 Getting Started In order to be fluent in mathematical statements, you need to understand the basic framework of the language
More informationChapter 4: Classical Propositional Semantics
Chapter 4: Classical Propositional Semantics Language : L {,,, }. Classical Semantics assumptions: TWO VALUES: there are only two logical values: truth (T) and false (F), and EXTENSIONALITY: the logical
More informationPropositional and Predicate Logic
8/24: pp. 2, 3, 5, solved Propositional and Predicate Logic CS 536: Science of Programming, Spring 2018 A. Why Reviewing/overviewing logic is necessary because we ll be using it in the course. We ll be
More informationReview. Propositional Logic. Propositions atomic and compound. Operators: negation, and, or, xor, implies, biconditional.
Review Propositional Logic Propositions atomic and compound Operators: negation, and, or, xor, implies, biconditional Truth tables A closer look at implies Translating from/ to English Converse, inverse,
More informationCHAPTER 1 - LOGIC OF COMPOUND STATEMENTS
CHAPTER 1 - LOGIC OF COMPOUND STATEMENTS 1.1 - Logical Form and Logical Equivalence Definition. A statement or proposition is a sentence that is either true or false, but not both. ex. 1 + 2 = 3 IS a statement
More information