2 #include <symengine/assumptions.h>
4 #include <symengine/test_visitors.h>
17 : assumptions_(assumptions)
21 void bvisit(
const Basic &x){};
24 is_lower_ = tribool::indeterminate;
29 is_lower_ = tribool::tritrue;
34 is_lower_ = is_square(x, assumptions_);
39 is_lower_ = tribool::tritrue;
44 size_t nrows = x.nrows();
45 size_t ncols = x.ncols();
47 is_lower_ = tribool::trifalse;
51 is_lower_ = tribool::tritrue;
52 for (
size_t i = 0; i < nrows; i++) {
53 for (
size_t j = i + 1; j < nrows; j++) {
54 is_lower_ = and_tribool(is_lower_, visitor.apply(*x.get(i, j)));
55 if (is_false(is_lower_)) {
64 bool found_nonlower =
false;
65 for (
auto &elt : x.get_terms()) {
67 if (is_indeterminate(is_lower_)) {
69 }
else if (is_false(is_lower_)) {
73 found_nonlower =
true;
78 is_lower_ = tribool::trifalse;
80 is_lower_ = tribool::tritrue;
88 for (
auto &elt : x.get_factors()) {
90 if (is_true(is_lower_)) {
94 is_lower_ = tribool::indeterminate;
107 return visitor.apply(m);
The base class for SymEngine.
The lowest unit of symbolic representation.
Main namespace for SymEngine package.