Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need some proof trees, pleaseee!!

Status
Not open for further replies.

PrSl

Technical User
Nov 7, 2010
3
FR
Hello to all,

I have to provide proof trees for the following queries based on the given programs. Can you help??

1. prouver/1

Program:

prouver(true).
prouver((But,Reste_Buts)) :-
prouver(But),
prouver(Reste_Buts).
prouver(But) :-
predicate_property(But,dynamic),
clause(But,Corps),
prouver(Corps).


Query:

?- prouver(conc([a],,[a,b])).

2. prouver/2

prouver(true,true).
prouver(
(But,Reste_Buts),
(Preuve,Reste_Preuves)) :-
prouver(But,Preuve),
prouver(Reste_Buts,Reste_Preuves).
prouver(But , (But :- Preuve)) :-
predicate_property(But,dynamic),
clause(But,Corps),
prouver(Corps,Preuve).

Query:

?- prouver(conc([a], ,[a,b]), A).

The above is "written in French", since I study Prolog at a French uni. Can't really say I get much of it :-S So if any of you can help, I would be so greatful!

Thanks in advance!
 
This is not a forum to solve school assignments. You have to show that you've struggled to solve it yourself, present your partial solution, discuss where you've encountered a dead end, etc. That would be in good accordancee with this forum's mission
 
Hello Kahleen,

Thank you for you input. However, I have to say that I genuinely need help with this since I am not getting Prolog at all! We sort of started learning it somewhere from the middle, even though I have no previous knowledge of any kind of programming whatsoever...So I struggle a lot. This is not an assignment, I am preparing for an oral exam, and I do not know where to start. I would appreciate your help, but it's ok if it's still against your principles.

Thank you.
 
Thank you joel76. It was helpful, particularly since it was in French :) I appreciate you help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top