×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Clausal Form?

## Clausal Form?

(OP)
Does anyone know how to convert prolog databases to clausal form? I have an assignment where I need to do an SLDNF proof, but before I can do that I need to convert some facts and rules from a prolog program into clausal form. My teacher gave us a 4 step process to do it but in the example he gives he doesn't use a statement from prolog.

So for example:

How would you convert "sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y" to clausal form?
Replies continue below

### RE: Clausal Form?

This rule sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y. means that you have sibling(X, Y) if you have parent(P, X), parent(P, Y), X \== Y.
So
sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y is like
(parent(P, X), parent(P, Y), X \== Y) => sibling(X, Y)
which is translated as
(parent(P, X)/\ parent(P, Y) /\ not(X == Y)) => sibling(X, Y)
and knowing (a => b) is like (not(a) \/ b)
not((parent(P, X)/\ parent(P, Y) /\ not(X == Y))) \/ sibling(X, Y)
and
not(parent(P, X)) \/ not(parent(P, Y)) \/ (X == Y) \/ sibling(X, Y)

### RE: Clausal Form?

(OP)
Thank you that makes sense

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!