Commit c507e21c authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

handle more negative cases in tropicalization split

parent 699c656c
......@@ -285,10 +285,17 @@ split_pos_neg_and_subst_rec(E + N * T, Vars, Ai, Pos, Neg) :-
split_pos_neg_and_subst_rec(E, Vars, Ai, PPos, NNeg).
split_pos_neg_and_subst_rec(N * (A - B), Vars, Ai, Pos, Neg) :-
number(N),
!,
M is -N,
split_pos_neg_and_subst_rec(N * A + M * B, Vars, Ai, Pos, Neg).
split_pos_neg_and_subst_rec(N * (- A), Vars, Ai, Pos, Neg) :-
number(N),
!,
M is -N,
split_pos_neg_and_subst_rec(M * A, Vars, Ai, Pos, Neg).
split_pos_neg_and_subst_rec(N * (A + B), Vars, Ai, Pos, Neg) :-
!,
split_pos_neg_and_subst_rec(N * A + N * B, Vars, Ai, Pos, Neg).
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment