A prologic dialogue

By Dennis J. Darland and Randy

Edited June 15, 2007

Dennis:

To see the conclusions follow as I said see:

http://dennisdarland.com/philosophy/prolog2.html

Randy:

Ok, now this is cool :-)

But I need to ask, if you want to represent that fred, say,

believes that wilma is cooking spare ribs, why not just

represent "wilma is cooking spare ribs" with the prolog

term:

cooking(wilma, spare_ribs)

and represents fred's belief like this:

believes(fred, cooking(wilma, spare_ribs) ).

In prolog lingo, why couldn't the belief predicate just be

a meta-circular interpreter with one extra argument

for the agent you are attributing the beliefs too?

(yes, i know about the problem of logical

omnicience, but that can also be handled by

adding extra arguements to block inferences

which are too long, etc...)

Anyway, you are hereby awarded full coolness points

for actually implementing this stuff in prolog.

Dennis:

Well fred can believe that "wilma is cooking spare

ribs", when she isn't. In which case cooking(wilma,

spare_ribs) does not exist, so what does fred believe?

Randy:

Recall, I proposed using the prolog _term_

cooking(wilma, spare_ribs), not the prolog

_fact_ cooking(wilma, spare_ribs).

Even if cooking(wilma, spare_ribs) is _false_,

it is still a valid sentence of first order logic,

and Fred can believe it.

Dennis:

What connects the sentence to the fact, so the

sentence is true if just that fact exists, and false

if it doesn't?

Randy:

Well personally, I take the general

Davidsonian/ Quinean line

