
signature(signature).


s_rule rule
(s, alist:L, blist:L, clist:L)
 ===>
cat> (a_cat, alist:L),
cat> (b_cat, blist:L),
cat> (c_cat, clist:L).


as_rule rule
 (as, alist:[F|R])
 ===>
cat> (single_a, alist:[F]),
cat> (a_cat, alist:R).

bs_rule rule
 (bs, blist:[F|R])
 ===>
cat> (single_b, blist:[F]),
cat> (b_cat, blist:R).

cs_rule rule
 (cs, clist:[F|R])
 ===>
cat> (single_c, clist:[F]),
cat> (c_cat, clist:R).


a ---> (single_a, alist:[(a_ i)]).
b ---> (single_b, blist:[(a_ i)]).
c ---> (single_c, clist:[(a_ i)]).