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!
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!