__inter_odd_and_two__mod__3(s(X)) :- __inter_even_and_one__mod__3(X).
__inter_odd_and_one__mod__3(s(X)) :- __inter_even_and_zero__mod__3(X).
q(nil).
q(cons(X1,X2)) :- __inter_even_and_tree__3n__plus__2(X1), __inter_list__even_and_tree__3n__plus__2(X2).
__inter_even_and_one__mod__3(s(X)) :- __inter_odd_and_zero__mod__3(X).
r(X1,X2) :- __inter_odd_and_two__mod__3(X1), __inter_list__even_and_tree__3n__plus__2(X2).
__inter_even_and_tree__3n__plus__2(s(X)) :- __inter_odd_and_one__mod__3(X).
__inter_list__even_and_tree__3n__plus__2(nil).
__inter_list__even_and_tree__3n__plus__2(cons(X1,X2)) :- __inter_even_and_tree__3n__plus__2(X1), __inter_list__even_and_tree__3n__plus__2(X2).
list_even(nil).
list_even(cons(X1,X2)) :- even(X1), list_even(X2).
tree_3n_plus_2(s(X)) :- one_mod_3(X).
tree_3n_plus_2(nil).
tree_3n_plus_2(cons(X1,X2)) :- tree_3n_plus_2(X1), tree_3n_plus_2(X2).
__inter_even_and_two__mod__3(s(X)) :- __inter_odd_and_one__mod__3(X).
__inter_odd_and_zero__mod__3(s(X)) :- __inter_even_and_two__mod__3(X).
two_mod_3(s(X)) :- one_mod_3(X).
one_mod_3(s(X)) :- zero_mod_3(X).
__def_1(X1,X2) :- __inter_list__even_and_tree__3n__plus__2(X1), __inter_odd_and_two__mod__3(X2).
__inter_even_and_zero__mod__3(o).
__inter_even_and_zero__mod__3(s(X)) :- __inter_odd_and_two__mod__3(X).
zero_mod_3(o).
zero_mod_3(s(X)) :- two_mod_3(X).
even(o).
even(s(X)) :- odd(X).
odd(s(X)) :- even(X).
