SlideShare a Scribd company logo
Truth, Deduction,
Computation
Lecture 2
First Order Languages
Vlad Patryshev
SCU
2013
In chapter 1 of LPL book...
● the world consists of existing objects
○ some of them have names
○ some of them have more than one name

● objects can participate in n-ary
relationships
○ relationships have names and arity
○ equality relationship

● functions
○ given an object, provide another object
Objects
Intuitively, they are something we know exists
Examples:
● Max, Claire, Scruffy, 1, 2, Saturday
Examples of non-objects:
● Pegasus, Zeus, Santa Claus :(
Names
Symbols that refer to objects
<name> ::= <number>|<id>
<number> ::= <digit>|<number><digit>
<letterOrDigit> ::= <letter>|<digit>
<id> ::= <letter>|<id><letterOrDigit>
<letters> ::= <letter>|<letters><letter>
E.g. max, claire, scruffy, 42, line1
Predicate
Informally, describes a feature of an object.
English: Max likes Claire
FOL: Likes(max, claire)
Examples (used throughout the book)
Tet(a)

a is a tetrahedron

Cube(a)

a is a cube

Small(a)

a is small

Medium(a)

a is medium size

Large(a)

a is large

Larger(a,b)

a is larger than b

Smaller(a,b)

a is smaller than b

SameSize(a,b)

a is the same size as b

SameShape(a,b)

a is the same shape as b

LeftOf(a,b)

a is to the left of b

FrontOf(a,b)

I is in front of b

Between(a, b, c)

a, b, c are in the same line and a is between b
and c
Atomic Sentences
<atomic> ::= <predicateName>(<arguments>)
<predicateName> ::= <Capital>
<predicateName> ::= <Capital><letters>
<arguments> ::= <name>|<names>,<name>
They take a value which can be either TRUE or FALSE.
Equality Predicate
Equals(a,b)
aka*
a = b (infix form)

aka ≡ Also Known As
Function Symbols
<functionTerm> ::= <id>(<arguments>)
<arguments> ::= <term>|<arguments>,<term>
<term> ::= <name>|<functionTerm>

Examples
● mother(father(father(max)))
● son(father(I))
● brother(I)
Combining All These
Now redefine atomic formula:
<atomic> ::= <predicate>(<arguments>)
Examples:
●
●
●
●

Taller(father(claire), father(max))
john=father(max)
Taller(clair, mother(mother(claire)))
mother(melanie)=mother(claire)
Alternative to Function
Can do without:
father(a) → FatherOf(b, a)
In general:
f(x1,x2,...,xn) → Is_f(y,x1,x2,...,
xn)
Applications. Relational DB
--CREATE TABLE users…
--CREATE TABLE NSA…
CREATE TABLE NSA_is_watching (
user_id character varying(30) NOT NULL,
bigbrother_id character varying(30) NOT NULL,
last_checked timestamp
CONSTRAINT bigbrother_id_fkey FOREIGN KEY (bigbrother_id)
REFERENCES NSA (id),
CONSTRAINT user_id_fkey FOREIGN KEY (user_id)
REFERENCES users (id)
)
Applications. Relational DB
insert into NSA_is_watching values
(‘John Doe’,

‘Agent Smith’, now()),

(‘Jane Dough’,

‘Agent Smith’, now()),

(‘Joe the Plumber’, ‘Agent Smith’, now())
Numbers as First Order Language
1.
2.
3.
4.

0,
a,
a,
a,

1
b
b
b

are terms (names, actually)
terms => a + b is a term (aka +(a,b))
terms => a * b is a term(aka *(a,b))
terms => a < b is a formula (aka <(a,b))

Question:
Can there be infinitely many terms referring to number 1?
Geometry as a First Order Language
1.
2.
3.
4.
5.
6.
7.

numbers, points, lines, circles, angles
line(p1, p2)
circle(p, r)
LiesOn(p, l)
LiesOn(p, c)
Between(p1, p2, p3)
Parallel(l1, l2)
Geometry as a First Order Language
Sample formulas:
● Parallel(line(p1, p2), line(p3, p4))
● LiesOn(p1, circle(p2, r))
Sets as First Order Language
1. sets; elements (may not be sets)
2. a ∈ b, where a is an element, b must be a
set
3. a = b
4. {a1,...an} is a set, where a1...an are
elements
5. s1 ∩ s2 is a set, where s1 and s2 are sets
6. s1 ∪ s2 is a set, where s1 and s2 are sets
Sets as First Order Language
Sample formulas
● 5 ∈ {1,2,42}
● 0 ∈ {0, {0, {0}} ∩ {1, {1}}}
Oriented Graphs
1. nodes and edges
2. Between(n1, n2, e)
Reference(s)
List of first-order-theories (wikipedia)

More Related Content

What's hot

MongoDB - A Document NoSQL Database
MongoDB - A Document NoSQL DatabaseMongoDB - A Document NoSQL Database
MongoDB - A Document NoSQL Database
Ruben Inoto Soto
 
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sqlNoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
Michael Lehmann
 
Day 3 distributive property
Day 3 distributive propertyDay 3 distributive property
Day 3 distributive property
Erik Tjersland
 

What's hot (13)

Swift & JSON
Swift & JSONSwift & JSON
Swift & JSON
 
Betting the Company (Literally) on a Graph Database – Aseem Kishore @ GraphCo...
Betting the Company (Literally) on a Graph Database – Aseem Kishore @ GraphCo...Betting the Company (Literally) on a Graph Database – Aseem Kishore @ GraphCo...
Betting the Company (Literally) on a Graph Database – Aseem Kishore @ GraphCo...
 
ETL for Pros: Getting Data Into MongoDB
ETL for Pros: Getting Data Into MongoDBETL for Pros: Getting Data Into MongoDB
ETL for Pros: Getting Data Into MongoDB
 
MongoDB - A Document NoSQL Database
MongoDB - A Document NoSQL DatabaseMongoDB - A Document NoSQL Database
MongoDB - A Document NoSQL Database
 
Mongo db
Mongo dbMongo db
Mongo db
 
Data Governance with JSON Schema
Data Governance with JSON SchemaData Governance with JSON Schema
Data Governance with JSON Schema
 
Jongo mongo sv
Jongo mongo svJongo mongo sv
Jongo mongo sv
 
Data normalization &amp; memoized denormalization
Data normalization &amp; memoized denormalizationData normalization &amp; memoized denormalization
Data normalization &amp; memoized denormalization
 
Dictionary in python
Dictionary in pythonDictionary in python
Dictionary in python
 
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sqlNoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
NoSQL Search Roadshow Zurich 2013 - Polyglot persistence with no sql
 
How to implement joins in mongo db
How to implement joins in mongo dbHow to implement joins in mongo db
How to implement joins in mongo db
 
Day 3 distributive property
Day 3 distributive propertyDay 3 distributive property
Day 3 distributive property
 
Json
JsonJson
Json
 

Viewers also liked

Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
ankush_kumar
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
Slideshare
 

Viewers also liked (20)

7.4 Rules Of Replacement Ii
7.4    Rules Of Replacement Ii7.4    Rules Of Replacement Ii
7.4 Rules Of Replacement Ii
 
Truth, deduction, computation lecture 7
Truth, deduction, computation   lecture 7Truth, deduction, computation   lecture 7
Truth, deduction, computation lecture 7
 
Predicate Logic
Predicate LogicPredicate Logic
Predicate Logic
 
Artificial inteligence
Artificial inteligenceArtificial inteligence
Artificial inteligence
 
Truth, deduction, computation lecture e
Truth, deduction, computation   lecture eTruth, deduction, computation   lecture e
Truth, deduction, computation lecture e
 
Truth, deduction, computation lecture c
Truth, deduction, computation   lecture cTruth, deduction, computation   lecture c
Truth, deduction, computation lecture c
 
Truth, deduction, computation; lecture 1
Truth, deduction, computation;   lecture 1Truth, deduction, computation;   lecture 1
Truth, deduction, computation; lecture 1
 
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
 
Artificial intelligence
Artificial intelligenceArtificial intelligence
Artificial intelligence
 
Truth, deduction, computation lecture d
Truth, deduction, computation   lecture dTruth, deduction, computation   lecture d
Truth, deduction, computation lecture d
 
Natural Language Access to Data via Deduction
Natural Language Access to Data via DeductionNatural Language Access to Data via Deduction
Natural Language Access to Data via Deduction
 
Truth, deduction, computation lecture f
Truth, deduction, computation   lecture fTruth, deduction, computation   lecture f
Truth, deduction, computation lecture f
 
1.5 Argument Forms Proving Invalidity
1.5   Argument Forms   Proving Invalidity1.5   Argument Forms   Proving Invalidity
1.5 Argument Forms Proving Invalidity
 
6.1 Symbols And Translation
6.1   Symbols And Translation6.1   Symbols And Translation
6.1 Symbols And Translation
 
6.4 Truth Tables For Arguments
6.4   Truth Tables For Arguments6.4   Truth Tables For Arguments
6.4 Truth Tables For Arguments
 
6.3 Truth Tables For Propositions
6.3   Truth Tables For Propositions6.3   Truth Tables For Propositions
6.3 Truth Tables For Propositions
 
03 - Predicate logic
03 - Predicate logic03 - Predicate logic
03 - Predicate logic
 
Propositional And First-Order Logic
Propositional And First-Order LogicPropositional And First-Order Logic
Propositional And First-Order Logic
 
Deduction theorem of propositional logic
Deduction theorem of propositional logicDeduction theorem of propositional logic
Deduction theorem of propositional logic
 
Logical reasoning
Logical reasoning Logical reasoning
Logical reasoning
 

Similar to Truth, deduction, computation; lecture 2

Similar to Truth, deduction, computation; lecture 2 (13)

Basics of Python programming (part 2)
Basics of Python programming (part 2)Basics of Python programming (part 2)
Basics of Python programming (part 2)
 
Functional es6
Functional es6Functional es6
Functional es6
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
 
Python_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdfPython_Cheat_Sheet_Keywords_1664634397.pdf
Python_Cheat_Sheet_Keywords_1664634397.pdf
 
Scala jargon cheatsheet
Scala jargon cheatsheetScala jargon cheatsheet
Scala jargon cheatsheet
 
Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2Intro to Python (High School) Unit #2
Intro to Python (High School) Unit #2
 
R for Pythonistas (PyData NYC 2017)
R for Pythonistas (PyData NYC 2017)R for Pythonistas (PyData NYC 2017)
R for Pythonistas (PyData NYC 2017)
 
Fol
FolFol
Fol
 
More expressive types for spark with frameless
More expressive types for spark with framelessMore expressive types for spark with frameless
More expressive types for spark with frameless
 
Monads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy DyagilevMonads and Monoids by Oleksiy Dyagilev
Monads and Monoids by Oleksiy Dyagilev
 
lect14-semantics.ppt
lect14-semantics.pptlect14-semantics.ppt
lect14-semantics.ppt
 
Exploiting Entity Linking in Queries For Entity Retrieval
Exploiting Entity Linking in Queries For Entity RetrievalExploiting Entity Linking in Queries For Entity Retrieval
Exploiting Entity Linking in Queries For Entity Retrieval
 
Python 培训讲义
Python 培训讲义Python 培训讲义
Python 培训讲义
 

More from Vlad Patryshev

More from Vlad Patryshev (20)

Formal methods 8 - category theory (last one)
Formal methods   8 - category theory (last one)Formal methods   8 - category theory (last one)
Formal methods 8 - category theory (last one)
 
Formal methods 6 - elements of algebra
Formal methods   6 - elements of algebraFormal methods   6 - elements of algebra
Formal methods 6 - elements of algebra
 
Formal methods 5 - Pi calculus
Formal methods   5 - Pi calculusFormal methods   5 - Pi calculus
Formal methods 5 - Pi calculus
 
Formal methods 4 - Z notation
Formal methods   4 - Z notationFormal methods   4 - Z notation
Formal methods 4 - Z notation
 
Formal methods 3 - languages and machines
Formal methods   3 - languages and machinesFormal methods   3 - languages and machines
Formal methods 3 - languages and machines
 
Formal methods 2 - languages and machines
Formal methods   2 - languages and machinesFormal methods   2 - languages and machines
Formal methods 2 - languages and machines
 
Formal methods 1 - introduction
Formal methods   1 - introductionFormal methods   1 - introduction
Formal methods 1 - introduction
 
Formal methods 7 - category theory
Formal methods   7 - category theoryFormal methods   7 - category theory
Formal methods 7 - category theory
 
Truth, deduction, computation lecture i (last one)
Truth, deduction, computation   lecture i (last one)Truth, deduction, computation   lecture i (last one)
Truth, deduction, computation lecture i (last one)
 
Truth, deduction, computation lecture h
Truth, deduction, computation   lecture hTruth, deduction, computation   lecture h
Truth, deduction, computation lecture h
 
Truth, deduction, computation lecture g
Truth, deduction, computation   lecture gTruth, deduction, computation   lecture g
Truth, deduction, computation lecture g
 
Truth, deduction, computation lecture b
Truth, deduction, computation   lecture bTruth, deduction, computation   lecture b
Truth, deduction, computation lecture b
 
Truth, deduction, computation lecture a
Truth, deduction, computation   lecture aTruth, deduction, computation   lecture a
Truth, deduction, computation lecture a
 
Truth, deduction, computation lecture 9
Truth, deduction, computation   lecture 9Truth, deduction, computation   lecture 9
Truth, deduction, computation lecture 9
 
Truth, deduction, computation lecture 8
Truth, deduction, computation   lecture 8Truth, deduction, computation   lecture 8
Truth, deduction, computation lecture 8
 
Truth, deduction, computation lecture 6
Truth, deduction, computation   lecture 6Truth, deduction, computation   lecture 6
Truth, deduction, computation lecture 6
 
Truth, deduction, computation; lecture 5
Truth, deduction, computation;  lecture 5Truth, deduction, computation;  lecture 5
Truth, deduction, computation; lecture 5
 
Truth, deduction, computation; lecture 4
Truth, deduction, computation;  lecture 4Truth, deduction, computation;  lecture 4
Truth, deduction, computation; lecture 4
 
Truth, deduction, computation; lecture 3
Truth, deduction, computation;  lecture 3Truth, deduction, computation;  lecture 3
Truth, deduction, computation; lecture 3
 
Woo
WooWoo
Woo
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
Avinash Rai
 

Recently uploaded (20)

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.pptBasic_QTL_Marker-assisted_Selection_Sourabh.ppt
Basic_QTL_Marker-assisted_Selection_Sourabh.ppt
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptxMatatag-Curriculum and the 21st Century Skills Presentation.pptx
Matatag-Curriculum and the 21st Century Skills Presentation.pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdfDanh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
Danh sách HSG Bộ môn cấp trường - Cấp THPT.pdf
 
Industrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training ReportIndustrial Training Report- AKTU Industrial Training Report
Industrial Training Report- AKTU Industrial Training Report
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 

Truth, deduction, computation; lecture 2

  • 1. Truth, Deduction, Computation Lecture 2 First Order Languages Vlad Patryshev SCU 2013
  • 2. In chapter 1 of LPL book... ● the world consists of existing objects ○ some of them have names ○ some of them have more than one name ● objects can participate in n-ary relationships ○ relationships have names and arity ○ equality relationship ● functions ○ given an object, provide another object
  • 3. Objects Intuitively, they are something we know exists Examples: ● Max, Claire, Scruffy, 1, 2, Saturday Examples of non-objects: ● Pegasus, Zeus, Santa Claus :(
  • 4. Names Symbols that refer to objects <name> ::= <number>|<id> <number> ::= <digit>|<number><digit> <letterOrDigit> ::= <letter>|<digit> <id> ::= <letter>|<id><letterOrDigit> <letters> ::= <letter>|<letters><letter> E.g. max, claire, scruffy, 42, line1
  • 5. Predicate Informally, describes a feature of an object. English: Max likes Claire FOL: Likes(max, claire)
  • 6. Examples (used throughout the book) Tet(a) a is a tetrahedron Cube(a) a is a cube Small(a) a is small Medium(a) a is medium size Large(a) a is large Larger(a,b) a is larger than b Smaller(a,b) a is smaller than b SameSize(a,b) a is the same size as b SameShape(a,b) a is the same shape as b LeftOf(a,b) a is to the left of b FrontOf(a,b) I is in front of b Between(a, b, c) a, b, c are in the same line and a is between b and c
  • 7. Atomic Sentences <atomic> ::= <predicateName>(<arguments>) <predicateName> ::= <Capital> <predicateName> ::= <Capital><letters> <arguments> ::= <name>|<names>,<name> They take a value which can be either TRUE or FALSE.
  • 8. Equality Predicate Equals(a,b) aka* a = b (infix form) aka ≡ Also Known As
  • 9. Function Symbols <functionTerm> ::= <id>(<arguments>) <arguments> ::= <term>|<arguments>,<term> <term> ::= <name>|<functionTerm> Examples ● mother(father(father(max))) ● son(father(I)) ● brother(I)
  • 10. Combining All These Now redefine atomic formula: <atomic> ::= <predicate>(<arguments>) Examples: ● ● ● ● Taller(father(claire), father(max)) john=father(max) Taller(clair, mother(mother(claire))) mother(melanie)=mother(claire)
  • 11. Alternative to Function Can do without: father(a) → FatherOf(b, a) In general: f(x1,x2,...,xn) → Is_f(y,x1,x2,..., xn)
  • 12. Applications. Relational DB --CREATE TABLE users… --CREATE TABLE NSA… CREATE TABLE NSA_is_watching ( user_id character varying(30) NOT NULL, bigbrother_id character varying(30) NOT NULL, last_checked timestamp CONSTRAINT bigbrother_id_fkey FOREIGN KEY (bigbrother_id) REFERENCES NSA (id), CONSTRAINT user_id_fkey FOREIGN KEY (user_id) REFERENCES users (id) )
  • 13. Applications. Relational DB insert into NSA_is_watching values (‘John Doe’, ‘Agent Smith’, now()), (‘Jane Dough’, ‘Agent Smith’, now()), (‘Joe the Plumber’, ‘Agent Smith’, now())
  • 14. Numbers as First Order Language 1. 2. 3. 4. 0, a, a, a, 1 b b b are terms (names, actually) terms => a + b is a term (aka +(a,b)) terms => a * b is a term(aka *(a,b)) terms => a < b is a formula (aka <(a,b)) Question: Can there be infinitely many terms referring to number 1?
  • 15. Geometry as a First Order Language 1. 2. 3. 4. 5. 6. 7. numbers, points, lines, circles, angles line(p1, p2) circle(p, r) LiesOn(p, l) LiesOn(p, c) Between(p1, p2, p3) Parallel(l1, l2)
  • 16. Geometry as a First Order Language Sample formulas: ● Parallel(line(p1, p2), line(p3, p4)) ● LiesOn(p1, circle(p2, r))
  • 17. Sets as First Order Language 1. sets; elements (may not be sets) 2. a ∈ b, where a is an element, b must be a set 3. a = b 4. {a1,...an} is a set, where a1...an are elements 5. s1 ∩ s2 is a set, where s1 and s2 are sets 6. s1 ∪ s2 is a set, where s1 and s2 are sets
  • 18. Sets as First Order Language Sample formulas ● 5 ∈ {1,2,42} ● 0 ∈ {0, {0, {0}} ∩ {1, {1}}}
  • 19. Oriented Graphs 1. nodes and edges 2. Between(n1, n2, e)