 <p>Relations are defined by predicates in Prolog. There is no built-in (but you could do it for example by using term expansion) syntactic way to define predicates inside predicates in program text, and there seems little reason to do so. You can simply write separate predicates and refer to them. You <em>can</em> of course have nested terms, that is terms as subterms of other terms. </p> <p>What do you mean with</p> <pre><code>relation(CctypeInt,[0-{2,3,4}, 1-{2,3,4}, 2-{2}],Ru1),!. </code></pre> <p>? This is a clause that states something about the predicate (,)/2 , which I doubt was the intention. On the other hand, you can of course build and use a Prolog term like</p> <pre><code>relation(cctypeint,relation(ru_1,...,ru_n)) </code></pre> <p>in your programs to represent your data.</p>