#include #include using namespace GiNaC; using namespace std; int main (){ symbol x("x"); int n = 2; ex test = power(power(x,n),power(n,-1)); cout << test.subs(power(power(wild(1),wild(2)),power(n,-1))==wild(1)) << endl; cout << test.subs(power(power(wild(1),wild(2)),power(wild(2),-1))==wild(1)) << endl; return 0; }