Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y)))...
-
Upload
theodore-knight -
Category
Documents
-
view
248 -
download
1
Transcript of Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y)))...
![Page 1: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/1.jpg)
Herbrand Models
Logic Lecture 2
![Page 2: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/2.jpg)
![Page 3: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/3.jpg)
Example: ModelsX(Y((mother(X) child_of(Y,X)) loves(X,Y)))mother(mary)child_of(tom,mary)
![Page 4: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/4.jpg)
![Page 5: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/5.jpg)
Problem…
• Difficult to compare two interpretations with different domains… e.g., one domain consists of apples and the other of oranges.
• Could map one domain to another. Can be tricky to define… most domains are infinite.
• Idea: for a given alphabet, pick a canonical domain and mapping. But how?
![Page 6: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/6.jpg)
![Page 7: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/7.jpg)
![Page 8: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/8.jpg)
![Page 9: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/9.jpg)
Some Notes
• Typically, we are given a theory (set of sentences) T and wish to speak of Herbrand interpretations relative to T.
• In this case we take the alphabet A to be the symbols in T.
• If T has no constants, we introduce one.
![Page 10: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/10.jpg)
Notes (continued)
• Valuations with respect to a Herbrand interpretation may be thought of as grounding substitutions.
• We’d like know it’s sufficient to consider only Herbrand interpretations… just ignore all others…
![Page 11: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/11.jpg)
![Page 12: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/12.jpg)
Herbrand Model Lemma
• Let T be a theory (set of sentences) in Skolem Normal Form.
• T has a model iff it has a Herbrand model.
![Page 13: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/13.jpg)
![Page 14: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/14.jpg)
![Page 15: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/15.jpg)
![Page 16: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/16.jpg)
Skolemization
• Process is applied to one sentence at a time and applied only to the entire sentence (so outermost quantifier first). Each sentence initially has empty vector of free variables.
• Replace X A(X) with A(X), and add X to vector of free variables.
• Replace X A(X) with A(x(V)) where x is a new function symbol and V is the current vector of free variables.
![Page 17: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/17.jpg)
Herbrand Model Lemma
• Let T be a theory (set of sentences) in Skolem Normal Form.
• T has a model iff it has a Herbrand model.
Now recall our goal of identifying a unique simplest model.
![Page 18: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/18.jpg)
Example: ModelsX(Y((mother(X) child_of(Y,X)) loves(X,Y)))mother(mary)child_of(tom,mary)
![Page 19: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/19.jpg)
![Page 20: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/20.jpg)
![Page 21: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/21.jpg)
![Page 22: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/22.jpg)
![Page 23: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/23.jpg)
Why no least Herbrand model?
• Disjunctive “positive” information… creates uncertainty. We can satisfy the disjunction by satisfying either disjunct – a choice.
• This is somewhat analogous to the uncertainty created by existential quantifiers.
• This uncertainty also causes inefficiencies in deduction (recall prop. SAT is NP-complete but SAT for Horn CNFs is linear-time solvable).
![Page 24: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/24.jpg)
![Page 25: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/25.jpg)
![Page 26: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/26.jpg)
![Page 27: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/27.jpg)
Examples of Definite Programs
mother(mary)
child_of(tom,mary)
loves(X,Y) mother(x) child_of(X,Y)
odd(s(0))
odd(s(s(X)) odd(X)
![Page 28: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/28.jpg)
Prolog Notation
mother(mary).
child_of(tom,mary).
loves(X,Y):- mother(x), child_of(X,Y).
odd(s(0)).
odd(s(s(X)):- odd(X).
![Page 29: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/29.jpg)
![Page 30: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/30.jpg)
About Least Herbrand Models
• The least Herbrand model MP of a program P is the set of all ground atomic logical consequences of the program.
• In general it is undecidable whether a ground atomic formula is in the least Herbrand model of a program (logically follows from the program). But if it follows, it can be eventually shown…
![Page 31: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/31.jpg)
Alternative Characterization of Least Herbrand Model
• Let P be a definite program. TP is a function on Herbrand interpretations defined as follows:
TP(I) = {A0 | A0A1,…,Am Pgr and {A1,…,Am} I}
• The least interpretation I such that TP(I) = I is the least Herbrand model of P.
![Page 32: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/32.jpg)
Contruction/Approximation of Least Herbrand Model
• TP 0 =
• TP (i+1) = TP(TP i)
• TP is the union of TP i for all i from 0 to
• The least Herbrand model MP of P is the least fixpoint of TP: the least Herbrand interpretation such that TP(MP) = MP.
• MP = TP
![Page 33: Herbrand Models Logic Lecture 2. Example: Models X( Y((mother(X) child_of(Y,X)) loves(X,Y))) mother(mary) child_of(tom,mary)](https://reader036.fdocuments.in/reader036/viewer/2022062300/56649e115503460f94afca40/html5/thumbnails/33.jpg)
Example
• odd(s(0)).• odd(s(s(X)) odd(X).
• TP 0 =
• TP 1 = {odd(s)}
• TP 2 = {odd(s(s(s(0))), odd(s)}
• TP odd(sn(0)) | n {1,3,5,…}}