|(Func(f,fs),Func(g,gs))::t->iff=gthen(solve((List.combinefsgs)@t)sub)elseNone(* If f and g are not equal, the equation can't be solved *)
|(Func(f,fs),Func(g,gs))::t->iff=gthen(solve((List.combinefsgs)@t)sub)elseNone(* If f and g are not equal, the equation can't be solved *)
andelimidtermeqsub=
andelimidtermeqsub=
ifeq=[]thenSomesub
ifoccursidtermthenNone(* If that's the cas, we would have something like x = f(x) which can't be solved *)
elseifoccursidtermthenNone(* If that's the cas, we would have something like x = f(x) which can't be solved *)
elseletsigma_xy=[(id,term)]in
elseletsigma_xy=[(id,term)]in
(solve(List.map(fun(a,b)->(substitasigma_xy,substitbsigma_xy))eq)(sigma_xy@sub))(* We apply the sigma_xy substitution and we add it to the solution list *)
(solve(List.map(fun(a,b)->(substitasigma_xy,substitbsigma_xy))eq)(sigma_xy@sub))(* We apply the sigma_xy substitution and we add it to the solution list *)