/* Learning conc/3 with non-ground background knowledge */ background([conc/3,components/3]). propositional([a([])]). /* Examples of the target predicate */ conc(a([]),a([1,2,3]),a([1,2,3])). conc(a([]),a([3]),a([3])). conc(a([1,2]),a([3]),a([1,2,3])). conc(a([2]),a([3]),a([2,3])). /* Background knowledge for 3-element ordered lists */ components(a([Head|Tail]),a(Head),a(Tail)) :- sublist([Head|Tail],[1,2,3]). sublist([H|T],[H|V]) :- sublist(T,V). sublist(T,[_|V]) :- !, sublist(T,V). sublist([],_).