from typing import Final, overload

class Fr:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, v: int) -> None: ...
    @overload
    def __init__(self, s: str, base: int = 0) -> None: ...
    def __str__(self) -> str: ...
    @staticmethod
    def random() -> "Fr": ...
    def __add__(self, other: "Fr") -> "Fr": ...
    def __sub__(self, other: "Fr") -> "Fr": ...
    def __neg__(self) -> "Fr": ...
    def __mul__(self, other: "Fr") -> "Fr": ...
    def __truediv__(self, other: "Fr") -> "Fr": ...
    def __invert__(self) -> "Fr": ...
    def sqr(self) -> "Fr": ...
    def sqrt(self) -> "Fr | None": ...
    def __eq__(self, other: "Fr") -> bool: ...
    def __ne__(self, other: "Fr") -> bool: ...
    def is_zero(self) -> bool: ...
    def is_one(self) -> bool: ...
    def __hash__(self) -> int: ...
    def serialize(self) -> bytes: ...
    @staticmethod
    def deserialize(b: bytes) -> "Fr": ...

class G1:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, s: str, mode: int = 0) -> None: ...
    def __str__(self) -> str: ...
    @staticmethod
    def hash(b: bytes) -> "G1": ...
    def __add__(self, other: "G1") -> "G1": ...
    def __sub__(self, other: "G1") -> "G1": ...
    def __neg__(self) -> "G1": ...
    def __mul__(self, other: "Fr") -> "G1": ...
    def __eq__(self, other: "G1") -> bool: ...
    def __ne__(self, other: "G1") -> bool: ...
    def is_zero(self) -> bool: ...
    def __hash__(self) -> int: ...
    def serialize(self) -> bytes: ...
    @staticmethod
    def deserialize(b: bytes) -> "G1": ...

class G2:
    @overload
    def __init__(self) -> None: ...
    @overload
    def __init__(self, s: str, mode: int = 0) -> None: ...
    def __str__(self) -> str: ...
    @staticmethod
    def hash(b: bytes) -> "G2": ...
    def __add__(self, other: "G2") -> "G2": ...
    def __sub__(self, other: "G2") -> "G2": ...
    def __neg__(self) -> "G2": ...
    def __mul__(self, other: "Fr") -> "G2": ...
    def __eq__(self, other: "G2") -> bool: ...
    def __ne__(self, other: "G2") -> bool: ...
    def is_zero(self) -> bool: ...
    def __hash__(self) -> int: ...
    def serialize(self) -> bytes: ...
    @staticmethod
    def deserialize(b: bytes) -> "G2": ...

class GT:
    @overload
    def __init__(self, one: bool = True) -> None: ...
    @overload
    def __init__(self, s: str, mode: int = 0) -> None: ...
    def __str__(self) -> str: ...
    def __mul__(self, other: "GT") -> "GT": ...
    def __truediv__(self, other: "GT") -> "GT": ...
    def __invert__(self) -> "GT": ...
    def __pow__(self, other: "Fr") -> "GT": ...
    def __eq__(self, other: "GT") -> bool: ...
    def __ne__(self, other: "GT") -> bool: ...
    def is_zero(self) -> bool: ...
    def is_one(self) -> bool: ...
    def __hash__(self) -> int: ...
    def serialize(self) -> bytes: ...
    @staticmethod
    def deserialize(b: bytes) -> "GT": ...

def pairing(a: G1, b: G2) -> GT: ...

g1: Final[G1]
g2: Final[G2]
r: Final[int]
