from typing import Any

def dup_half_gcdex(f, g, K) -> tuple[Any | list[Any], Any | list[Any]]:
    ...

def dmp_half_gcdex(f, g, u, K) -> tuple[Any | list[Any], Any | list[Any]]:
    ...

def dup_gcdex(f, g, K) -> tuple[Any | list[Any], Any | list[Any], Any | list[Any]]:
    ...

def dmp_gcdex(f, g, u, K) -> tuple[Any | list[Any], Any | list[Any], Any | list[Any]]:
    ...

def dup_invert(f, g, K) -> list[Any]:
    ...

def dmp_invert(f, g, u, K) -> list[Any]:
    ...

def dup_euclidean_prs(f, g, K) -> list[Any]:
    ...

def dmp_euclidean_prs(f, g, u, K) -> list[Any]:
    ...

def dup_primitive_prs(f, g, K) -> list[Any]:
    ...

def dmp_primitive_prs(f, g, u, K) -> list[Any]:
    ...

def dup_inner_subresultants(f, g, K) -> tuple[list[Any], list[Any]]:
    ...

def dup_subresultants(f, g, K) -> list[Any]:
    ...

def dup_prs_resultant(f, g, K) -> tuple[Any, list[Any]]:
    ...

def dup_resultant(f, g, K, includePRS=...) -> tuple[Any, list[Any]]:
    ...

def dmp_inner_subresultants(f, g, u, K) -> tuple[list[Any], list[Any]] | tuple[list[Any], list[list[list[Any]] | Any | list[Any]]]:
    ...

def dmp_subresultants(f, g, u, K) -> list[Any]:
    ...

def dmp_prs_resultant(f, g, u, K) -> tuple[Any, list[Any]] | tuple[list[list[Any]], list[Any]] | tuple[list[list[Any]] | Any | list[Any], list[Any]]:
    ...

def dmp_zz_modular_resultant(f, g, p, u, K) -> list[list[Any]]:
    ...

def dmp_zz_collins_resultant(f, g, u, K) -> list[list[Any]]:
    ...

def dmp_qq_collins_resultant(f, g, u, K0) -> list[list[Any]] | list[Any]:
    ...

def dmp_resultant(f, g, u, K, includePRS=...) -> tuple[Any, list[Any]] | tuple[list[list[Any]], list[Any]] | tuple[list[list[Any]] | Any | list[Any], list[Any]] | list[list[Any]] | list[Any]:
    ...

def dup_discriminant(f, K):
    ...

def dmp_discriminant(f, u, K) -> list[list[Any]]:
    ...

def dup_rr_prs_gcd(f, g, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]]:
    ...

def dup_ff_prs_gcd(f, g, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any | list[Any], list[Any], list[Any]] | tuple[Any | list[Any], Any | list[Any], Any | list[Any]]:
    ...

def dmp_rr_prs_gcd(f, g, u, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]] | tuple[list[list[Any]], ...] | tuple[Any, list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[list[Any], list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[Any, list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[Any], list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[list[Any]] | Any | list[Any], Any, Any] | tuple[list[Any], list[Any | list[list[Any]]], list[Any | list[list[Any]]]] | tuple[list[Any] | Any | list[list[Any]] | list[Any | list[Any] | list[list[Any]]], Any | list[list[Any]], Any | list[list[Any]]]:
    ...

def dmp_ff_prs_gcd(f, g, u, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any | list[Any], list[Any], list[Any]] | tuple[Any | list[Any], Any | list[Any], Any | list[Any]] | tuple[list[list[Any]], ...] | tuple[Any | list[Any], list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[Any | list[Any], list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[Any], list[Any | list[list[Any]]], list[Any | list[list[Any]]]] | tuple[Any | list[Any], Any | list[list[Any]], Any | list[list[Any]]]:
    ...

HEU_GCD_MAX = ...
def dup_zz_heu_gcd(f, g, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]] | tuple[list[Any], list[Any], Any | list[Any]] | tuple[list[Any], Any | list[Any], list[Any]]:
    ...

def dmp_zz_heu_gcd(f, g, u, K) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]] | tuple[list[Any], list[Any], Any | list[Any]] | tuple[list[Any], Any | list[Any], list[Any]] | tuple[list[list[Any]], ...] | tuple[Any, list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[list[Any], list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[Any, list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[Any], list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[list[Any]] | Any | list[Any], Any, Any] | tuple[list[Any], list[Any | list[list[Any]]], list[Any | list[list[Any]]]] | tuple[list[Any], Any | list[list[Any]], Any | list[list[Any]]] | tuple[list[Any], list[Any], Any | list[list[Any]]] | tuple[list[Any], Any | list[list[Any]], list[Any]]:
    ...

def dup_qq_heu_gcd(f, g, K0) -> tuple[list[Any], list[Any], list[Any]] | tuple[Any | list[Any], list[Any], list[Any]]:
    ...

def dmp_qq_heu_gcd(f, g, u, K0) -> tuple[list[list[Any]], ...] | tuple[Any | list[Any], list[list[Any]], list[list[Any]] | Any | list[Any]] | tuple[Any | list[Any], list[list[Any]] | Any | list[Any], list[list[Any]]] | tuple[list[Any], list[Any | list[list[Any]]], list[Any | list[list[Any]]]] | tuple[Any | list[Any], list[Any], list[Any]]:
    ...

def dup_inner_gcd(f, g, K) -> tuple[list[Any], Any, Any] | tuple[Any, Any, Any] | tuple[list[Any], list[Any], list[Any]] | tuple[Any | list[Any], list[Any], list[Any]] | tuple[Any | list[Any], Any | list[Any], Any | list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]] | tuple[list[Any], list[Any], Any | list[Any]] | tuple[list[Any], Any | list[Any], list[Any]]:
    ...

def dmp_inner_gcd(f, g, u, K) -> tuple[list[Any], Any, Any] | tuple[Any, Any, Any] | tuple[list[Any], list[Any], list[Any]] | tuple[Any | list[Any], list[Any], list[Any]] | tuple[Any | list[Any], Any | list[Any], Any | list[Any]] | tuple[Any, list[Any], list[Any]] | tuple[list[Any], Any | list[Any], Any | list[Any]] | tuple[list[Any], list[Any], Any | list[Any]] | tuple[list[Any], Any | list[Any], list[Any]]:
    ...

def dup_gcd(f, g, K) -> list[Any]:
    ...

def dmp_gcd(f, g, u, K):
    ...

def dup_rr_lcm(f, g, K) -> list[Any]:
    ...

def dup_ff_lcm(f, g, K) -> list[Any]:
    ...

def dup_lcm(f, g, K) -> list[Any]:
    ...

def dmp_rr_lcm(f, g, u, K) -> list[Any]:
    ...

def dmp_ff_lcm(f, g, u, K) -> list[Any]:
    ...

def dmp_lcm(f, g, u, K) -> list[Any]:
    ...

def dmp_content(f, u, K) -> list[Any]:
    ...

def dmp_primitive(f, u, K) -> tuple[Any | list[Any], Any] | tuple[Any | list[Any], list[Any | list[list[Any]]]]:
    ...

def dup_cancel(f, g, K, include=...) -> tuple[Any, Any, list[Any] | Any | list[list[Any]], list[Any] | Any | list[list[Any]]] | tuple[list[Any], list[Any]]:
    ...

def dmp_cancel(f, g, u, K, include=...) -> tuple[Any, Any, list[Any] | Any | list[list[Any]], list[Any] | Any | list[list[Any]]] | tuple[list[Any], list[Any]]:
    ...

