2 views

Uploaded by notg

Artificial intelligence notes KRR2Notes

- lecture02 (1)
- Assignment 2
- Teach Yourself Logic Study Guide - Peter Smith (lecture).pdf
- Logics for Hybrid Systems
- Comprehension of Sentences
- 'Ought' and 'Must': Some Philosophical Therapy
- Clarifying the Notion Parameter
- Philosophy Dic
- Aidan
- Is Stalin an atheist
- Types of Data in Data Mining
- bmeyer
- t
- Jeff Heaton-Artificial Intelligence for Humans, Volume 3_ Deep Learning and Neural Networks-CreateSpace Independent Publishing Platform (2015)
- KRR1Notes
- p_acmmm15asd
- Computer Graphics All Module Notes
- Computer Graphics All Module Notes
- KRR8Notes
- deng2014large HEX GRAPH.pdf

You are on page 1of 6

First-order logic

Outline

Contents

1

Propositional logic is declarative: pieces of syntax correspond to facts

Propositional logic allows partial/disjunctive/negated information

(unlike most data structures and databases)

Propositional logic is compositional: meaning of a b is derived from meaning of a and of b

Meaning in propositional logic is context-independent (unlike natural language, where meaning depends on context)

Propositional logic has very limited expressive power (unlike natural language)

Expressiveness of propositional logic

Example 1. I want to declare:

Every friend of my sisters has a blue car

In the natural language, I need one simple sentence. What about in propositional logic?

I need symbols!! Lots of them!! Because I have a big family and my sisters are very friendly.

Sister 1 Friend 1 Has Blue Car

Sister 1 Friend 2 Has Blue Car

...

Sister 4 Friend 23 Has Blue Car

First-order logic

Whereas propositional logic assumes world contains facts, first-order logic (like natural language) assumes the world contains

Objects: people, houses, numbers, theories, colors, cricket games, centuries . . . and me, and cars!!

Relations: red, round, bogus, prime, multistoried . . ., brother of, bigger than, inside, part of, has

color, occurred after, owns, comes between, . . . and blue!!

Functions: father of, third inning of, one more than, end of . . . and friend of, sister of!!

1. Constants: KingJohn, 2, AN U, Y annick

2. Predicate: Sister, >

3. Functions: Sqrt, F riendOf

4. Variables: x, y, a, b

5. Connectives: , , , ,

6. Equality: =

7. Quantifiers:

Syntax of First-Order Logic

A term represents an object in FOL. Its syntax is:

a constant, or

a variable, or

a function of terms f unction(term1 , , termn )

An atomic sentence represents an elementary relation between terms. Its syntax is:

a predicate predicate(term1 , , termn )

an equality of terms term1 = term2

Example 2. Brother(KingJohn, RichardT heLionheart)

> (Length(Lef tLegOf (Richard)), Length(Lef tLegOf (KingJohn)))

carOf (f riendOf (oneSisterOf (Y annick))) = colorOf (Ocean)

Complex sentences are made from atomic sentences using connectives

S,

S1 S2 ,

S 1 S2 ,

S 1 S2 ,

S 1 S2

>(1, 2) Sister(M arie, Y annick) CarColor(F riendOf (M arie), blue)

Truth in first-order logic

Sentences are true with respect to a model and an interpretation.

Model contains objects (domain elements) and relations among them.

Interpretation specifies referents for

constant symbols objects

predicate symbols relations

function symbols functional relations

An atomic sentence predicate(term1 , . . . , termn ) is true iff the objects referred to by term1 , . . . , termn are in the

relation referred to by predicate.

crown

on head

brother

person

person

king

brother

$

left leg

J

left leg

Example 4.

Models for FOL: Example

Example 5. Consider the interpretation in which

Richard Richard the lionheart

John the evil King John

Brother the brotherhood relation

Under this interpretation, Brother(Richard, John) is true just in case Richard the Lionheart

and the evil King John are in the brotherhood relation in the model

