1457{
1458 if (f == nullptr or level < 0 or f->deg >= 2) return -1;
1459 if (level == 0)
1460 {
1461 if (f->deg == 0) return -1;
1462
1463 if (f->arr.ints[0] == 0 and f->arr.ints[1] == 1)
1464 return 0;
1465 else
1466 return -1;
1467 }
1468 else
1469 {
1470 if (f->arr.polys[0] ==
nullptr and
is_one(level - 1, f->arr.polys[1]))
1471 return level;
1472 if (f->deg == 1) return -1;
1474 }
1475}
int index_of_var(int level, const TowerPolynomial f) const
static bool is_one(int level, const TowerPolynomial f)