Computational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/26)
|
|
- Chastity Webb
- 6 years ago
- Views:
Transcription
1 Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/26)
2 Propositional Logic - algorithms Complete calculi for deciding logical entailment run into time and space problem as soon as formulas are larger Unfortunately, many real word applications (planning, scheduling) require too many propositional variables Incomplete procedures have been developed, which can take care of large formulas We will introduce a general framework for this kind of algorithms, and then two instantiations: GSAT and GWSAT Computational Logic Davide Martinenghi (2/26)
3 Propositional Logic - algorithms GenSAT framework Input: a formula F in CNF Output: a model for F, or no model found 1: for j := 1 to maxtries do 2: I := initial(f) 3: for k := 1 to maxloops do 4: if I = F then 5: return I 6: else 7: I := flip(i, pick(hillclimb(f, I))) 8: end if 9: end for 10: end for 11: return no model found maxtries and maxloops are some natural numbers, initial(f) randomly selects an interpretation for F, pick() randomly selects an element from a given set of propositions, flip() changes the truth value of a proposition in an interpretation Computational Logic Davide Martinenghi (3/26)
4 Propositional Logic - algorithms Hillclimb procedure for GenSAT hillclimb() computes a set of variables which can be potentially flipped Input a propositional formula F and an interpretation I such that I = F Output a set of propositions in F 1: r := rand(0, 1) 2: return {P select(f, I, P, r) = true} select() returns true for some variables depending on a random number r Computational Logic Davide Martinenghi (4/26)
5 Propositional Logic - algorithms We now introduce GSAT (greedy satisfiability testing) Let F u (I) be the set of unsatisfied clauses of CNF F in interpretation I Let P be a proposition in F, then the rank of P in F and I is rank(f, I, P) := F u (I) F u (flip(i, P)) If rank(f, I, P) > 0 then the number of unsatisfied clauses in F decreases when P is flipped In GSAT the select() function is defined as { true if rank(f, I, P) is maximal in P select(f, I, P, r) = false otherwise i.e., select() retains all propositions that make a maximal change in the number of satisfied clauses This is the reason why it is called greedy This procedure will inevitably end in a local minimum of F u (I) Computational Logic Davide Martinenghi (5/26)
6 Propositional Logic - algorithms It was observed that the performance of algorithms that avoid local minima is better GWSAT (greedy satisfiability testing with random walks) is an extension of GSAT which randomly selects arbitrary propositions to flip In this way propositions with non-maximal, or even negative, rank can be selected true if r > p and rank(f, I, P) is maximal select(f, I, P, r) = true if r p and P occurs in F u (I) false otherwise where p is a fixed value between 0 and 1 In experiments, GWSAT is shown to perform better than GSAT Computational Logic Davide Martinenghi (6/26)
7 First-Order Logic (FOL) - syntax Propositional logic (PL) has many applications, but its expressive power is restricted Sentences such as all men are mortal and each child must have parents can be expressed as propositions in a way that does not capture the intended relationship between men, mortals, children, and parents Frege developed what is now known as first-order logic (FOL, aka predicate logic) in 1879, extending propositional logic with functions, variables and quantifiers Epistemologically (states of knowledge), both PL and FOL consider truth and falsity Ontologically (what exists), PL considers facts, while FOL also considers objects: people, houses, numbers, courses,... properties and relations: being red, being happy, being prime,..., being bigger than, being part of,... functions: parent of, age of, successor of,... Computational Logic Davide Martinenghi (7/26)
8 FOL - syntax The alphabet of a FOL language L is composed of A countably infinite set of variables: X, Y, Z,... A set of function symbols: f, g,... A set of predicate (aka relation) symbols: p, q, r,... The following connectives:,,,, The following quantifiers:, The punctuation symbols: (, ), and commas Each function and relation symbol has a fixed arity which denotes the number of arguments associated with it p/n indicates that predicate (or function) p has arity n Nullary functions are called constants; nullary predicates are called propositions No meaning is attached to the symbols of the alphabet (this is the role of the semantics ) Computational Logic Davide Martinenghi (8/26)
9 FOL - syntax Terms denote all the objects L is able to speak about. They are inductively defined as follows: A variable is a term If f/n is a function symbol, and t1,..., t n are terms, then f(t 1,..., t n ) is a term Generic terms are typically denoted by s, t,... A nullary function c() is simply written as c Computational Logic Davide Martinenghi (9/26)
10 FOL - syntax The set of FOL formulas is inductively defined as the smallest set such that: If p/n is a relation symbol, and t1,..., t n are terms, then p(t 1,..., t n ) is a formula called atomic formula or atom If F and G are formulas, and X is a variable, then are formulas ( F) (F G) (F G) (F G) (F G) ( XF) ( XF) A nullary predicate p() is simply written as p Computational Logic Davide Martinenghi (10/26)
11 FOL - syntax Literals are atoms (positive literals), or negated atoms (negative literals) Parentheses are omitted whenever possible with the following precedence order:, > > > > > For convenience ( X1 (... ( X n (F))...) is abbreviated as ( X 1,..., X n (F)), and ( X 1 (... ( X n (F))...) is abbreviated as ( X 1,..., X n (F)) Computational Logic Davide Martinenghi (11/26)
12 FOL - syntax Examples of possible FOL translations of sentences in natural language: all humans are mortal becomes ( X(h(X) m(x))) each child must have parents becomes X(c(X) ( Y, Z p(x, Y, Z)))) Computational Logic Davide Martinenghi (12/26)
13 FOL - syntax Observations on the translation into FOL The main connective in use with is Example: everyone at Unibz is smart is translated as X(at(X, unibz) smart(x)) Note that the formula X(at(X, unibz) smart(x)) means that everyone is at Unibz and everyone is smart! Similarly, the main connective in use with is Example: someone at Unibz is smart is translated as X(at(X, unibz) smart(x)) Note that the formula X(at(X, unibz) smart(x)) means that there is someone who either is not at Unibz or is smart (or both)! Computational Logic Davide Martinenghi (13/26)
14 FOL - syntax An expression is either a term or a formula A subterm of an expression E is a substring of E which is also a term in the same language If t is a subterm of E, then it is said that t occurs in E Every term is a subterm of itself; so a subterm t of s is a proper subterm if t s Computational Logic Davide Martinenghi (14/26)
15 FOL - syntax VAR(E) denotes the set of variables occurring in E; if VAR(E) = then E is said to be ground If QX(F) is a formula, and Q a quantifier, then F is said to be the scope of Q, and Q is said to be applied to F An occurrence of a variable in a formula is bound iff its occurrence is within the scope of a quantifier employing the variable It is bound by the quantifier of smallest scope that causes it to be bound Otherwise it is free Example: X( Y(p(X, Y) q(x, Y))) A formula is closed iff it does not contain free occurrences of variables; closed formulas are also called sentences The universal closure of a formula F is obtained by adding as a prefix a universal quantifier for each free variable occurring in F, commonly indicated as (F) Similarly, the existential closure of F is written as (F) Computational Logic Davide Martinenghi (15/26)
16 FOL - syntax Substitutions A substitution θ is a finite set of pairs of terms {X 1 /t 1,..., X n /t n }, where each t i is a term and each X i a variable such that X i t i and X i X j if i j Substitutions are usually denoted by θ, ρ, σ... The identity mapping {}, or ɛ is called the empty substitution A pair X/t is called a binding A substitution {X 1 /Y 1,..., X n /Y n } is a renaming iff Y 1,..., Y n is a permutation of X 1,..., X n Example: θ = {X/f(Y, Z), Y/g(h(W), a)} is a substitution but not a renaming Example: σ = {X/Y, Y/Z, Z/X} is a renaming substitution Computational Logic Davide Martinenghi (16/26)
17 FOL - syntax Substitutions Let θ = {X 1 /t 1,..., X n /t n } be a substitution, and V a set of variables then DOM(θ) denotes the set {X1,..., X n } RANGE(θ) denotes the set {t1,..., t n } VRANGE(θ) denotes the set of variables occurring in RANGE(θ) VAR(θ) = DOM(θ) VRANGE(θ) θ V = {X/t θ X V} is the restriction of θ to V Computational Logic Davide Martinenghi (17/26)
18 FOL - syntax Substitutions The application Eθ of a substitution θ to an expression E is the expression obtained by simultaneously replacing each occurrence of a variable X by term t whenever X/t θ Eθ is called an instance of E θ is said to be a grounding substitution for E if Eθ is ground If θ is a renaming substitution, then Eθ is called a variant of E Examples: term substitution instance {}}{{}}{{}}{ p(f(x, Z), f(y, a)) {X/a, Y/Z, W/b}= p(f(a, Z), f(z, a)) term substitution instance {}}{{}}{{}}{ p(x, Y) {X/f(Y), Y/b}= p(f(y), b) Computational Logic Davide Martinenghi (18/26)
19 FOL - syntax Substitutions Let θ and σ be two substitutions, then their composition θσ is the substitution {X/tσ X/t θ and X tσ} {Y/t σ Y DOM(θ)} Example: {X/f(Z), Y/W}{X/a, Z/a, W/Y} = {X/f(a), Z/a, W/Y} Composition of substitutions is associative: E(θσ) = (Eθ)σ (θσ)γ = θ(σγ) Composition has ɛ both as left and as right identity ɛθ = θɛ = θ However, composition is not commutative A substitution θ is idempotent iff θθ = θ It turns out that θ is idempotent iff DOM(θ) RANGE(θ) = Computational Logic Davide Martinenghi (19/26)
20 FOL - semantics As PL, FOL has a two-valued semantics based on the notion of interpretation An interpretation I of an alphabet A is a non-empty domain D (also indicated I ) and a mapping that associates each constant c A with an element ci D each function symbol f/n A with a function f I : D n D n times {}}{ each predicate symbol p/n A with a relation pi D... D However, before assigning meaning to formulas, the meaning of terms has to be defined Since terms may contain variables, a valuation (aka state) is needed, i.e., a mapping from variables of A to I The meaning φ I (t) of a term t under interpretation I and valuation φ is then inductively defined as ci if t is a constant c φ(x) if t is a variable X f I (φ I (t 1 ),..., φ I (t n )) if t is of the form f(t 1,..., t n ) Computational Logic Davide Martinenghi (20/26)
21 FOL - semantics Example: consider the term g(f(c), X) Let I be an interpretation with I = N and such that Constants: c I = 0 Functions: fi (x) = 1 + x (successor), g I (x, y) = x + y (addition) Let φ be a valuation such that φ(x) = 0 Then φ I (g(f(c), X)) = φ I (f(c)) + φ I (X) = (1 + φ I (c)) + φ(x) = (1 + 0) + 0 = 1 The same term can have different meanings. Take, e.g. I = persons in the Bible c I = Abel f I (x) = father of x, g I (x, y) = firstborn of x and y and a valuation φ such that φ(x) = Eve Eventually you get that φi (g(f(c), X)) = Cain Computational Logic Davide Martinenghi (21/26)
22 FOL - semantics Let φ be a valuation, X a variable, I an interpretation, and c I I Then φ[x c I ] is a valuation identical to φ except that it maps X to c I The meaning of a formula is a truth value that is defined inductively as follows We write I = φ F to indicate that F is true wrt. I and φ I = φ p(t 1,..., t n ) iff φ I (t 1 ),..., φ I (t n ) p I I = φ ( F) iff I = φ F I = φ (F G) iff I = φ F and I = φ G I = φ (F G) iff I = φ F or I = φ G I = φ (F G) iff I = φ F or I = φ G I = φ (F G) iff I = φ (F G) and I = φ (G F) I = φ ( X(F)) iff I = φ[x ci ] F for every c I I I = φ ( X(F)) iff I = φ[x ci ] F for some c I I Computational Logic Davide Martinenghi (22/26)
23 FOL - semantics If F is a sentence, its meaning only depends on the interpretation The valuation will then be omitted when considering sentences Commonly, in logic programming, formulas are implicitly considered as universally quantified, i.e., whenever there are free variables, the universal closure is considered instead An interpretation I is said to be a model for F, written I = F, iff for every valuation φ we have that I = φ F If F is a set of formulas, an interpretation is a model of F iff it is a model for each F F Computational Logic Davide Martinenghi (23/26)
24 FOL - semantics Example (cont d) Let I be an interpretation with I = N and such that Constants: ci = 0 Functions: fi (x) = 1 + x (successor) Predicates: pi = { 1, 3, 5,...} Then the meaning of the formula p(c) p(f(c)) in I is as follows I = p(c) p(f(c)) iff I = p(c) and I = p(f(c)) iff φ I (c) p I and φ I (f(c)) p I iff φ I (c) p I and 1 + φ I (c) p I iff 0 p I and 1 p I Now, 1 p I but 0 p I, so I is not a model for the formula Computational Logic Davide Martinenghi (24/26)
25 FOL - semantics The logical entailment = relation between sets of formulas and formulas can be extended to FOL and so can the concepts of validity, satisfiability, falsifiability, contingency, and unsatisfiability The deduction theorem and the theorem relating validity with unsatisfiability through negation also apply to FOL closed formulas In contrast to PL, the question of whether a FOL formula is a logical consequence of a set of formulas is undecidable This can be formally shown by reducing some known undecidable problem (like the halting problem for Turing machines) to logical entailment in FOL However, logical entailment in FOL is semidecidable Computational Logic Davide Martinenghi (25/26)
26 FOL - semantics Equivalences The equivalences shown for PL can be extended to FOL Some additional equivalences for FOL: X(F) ( X( F)) quantifier duality 1 (1) X(F) ( X( F)) quantifier duality 2 (2) X(F) ( X)G X(F G) (3) X(F) ( X)G X(F G) (4) ( X)( Y)F ( Y)( X)F (5) ( X)( Y)F ( Y)( X)F (6) ( X(F)) G X(F G) (7) ( X(F)) G X(F G) (8) ( X(F)) G X(F G) (9) ( X(F)) G X(F G) (10) only applies if X does not occur free in G Computational Logic Davide Martinenghi (26/26)
3 Propositional Logic
3 Propositional Logic 3.1 Syntax 3.2 Semantics 3.3 Equivalence and Normal Forms 3.4 Proof Procedures 3.5 Properties Propositional Logic (25th October 2007) 1 3.1 Syntax Definition 3.0 An alphabet Σ consists
More informationWhen describing some state of affairs in the real world we often use declarative 1 sentences
Chapter 1 Preliminaries 1.1 Logic Formulas When describing some state of affairs in the real world we often use declarative 1 sentences like: (i) Every mother loves her children (ii) Mary is a mother and
More informationComputational Logic Automated Deduction Fundamentals
Computational Logic Automated Deduction Fundamentals 1 Elements of First-Order Predicate Logic First Order Language: An alphabet consists of the following classes of symbols: 1. variables denoted by X,
More informationThe non-logical symbols determine a specific F OL language and consists of the following sets. Σ = {Σ n } n<ω
1 Preliminaries In this chapter we first give a summary of the basic notations, terminology and results which will be used in this thesis. The treatment here is reduced to a list of definitions. For the
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 informationFirst-Order Logic (FOL)
First-Order Logic (FOL) Also called Predicate Logic or Predicate Calculus 2. First-Order Logic (FOL) FOL Syntax variables x, y, z, constants a, b, c, functions f, g, h, terms variables, constants or n-ary
More informationOutline. Formale Methoden der Informatik First-Order Logic for Forgetters. Why PL1? Why PL1? Cont d. Motivation
Outline Formale Methoden der Informatik First-Order Logic for Forgetters Uwe Egly Vienna University of Technology Institute of Information Systems Knowledge-Based Systems Group Motivation Syntax of PL1
More informationFirst-Order Predicate Logic. Basics
First-Order Predicate Logic Basics 1 Syntax of predicate logic: terms A variable is a symbol of the form x i where i = 1, 2, 3.... A function symbol is of the form fi k where i = 1, 2, 3... und k = 0,
More informationSyntax. Notation Throughout, and when not otherwise said, we assume a vocabulary V = C F P.
First-Order Logic Syntax The alphabet of a first-order language is organised into the following categories. Logical connectives:,,,,, and. Auxiliary symbols:.,,, ( and ). Variables: we assume a countable
More informationAAA615: Formal Methods. Lecture 2 First-Order Logic
AAA615: Formal Methods Lecture 2 First-Order Logic Hakjoo Oh 2017 Fall Hakjoo Oh AAA615 2017 Fall, Lecture 2 September 24, 2017 1 / 29 First-Order Logic An extension of propositional logic with predicates,
More informationComputational Logic. Recall of First-Order Logic. Damiano Zanardini
Computational Logic Recall of First-Order Logic Damiano Zanardini UPM European Master in Computational Logic (EMCL) School of Computer Science Technical University of Madrid damiano@fi.upm.es Academic
More informationCS156: The Calculus of Computation Zohar Manna Winter 2010
Page 3 of 35 Page 4 of 35 quantifiers CS156: The Calculus of Computation Zohar Manna Winter 2010 Chapter 2: First-Order Logic (FOL) existential quantifier x. F [x] there exists an x such that F [x] Note:
More informationPredicate Logic: Sematics Part 1
Predicate Logic: Sematics Part 1 CS402, Spring 2018 Shin Yoo Predicate Calculus Propositional logic is also called sentential logic, i.e. a logical system that deals with whole sentences connected with
More informationA Little Logic. Propositional Logic. Satisfiability Problems. Solving Sudokus. First Order Logic. Logic Programming
A Little Logic International Center for Computational Logic Technische Universität Dresden Germany Propositional Logic Satisfiability Problems Solving Sudokus First Order Logic Logic Programming A Little
More informationPropositional and Predicate Logic. jean/gbooks/logic.html
CMSC 630 February 10, 2009 1 Propositional and Predicate Logic Sources J. Gallier. Logic for Computer Science, John Wiley and Sons, Hoboken NJ, 1986. 2003 revised edition available on line at http://www.cis.upenn.edu/
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 informationFirst Order Logic (FOL) 1 znj/dm2017
First Order Logic (FOL) 1 http://lcs.ios.ac.cn/ znj/dm2017 Naijun Zhan March 19, 2017 1 Special thanks to Profs Hanpin Wang (PKU) and Lijun Zhang (ISCAS) for their courtesy of the slides on this course.
More informationIntroduction to Logic in Computer Science: Autumn 2006
Introduction to Logic in Computer Science: Autumn 2006 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Plan for Today Today s class will be an introduction
More informationPredicate Logic. CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University
Predicate Logic CSE 595 Semantic Web Instructor: Dr. Paul Fodor Stony Brook University http://www3.cs.stonybrook.edu/~pfodor/courses/cse595.html 1 The alphabet of predicate logic Variables Constants (identifiers,
More informationLogic: First Order Logic (Part I)
Logic: First Order 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 informationTHE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16)
THE LANGUAGE OF FIRST-ORDER LOGIC (FOL) Sec2 Sec1(1-16) FOL: A language to formulate knowledge Logic is the study of entailment relationslanguages, truth conditions and rules of inference. FOL or Predicate
More informationDefinite Logic Programs: Derivation and Proof Trees. CSE 505 Computing with Logic Stony Brook University
Definite Logic Programs: Derivation and Proof Trees CSE 505 Computing with Logic Stony Brook University http://www.cs.stonybrook.edu/~cse505 1 Refutation in Predicate Logic parent(pam, bob). parent(tom,
More informationFirst-Order Logic First-Order Theories. Roopsha Samanta. Partly based on slides by Aaron Bradley and Isil Dillig
First-Order Logic First-Order Theories Roopsha Samanta Partly based on slides by Aaron Bradley and Isil Dillig Roadmap Review: propositional logic Syntax and semantics of first-order logic (FOL) Semantic
More informationPropositional Logic: Models and Proofs
Propositional Logic: Models and Proofs C. R. Ramakrishnan CSE 505 1 Syntax 2 Model Theory 3 Proof Theory and Resolution Compiled at 11:51 on 2016/11/02 Computing with Logic Propositional Logic CSE 505
More informationPart 2: First-Order Logic
Part 2: First-Order Logic First-order logic formalizes fundamental mathematical concepts is expressive (Turing-complete) is not too expressive (e. g. not axiomatizable: natural numbers, uncountable sets)
More informationAutomated Reasoning Lecture 5: First-Order Logic
Automated Reasoning Lecture 5: First-Order Logic Jacques Fleuriot jdf@inf.ac.uk Recap Over the last three lectures, we have looked at: Propositional logic, semantics and proof systems Doing propositional
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 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 (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 information06 From Propositional to Predicate Logic
Martin Henz February 19, 2014 Generated on Wednesday 19 th February, 2014, 09:48 1 Syntax of Predicate Logic 2 3 4 5 6 Need for Richer Language Predicates Variables Functions 1 Syntax of Predicate Logic
More informationIntroduction to Logic in Computer Science: Autumn 2007
Introduction to Logic in Computer Science: Autumn 2007 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam Ulle Endriss 1 Tableaux for First-order Logic The next part of
More informationSyntax of FOL. Introduction to Logic in Computer Science: Autumn Tableaux for First-order Logic. Syntax of FOL (2)
Syntax of FOL Introduction to Logic in Computer Science: Autumn 2007 Ulle Endriss Institute for Logic, Language and Computation University of Amsterdam The syntax of a language defines the way in which
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 7: Validity Proofs and Properties of FOL. Motivation for semantic argument method
Overview CS389L: Automated Logical Reasoning Lecture 7: Validity Proofs and Properties of FOL Agenda for today: Semantic argument method for proving FOL validity Işıl Dillig Important properties of FOL
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 informationFirst-Order Logic. Chapter Overview Syntax
Chapter 10 First-Order Logic 10.1 Overview First-Order Logic is the calculus one usually has in mind when using the word logic. It is expressive enough for all of mathematics, except for those concepts
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 informationIntelligent Agents. First Order Logic. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: 19.
Intelligent Agents First Order Logic Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: 19. Mai 2015 U. Schmid (CogSys) Intelligent Agents last change: 19. Mai 2015
More informationIntroduction to first-order logic:
Introduction to first-order logic: First-order structures and languages. Terms and formulae in first-order logic. Interpretations, truth, validity, and satisfaction. Valentin Goranko DTU Informatics September
More informationClassical First-Order Logic
Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2008/2009 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2008/09
More information03 Review of First-Order Logic
CAS 734 Winter 2014 03 Review of First-Order Logic William M. Farmer Department of Computing and Software McMaster University 18 January 2014 What is First-Order Logic? First-order logic is the study of
More informationLogic: The Big Picture
Logic: The Big Picture A typical logic is described in terms of syntax: what are the legitimate formulas semantics: under what circumstances is a formula true proof theory/ axiomatization: rules for proving
More informationhttps://vu5.sfc.keio.ac.jp/slide/
1 FUNDAMENTALS OF LOGIC NO.7 PREDICATE LOGIC Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical Connectives (,,, ) Truth Table Tautology
More informationDiscrete Mathematics and Its Applications
Discrete Mathematics and Its Applications Lecture 1: The Foundations: Logic and Proofs (1.3-1.5) MING GAO DASE @ ECNU (for course related communications) mgao@dase.ecnu.edu.cn Sep. 19, 2017 Outline 1 Logical
More informationLogic. Foundations of First Order Logic. franconi. Enrico Franconi
(1/41) Logic Foundations of First Order Logic Enrico Franconi franconi@inf.unibz.it http://www.inf.unibz.it/ franconi Faculty of Computer Science, Free University of Bozen-Bolzano (2/41) Motivation We
More informationReasoning. Inference. Knowledge Representation 4/6/2018. User
Reasoning Robotics First-order logic Chapter 8-Russel Representation and Reasoning In order to determine appropriate actions to take, an intelligent system needs to represent information about the world
More information4 Predicate / First Order Logic
4 Predicate / First Order Logic 4.1 Syntax 4.2 Substitutions 4.3 Semantics 4.4 Equivalence and Normal Forms 4.5 Unification 4.6 Proof Procedures 4.7 Implementation of Proof Procedures 4.8 Properties First
More informationFirst order logic. Example The deduction of statements: This reasoning is intuitively correct. Every man is mortal. Since Ade is a man, he is mortal.
First Order Logic In the propositional logic, the most basic elements are atoms. Through atoms we build up formulas. We then use formulas to express various complex ideas. In this simple logic, an atom
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 informationHerbrand Theorem, Equality, and Compactness
CSC 438F/2404F Notes (S. Cook and T. Pitassi) Fall, 2014 Herbrand Theorem, Equality, and Compactness The Herbrand Theorem We now consider a complete method for proving the unsatisfiability of sets of first-order
More informationA Logic Primer. Stavros Tripakis University of California, Berkeley
EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2015 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,
More informationComputational Logic. Davide Martinenghi. Spring Free University of Bozen-Bolzano. Computational Logic Davide Martinenghi (1/30)
Computational Logic Davide Martinenghi Free University of Bozen-Bolzano Spring 2010 Computational Logic Davide Martinenghi (1/30) Propositional Logic - sequent calculus To overcome the problems of natural
More informationPredicate Calculus. Formal Methods in Verification of Computer Systems Jeremy Johnson
Predicate Calculus Formal Methods in Verification of Computer Systems Jeremy Johnson Outline 1. Motivation 1. Variables, quantifiers and predicates 2. Syntax 1. Terms and formulas 2. Quantifiers, scope
More information1 FUNDAMENTALS OF LOGIC NO.10 HERBRAND THEOREM Tatsuya Hagino hagino@sfc.keio.ac.jp lecture URL https://vu5.sfc.keio.ac.jp/slide/ 2 So Far Propositional Logic Logical connectives (,,, ) Truth table Tautology
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 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 informationResolution for Predicate Logic
Logic and Proof Hilary 2016 James Worrell Resolution for Predicate Logic A serious drawback of the ground resolution procedure is that it requires looking ahead to predict which ground instances of clauses
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 informationMathematics 114L Spring 2018 D.A. Martin. Mathematical Logic
Mathematics 114L Spring 2018 D.A. Martin Mathematical Logic 1 First-Order Languages. Symbols. All first-order languages we consider will have the following symbols: (i) variables v 1, v 2, v 3,... ; (ii)
More informationNotation for Logical Operators:
Notation for Logical Operators: always true always false... and...... or... if... then...... if-and-only-if... x:x p(x) x:x p(x) for all x of type X, p(x) there exists an x of type X, s.t. p(x) = is equal
More informationClassical First-Order Logic
Classical First-Order Logic Software Formal Verification Maria João Frade Departmento de Informática Universidade do Minho 2009/2010 Maria João Frade (DI-UM) First-Order Logic (Classical) MFES 2009/10
More informationCS1021. Why logic? Logic about inference or argument. Start from assumptions or axioms. Make deductions according to rules of reasoning.
3: Logic Why logic? Logic about inference or argument Start from assumptions or axioms Make deductions according to rules of reasoning Logic 3-1 Why logic? (continued) If I don t buy a lottery ticket on
More informationPropositional Logic: Syntax
Logic Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and programs) epistemic
More information7. Propositional Logic. Wolfram Burgard and Bernhard Nebel
Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics
More informationLogic: First Order Logic
Logic: First Order Logic Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06
More informationA Logic Primer. Stavros Tripakis University of California, Berkeley. Stavros Tripakis (UC Berkeley) EE 144/244, Fall 2014 A Logic Primer 1 / 35
EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2014 A Logic Primer Stavros Tripakis University of California, Berkeley Stavros Tripakis (UC Berkeley) EE 144/244,
More informationFormal (Natural) Deduction for Predicate Calculus
Formal (Natural) Deduction for Predicate Calculus Lila Kari University of Waterloo Formal (Natural) Deduction for Predicate Calculus CS245, Logic and Computation 1 / 42 Formal deducibility for predicate
More informationJ Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2
Propositional logic First-Order Logic Russell and Norvig Chapter 8 J Propositional logic is declarative J Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and
More informationGS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen Anthony Hall
GS03/4023: Validation and Verification Predicate Logic Jonathan P. Bowen www.cs.ucl.ac.uk/staff/j.bowen/gs03 Anthony Hall GS03 W1 L3 Predicate Logic 12 January 2007 1 Overview The need for extra structure
More informationInformal Statement Calculus
FOUNDATIONS OF MATHEMATICS Branches of Logic 1. Theory of Computations (i.e. Recursion Theory). 2. Proof Theory. 3. Model Theory. 4. Set Theory. Informal Statement Calculus STATEMENTS AND CONNECTIVES Example
More informationChapter 3. SLD-Resolution. 3.1 Informal Introduction
Chapter 3 SLD-Resolution This chapter introduces the inference mechanism which is the basis of most logic programming systems. The idea is a special case of the inference rule called the resolution principle
More informationSection Summary. Section 1.5 9/9/2014
Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers Translated
More informationPropositional logic. First order logic. Alexander Clark. Autumn 2014
Propositional logic First order logic Alexander Clark Autumn 2014 Formal Logic Logical arguments are valid because of their form. Formal languages are devised to express exactly that relevant form and
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 informationAutomated Reasoning in First-Order Logic
Automated Reasoning in First-Order Logic Peter Baumgartner http://users.cecs.anu.edu.au/~baumgart/ 7/11/2011 Automated Reasoning in First-Order Logic... First-Order Logic Can express (mathematical) structures,
More informationExamples: P: it is not the case that P. P Q: P or Q P Q: P implies Q (if P then Q) Typical formula:
Logic: The Big Picture Logic is a tool for formalizing reasoning. There are lots of different logics: probabilistic logic: for reasoning about probability temporal logic: for reasoning about time (and
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 informationMAI0203 Lecture 7: Inference and Predicate Calculus
MAI0203 Lecture 7: Inference and Predicate Calculus Methods of Artificial Intelligence WS 2002/2003 Part II: Inference and Knowledge Representation II.7 Inference and Predicate Calculus MAI0203 Lecture
More informationLogic for Computer Scientists
Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Winter Quarter 2011 Wright State University, Dayton, OH, U.S.A. [final version: 03/10/2011] Contents 1 Propositional
More informationLogic for Computer Scientists
Logic for Computer Scientists Pascal Hitzler http://www.pascal-hitzler.de CS 499/699 Lecture, Spring Quarter 2010 Wright State University, Dayton, OH, U.S.A. Final version. Contents 1 Propositional Logic
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 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 informationModal Logics. Most applications of modal logic require a refined version of basic modal logic.
Modal Logics Most applications of modal logic require a refined version of basic modal logic. Definition. A set L of formulas of basic modal logic is called a (normal) modal logic if the following closure
More informationHandout: Proof of the completeness theorem
MATH 457 Introduction to Mathematical Logic Spring 2016 Dr. Jason Rute Handout: Proof of the completeness theorem Gödel s Compactness Theorem 1930. For a set Γ of wffs and a wff ϕ, we have the following.
More informationTHE LOGIC OF QUANTIFIED STATEMENTS. Predicates and Quantified Statements I. Predicates and Quantified Statements I CHAPTER 3 SECTION 3.
CHAPTER 3 THE LOGIC OF QUANTIFIED STATEMENTS SECTION 3.1 Predicates and Quantified Statements I Copyright Cengage Learning. All rights reserved. Copyright Cengage Learning. All rights reserved. Predicates
More information22c:145 Artificial Intelligence. First-Order Logic. Readings: Chapter 8 of Russell & Norvig.
22c:145 Artificial Intelligence First-Order Logic Readings: Chapter 8 of Russell & Norvig. Einstein s Puzzle in Logic We used propositinal variables to specify everything: x 1 = house #1 is red ; x 2 =
More informationFirst-Order Logic. 1 Syntax. Domain of Discourse. FO Vocabulary. Terms
First-Order Logic 1 Syntax Domain of Discourse The domain of discourse for first order logic is FO structures or models. A FO structure contains Relations Functions Constants (functions of arity 0) FO
More informationG52DOA - Derivation of Algorithms Predicate Logic
G52DOA - Derivation of Algorithms Predicate Logic Venanzio Capretta Predicate Logic So far, we studied propositional logic, in which we started with unspecified propositional variables A, B, C, and combined
More informationLogic: Propositional Logic Truth Tables
Logic: Propositional Logic Truth Tables Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06
More informationNotes. Corneliu Popeea. May 3, 2013
Notes Corneliu Popeea May 3, 2013 1 Propositional logic Syntax We rely on a set of atomic propositions, AP, containing atoms like p, q. A propositional logic formula φ Formula is then defined by the following
More informationCS2742 midterm test 2 study sheet. Boolean circuits: Predicate logic:
x NOT ~x x y AND x /\ y x y OR x \/ y Figure 1: Types of gates in a digital circuit. CS2742 midterm test 2 study sheet Boolean circuits: Boolean circuits is a generalization of Boolean formulas in which
More informationReasoning with Quantified Boolean Formulas
Reasoning with Quantified Boolean Formulas Martina Seidl Institute for Formal Models and Verification Johannes Kepler University Linz 1 What are QBF? Quantified Boolean formulas (QBF) are formulas of propositional
More informationLogic: First Order Logic
Logic: First Order Logic Raffaella Bernardi bernardi@inf.unibz.it P.zza Domenicani 3, Room 2.28 Faculty of Computer Science, Free University of Bolzano-Bozen http://www.inf.unibz.it/~bernardi/courses/logic06
More informationAlgebraizing Hybrid Logic. Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation
Algebraizing Hybrid Logic Evangelos Tzanis University of Amsterdam Institute of Logic, Language and Computation etzanis@science.uva.nl May 1, 2005 2 Contents 1 Introduction 5 1.1 A guide to this thesis..........................
More informationApplied Logic. Lecture 1 - Propositional logic. Marcin Szczuka. Institute of Informatics, The University of Warsaw
Applied Logic Lecture 1 - Propositional logic Marcin Szczuka Institute of Informatics, The University of Warsaw Monographic lecture, Spring semester 2017/2018 Marcin Szczuka (MIMUW) Applied Logic 2018
More informationFirst Order Logic (FOL)
First Order Logic (FOL) Testing, Quality Assurance, and Maintenance Winter 2018 Prof. Arie Gurfinkel based on slides by Prof. Ruzica Piskac, Nikolaj Bjorner, and others References Chpater 2 of Logic for
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents
More informationA MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ
A MODEL-THEORETIC PROOF OF HILBERT S NULLSTELLENSATZ NICOLAS FORD Abstract. The goal of this paper is to present a proof of the Nullstellensatz using tools from a branch of logic called model theory. In
More informationFoundations of Artificial Intelligence
Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016
More informationFirst-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say:
Propositional logic First-Order Logic Russell and Norvig Chapter 8 Propositional logic is declarative Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of
More informationExercises 1 - Solutions
Exercises 1 - Solutions SAV 2013 1 PL validity For each of the following propositional logic formulae determine whether it is valid or not. If it is valid prove it, otherwise give a counterexample. Note
More information