basis.info(inf);
case info_flags::expanded:
return (flags & status_flags::expanded);
+ case info_flags::has_indices: {
+ if (flags & status_flags::has_indices)
+ return true;
+ else if (flags & status_flags::has_no_indices)
+ return false;
+ else if (basis.info(info_flags::has_indices)) {
+ setflag(status_flags::has_indices);
+ clearflag(status_flags::has_no_indices);
+ return true;
+ } else {
+ clearflag(status_flags::has_indices);
+ setflag(status_flags::has_no_indices);
+ return false;
+ }
+ }
}
return inherited::info(inf);
}
ex power::expand(unsigned options) const
{
+ if (is_a<symbol>(basis) && exponent.info(info_flags::integer))
+ return (new power(*this))->setflag(status_flags::dynallocated | status_flags::expanded);
+
if (options == 0 && (flags & status_flags::expanded))
return *this;