Lecture 8
FOL
Johannes Korbmacher Lecture slides
Logical methods for AI
FOL
Lecture 8
What you’ll be able to do
All humans are mortal
- Propositional logic: HUMANβ β MORTALβ, HUMANβ β MORTALβ, β¦
- First-order logic: βx (Human(x) β Mortal(x))
Alphabet
Terms
Enable JavaScript to step through the tree. The grammar and worked example remain available in the chapter.
Formulas
- Atomic: Human(Socrates), motherOf(x) = y
- Quantified: βx (Human(x) β Mortal(x))
- A term, not a formula: fatherOf(Socrates)
Scope and binding
Enable JavaScript to explore variable binding.
Models
First-order models
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
Domain and interpretation
Classical FOL assumes nonempty domains, a referent for every name, total functions and a truth-value for every atom: idealizations.
Denotation
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
Assignments and denotation
Model checking
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
Satisfaction
Quantifiers
- βx: one witness is enough.
- βx: one counterexample refutes it.
Extensions
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
Models as databases
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
|
|
An extension becomes a table; a tuple, a row.
Queries as open formulas
Domain
Enable JavaScript to use the model canvas. The definitions and worked examples remain available.
Formulas to SQL
Each free variable ranges over Domain; query(A) is the condition for A.
| FOL | SQL condition |
|---|---|
| LocatedIn(x, Europe) | EXISTS (SELECT 1 FROM LocatedIn AS r WHERE r.country = d.value AND r.continent = 'Europe')
|
| Β¬A | NOT (query(A))
|
| A β§ B | (query(A)) AND (query(B))
|
| A β¨ B | (query(A)) OR (query(B))
|
| βy A | EXISTS (SELECT 1 FROM Domain AS e WHERE query(A))
|
| βy A | NOT EXISTS (SELECT 1 FROM Domain AS e WHERE NOT (query(A)))
|
Queries and Codd’s theorem
Use β / β, Page Up / Page Down, or Space to navigate. While you work in an app, only Page Up / Page Down change the slide. Press F for full screen and Esc to exit. Each slide has a shareable URL.
What is on the slidesText of every slide
The text of every slide, in order. Drawings are described in words, and interactive apps are named; the textbook chapter has each of them in full.