static uint64_t embed_power(struct solver_Algebra *a, uint64_t base, uint64_t exponent) {
  if(is_number(base) && is_number(exponent)) {
    return number_power(a, base, exponent);
  }

  if(is_number(base) && base == LITERAL_ZERO)         return LITERAL_ZERO;
  if(is_number(base) && base == LITERAL_ONE)          return LITERAL_ONE;
  if(is_number(exponent) && exponent == LITERAL_ZERO) return LITERAL_ONE;
  if(is_number(exponent) && exponent == LITERAL_ONE)  return base;

  uint64_t values[2] = {base, exponent};
  uint32_t index = embed_values(a, 2, values);
  return pack_power(index);
}

uint64_t solver_Algebra_power(struct solver_Algebra *a, uint64_t base, uint64_t exponent) { 
  return embed_power(a, base, exponent);
}