Predicate Logic. M.A.Galán, TDBA64, VT-03

Similar documents
Predicate Logic. For example, consider the following argument:

Predicate Logic. Example: All men are mortal. Socrates is a man. Socrates is mortal.

2. The Language of First-order Logic

The Syntax of Predicate Logic

Predicate logic Proofs Artificial intelligence. Predicate logic. SET07106 Mathematics for Software Engineering

(LMCS, p. 317) V.1. First Order Logic. This is the most powerful, most expressive logic that we will examine.

CHAPTER 3. Methods of Proofs. 1. Logical Arguments and Formal Proofs

Propositional Logic. A proposition is a declarative sentence (a sentence that declares a fact) that is either true or false, but not both.

Fixed-Point Logics and Computation

Relational Calculus. Module 3, Lecture 2. Database Management Systems, R. Ramakrishnan 1

Introduction to tuple calculus Tore Risch

A Knowledge-based System for Translating FOL Formulas into NL Sentences

CS510 Software Engineering

Likewise, we have contradictions: formulas that can only be false, e.g. (p p).

Predicate Logic Review

A Beginner s Guide to Modern Set Theory

Computational Logic and Cognitive Science: An Overview

! " # The Logic of Descriptions. Logics for Data and Knowledge Representation. Terminology. Overview. Three Basic Features. Some History on DLs

Lecture 8: Resolution theorem-proving

Artificial Intelligence

ON FUNCTIONAL SYMBOL-FREE LOGIC PROGRAMS

First-Order Stable Model Semantics and First-Order Loop Formulas

Lecture 13 of 41. More Propositional and Predicate Logic

Type Theory & Functional Programming

FUNDAMENTALS OF ARTIFICIAL INTELLIGENCE KNOWLEDGE REPRESENTATION AND NETWORKED SCHEMES

Aikaterini Marazopoulou

Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Formalization of the CRM: Initial Thoughts

Invalidity in Predicate Logic

If an English sentence is ambiguous, it may allow for more than one adequate transcription.

Certamen 1 de Representación del Conocimiento

Beyond Propositional Logic Lukasiewicz s System

Handout #1: Mathematical Reasoning

Chapter 3. Cartesian Products and Relations. 3.1 Cartesian Products

Introduction to Symbolic Logic Vaishali Khandekar, PhD Course Description: PREREQUISITE(S): CO-REQUISITE(S): FREQUENT REQUISITES

Schedule. Logic (master program) Literature & Online Material. gic. Time and Place. Literature. Exercises & Exam. Online Material

CHAPTER 7 GENERAL PROOF SYSTEMS

The Modal Logic Programming System MProlog

24. PARAPHRASING COMPLEX STATEMENTS

Schema Mappings and Data Exchange

First-Order Logics and Truth Degrees

A Problem Course in Mathematical Logic Version 1.6. Stefan Bilaniuk

Repair Checking in Inconsistent Databases: Algorithms and Complexity

Lecture 16 : Relations and Functions DRAFT

Relations: their uses in programming and computational specifications

EQUATIONAL LOGIC AND ABSTRACT ALGEBRA * ABSTRACT

Introducing Formal Methods. Software Engineering and Formal Methods

Analyzing Piecewise Functions

SPARQL: Un Lenguaje de Consulta para la Web

Predicate logic. Logic in computer science. Logic in Computer Science (lecture) PART II. first order logic

Overview of the TACITUS Project

Teaching Formal Methods for Computational Linguistics at Uppsala University

3. Mathematical Induction

Math 223 Abstract Algebra Lecture Notes

10.4 Traditional Subject Predicate Propositions

Midterm Practice Problems

Rules of Inference Friday, January 18, 2013 Chittu Tripathy Lecture 05

Temporal Logics. Computation Tree Logic

Computational Methods for Database Repair by Signed Formulae

1 Propositions. mcs-ftl 2010/9/8 0:40 page 5 #11. Definition. A proposition is a statement that is either true or false.

