Commit 223cbaaf authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Improve distribute for exponentiation (needed for tropicalization)

parent 0234865e
......@@ -605,6 +605,12 @@ rewrite_distribute(A - (B + C), A - B - C).
rewrite_distribute(- (A + B), - A - B).
rewrite_distribute(A^1, A).
rewrite_distribute(A^N, A*A^Nm) :-
Nm is N-1.
additive_normal_form(In, Out) :-
rewrite(rewrite_additive_normal_form, In, Out).
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