15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried
|
|
- Hortense Ferguson
- 5 years ago
- Views:
Transcription
1 15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 1
2 Admin 2
3 Audits 3
4 Review 4
5 What is AI? Lots of examples: poker, driving robots, RoboCup Things that are easy for us to do, but no obvious algorithm Search / optimization / summation Handling uncertainty 5
6 Propositional logic Syntax variables, constants, operators literals, clauses, sentences Semantics (model {T, F}) Truth tables, how to evaluate formulas Satisfiable, valid, contradiction 6
7 Propositional logic Manipulating formulas (e.g., de Morgan) Normal forms (e.g., CNF) Tseitin transformation to CNF How to translate informally-specified problems into logic (e.g., 3-coloring) 7
8 Proofs 8
9 Entailment Sentence A entails sentence B, A B, if B is True in every model where A is same as saying that (A B) is valid 9
10 Proof tree A tree with a formula at each node At each internal node, children parent Leaves: assumptions or premises Root: consequence If we believe assumptions, we should also believe consequence 10
11 Proof tree example 11
12 Proof by contradiction Assume opposite of what we want to prove, show it leads to a contradiction Suppose we want to show KB S Write KB for (KB S) Build a proof tree with assumptions drawn from clauses of KB conclusion = F so, (KB S) F (contradiction) 12
13 Proof by contradiction 13
14 Proof by contradiction 14
15 Inference rules 15
16 Inference rule To make a proof tree, we need to be able to figure out new formulas entailed by KB Method for finding entailed formulas = inference rule We ve implicitly been using one already 16
17 Modus ponens (a b c d) a b c d Probably most famous inference rule: all men are mortal, Socrates is a man, therefore Socrates is mortal Quantifier-free version: man(socrates) (man(socrates) mortal(socrates)) 17
18 Another inference rule (a b) b a Modus tollens If it s raining the grass is wet; the grass is not wet, so it s not raining 18
19 One more Resolution (a b c) ( c d e) a b d e Combines two sentences that contain a literal and its negation Not as commonly known as modus ponens / tollens 19
20 Resolution example Modus ponens / tollens are special cases Modus tollens: ( raining grass-wet) grass-wet raining 20
21 Resolution (a b c) ( c d e) a b d e Simple proof by case analysis Consider separately cases where we assign c = True and c = False 21
22 Resolution (a b c) ( c d e) Case c = True (a b T) (F d e) = (T) (d e) = (d e) 22
23 Resolution (a b c) ( c d e) Case c = False (a b F) (T d e) = (a b) (T) = (a b) 23
24 Resolution (a b c) ( c d e) Since c must be True or False, conclude (d e) (a b) as desired 24
25 Soundness and completeness An inference procedure is sound if it can only conclude things entailed by KB common sense; haven t discussed anything unsound A procedure is complete if it can conclude everything entailed by KB 25
26 Completeness Modus ponens by itself is incomplete Resolution is complete for propositional logic not obvious famous theorem due to Robinson caveat: also need factoring, removal of redundant literals (a b a) = (a b) 26
27 Variations Horn clause inference (faster) Ways of handling uncertainty (slower) CSPs (sometimes more convenient) Quantifiers / first-order logic 27
28 Horn clauses Horn clause: (a b c d) Equivalently, ( a b c d) Disjunction of literals, at most one of which is positive Positive literal = head, rest = body 28
29 Use of Horn clauses People find it easy to write Horn clauses (listing out conditions under which we can conclude head) happy(john) happy(mary) happy(sue) No negative literals in above formula; again, easier to think about 29
30 Why are Horn clauses important Modus ponens alone is complete So is modus tollens alone Inference in a KB of propositional Horn clauses is linear e.g., by forward chaining 30
31 Forward chaining Look for a clause with all body literals satisfied Add its head to KB (modus ponens) Repeat See RN for more details 31
32 Handling uncertainty Fuzzy logic / certainty factors simple, but don t scale Nonmonotonic logic also doesn t scale Probabilities may or may not scale more later Dempster-Shafer (interval probability) 32
33 Certainty factors KB assigns a certainty factor in [0, 1] to each proposition Interpret as degree of belief When applying an inference rule, certainty factor for consequent is a function of certainty factors for antecedents (e.g., minimum) 33
34 Problems w/ certainty factors Famously difficult to debug a KB with certainty factors, because it s hard to separate a large KB into mostly-independent chunks that interact only through a well-defined interface, because certainty factors are not probabilities (i.e., do not obey Bayes Rule) 34
35 Nonmonotonic logic Suppose we believe all birds can fly Might add a set of sentences to KB bird(polly) flies(polly) bird(tweety) flies(tweety) bird(tux) flies(tux) bird(john) flies(john) 35
36 Nonmonotonic logic Fails if there are penguins in the KB Fix: instead, add bird(polly) ab(polly) flies(polly) bird(tux) ab(tux) flies(tux) ab(tux) is an abnormality predicate Need separate ab i (x) for each type of rule 36
37 Nonmonotonic logic Now set as few abnormality predicates as possible Can prove flies(polly) or flies(tux) with no ab(x) assumptions If we assert flies(tux), must now assume ab(tux) to maintain consistency Can t prove flies(tux) any more, but can still prove flies(polly) 37
38 Nonmonotonic logic Works well as long as we don t have to choose between big sets of abnormalities is it better to have 3 flightless birds or 5 professors that don t wear jackets with elbow-patches? even worse with nested abnormalities: birds fly, but penguins don t, but superhero penguins do, but 38
39 First-order logic 39
40 First-order logic Bertrand Russell So far we ve been using opaque vars like rains or happy(john) Limits us to statements like it s raining or if John is happy then Mary is happy Can t say all men are mortal or if John is happy then someone else is happy too 40
41 Predicates and objects Interpret happy(john) or likes(joe, pizza) as a predicate applied to some objects Object = an object in the world Predicate = boolean-valued function of objects Zero-argument predicate x() plays same role that Boolean variable x did before 41
42 Distinguished predicates We will assume three distinguished predicates with fixed meanings: True / T, False / F Equal(x, y) We will also write (x = y) and (x y) 42
43 Equality satisfies usual axioms Reflexive, transitive, symmetric Substituting equal objects doesn t change value of expression (John = Jonathan) loves(mary, John) loves(mary, Jonathan) 43
44 Functions Functions map zero or more objects to another object e.g., professor(15-780), last-commonancestor(john, Mary) Zero-argument function is the same as an object John v. John() 44
45 The nil object Functions are untyped: must have a value for any set of arguments Typically add a nil object to use as value when other answers don t make sense 45
46 Types of values Expressions in propositional logic could only have Boolean (T/F) values Now we have two types of expressions: object and Boolean done(slides(15-780)) happy(professor(15-780)) Functions convert objects to objects; predicates convert objects to Booleans; connectives convert Booleans to Booleans 46
47 Definitions Term = expression referring to an object John left-leg-of(father-of(president-of(usa))) Atom = predicate applied to objects happy(john) raining at(robot, Wean-5409, 11AM-Wed) 47
48 Definitions Literal = possibly-negated atom happy(john), happy(john) Sentence = literals joined by connectives like raining done(slides(780)) happy(professor) 48
49 Semantics Models are now much more complicated List of objects (finite or countable) Table of function values for each function mentioned in formula Table of predicate values for each predicate mentioned in formula Meaning of sentence: model {T, F} Meaning of term: model object 49
50 For example 50
51 KB describing example alive(cat) ear-of(cat) = ear in(cat, box) in(ear, box) in(box, cat) in(cat, nil) ear-of(box) = ear-of(ear) = ear-of(nil) = nil cat box cat ear cat nil 51
52 Aside: avoiding verbosity Closed-world assumption: literals not assigned a value in KB are false avoid stating in(box, cat), etc. Unique names assumption: objects with separate names are separate avoid box cat, cat ear, 52
53 Aside: typed variables KB also illustrates need for data types Don t want to have to specify ear-of(box) or in(cat, nil) Could design a type system argument of happy() is of type animate Function instances which disobey type rules have value nil 53
54 Model of example Objects: C, B, E, N Assignments: cat: C, box: B, ear: E, nil: N ear-of(c): E, ear-of(b): N, ear-of(e): N, ear-of(n): N Predicate values: in(c, B), in(c, C), in(c, N), 54
55 Failed model Objects: C, E, N Fails because there s no way to satisfy inequality constraints with only 3 objects 55
56 Another possible model Objects: C, B, E, N, X Extra object X could have arbitrary properties since it s not mentioned in KB E.g., X could be its own ear 56
57 An embarrassment of models In general, can be infinitely many models unless KB limits number somehow Job of KB is to rule out models that don t match our idea of the world Saw how to rule out CEN model Can we rule out CBENX model? 57
58 Getting rid of extra objects Can use quantifiers to rule out CBENX model: x. x = cat x = box x = ear x = nil Called a domain closure assumption 58
59 Quantifiers Want all men are mortal, or closure Add quantifiers and object variables x. man(x) mortal(x) x. lunch(x) free(x) : no matter how we fill in object variables, formula is still true : there is some way to fill in object variables to make formula true 59
60 Variables Build atoms from variables x, y, as well as constants John, Fred, man(x), loves(john, z), mortal(brother(y)) Build formulas from these atoms man(x) mortal(brother(x)) New syntactic construct: term or formula w/ free variables 60
61 New syntax new semantics New part of model: interpretation Maps variables to model objects x: C, y: N Meaning of a term or formula: look up its free variables in the interpretation, then continue as before alive(ear(x)) alive(ear(c)) alive(e) T 61
62 Working with interpretations Write (M / x: obj) for the model which is just like M except that variable x is interpreted as the object obj M / x: obj is a refinement of M 62
63 Binding Adding quantifier for x is called binding x In ( x. likes(x, y)), x is bound, y is free Can add quantifiers and apply logical operations like in any order But must wind up with ground formula (no free variables) 63
64 Semantics of A sentence ( x. S) is true in M if S is true in (M / x: obj) for all objects obj in M 64
65 Example M has objects (A, B, C) and predicate happy(x) which is true for A, B, C Sentence x. happy(x) is satisfied in M since happy(a) is satisfied in M/x:A, happy(b) in M/x:B, happy(c) in M:x/C 65
66 Semantics of A sentence ( x. S) is true in M if there is some object obj in M such that S is true in model (M / x: obj) 66
67 Example M has objects (A, B, C) and predicate happy(a) = happy(b) = True happy(c) = False Sentence x. happy(x) is satisfied in M Since happy(x) is satisfied in, e.g., M/x:B 67
68 Scoping rules Portion of formula where quantifier applies = scope Variable is bound by innermost enclosing scope with matching name Two variables in different scopes can have same name they are still different vars 68
69 Scoping examples ( x. happy(x)) ( x. happy(x)) Either everyone s happy, or someone s unhappy x. (raining outside(x) ( x. wet(x))) The x who is outside may not be the one who is wet 69
70 Quantifier nesting English sentence everybody loves somebody is ambiguous Translates to logical sentences x. y. loves(x, y) y. x. loves(x, y) 70
71 Reasoning in FOL 71
72 Entailment, etc. As before, entailment, unsatisfiability, validity, equivalence, etc. refer to all possible models But now, can t determine by enumerating models since there could be infinitely many 72
73 Equivalences All transformation rules for propositional logic still hold In addition, there is a De Morgan s Law for moving negations through quantifiers x. S x. S x. S x. S And, rules for getting rid of quantifiers 73
74 Generalizing CNF Eliminate, move in w/ De Morgan but moves through quantifiers too Get rid of quantifiers (see below) Distribute, or use Tseitin 74
75 Do we really need? x. happy(x) happy(happy_person()) y. x. loves(y, x) y. loves(y, loved_one(y)) 75
76 Skolemization Called Skolemization (after Thoraf Albert Skolem) Thoraf Albert Skolem Eliminate using function of arguments of all enclosing quantifiers 76
77 Do we really need? 77
78 Getting rid of quantifiers Standardize apart (avoid name collisions) Skolemize Drop (free variables implicitly universally quantified) Terminology: still called free even though quantification is implicit 78
79 For example x. man(x) mortal(x) ( man(x) mortal(x)) x. (honest(x) happy(diogenes)) ( honest(y) happy(diogenes)) y. x. loves(y, x) loves(z, f(z)) 79
80 Exercise ( x. honest(x)) happy(diogenes) 80
81 Proofs 81
82 Proofs Proofs by contradiction work as before: add S to KB put in CNF run resolution if we get an empty clause, we ve proven S by contradiction But, CNF and resolution have changed 82
83 Generalizing resolution Propositional: ( a b) a b FOL: ( man(x) mortal(x)) man(socrates) mortal(socrates) Difference: had to substitute x = Socrates 83
84 Unification Two FOL sentences unify with each other if there is a way to set their variables so that they are identical man(x), man(socrates) unify using the substitution x = Socrates 84
85 Unification examples loves(x, x), loves(john, y) unify using x = y = John loves(x, x), loves(john, Mary) can t unify loves(uncle(x), y), loves(z, aunt(z)): 85
86 Unification examples loves(x, x), loves(john, y) unify using x = y = John loves(x, x), loves(john, Mary) can t unify loves(uncle(x), y), loves(z, aunt(z)): z = uncle(x), y = aunt(uncle(x)) loves(uncle(x), aunt(uncle(x))) 86
87 Most general unifier May be many substitutions that unify two formulas MGU is unique (up to renaming) Simple, fast algorithm for finding MGU (see RN) 87
88 First-order resolution Given clauses (a b c), ( c d e) And a variable substitution V If c : V and c : V are the same Then we can conclude (a b d e) : V 88
89 First-order factoring When removing redundant literals, we have the option of unifying them first Given clause (a b c), substitution V If a : V and b : V are the same Then we can conclude (a c) : V 89
90 Completeness First-order resolution (together with firstorder factoring) is sound and complete for FOL Famous theorem 90
91 Completeness 91
92 Proof strategy We ll show FOL completeness by reducing to propositional completeness 92
93 Propositionalization Given a FOL KB in clause form And a set of terms U (for universe) We can propositionalize KB under U by substituting elements of U for free variables in all combinations 93
94 Propositionalization example ( man(x) mortal(x)) mortal(socrates) favorite_drink(socrates) = hemlock drinks(x, favorite_drink(x)) U = {Socrates, hemlock, Fred} 94
95 Propositionalization example ( man(socrates) mortal(socrates)) ( man(fred) mortal(fred)) ( man(hemlock) mortal(hemlock)) drinks(socrates, favorite_drink(socrates)) drinks(hemlock, favorite_drink(hemlock)) drinks(fred, favorite_drink(fred)) mortal(socrates) favorite_drink(socrates) = hemlock 95
96 Choosing a universe To check a FOL KB, propositionalize it using some universe U Which universe? 96
97 Herbrand Universe Herbrand universe H of formula S: start with all objects mentioned in S or synthetic object X if none mentioned apply all functions mentioned in S to all combinations of objects in H, add to H repeat 97
98 Herbrand Universe E.g., loves(uncle(john), Mary) H = {John, Mary, uncle(john), uncle(mary), uncle(uncle(john)), uncle(uncle(mary)), } 98
99 Herbrand s theorem If a FOL KB in clause form is unsatisfiable And H is its Herbrand universe Then the propositionalized KB is unsatisfiable for some finite U H 99
100 Significance This is one half of the equivalence we want: unsatisfiable FOL KB unsatisfiable propositional KB 100
101 Converse of Herbrand A. J. Robinson proved lifting lemma Write PKB for a propositionalization of KB (under some universe) Any resolution proof in PKB corresponds to a resolution proof in KB and, if PKB is unsatisfiable, there is a proof of F (by prop. completeness); so, lifting it shows KB unsatisfiable 101
102 Proofs w/ Herbrand & Robinson So, FOL KB is unsatisfiable if and only if there is a subset of Herbrand universe making PKB unsatisfiable If we have a way to find proofs in propositional logic, we have a way to find them in FOL 102
103 Proofs w/ Herbrand & Robinson To prove S, put KB S in CNF: KB Build subsets of Herbrand universe in increasing order of size: U1, U2, Propositionalize KB w/ Ui, look for proof If U i unsatisfiable, use lifting to get a contradiction in KB If Ui satisfiable, move on to Ui+1 103
104 Making it faster Restrict semantics so we only need to check one finite propositional KB Unique names: objects with different names are different (John Mary) Domain closure: objects without names given in KB don t exist Restrictions also make entailment, validity feasible 104
105 Why FOL 105
106 What s so special about FOL Existence of a sound, complete inference procedure Additions to FOL break this procedure although sometimes there s a replacement 106
107 Equality Paramodulation is sound and complete for FOL+equals (see RN) 107
108 Second order logic SOL adds quantification over predicates E.g., principle of mathematical induction: P. P(0) ( x. P(x) P(S(x))) x. P(x) There is no sound and complete inference procedure for SOL (Gödel s famous incompleteness theorem) 108
109 Others Temporal logics ( P(x) will be true at some time in the future ) Modal logics ( John knows P(x) ) First-class functions (lambda operator, application) 109
15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried
15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Byron Boots, Sam Ganzfried 1 Admin 2 Audits http://www.cmu.edu/hub/forms/esg-audit.pdf 3 Matlab tutorial When
More information15-780: Graduate AI Lecture 5. Logic, Planning. Geoff Gordon (this lecture) Ziv Bar-Joseph TAs Geoff Hollinger, Henry Lin
15-780: Graduate AI Lecture 5. Logic, Planning Geoff Gordon (this lecture) Ziv Bar-Joseph TAs Geoff Hollinger, Henry Lin Review Review CSPs (definition, examples) Sudoku, jobshop scheduling Over-, under-,
More information15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman
15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 1 Admin Recitations: Fri. 3PM here (GHC 4307) Vote: useful to have one tomorrow? would
More information15-780: Graduate AI Lecture 2. Proofs & FOL. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman
15-780: Graduate AI Lecture 2. Proofs & FOL Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman 1 Admin Recitations: Fri. 3PM here (GHC 4307) Vote: useful to have one tomorrow? would
More informationAutomated Reasoning PROLOG and Automated Reasoning 13.4 Further Issues in Automated Reasoning 13.5 Epilogue and References 13.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution Theorem Proving 13.3 PROLOG and Automated Reasoning 13.4
More informationFoundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution
Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation
More informationLecture 4: January 12, 2015
32002: AI (First Order Predicate Logic, Interpretation and Inferences) Spring 2015 Lecturer: K.R. Chowdhary Lecture 4: January 12, 2015 : Professor of CS (VF) Disclaimer: These notes have not been subjected
More informationResolution (14A) Young W. Lim 6/14/14
Copyright (c) 2013-2014. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free
More information15-780: Graduate AI Lecture 3. FOL proofs. Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman
15-780: Graduate AI Lecture 3. FOL proofs Geoff Gordon (this lecture) Tuomas Sandholm TAs Erik Zawadzki, Abe Othman Admin 2 HW1 Out today Due Tue, Feb. 1 (two weeks) hand in hardcopy at beginning of class
More informationCS221 / Autumn 2017 / Liang & Ermon. Lecture 17: Logic II
CS221 / Autumn 2017 / Liang & Ermon Lecture 17: Logic II Review: ingredients of a logic Syntax: defines a set of valid formulas (Formulas) Example: Rain Wet Semantics: for each formula, specify a set of
More informationTHE PREDICATE CALCULUS
2 THE PREDICATE CALCULUS Slide 2.1 2.0 Introduction 2.1 The Propositional Calculus 2.2 The Predicate Calculus 2.3 Using Inference Rules to Produce Predicate Calculus Expressions 2.4 Application: A Logic-Based
More informationLecture 17 of 41. Clausal (Conjunctive Normal) Form and Resolution Techniques
Lecture 17 of 41 Clausal (Conjunctive Normal) Form and Resolution Techniques Wednesday, 29 September 2004 William H. Hsu, KSU http://www.kddresearch.org http://www.cis.ksu.edu/~bhsu Reading: Chapter 9,
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 37 Resolution Rules
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 37 Resolution Rules If some literals can be unified, the same algorithm should be able
More informationLecture 7: January 15, 2014
32002: AI (First order Predicate Logic, Syntax and Semantics) Spring 2014 Lecturer: K.R. Chowdhary Lecture 7: January 15, 2014 : Professor of CS (GF) Disclaimer: These notes have not been subjected to
More informationComputation Club: Gödel s theorem
Computation Club: Gödel s theorem The big picture mathematicians do a lot of reasoning and write a lot of proofs formal systems try to capture the ideas of reasoning and proof in a purely mechanical set
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) Lesson 15 Inference in FOL - I 6.2.8 Resolution We have introduced the inference rule Modus Ponens. Now we introduce another inference rule
More informationModule 6. Knowledge Representation and Logic (First Order Logic) Version 2 CSE IIT, Kharagpur
Module 6 Knowledge Representation and Logic (First Order Logic) 6.1 Instructional Objective Students should understand the advantages of first order logic as a knowledge representation language Students
More informationDefinition: A context-free grammar (CFG) is a 4- tuple. variables = nonterminals, terminals, rules = productions,,
CMPSCI 601: Recall From Last Time Lecture 5 Definition: A context-free grammar (CFG) is a 4- tuple, variables = nonterminals, terminals, rules = productions,,, are all finite. 1 ( ) $ Pumping Lemma for
More informationFirst Order Predicate Logic CIS 32
First Order Predicate Logic CIS 32 Functionalia Demos? HW 3 is out on the web-page. Today: Predicate Logic Constructing the Logical Agent Predicate Logic First-order predicate logic More expressive than
More information6.034 Notes: Section 10.1
6.034 Notes: Section 10.1 Slide 10.1.1 A sentence written in conjunctive normal form looks like ((A or B or not C) and (B or D) and (not A) and (B or C)). Slide 10.1.2 Its outermost structure is a conjunction.
More informationKnowledge Representation. CS 486/686: Introduction to Artificial Intelligence
Knowledge Representation CS 486/686: Introduction to Artificial Intelligence 1 Outline Knowledge-based agents Logics in general Propositional Logic& Reasoning First Order Logic 2 Introduction So far we
More informationSection 2.4: Arguments with Quantified Statements
Section 2.4: Arguments with Quantified Statements In this section, we shall generalize the ideas we developed in Section 1.3 to arguments which involve quantified statements. Most of the concepts we shall
More informationResolution in FO logic (Ch. 9)
Resolution in FO logic (Ch. 9) Review: CNF form Conjunctive normal form is a number of clauses stuck together with ANDs Each clause can only contain ORs, and logical negation must appears right next to
More informationCSL105: Discrete Mathematical Structures. Ragesh Jaiswal, CSE, IIT Delhi
is another way of showing that an argument is correct. Definitions: Literal: A variable or a negation of a variable is called a literal. Sum and Product: A disjunction of literals is called a sum and a
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationFor next Tuesday. Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday
For next Tuesday Read chapter 8 No written homework Initial posts due Thursday 1pm and responses due by class time Tuesday Any questions? Program 1 Imperfect Knowledge What issues arise when we don t know
More informationCOMP4418 Knowledge Representation and Reasoning
COMP4418 Knowledge Representation and Reasoning Week 3 Practical Reasoning David Rajaratnam Click to edit Present s Name Practical Reasoning - My Interests Cognitive Robotics. Connect high level cognition
More informationDeclarative Programming. 2: theoretical backgrounds
Declarative Programming 2: theoretical backgrounds 1 Logic Systems: structure and meta-theoretical properties logic system syntax semantics proof theory defines which sentences are legal in the logical
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More information(More) Propositional Logic and an Intro to Predicate Logic. CSCI 3202, Fall 2010
(More) Propositional Logic and an Intro to Predicate Logic CSCI 3202, Fall 2010 Assignments Next week: Guest lectures (Jim Martin and Nikolaus Correll); Read Chapter 9 (but you can skip sections on logic
More informationFirst-Order Logic PREDICATE LOGIC. Syntax. Terms
First-Order Logic PREDICATE LOGIC Aim of this lecture: to introduce first-order predicate logic. More expressive than propositional logic. Consider the following argument: all monitors are ready; X12 is
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning
More informationCSE 473 Lecture 12 Chapter 8. First-Order Logic. CSE AI faculty
CSE 473 Lecture 12 Chapter 8 First-Order Logic CSE AI faculty What s on our menu today? First-Order Logic Definitions Universal and Existential Quantifiers Skolemization Unification 2 Propositional vs.
More informationInf2D 12: Resolution-Based Inference
School of Informatics, University of Edinburgh 09/02/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Last time Unification: Given α and β, find θ such that αθ = βθ Most general unifier
More informationPropositional Logic. Part I
Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.
More informationAXIOMS FOR THE INTEGERS
AXIOMS FOR THE INTEGERS BRIAN OSSERMAN We describe the set of axioms for the integers which we will use in the class. The axioms are almost the same as what is presented in Appendix A of the textbook,
More informationKnowledge Representation and Reasoning Logics for Artificial Intelligence
Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State
More informationFirst Order Logic and Resolution
Artificial Intelligence CS 6364 Professor Dan Moldovan Section 6 First Order Logic and Resolution First Order Logic (First Order Predicate Calculus) n n There is need to access components of a sentence.
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding
More information(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1
CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are
More informationIntegrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation
CSE560 Class 10: 1 c P. Heeman, 2010 Integrity Constraints Overview Disjunctive & Negative Knowledge Resolution Rule Bottom-Up Proof by Refutation Top-Down CSE560 Class 10: 2 c P. Heeman, 2010 Integrity
More informationTowards a Logical Reconstruction of Relational Database Theory
Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2
More informationWhat is the study of logic?
Chapter 2: The Representation of Knowledge Expert Systems: Principles and Programming, Fourth Edition What is the study of logic? Logic is the study of making inferences given a set of facts, we attempt
More informationLogical reasoning systems
Logical reasoning systems Theorem provers and logic programming languages Production systems Frame systems and semantic networks Description logic systems CS 561, Session 19 1 Logical reasoning systems
More informationResolution in FOPC. Deepak Kumar November Knowledge Engineering in FOPC
Resolution in FOPC Deepak Kumar November 2017 Knowledge Engineering in FOPC Identify the task Assemble relevant knowledge Decide on a vocabulary of predicates, functions, and constants Encode general knowledge
More informationPredicate Logic CHAPTER What This Chapter Is About
CHAPTER 14 Predicate Logic We now turn our attention to a generalization of propositional logic, called predicate, or first-order, logic. Predicates are functions of zero or more variables that return
More informationPropositional Logic Formal Syntax and Semantics. Computability and Logic
Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.
Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to
More informationConstraint Solving. Systems and Internet Infrastructure Security
Systems and Internet Infrastructure Security Network and Security Research Center Department of Computer Science and Engineering Pennsylvania State University, University Park PA Constraint Solving Systems
More informationMathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras. Lecture - 9 Normal Forms
Mathematical Logic Prof. Arindama Singh Department of Mathematics Indian Institute of Technology, Madras Lecture - 9 Normal Forms In the last class we have seen some consequences and some equivalences,
More informationDeductive Methods, Bounded Model Checking
Deductive Methods, Bounded Model Checking http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Deductive methods Pavel Parízek Deductive Methods, Bounded
More informationCS 4700: Artificial Intelligence
CS 4700: Foundations of Artificial Intelligence Fall 2017 Instructor: Prof. Haym Hirsh Lecture 16 Cornell Cinema Thursday, April 13 7:00pm Friday, April 14 7:00pm Sunday, April 16 4:30pm Cornell Cinema
More informationPROPOSITIONAL LOGIC (2)
PROPOSITIONAL LOGIC (2) based on Huth & Ruan Logic in Computer Science: Modelling and Reasoning about Systems Cambridge University Press, 2004 Russell & Norvig Artificial Intelligence: A Modern Approach
More informationAutomated Reasoning Systems
Automated Reasoning Systems Resolution Theorem Proving: Prover9 Temur Kutsia RISC, Johannes Kepler University of Linz, Austria kutsia@risc.uni-linz.ac.at May 11, 2011 Prover9 Automated theorem prover from
More informationKnowledge Representation and Reasoning Logics for Artificial Intelligence
Knowledge Representation and Reasoning Logics for Artificial Intelligence Stuart C. Shapiro Department of Computer Science and Engineering and Center for Cognitive Science University at Buffalo, The State
More informationKnowledge Representation
Knowledge Representation References Rich and Knight, Artificial Intelligence, 2nd ed. McGraw-Hill, 1991 Russell and Norvig, Artificial Intelligence: A modern approach, 2nd ed. Prentice Hall, 2003 Outline
More informationPredicate Calculus. Problems? Syntax. Atomic Sentences. Complex Sentences. Truth
Problems? What kinds of problems exist for propositional logic? Predicate Calculus A way to access the components of an individual assertion Predicate Calculus: used extensively in many AI programs, especially
More informationIntro. Scheme Basics. scm> 5 5. scm>
Intro Let s take some time to talk about LISP. It stands for LISt Processing a way of coding using only lists! It sounds pretty radical, and it is. There are lots of cool things to know about LISP; if
More informationVibhav Gogate University of Texas, Dallas Artificial Intelligence: CS 4365 First-order Logic
Artificial Intelligence: CS 4365 First-order Logic Vibhav Gogate University of Texas, Dallas First-order Logic Course Outline: Where are we? Introduction and Agents Search, Heuristics and CSPs Adversarial
More informationKnowledge & Reasoning
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of representing large bodies of knowledge 1 Logical
More informationLogic and its Applications
Logic and its Applications Edmund Burke and Eric Foxley PRENTICE HALL London New York Toronto Sydney Tokyo Singapore Madrid Mexico City Munich Contents Preface xiii Propositional logic 1 1.1 Informal introduction
More informationAnswer Key #1 Phil 414 JL Shaheen Fall 2010
Answer Key #1 Phil 414 JL Shaheen Fall 2010 1. 1.42(a) B is equivalent to B, and so also to C, where C is a DNF formula equivalent to B. (By Prop 1.5, there is such a C.) Negated DNF meets de Morgan s
More informationLogic as a framework for NL semantics. Outline. Syntax of FOL [1] Semantic Theory Type Theory
Logic as a framework for NL semantics Semantic Theory Type Theory Manfred Pinkal Stefan Thater Summer 2007 Approximate NL meaning as truth conditions. Logic supports precise, consistent and controlled
More informationNotes. Notes. Introduction. Notes. Propositional Functions. Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry.
Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Spring 2006 1 / 1 Computer Science & Engineering 235 Introduction to Discrete Mathematics Sections 1.3 1.4 of Rosen cse235@cse.unl.edu Introduction
More informationNotes on Default Reasoning
Notes on Default Reasoning Stuart C. Shapiro November 30, 2004 1 Introduction These notes comment on, and are, in part, derived from Brachman & Levesque, Knowledge Representation and Reasoning, Chapter
More informationAdvanced Logic and Functional Programming
Advanced Logic and Functional Programming Lecture 1: Programming paradigms. Declarative programming. From first-order logic to Logic Programming. Programming paradigms Programming paradigm (software engineering)
More informationSo many Logics, so little time
So many Logics, so little time One classical way to organize them is by tractability vs. expressivity. Description Logics (DLs) are basically subsets of FO logic, located in a 'sweet spot' which provides
More informationLOGIC-BASED TRUTH MAINTENANCE SYSTEMS. EECS 344 Winter, 2008
LOGIC-BASED TRUTH MAINTENANCE SYSTEMS EECS 344 Winter, 2008 Overview Limitations of the JTMS LTMS basics Logical Specification of LTMS Boolean Constraint Propagation Interface to inference engine Example:
More informationLogic Programming and Resolution Lecture notes for INF3170/4171
Logic Programming and Resolution Lecture notes for INF3170/4171 Leif Harald Karlsen Autumn 2015 1 Introduction This note will explain the connection between logic and computer programming using Horn Clauses
More informationPreface Violine(stradivari1) 4string(stradivari1). x.violine(x) 4string(x)
circumscription Preface- FOL We have KB consist the sentence: Violine(stradivari1) We want to conclude it have 4 strings, there are exactly 2 possibilities. One is to add the explicit sentence: 4string(stradivari1).
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More informationFull Clausal Logic - Syntax: clauses
Full Clausal Logic - Syntax: clauses compound terms aggregate objects Add function symbols (functors), with an arity; constants are 0-ary functors. object proposition functor : single word starting with
More informationDISCRETE MATHEMATICS
DISCRETE MATHEMATICS WITH APPLICATIONS THIRD EDITION SUSANNA S. EPP DePaul University THOIVISON * BROOKS/COLE Australia Canada Mexico Singapore Spain United Kingdom United States CONTENTS Chapter 1 The
More informationDiscrete Mathematics Lecture 4. Harper Langston New York University
Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a
More informationCPSC 121: Models of Computation. Module 6: Rewriting predicate logic statements
CPSC 121: Models of Computation Module 6: Rewriting predicate logic statements Module 6: Rewriting predicate logic statements Pre-class quiz #7 is due March 1st at 19:00. Assigned reading for the quiz:
More informationCSC 501 Semantics of Programming Languages
CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this
More informationINF5390 Kunstig intelligens. First-Order Logic. Roar Fjellheim
INF5390 Kunstig intelligens First-Order Logic Roar Fjellheim Outline Logical commitments First-order logic First-order inference Resolution rule Reasoning systems Summary Extracts from AIMA Chapter 8:
More informationBoolean Functions (Formulas) and Propositional Logic
EECS 219C: Computer-Aided Verification Boolean Satisfiability Solving Part I: Basics Sanjit A. Seshia EECS, UC Berkeley Boolean Functions (Formulas) and Propositional Logic Variables: x 1, x 2, x 3,, x
More information1.3. Conditional expressions To express case distinctions like
Introduction Much of the theory developed in the underlying course Logic II can be implemented in a proof assistant. In the present setting this is interesting, since we can then machine extract from a
More information3.4 Deduction and Evaluation: Tools Conditional-Equational Logic
3.4 Deduction and Evaluation: Tools 3.4.1 Conditional-Equational Logic The general definition of a formal specification from above was based on the existence of a precisely defined semantics for the syntax
More informationInduction and Semantics in Dafny
15-414 Lecture 11 1 Instructor: Matt Fredrikson Induction and Semantics in Dafny TA: Ryan Wagner Encoding the syntax of Imp Recall the abstract syntax of Imp: a AExp ::= n Z x Var a 1 + a 2 b BExp ::=
More information6.034 Notes: Section 11.1
6.034 Notes: Section 11.1 Slide 11.1.1 We've now spent a fair bit of time learning about the language of first-order logic and the mechanisms of automatic inference. And, we've also found that (a) it is
More informationProgramming Languages Third Edition
Programming Languages Third Edition Chapter 12 Formal Semantics Objectives Become familiar with a sample small language for the purpose of semantic specification Understand operational semantics Understand
More information6.034 Notes: Section 5.1
6.034 Notes: Section 5.1 Slide 5.1.1 Now we're going to start talking about first-order logic, which extends propositional logic so that we can talk about things. Slide 5.1.2 In propositional logic, all
More informationTheorem proving. PVS theorem prover. Hoare style verification PVS. More on embeddings. What if. Abhik Roychoudhury CS 6214
Theorem proving PVS theorem prover Abhik Roychoudhury National University of Singapore Both specification and implementation can be formalized in a suitable logic. Proof rules for proving statements in
More informationIntroduction to Axiomatic Semantics
Introduction to Axiomatic Semantics Meeting 10, CSCI 5535, Spring 2009 Announcements Homework 3 due tonight Homework 2 is graded 13 (mean), 14 (median), out of 21 total, but Graduate class: final project
More informationIntroduction to dependent types in Coq
October 24, 2008 basic use of the Coq system In Coq, you can play with simple values and functions. The basic command is called Check, to verify if an expression is well-formed and learn what is its type.
More informationCS 321 Programming Languages and Compilers. Prolog
CS 321 Programming Languages and Compilers Prolog Prolog PROgramming LOGic Algorithm = Logic + Control Logic programming deals with computing relations rather than functions. To understand Prolog one must
More informationThis is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS
1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be
More informationAutomatic Reasoning (Section 8.3)
Automatic Reasoning (Section 8.3) Automatic Reasoning Can reasoning be automated? Yes, for some logics, including first-order logic. We could try to automate natural deduction, but there are many proof
More informationAutomata Theory for Reasoning about Actions
Automata Theory for Reasoning about Actions Eugenia Ternovskaia Department of Computer Science, University of Toronto Toronto, ON, Canada, M5S 3G4 eugenia@cs.toronto.edu Abstract In this paper, we show
More information(Refer Slide Time: 4:00)
Principles of Programming Languages Dr. S. Arun Kumar Department of Computer Science & Engineering Indian Institute of Technology, Delhi Lecture - 38 Meanings Let us look at abstracts namely functional
More informationHarvard School of Engineering and Applied Sciences CS 152: Programming Languages
Harvard School of Engineering and Applied Sciences CS 152: Programming Languages Lecture 19 Tuesday, April 3, 2018 1 Introduction to axiomatic semantics The idea in axiomatic semantics is to give specifications
More informationDATABASE THEORY. Lecture 11: Introduction to Datalog. TU Dresden, 12th June Markus Krötzsch Knowledge-Based Systems
DATABASE THEORY Lecture 11: Introduction to Datalog Markus Krötzsch Knowledge-Based Systems TU Dresden, 12th June 2018 Announcement All lectures and the exercise on 19 June 2018 will be in room APB 1004
More information6. Inference and resolution
Computer Science and Software Engineering University of Wisconsin - Platteville 6. Inference and resolution CS 3030 Lecture Notes Yan Shi UW-Platteville Read: Textbook Chapter 8 Part of the slides are
More informationLogic: TD as search, Datalog (variables)
Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from Chpt 12) June, 8, 2017 CPSC 322, Lecture 23 Slide 1 Lecture Overview Recap Top
More informationLOGIC AND DISCRETE MATHEMATICS
LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University
More informationSet 7: Predicate logic Chapter 8 R&N. ICS 271 Fall 2015
Set 7: Predicate logic Chapter 8 R&N ICS 271 Fall 2015 Outline New ontology objects, relations, properties, functions New Syntax Constants, predicates, properties, functions New semantics meaning of new
More informationCOMP219: Artificial Intelligence. Lecture 14: Knowledge Representation
COMP219: Artificial Intelligence Lecture 14: Knowledge Representation 1 Overview Last time Game playing Minimax decisions Alpha-beta pruning Today Introduce the need for explicit knowledge representation
More informationThe Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT
The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT 1 Satisfiability (SAT) Problem 2 Boolean Expressions Boolean,
More information