Nombre: Today is Monday. Yesterday was. Tomorrow will be. Today is Friday. Yesterday was. Tomorrow will be. Today is Wednesday.

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 2

(a) Write each of p and q as a polynomial in x with coefficients in Z[y, z]. deg(p) = 7 deg(q) = 9

Neighborhood Data and Database Security

Summary Last Lecture. Automated Reasoning. Outline of the Lecture. Definition sequent calculus. Theorem (Normalisation and Strong Normalisation)

Bindings, mobility of bindings, and the -quantifier

Sentence Types. Simple Compound Complex Compound-Complex

On strong fairness in UNITY

COMPUTER SCIENCE TRIPOS

This asserts two sets are equal iff they have the same elements, that is, a set is determined by its elements.

Monitoring Metric First-order Temporal Properties

First-order logic. Chapter 8. Chapter 8 1

AUTOMATED REASONING SLIDES 3: RESOLUTION The resolution rule Unification Refutation by resolution Factoring Clausal Form and Skolemisation

SQL Database queries and their equivalence to predicate calculus

Logic is a systematic way of thinking that allows us to deduce new information

Relational Methodology for Data Mining and Knowledge Discovery

Fun with Henry. Dirk Pattinson Department of Computing Imperial College London

Mathematical Induction

Mathematical Induction. Lecture 10-11

Rigorous Software Development CSCI-GA

Lecture Notes in Discrete Mathematics. Marcel B. Finan Arkansas Tech University c All Rights Reserved

Deductive reasoning is the application of a general statement to a specific instance.

Paraphrasing controlled English texts

µz An Efficient Engine for Fixed points with Constraints

Computational Semantics, Type Theory, and Functional Programming

GRAPH THEORY LECTURE 4: TREES

Transcription:

Predicate Logic 1

Introduction There are certain arguments that seem to be perfectly logical, yet they cannot be specified by using propositional logic. All cats have tails. Tom is a cat. From these two sentences, one should be able to conclude that Tom has a tail. 2

Introduction Generally, predicates are used to describe certain properties or relationships between individuals or objects. In addition to predicates one uses terms and quantifiers. Mary and Anne are sisters. All cats have tails. Predicate calculus is a generalization of propositional calculus. 3

Syntax: Symbols. constants: a, b, c,... variables: x, y, z,... function symbols: f, g, h,... predicate symbols: p, q, r,... logical connectives:,,, quantifiers: (for all), (there exists) parenthesis and comas 4

Predicates Generally, predicates make statements about individuals. In predicate calculus, each predicate is given a name, which is followed by the list of arguments. The list of arguments is enclosed in parentheses. To express Jane is the mother of Mary, one would choose an identifier, say mother, to express the predicate is mother of and one would write mother(jane, Mary) Note that the order of the arguments is important. The number of elements in the predicate list is called the arity of the predicate. The arity of a predicate is fixed. 5

Predicates A predicate name, followed by an argument list in parentheses, is called an atomic formula. The atomic formulas are statements, and they can be combined by logical connectives. For instance, to express the fact that Jane is the mother of Mary, one can use the atomic formula mother(jane, Mary), and this statement can be part of some compound statement, such as mother(jane, Mary) mother(mary, Jane) 6

Variables Often, one does not want to associate the arguments of an atomic formula with a particular individual. To avoid this, variables are used. cat(x) hastail(x) Syntactically, one can use variables in any place where one is allowed to use constants. The word term is used to refer to anything that can be used in place of an individual. 7

Syntax for terms The set T of all terms is defined as follows: Every constant is a term. Every variable is a term. If f is a function symbol with arity n and s 1, s 2,..., s n are terms, then f(s 1, s 2,..., s n ) is also a term. 8

Well formed formulas Every atomic expression p(s 1,..., s n ) where p is a predicate symbol of arity n and s 1... s n are terms, is a wff. If P and Q are wffs so are P, P Q, P Q, P Q. If P is a wff and x is a variable, x P and x P are wffs. No other expression is a wff. 9

