%%%%%%%%%%%%%%%%%%%%%  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).

%%%%%%%%%%%%%%%%%%%%%  Standard options for hyperresolution

set(output_sequent).
set(hyper_res).
set(order_history).
set(unit_deletion).
set(para_from_units_only).
set(para_into_units_only).

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

clear(process_input).
clear(back_demod).
clear(dynamic_demod).
clear(geometric_rule).
clear(geometric_rewrite_before).
assign(max_weight, 1).

%%%%%%%%%%%%%%%%%%%%%  Clauses
list(usable).
x = x.
g(x,y,z,u,v) != f(x,y,z,u,v) | g(y,z,u,v,x) = f(y,z,u,v,x).
end_of_list.

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

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

f(x1,x2,x3,y,g(x4,x5,x6,y,x7))=f(x1,x2,x3,z,g(x4,x5,x6,z,x7)).
end_of_list.

list(passive).
g(A,B,C,D,E) != f(A,B,C,D,E).
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).

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

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.

