from typing import Number, Optional

from .expr import Expr

def isqrt(n: Number) -> Number: ...
def integer_nthroot(y: Number, n: Number) -> Tuple[Number, bool]: ...
def integer_log(y: Number, x: Number) -> Tuple[Number, bool]: ...

class Pow(Expr):
    is_Pow: bool = ...
    @property
    def base(self) -> Expr: ...
    @property
    def exp(self) -> Expr: ...
    def __new__(cls, b: Expr, e: Expr, evaluate: Optional[bool] = ...) -> Expr: ...
    def _eval_Mod(self, q: Expr) -> Expr: ...
    def _eval_is_even(self) -> bool: ...
    def _eval_is_negative(self) -> bool: ...
    def _eval_is_positive(self) -> bool: ...
    def _eval_is_extended_positive(self) -> bool: ...
    def _eval_is_extended_negative(self) -> bool: ...
    def _eval_is_zero(self) -> bool: ...
    def _eval_is_integer(self) -> bool: ...
    def _eval_is_extended_real(self) -> bool: ...
    def _eval_is_complex(self) -> bool: ...
    def _eval_is_imaginary(self) -> bool: ...
    def _eval_is_odd(self) -> bool: ...
    def _eval_is_finite(self) -> bool: ...
    def _eval_is_prime(self) -> bool: ...
    def _eval_is_composite(self) -> bool: ...
    def _eval_is_polar(self) -> bool: ...
    def _eval_subs(self, old: Expr, new: Expr) -> Expr: ...
    def as_base_exp(self) -> Tuple[Number, Number]: ...
    def _eval_adjoint(self) -> Expr: ...
    def _eval_conjugate(self) -> Expr: ...
    def _eval_transpose(self) -> Expr: ...
    def _eval_expand_power_exp(self, **hints: Any) -> Expr: ...
    def _eval_expand_power_base(self, **hints: Any) -> Expr: ...
    def _eval_expand_multinomial(self, **hints: Any) -> Expr: ...
    def _eval_derivative(self, s: Expr) -> Expr: ...
    def _eval_evalf(self, prec: Expr) -> Expr: ...
    def _eval_is_rational(self) -> bool: ...
    def _eval_is_algebraic(self) -> bool: ...
    def _eval_rewrite_as_exp(self, base: Expr, expo: Expr, **kwargs: Any) -> Expr: ...
    def _sage_(self) -> Expr: ...
    def _eval_rewrite_as_sin(self, base: Expr, exp: Expr) -> Expr: ...
    def _eval_rewrite_as_cos(self, base: Expr, exp: Expr) -> Expr: ...
    def _eval_rewrite_as_tanh(self, base: Expr, exp: Expr) -> Expr: ...
    def _eval_rewrite_as_sqrt(
        self, base: Expr, exp: Expr, **kwargs: Any
    ) -> Optional[Expr]: ...
    def _eval_difference_delta(self, n: Expr, step: Expr) -> Expr: ...