Quantifiers All cats have tails Some people like going to the cinema These statements indicate how frequently certain things are true. In predicate calculus, one uses quantifiers in this context. The universal quantifier indicates that something is true for all individuals. The existential quantifier indicates that a statement is true for some individuals. 10

Universal quantifier Let P be an expression, and let x represent a variable. If we want to indicate that P is true for all possible values of x, we write x P. Here x is called the universal quantifier and P the scope of the quantifier. The variable x is said to be bound by the quantifier. The symbol is pronounced for all Example: Everyone gets a break once in a while x getsbreak(x) 11

Existential quantifier Let P be an expression, and let x represent a variable. If we want to indicate that P is true for at least one value of x, we write x P. This statement is pronounced there exists an x such that P. Here x is called the existential quantifier, and P is called the scope of the existential quantifier. The variable x is said to be bound by the quantifier. Example: Some objects are blue x blue(x) 12

Free variables Any variable that is not bound is said to be free. In the formula, z (p(z) q(x)) y q(y) only the variable x is free. All occurrences of z are bound, and so are all occurrences of the variable y. 13

Precedence rules Same rules as in propositional logic but the quantifiers are given a higher precedence than all the rest of the connectives. Consider the predicates p(x) = x is living and q(x) = x is dead, then x (p(x) q(x)) indicates that everything is either living or dead. x p(x) q(x) indicates that everything is living, or x is dead. 14

Semantic 1. Jane is Paul s mother. 2. Jane is Mary s mother. 3. Any two persons having the same mother are siblings. 4. Paul and Mary are siblings. There are many people named Jane and Paul, and without further information the statement Jane is Paul s mother can refer to many different people. To remove such ambiguities, we introduce the concept of domain (collection of all individuals that affect the logical argument under consideration) 15

Semantic: Interpretation An interpretation t is a mapping that to each constant a and each variable x assigns a value t(a), t(x) D (The set D is called the domain of the interpretation) to each function symbol of arity n, assigns a function f t : D n D to each predicate symbol of arity n, assigns a function p t : D n {T, F } 16

Interpretation The interpretation of a formula is defined inductively by: t(f(s 1,..., s n )) = f t (t(s 1 ),..., t(s n )) for the term f(s 1,..., s n ). t(p(s 1,..., s n )) = p t (t(s 1 ),..., t(s n )) for all atomic formula p(s 1,..., s n ). For all formula P, Q t(p Q) = t(p ) t(q) t(p Q) = t(p ) t(q) t( )P = t(p ) t(p Q) = t(p ) t(q) 17

Interpretation For all formula P t( x P ) = T if t x=d (P ) = T for all d D (otherwise is F ) t( x P ) = T if t x=d (P ) = T for a particular d D (otherwise is F ) A formula P is valid is t(p ) = T for all interpretation t. 18

Gödel s Theorems Gödel s completeness theorem There exists a sound and complete proof system for predicate logic. Gödel s incompleteness theorem For number theory (N, >, +,, 0, 1) is not possible to find a sound proof system that is complete. 19

Examples Domain= {animals} How can we express All dog are mammals? One rephrases the statement as If x is a dog, then x is a mammal. x (dog(x) mammal(x)) Generally, the sentence x (P (x) Q(x)) can be translated as All individuals with property P also have property Q 20

Examples How can we express Some dogs are brown? This statement means that there are some animals that are dogs and that are brown. The statement x is a dog and x is brown can be translated as dog(x) brown(x) There are some brown dogs can now be translated as x (dog(x) brown(x)) In general, the statement x (P (x) Q(x)) can be interpreted as Some individuals with property P also have property Q. 21

Examples Only dogs bark To convert this into predicate calculus, this must be reworded as It barks only if it is a dog or, equivalently, If it barks, then it is a dog. One has therefore x (barks(x) dog(x)) 22