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