# sage_setup: distribution = sagemath-objects
from typing import Any, Optional, Union

class GenericAction:
    def __init__(self, G: Any, S: Any, is_left: bool, check: bool = True) -> None: ...
    def codomain(self) -> Any: ...

class ActOnAction(GenericAction):
    def _act_(self, g: Any, x: Any) -> Any: ...

class ActedUponAction(GenericAction):
    def _act_(self, g: Any, x: Any) -> Any: ...

def detect_element_action(X: Any, Y: Any, X_on_left: bool, X_el: Optional[Any] = None, Y_el: Optional[Any] = None) -> Optional[Any]: ...

class ModuleAction:
    def __init__(self, G: Any, S: Any, g: Optional[Any] = None, a: Optional[Any] = None, check: bool = True) -> None: ...
    def __reduce__(self) -> Any: ...
    def _repr_name_(self) -> str: ...
    def codomain(self) -> Any: ...
    def domain(self) -> Any: ...
    def __invert__(self) -> Any: ...

class LeftModuleAction(ModuleAction):
    def _act_(self, g: Any, a: Any) -> Any: ...

class RightModuleAction(ModuleAction):
    def _act_(self, g: Any, a: Any) -> Any: ...

class IntegerAction:
    def __init__(self, Z: Any, S: Any, is_left: bool, op: Any) -> None: ...
    def __reduce__(self) -> Any: ...
    def __invert__(self) -> Any: ...

class IntegerMulAction(IntegerAction):
    def __init__(self, Z: Any, M: Any, is_left: bool = True, m: Optional[Any] = None) -> None: ...
    def _act_(self, nn: Any, a: Any) -> Any: ...
    def _repr_name_(self) -> str: ...

class IntegerPowAction(IntegerAction):
    def __init__(self, Z: Any, M: Any, is_left: bool = False, m: Optional[Any] = None) -> None: ...
    def _act_(self, n: Any, a: Any) -> Any: ...
    def _repr_name_(self) -> str: ...

def fast_mul(a: Any, n: int) -> Any: ...

def fast_mul_long(a: Any, s: int) -> Any: ...
