from typing import Any

from sympy.core.basic import Basic
from sympy.matrices import Matrix
from sympy.sets.conditionset import ConditionSet
from sympy.sets.sets import Complement, FiniteSet, Intersection, Set, Union

class NonlinearError(ValueError): ...

_rc = ...
invert_complex = ...

def invert_real(
    f_x, y, x
) -> tuple[Any, Any | FiniteSet] | tuple[Any, FiniteSet] | tuple[Any, Any | FiniteSet | Intersection | Union | Complement]: ...
def domain_check(f, symbol, p) -> bool | None: ...

class _SolveTrig1Error(Exception): ...

def solve_decomposition(f, symbol, domain) -> Set | FiniteSet | Intersection | Union | Complement | ConditionSet: ...
def solveset(f, symbol=..., domain=...) -> Set: ...
def solveset_real(f, symbol) -> Set: ...
def solveset_complex(f, symbol) -> Set: ...
def solvify(f, symbol, domain) -> list[Basic] | None: ...
def linear_coeffs(eq, *syms, dict=...) -> list[Any]: ...
def linear_eq_to_matrix(equations, *symbols) -> tuple[Any, Matrix]: ...
def linsolve(system, *symbols) -> FiniteSet | Basic: ...
def substitution(
    system, symbols, result=..., known_symbols=..., exclude=..., all_symbols=...
) -> Set | FiniteSet | Intersection | Union | Complement | ConditionSet: ...
def nonlinsolve(system, *symbols) -> FiniteSet | Set | Intersection | Union | Complement | ConditionSet: ...