here: There are certain sentences (like "Im seeing

some red and green patches now") which we are

caused_ to believe true by our senses, and our

other

believes follow logically from those + our best

scientific theories.

 Ironically, implementation in prolog is in fact one

of the things which drove me to this position: after all,

you can think of re-writing your prolog program

so it used syntax like this:

believe_r(tom, denounced(cicero, cataline, now))

instead of like you do:

belief_r(tom, 'denounced', 'cicero', 'cataline',now).

 the difference is just spelling. You could as well

ask why the fact that cicero denounced cataline

implies the truth of your prolog fact

belief_r(tom, 'denounced', 'cicero', 'cataline',now),

right?

 Moreover, by attributing a sentence to an agent

as a belief, you can use a single 2-place predicate

belief_r/2 to represnt all kinds of beliefs, even

thoughs which relate 3 objects:

 cicero is giving cataline the book

belief_r(tom, gave(cicero, cataline, book, now))

 Of course, prolog does let you have all kinds of

belief_r

predicates of various arities, but this complicates

your program, because in general, beliefs do bear logical

relations to each other, and you have to therefore

relate all of these belief_r predicates amoung each

other.

Dennis:

But since

belief_r(tom, denounced( cicero,cataline, now))

and

tully = cicero

you get

belief_r(tom, denounced( tully,cataline, now))

but tom doesn't know tully = cicero

in fact he believes the opposite.

it would also follow on your account since

belief_r(tom, tully ~= cicero,now) that

beleif_r(tom, tully ~= tully, now)

Randy:

I'm quite excited about having someone on Analytic who

knows prolog. Anyways, you say:

"it would also follow on your account since

 belief_r(tom, tully ~= cicero,now) that

 beleif_r(tom, tully ~= tully, now)"

No, not if you set it up right. Here's how I would do it:

Lets start out with a basic vanilla

meta-interpreter:

prove(P) :- axiom(P).

prove((P,Q)) :- prove(P),prove( Q).

prove(P) :- clause((P:-Q) ), prove(Q).

Then, by

1. chanigne "prove" to "believe", and

2. adding an extra argument to indicate

who the agent is, we can convert the above

to a belief predicate:

believe(A, P) :- axiom(A, P).

believe(A, (P,Q)) :- believe(A, P),believe(A, Q).

believe(A, P) :- clause(A, (P:-Q)), believe(A, Q).

Now, lets add some axioms about what tom

believes:

axiom(tom, denounced(tully, cataline, now)).

We can now use prolog to conclude that

believe(tom, denounced(tully, cataline, now)).

But notice!!! We **can't** derive

believe(tom, denounced(cicero, cataline, now)).

which is exactly what we wanted.

Notice how talk of "facts" goes right out the

window. We don't really need to include

"facts" in our ontology at all. All we need

are agents and sentences which they either

believe or don't believe.

Dennis:

/* my addititions to try to represent equality */

/* Dennis */

axiom(denounced( A,B,T)) :- axiom(denounced( C,B,T)),

axiom(same_person( A,C)).

axiom(denounced( A,B,T)) :- axiom(denounced( A,C,T)),

axiom(same_person( A,C)).

axiom(same_person( cicero,tully) ).

(really my 'T' was to represent thr time of the belief

rather than the time of the denouncing, but we are not

really using it anyway.)

But I had trouble getting it to work because you use

both a axiom/1 and axiom/2

you also use a clause(A, P:-Q) which it seems to me

should involve 'believe' somehow.

Also

prove((P,Q)) :- prove(P),prove( Q). causes infinite

generation which you noted, but is a problem when you

try to run it!

Also:

I think you *can* work out what you say:

believes(tom, (denounced( cicero,cataline) ,now)

and

believes(tom, (~denounced( tully,cataline) ,now)

while cicero = tully

but this is an instance of what Quine calls an Opaque

context. With my analysis there are no opaque

contexts.

Randy:

You said "but this is an instance of what Quine calls an Opaque

context. With my analysis there are no opaque contexts."

Quine mentions towards the back of "From Stimulus to Science"

that somebody figured out some sort of method to

quantify into opaque contexts--I never tracked down the

reference to see exactly what he was talking about though.

Dennis

I would still like to see your way worked out!

Randy:

Here's some annotated source code, see what you think:

As you know, equality and equasional reasoning

is one area in which prolog (and theorem provers

in general) have a really hard problem with.

The way I work around it is as follows--I take

my cue from prolog, and use the unique names

assumption. Every object has a unique internal

name, which is just a prolog constant (usually

a skolem constant).

To represent that people can have multiple names,

I use a two-place term. e.g. the following:

name(sk1, tom).

name(sk2, cicero).

name(sk2, tulley).

represents that there are two people, sk1 and sk2,

and sk1 is named tom, and sk2 is named cicero and

tulley.

So, to mirror the argument:

Tully denounced Cataline.

Tulley == Cicero.

ergo, Cicero denounced Cataline

I'd first program up the

vanilla interpreter again:

prove(P) :- axiom(P).

prove((P,Q)) :- prove(P),prove( Q).

prove(P) :- clause((P:-Q) ), prove(Q).

Then I'd add a few axioms for this:

axiom(name(sk1, tom)).

axiom(name(sk2, cicero)).

axiom(name(sk2, tulley)).

axiom(name(sk3, cataline)).

axiom(denounced( sk2,sk3)) .

% dummy clause/1 to keep swi prolog from complaining

clause((dumb: -dumber)) .

Now, we can ask whether Cicero

denounced Cataline like this:

?- prove((name( X,cicero) , name(Y,cataline) , denounced(X, Y))).

X = sk2,

Y = sk3

and we can also prove that Tully denounced

Cataline like this:

?- prove((name( X,tulley) , name(Y,cataline) , denounced(X, Y))).

X = sk2,

Y = sk3 ;

Now......to prove that tom, due to his

lack of a classical education, doesn't know

that tulley==cicero, it is simplicity itself.

First, program up the "believe/2" predicate.

(Apparenely, swi prolog already defines

"clause/2", so lets use Richard O'Keefs

name instead : "claws/2" :-)

believe(A, P) :- axiom(A, P).

believe(A, (P,Q)) :- believe(A, P),believe(A, Q).

believe(A, P) :- claws(A, (P:-Q)), believe(A, Q).

And then use the same axioms which represent the

real world, except for the axiom which gives the

additional name to sk2 (tulley).

axiom(tom, name(sk1, tom)).

% Tom doesn't know about this:

% axiom(tom, name(sk2, cicero)).

axiom(tom, name(sk2, tulley)).

axiom(tom, name(sk3, cataline)).

axiom(tom, denounced(sk2, sk3)).

% dummy clause/2 to keep swi prolog from complaining

claws(tom, (dumb:-dumber) ).

We can now use prolog to conclude that

Tom believes that Tulley denounced Cataline:

?- believe(tom, (name(X,tulley) , denounced(X, Y), name(Y,Who)) ).

X = sk2,

Y = sk3,

Who = cataline ;

But poor Tom doesn't know that

Tulley == Cicero:

?- believe(tom, (name(X,cicero) , name(X,tulley) )).

No

And he therefore doesn't believe that Cicero denounced Cataline:

?- believe(tom, (name(X,cicero) , denounced(X, Y), name(Y,Who)) ).

No

Dennis:

I think, although some of the details are different,

you have adopted my approach in that cataline and

tully are now names for you and no longer a person!

I used "tully" and "cicero" as names and cicero as the

person (you used sk2 as the person).

Randy:

Yes.

Dennis;

It just seems I have elaborated it a bit more in that

my sybmol_r relation specifies the person & time that

the name is a name of the object. You had to comment

out the naming relation to represent that tom didn't

know it.

Randy:

I said the difference is mostly spelling. But it _does_

make for a more uniform treatment--- you'd have to

add extra arguments to your belief_r relation

to represent that tom believes that cicero gave

cataline a book.

Also, it simplifies the ontology

not to have to include facts. Facts just disappear.

There's only sentences which are true or false,

believed or not believed.

Dennis:

That is true, but I have a motive for doing it. I

want to be able to quantify over predicates, or at

least symbols for predicates. So I want to recognize

that "denounce" is just the name of a relation, just

as "cicero" is the name of cicero. But the *name*

"denounce" is not a relation, so I am forced to do it

as I did.

I want to quantfy over predicates in order to define

classes as in _Principia Mathematica_ . I see

predicates as more primitive. I think problems with

"grue" etc can be worked out as some precicates are

more basic than others, while all classes have equal

ontological status.

And I don't have a "fact" predicate. It's just a way

of saying a proposition is true. A fact predicate

could be defined, but only, I would think, the "base"

predicates, in which others are defined, would have

ontological status.

Also you have taken "axiom" as a "base" predicate,

which would seem to give it ontological status.

Also my belief_r relation only involves the names. The

person with the belief_r need not be able to say

symbol_r(I," cicero",cicero, now) -- he need bave no

access to cicero other than the use of the name

"cicero". Although I think he would always believe-r

this, I think he could be mistaken. Cicero could turn

out to be a myth.

Randy:

How do you represent the fact that tom might beleive

that cicero refers to brutus then? If the access is

_only_ thorugh the name, then tom can't be _wrong_

about who has that name, right?

Dennis

Tom can't be wrong that he thinks that "cicero" is a

symbol for something. He has no independent way of

saying what except he might be able to say "tully" is

a symbol for the same person (or not). So we would have

belief_r(tom, 'r(a,s,o, t)',"symbol_ r",tom,'" cicero"', "cicero", t)

but it could be that

symbol_r(tom, "cicero", brutus,t)

Randy;

have you checked out Hilog? XSB prolog

from stony brook is a good implementation of

it. It allows you to do just this.

If you want to stay with XSB prolog, you

can achieve a similar effect by replacing:

denounces(cicero, catalina)

with

apply(denounces, cicero, catalina)

which is what XSB prolog does internally

for you.

Dennis:

I'll check into it. I'm mostly concerned with just

the logic of it, and I think there are limits to what

can be done in prolog. But prolog is a useful tool in

seeing how my definitions work.

Randy:

You said "Also you have taken "axiom" as a "base" predicate,

which would seem to give it ontological status."

Well, there's two levals here: the object theory

and the meta theory. The vaniilla meta-interpreter is

just that--it is a _meta_ interpreter. the axioms/2

predicates arn't predicates of the object theory,

they are predicates of the meta theory.

Also you said you could have:

belief_r(tom, 'r(a,s,o, t)',"symbol_ r",tom,'" cicero"', "cicero", t)

but it could be that

symbol_r(tom, "cicero", brutus,t)

but how would I say that tom is _wrong_ about

who cicero is?

Dennis:

tom's belief_r(above) would be true if

symbol_r(tom, "cicero", cicero,t)

but

but instead we have

symbol_r(tom, "cicero", brutus,t)

(really it involves more but its a bit pedantic

you need)

symbol_r(tom, "symbol_r" ,symbol_r, t)

and

symbol_r(tom, '"cicero" ',"cicero" ,t)

tom would assert

symbol_r(tom, "cicero", cicero,t)

because of his belief_r

(note he is using '"cicero"' and "cicero" to do so.)

Dennis:

I think there are limits to what can be done in prolog.

Randy:

Yes, very definately :-(

Dennis'

But prolog is a useful tool in

seeing how my definitions work.

Randy:

Quite so. I wish more philosophers would do that.

It seems like it would prevent all kinds of nonsense

from escaping. I think its really cool you're

doing this.

Also, did you read Patric Blackburn and Johann Bos's latest

book? They have amazing examples of this kind of

knowledge representation, and interface it with a natural

language processing system to boot.

Dennis:

No, I'll look for it.

It turns out that you were right, Tom can't be wrong

about his symbol_r relations, but he may be using

different words than other people!

Randy:

Hmmmm....... do you mean that Tom can't be

wrong about his symbol_r relations, or that

your system can't represent Tom when he

is wrong about his symbol_r relations?

(not to put too fine a point on it....) :-)

I.e. surely tom can wrong about what

name somebody has.....

Dennis:

Check out tom's belief_r relation about his symbol relation to brutus in

Randy:

I don't understand why you need to hypostatisze
"facts" or the role they play in your philosophy.  
 Suppose a cat is on a mat.
 
 Is there a fact that a cat is on a mat?
 Is there a seperate fact that the mat is under the

 cat, or is

that the same fact?
 
Dennis:
 
The "facts" relate to our "sentences" through
symbolic relations between "objects" and "words".
The "words" occur in the sentences, the "objects" are
related in "facts" (there are also "words for the
"relations" the objects occur in) You cannot specify
the "objects" and "facts" verbally independently of
words.  The symbolic relations are primarily
established by practices which include in part the use
of words. This is Wittgenstein's "forms of life." 
There are different equivalent possible ways you could
divide this up.  The differences are just verbal. 
Ordinarily we just use sentences, but the sentences
have relations to non-verbal practices in our lives.
There are also other uses of words than as symbols for
objects: logical connectives, quantifiers, commanding,
etc.
 
I see no need to quantify over “facts”.
 

Back to top: http://dennisdarland.com/philosophy/prolog3.html