Models for FOL: Example

Example 6. Consider this new interpretation on the model about Yannick and his sisters in which

Richard Yannick

John Marie

Brother the brother-sister relation

Under this interpretation, Brother(Richard, John) is true just in case Yannick and Marie are in

the brother-sister relation in the model.

This interpretation is ok but the symbols are not very well-chosen!

Universal quantification

Symbol: Syntax: < variables > < sentence > Semantics: x P is true in a model m iff P

is true with x being each possible object in the model

Example 7. Quantified sentence: x Sister(x, Y annick) ColorCar(F riendOf (x), blue)

Roughly speaking, it is equivalent to:

Sister(M arie, Y annick) ColorCar(F riendOf (M arie), Blue) Sister(Claire, Y annick) ColorCar(F riendOf (Claire), Blue

Sister(KingJohn, Y annick) ColorCar(F riendOf (KingJohn), Blue) Sister(Blue, Y annick) ColorCar(F riendOf (Blue), Bl

Sister(Y annick, Y annick) ColorCar(F riendOf (Y annick), Blue) ...

Typically, is the main connective with

Common mistake: using as the main connective with

Example 8.

x

means Everyone is the sister of Yannick and every friend of everyone has a blue car

Existential quantification

Symbol:

Syntax: < variables > < sentence >

Semantics: x P is true in the model m iff P is true with x beging some object in the model.

Example 9. Quantified sentence: x Sister(x, Y annick) ColorCar(F riendOf (x), blue)

Roughly speaking, it is equivalent to:

Sister(M arie, Y annick)ColorCar(F riendOf (M arie), Blue) Sister(Claire, Y annick)ColorCar(F riendOf (Claire), Blue)

Sister(KingJohn, Y annick)ColorCar(F riendOf (KingJohn), Blue) Sister(Blue, Y annick)ColorCar(F riendOf (Blue), Blue)

Sister(Y annick, Y annick) ColorCar(F riendOf (Y annick), Blue) ...

Typically, is the main connective with

Common mistake: using as the main connective with

Example 10.

x

This sentence is true if you find someone who is not my sister! It does not matter if this person has a blue

car or not.

Properties of quantifiers

xy is the same as yx

xy is the same as yx

xy is not the same as yx

xy

Loves(x, y)

yx

Loves(x, y)

Each quantifier can be expressed using the other

x

Example 11.

Example 12.

x, y Brother(x, y) Sibling(x, y)

Example 13.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

Example 14.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

x, y Sibling(x, y) Sibling(y, x)

Example 15.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

x, y Sibling(x, y) Sibling(y, x)

Ones mother is ones female parent

Example 16.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

x, y Sibling(x, y) Sibling(y, x)

Ones mother is ones female parent

x, y M other(x, y) (F emale(x) P arent(x, y))

Example 17.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

x, y Sibling(x, y) Sibling(y, x)

Ones mother is ones female parent

x, y M other(x, y) (F emale(x) P arent(x, y))

A first cousin is a child of a parents sibling

Example 18.

x, y Brother(x, y) Sibling(x, y)

Sibling is symmetric

x, y Sibling(x, y) Sibling(y, x)

Ones mother is ones female parent

x, y M other(x, y) (F emale(x) P arent(x, y))

A first cousin is a child of a parents sibling

x, y F irstCousin(x, y) p, ps P arent(p, x) Sibling(ps, p) P arent(ps, y)

Equality

term1 = term2 is true under a given interpretation if and only if term1 and term2 refer to the same object.

Example 19.

1 = 2 is satisfiable (if the symbols 1 and 2 refer to the same object in the interpretation)

2 = 2 is valid

Example 20. Definition of Sibling thanks to P arent:

x, y Sibling(x, y) ((x = y) m, f (m = f )

P arent(m, x) P arent(f, x) P arent(m, y) P arent(f, y))

Summary

Knowledge representation language:

declarative, compositional, expressive, context-independent, unambiguous

Model: set of objects, functions and their relation

Knowledge-base in first-order logic

careful process

1. analyzing the domain (objects, functions, relations),

2. choosing a vocabulary (interpretation)

3. encoding the axioms (what is known in KB) to support the desired inferences

- lecture02 (1)Uploaded bySaiful Rahman
- Assignment 2Uploaded bySam
- Teach Yourself Logic Study Guide - Peter Smith (lecture).pdfUploaded byDionisio
- Logics for Hybrid SystemsUploaded byCarlos Rivera
- Comprehension of SentencesUploaded byWesley Baan
- 'Ought' and 'Must': Some Philosophical TherapyUploaded byAlex Silk
- Clarifying the Notion ParameterUploaded byAntonio Codina
- Philosophy DicUploaded byCarn Joseph

- AidanUploaded bynotg
- Is Stalin an atheistUploaded bynotg
- Types of Data in Data MiningUploaded bynotg
- bmeyerUploaded bynotg
- tUploaded bynotg
- Jeff Heaton-Artificial Intelligence for Humans, Volume 3_ Deep Learning and Neural Networks-CreateSpace Independent Publishing Platform (2015)Uploaded byAdriano Carafini
- KRR1NotesUploaded bynotg
- p_acmmm15asdUploaded bynotg
- Computer Graphics All Module NotesUploaded bynotg
- Computer Graphics All Module NotesUploaded bynotg
- KRR8NotesUploaded bynotg
- deng2014large HEX GRAPH.pdfUploaded bynotg

- Crim Law reviewerUploaded byJb Gunay
- Case Digests for Mock RecitUploaded bylabellejolie
- Strahlenfolter Electronic Harassment Us Government TortureUploaded byZombieland6375
- United States v. Martha Tabares, United States v. Ramiro Ramirez, 951 F.2d 405, 1st Cir. (1991)Uploaded byScribd Government Docs
- PREPOZITII FRAZALEUploaded bygeta71
- Metro Weekly - 03-19-15 - Desiree AkhavanUploaded byMetroWeekly
- Aug 2013Uploaded bypreeti.2405
- Pennsylvania Public Health Law Bench BookUploaded bypaceminterris
- Criminal Procedure Act of TanzaniaUploaded byCamille Junio
- stories involving minorsUploaded byapi-264140833
- Colonial HistoryUploaded byjakila
- R._v._Brisson,_[2009]_B.C.J._No._2322Uploaded byJason Panagiotis
- Writ of Habeas Corpus, Amparo, DataUploaded byNeo Kigz
- 13439145Uploaded byMoon Ga
- 16187Uploaded byValaki
- 288 SCRA 542 (1998) People vs. Pimentel, G.R. No. 100210.docxUploaded byNori Lola
- BAIL.docxUploaded byRomando Marcos
- Ppmp Module GoodhopeUploaded byCikgu Wilson
- Noun ClausesUploaded byRaul
- Ruiz Amended Complaint May 31 2012Uploaded byKQED News
- SOS ChildrenUploaded byAhtisham Alam Gujjar
- African Charter on the Rights and Welfare of the Child, OAU Doc. CAB_LEG_24.9_49 (1990)Uploaded bytariqghayyur2
- parvana the bookUploaded byapi-302447167
- 3.3 Roundup-spain EnglishUploaded byأحمد أبرار
- McNulty v. California, 149 U.S. 645 (1893)Uploaded byScribd Government Docs
- AL 5-1Uploaded byoldhastonian
- Why is It Important to Vary Sentence StructureUploaded bylll
- Hermitage Capital, the Russian State and the Case of Sergei MagnitskyUploaded byHermitageCap
- Jewish Pirates and Lawyers of the Caribbean and Their Fight Against the InquisitionUploaded byJay
- 02-05-13 Teen Arrested and Facing Terrorism Charges for Rap About Boston Marathon BombingUploaded byWilliam J Greenberg