| 1214 | |
| 1215 | |
| 1216 | BOOLEAN B(const binomial& a, const binomial& b, const binomial& c) |
| 1217 | // verifies if head(a) divides lcm(head(b),head(c)) and |
| 1218 | // lcm(head(a),head(b))!=lcm(head(b),head(c))!=lcm(head(a),head(c)) |
| 1219 | { |
| 1220 | |
| 1221 | #ifdef SUPPORT_DRIVEN_METHODS |
| 1222 | |
| 1223 | long a_or_b=a.head_support|b.head_support; |
| 1224 | long a_or_c=a.head_support|c.head_support; |
| 1225 | long b_or_c=b.head_support|c.head_support; |
| 1226 | |
| 1227 | if((a.head_support & b_or_c)!=a.head_support) |
| 1228 | return FALSE; |
| 1229 | // The above condition verifies if the support of head(a) is contained in |
| 1230 | // the support of lcm(head(b),head(c)). |
| 1231 | |
| 1232 | if( (a_or_c != b_or_c) && (a_or_b != b_or_c)) |
| 1233 | // Then the inequality conditions are guaranteed... |
| 1234 | { |
| 1235 | for(short i=0;i<a._number_of_variables;i++) |
| 1236 | { |
| 1237 | Integer b_exponent=b.exponent_vector[i]; |
| 1238 | Integer c_exponent=c.exponent_vector[i]; |
| 1239 | |
| 1240 | if(a.exponent_vector[i]>MAXIMUM(b_exponent,c_exponent)) |
| 1241 | return FALSE; |
| 1242 | } |
| 1243 | |
| 1244 | return (TRUE); |
| 1245 | } |
| 1246 | |
| 1247 | |
| 1248 | if(a_or_b != b_or_c) |
| 1249 | // Then the first inequality conditions is guaranteed... |
| 1250 | // Verify only the second. |
| 1251 | { |
| 1252 | BOOLEAN not_equal=FALSE; |
| 1253 | |
| 1254 | for(short i=0;i<a._number_of_variables;i++) |
| 1255 | { |
| 1256 | Integer a_exponent=a.exponent_vector[i]; |
| 1257 | Integer b_exponent=b.exponent_vector[i]; |
| 1258 | Integer c_exponent=c.exponent_vector[i]; |
| 1259 | Integer m=MAXIMUM(b_exponent, c_exponent); |
| 1260 | |
| 1261 | if(a_exponent>m) |
| 1262 | return FALSE; |
| 1263 | |
| 1264 | if(MAXIMUM(a_exponent,c_exponent) != m) |
| 1265 | not_equal=TRUE; |
| 1266 | } |
| 1267 | return(not_equal); |
| 1268 | } |
| 1269 | |
| 1270 | |
| 1271 | if( a_or_c != b_or_c ) |
| 1272 | // Then the second inequality conditions is guaranteed... |
| 1273 | // Verify only the first. |