How can you write a predicate in Prolog, which takes 3 lists, L1 is a list that contains constants and variables, L2 contains constants, and L3 is a some list. The predicate should return true iff the variables of the first list substituted with the corresponding element of the second list equals the third list.
Like if L1_i is a variable, it needs to be substituted with L2_i, and then if it needs to be equal to L3_i.
How can this be done?
Thanks.