The are a few problems with your predicate:
remove_duplicates([H | T], List) :-
member(H, T),
append(T, [], List1).
First you should have a recursive predicate ,you check for the head of the list but you don't recursively check for the tail of the list:
so you could change it to:
remove_duplicates([H | T], List) :-
member(H, T),
remove_duplicates( T, List).
The above calls recursively for the tail.
Second you have to decide what happens if h is not member of the list so you need to add another clause :
remove_duplicates([H | T], [H|T1]) :-
\+member(H, T),
remove_duplicates( T, T1).
The above checks if H exists in T and if not forces the first element of the list you want to return to be the element H:
if this is not so clear, the above is equal to this:
remove_duplicates([H | T], List) :-
\+member(H, T),
List=[Head|Tail],
Head=H,
remove_duplicates( T, Tail).
This is not very elegant ,it is just to understand how the previous works.
Last you need a base to your recursion for the empty list:
remove_duplicates([],[]).
So the predicate remove_duplicates according to the above clauses should be:
remove_duplicates([],[]).
remove_duplicates([H | T], List) :-
member(H, T),
remove_duplicates( T, List).
remove_duplicates([H | T], [H|T1]) :-
\+member(H, T),
remove_duplicates( T, T1).
Though you have to notice that the above would keep only one time every element for example:
remove_duplicates([a,a,b,c],L).
L = [a, b, c] ;
false.
This is ok but check the example below :
remove_duplicates([a,a,b,a,c],L).
L = [b, a, c] ;
L = [b, a, c] ;
false.
This will return L=[b,a,c] because it erased the two first 'a' of the list and kept only the third.
If you wish to erase only duplicates the above will not work due to member predicate.
You could write :
remove_duplicates2([],[]).
remove_duplicates2([H],[H]).
remove_duplicates2([H ,H| T], List) :-remove_duplicates( [H|T], List).
remove_duplicates2([H,Y | T], [H|T1]):- Y \= H,remove_duplicates( [Y|T], T1).
The predicate remove_duplicates2 is similar to remove_duplicates but with some important differences:
1)You don't use member, but you examine what happens when you have a list [H,H|T] with two SAME elements and you keep only one, so you ignore the first H and call recursively remove_duplicates2([H|T],L).
2)If you have input [H,Y|T] (a list with at least two elements H,Y and a tail of the list) and H\=Y you call remove_duplicates2([Y|T],T1) and you have stored H to the List you want to return.
3) Finally because all clause require at least two elements your base of recursion is the list with one element : remove_duplicates2([H],[H]).
4) The clause remove_duplicates2([],[]). is only used if the input is the empty list ,so it is required to cover this input.
The remove_duplicates2 predicate would give you :
remove_duplicates2([a,a,b,a,c],L).
L = [a, b, a, c] ;
false.
remove_duplicates2([a,a,b,c],L).
L = [a, b, c] ;
false.