%%%%%%%%%%%%%%%%%%%%%  Basic options

op(400, xfx, [*,+,^,v,/,\,#]).  % infix operators
op(300,yf,@).                   % postfix operator

clear(print_kept).
clear(print_new_demod).
clear(print_back_demod).

assign(pick_given_ratio, 4).
assign(max_mem, 20000).

%%%%%%%%%%%%%%%%%%%%%  Standard for (gL) problems

set(geometric_rule).
set(geometric_rewrite_before).
set(para_from).
set(para_into).
set(para_from_vars).
set(para_into_vars).
set(order_eq).
set(back_demod).
set(process_input).
set(lrpo).

%%%%%%%%%%%%%%%%%%%%%  Modifications to strategy

clear(lrpo).
clear(process_input).
clear(back_demod).
clear(dynamic_demod).
assign(max_weight, 1).

%%%%%%%%%%%%%%%%%%%%%  Clauses

list(usable).
x = x.
end_of_list.

list(sos).
f(u,v,w,x,y) = f(u,v,w,y,x).
f(e,e,e,e,e) = e.
f(u,v,w,x,f(u,v,w,x,y)) = y.

g(u,v,w,x,y) = g(u,v,w,y,x).
g(e,e,e,e,e) = e.
g(u,v,w,x,g(u,v,w,x,y)) = y.
end_of_list.

list(passive).
f(A1,A2,A3,B,g(A4,A5,A6,B,A7)) != f(A1,A2,A3,C,g(A4,A5,A6,C,A7)).
end_of_list.

weight_list(pick_given).
% multiply symbol count by 10, then subtract 1 for each variable.
weight(e,10).
weight(x,9).
weight(f($(1),$(1),$(1),$(1),$(1)),10).
weight(g($(1),$(1),$(1),$(1),$(1)),10).
weight($(1)=$(1),10).
end_of_list.

weight_list(purge_gen).

% Keep only those clauses with weight=1 using the following templates.

weight(e, 0).
weight(x, 0).

weight(f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),
             g($(1),$(1),$(1),$(1),$(1))))=
       f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),$(1))), 1). %fgg=fg

weight(f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),$(1)))=
       f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),$(1))), 1).    % fg=fg

weight(f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),$(1)))=
       f($(1),$(1),$(1),$(1),$(1)), 1).  % fg=f

weight(g($(1),$(1),$(1),$(1),$(1))=f($(1),$(1),$(1),$(1),$(1)), 1).   % g=f
weight(f($(1),$(1),$(1),$(1),g($(1),$(1),$(1),$(1),$(1)))=$(1), 1).   % fg=[ex]

end_of_list.

