%%%%%%%%%%%%%%%%%%%%%  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(process_input).
clear(back_demod).
clear(dynamic_demod).
assign(max_weight, 130).

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

list(usable).
x = x.
end_of_list.

list(sos).
f(x,y) = f(y,x).
f(x,f(y,x)) = y.
f(e,e) = e.
g(x,y) = g(y,x).
g(x,g(y,x)) = y.
g(e,e) = e.
end_of_list.

list(passive).
g(A,B) != f(A,B).
end_of_list.

list(demodulators).
f(e,e) = e.
f(x,f(y,x)) = y.
end_of_list.

weight_list(pick_and_purge).

% Discard left associated terms.

weight(g(g($(1),$(1)),$(1)), 1000).
weight(f(f($(1),$(1)),$(1)), 1000).
weight(f(g($(1),$(1)),$(1)), 1000).
weight(g(f($(1),$(1)),$(1)), 1000).

% Multiply symbol conut by 10 and subtract 1 for each variable.

weight(e,10).
weight(x,9).
weight(f($(1),$(1)),10).
weight(g($(1),$(1)),10).
weight($(1)=$(1),10).

end_of_list.
