このディレクトリの索引
#  I'm new in Prolog. I know the recursion function of permutation, that is:
#  
#  per([],[]).
#  per(L, [X|P]) :- del(X,L,L1),per(L1,P).
#  I want to know the logic tree of this function in the final iteration when we receive per([],[]) which element it back.
#  

per([],[],[per([],[])]).
per(L, [X|P],[((per(L,[X|P]) :- del(X,L,L1),per(L1,P)))|Z]) :- del(X,L,L1),per(L1,P,Z).

del(X,[X|L],L).
del(X,[A|R1],[A|R2]) :-
        del(X,R1,R2).