Add simplify_polynomial_list()
This commit is contained in:
parent
ff8971c141
commit
f89fad686c
15
polimani.pl
15
polimani.pl
@ -249,6 +249,21 @@ simplify_polynomial(P + M, P2 + M2) :-
|
||||
simplify_polynomial(P, P2),
|
||||
simplify_term(M, M2).
|
||||
|
||||
%% simplify_polynomial_list(+L1,-L3) is det
|
||||
%
|
||||
% Simplifies a list of polynomials
|
||||
%
|
||||
|
||||
simplify_polynomial_list([L1], L3) :-
|
||||
simplify_polynomial(L1, L2),
|
||||
L3 = [L2].
|
||||
simplify_polynomial_list([L1|L2],L3) :-
|
||||
simplify_polynomial(L1, P1),
|
||||
simplify_polynomial_list(L2, P2),
|
||||
L3 = [P1|P2],
|
||||
% There is nothing further to compute at this point
|
||||
!.
|
||||
|
||||
closure_simplify_polynomial(P, P) :-
|
||||
simplify_polynomial(P, P2),
|
||||
P==P2,
|
||||
|
Reference in New Issue
Block a user