From 8b2799303393e11d4080e92de46964664c7533e9 Mon Sep 17 00:00:00 2001 From: Diogo Cordeiro Date: Sun, 18 Nov 2018 23:18:28 +0000 Subject: [PATCH] discreetly fixes the code --- polimani.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/polimani.pl b/polimani.pl index e7f6ac5..90c3ec6 100644 --- a/polimani.pl +++ b/polimani.pl @@ -43,7 +43,8 @@ term(X) :- power(X). term(L * R) :- term(L), - term(R), !. + term(R), + !. %% is_term_valid_in_function(+T, +F) is det % @@ -184,16 +185,16 @@ monomial_parts(K, K, indep) :- delete_monomial(M, X, M, 0) :- - term_p(M), + term(M), monomial_parts(M, _, X), !. delete_monomial(M + M2, X, M, M2) :- - term_p(M2), - term_p(M), + term(M2), + term(M), monomial_parts(M, _, X), !. delete_monomial(P + M, X, M, P) :- - term_p(M), + term(M), monomial_parts(M, _, X), !. delete_monomial(P + M2, X, M, P2 + M2) :-