"""Diofant is a Python library for symbolic mathematics."""

from fractions import Fraction
from importlib.metadata import version

from .calculus import Limit, O, Order, limit, maximize, minimize, residue
from .combinatorics import (AbelianGroup, AlternatingGroup, Cycle, CyclicGroup,
                            DihedralGroup, DirectProduct, GrayCode,
                            IntegerPartition, Partition, Permutation,
                            PermutationGroup, Polyhedron, Prufer, RGS_enum,
                            RGS_rank, RGS_unrank, RubikGroup, Subset,
                            SymmetricGroup, alternating, cube, cyclic,
                            dihedral, dodecahedron, icosahedron, octahedron,
                            symmetric, tetrahedron)
from .concrete import Product, Sum, product, summation
from .core import (Add, Atom, AtomicExpr, Basic, Catalan, Derivative, Dict,
                   Dummy, E, Eq, Equality, EulerGamma, Expr, Float, Function,
                   FunctionClass, Ge, GoldenRatio, GreaterThan, Gt, I, Integer,
                   Lambda, Le, LessThan, Lt, Mod, Mul, N, Ne, Number,
                   NumberSymbol, PoleError, Pow, PrecisionExhausted, Rational,
                   Rel, Relational, S, StrictGreaterThan, StrictLessThan, Subs,
                   Symbol, SympifyError, Tuple, Unequality, Wild, WildFunction,
                   cacheit, comp, count_ops, diff, evaluate, expand,
                   expand_complex, expand_func, expand_log, expand_mul,
                   expand_multinomial, expand_power_base, expand_power_exp,
                   expand_trig, factor_nc, factor_terms, gcd_terms,
                   integer_digits, integer_nthroot, mod_inverse, nan, nfloat,
                   oo, pi, preorder_traversal, symbols, sympify, var,
                   vectorize, zoo)
from .domains import (CC, EX, FF, GF, GROUND_TYPES, QQ, RR, ZZ, AlgebraicField,
                      ComplexAlgebraicField, ComplexField, Domain,
                      ExpressionDomain, FF_gmpy, FF_python, FiniteField,
                      IntegerModRing, IntegerRing, PythonRational, QQ_gmpy,
                      QQ_python, RationalField, RealAlgebraicField, RealField,
                      ZZ_gmpy, ZZ_python)
from .functions import (E1, Abs, Chi, Ci, DiracDelta, Ei, Eijk,
                        FallingFactorial, Heaviside, Id, KroneckerDelta,
                        LambertW, LeviCivita, Li, Max, Min, Piecewise,
                        RisingFactorial, Shi, Si, Ynm, Ynm_c, Znm, acos, acosh,
                        acot, acoth, acsc, adjoint, airyai, airyaiprime,
                        airybi, airybiprime, arg, asec, asin, asinh,
                        assoc_laguerre, assoc_legendre, atan, atan2, atanh,
                        bell, bernoulli, besseli, besselj, besselk, bessely,
                        beta, binomial, bspline_basis, bspline_basis_set,
                        catalan, cbrt, ceiling, chebyshevt, chebyshevt_root,
                        chebyshevu, chebyshevu_root, conjugate, cos, cosh, cot,
                        coth, csc, csch, digamma, dirichlet_eta, elliptic_e,
                        elliptic_f, elliptic_k, elliptic_pi, erf, erf2,
                        erf2inv, erfc, erfcinv, erfi, erfinv, euler, exp,
                        exp_polar, expint, factorial, factorial2, ff,
                        fibonacci, floor, fresnelc, fresnels, gamma,
                        gegenbauer, genocchi, hankel1, hankel2, harmonic,
                        hermite, hyper, im, jacobi, jacobi_normalized, jn,
                        jn_zeros, laguerre, legendre, lerchphi, li, ln, log,
                        loggamma, lowergamma, lucas, meijerg,
                        periodic_argument, piecewise_fold, polar_lift,
                        polarify, polygamma, polylog, principal_branch, re,
                        real_root, rf, root, sec, sech, sign, sin, sinh, sqrt,
                        subfactorial, tan, tanh, transpose, trigamma,
                        unbranched_argument, unpolarify, uppergamma, yn, zeta)
from .integrals import (CosineTransform, FourierTransform, HankelTransform,
                        Integral, InverseCosineTransform,
                        InverseFourierTransform, InverseHankelTransform,
                        InverseLaplaceTransform, InverseMellinTransform,
                        InverseSineTransform, LaplaceTransform,
                        MellinTransform, SineTransform, cosine_transform,
                        fourier_transform, hankel_transform, integrate,
                        inverse_cosine_transform, inverse_fourier_transform,
                        inverse_hankel_transform, inverse_laplace_transform,
                        inverse_mellin_transform, inverse_sine_transform,
                        laplace_transform, mellin_transform, sine_transform)
from .interactive import init_printing
from .logic import (ITE, And, Equivalent, Implies, Nand, Nor, Not, Or, Xor,
                    false, satisfiable, simplify_logic, to_cnf, to_dnf, to_nnf,
                    true)
from .matrices import (Adjoint, BlockDiagMatrix, BlockMatrix, Determinant,
                       DiagonalMatrix, DiagonalOf, FunctionMatrix, GramSchmidt,
                       HadamardProduct, Identity, ImmutableDenseMatrix,
                       ImmutableMatrix, ImmutableSparseMatrix, Inverse, MatAdd,
                       MatMul, MatPow, Matrix, MatrixBase, MatrixExpr,
                       MatrixSlice, MatrixSymbol, MutableDenseMatrix,
                       MutableMatrix, MutableSparseMatrix,
                       NonSquareMatrixError, ShapeError, SparseMatrix, Trace,
                       Transpose, ZeroMatrix, block_collapse, blockcut,
                       casoratian, det, diag, eye, hadamard_product, hessian,
                       jordan_cell, list2numpy, matrix2numpy,
                       matrix_multiply_elementwise, ones, randMatrix,
                       rot_axis1, rot_axis2, rot_axis3, symarray, trace,
                       vandermonde, wronskian, zeros)
from .ntheory import (Sieve, binomial_coefficients, binomial_coefficients_list,
                      continued_fraction_convergents,
                      continued_fraction_iterator, continued_fraction_periodic,
                      continued_fraction_reduce, cycle_length, discrete_log,
                      divisor_count, divisor_sigma, divisors,
                      egyptian_fraction, factorint, factorrat,
                      is_nthpow_residue, is_primitive_root, is_quad_residue,
                      is_square, isprime, jacobi_symbol, legendre_symbol,
                      mobius, multinomial_coefficients, multiplicity, n_order,
                      nextprime, npartitions, nthroot_mod, perfect_power,
                      pollard_pm1, pollard_rho, prevprime, prime, primefactors,
                      primepi, primerange, primitive_root, primorial,
                      quadratic_residues, randprime, sieve, sqrt_mod,
                      sqrt_mod_iter, square_factor, totient, trailing)
from .polys import (LC, LM, LT, BasePolynomialError, CoercionFailedError,
                    ComputationFailedError, DomainError, EvaluationFailedError,
                    ExactQuotientFailedError, ExtraneousFactorsError,
                    FlagError, FractionField, GeneratorsError,
                    GeneratorsNeededError, GroebnerBasis,
                    HeuristicGCDFailedError, HomomorphismFailedError,
                    IsomorphismFailedError, Monomial,
                    MultivariatePolynomialError, NotAlgebraicError,
                    NotInvertibleError, NotReversibleError,
                    OperationNotSupportedError, OptionError,
                    PolificationFailedError, Poly, eliminate,
                    PolynomialDivisionFailedError, PolynomialError,
                    PolynomialRing, PurePoly, RefinementFailedError, RootOf,
                    RootSum, UnificationFailedError, UnivariatePolynomialError,
                    UnivarPolynomialRing, apart, apart_list,
                    assemble_partfrac_list, cancel, chebyshevt_poly,
                    chebyshevu_poly, cofactors, compose, construct_domain,
                    content, count_roots, cyclotomic_poly, decompose, degree,
                    discriminant, div, exquo, factor, factor_list, field,
                    field_isomorphism, gcd, gcdex, grevlex, grlex, groebner,
                    half_gcdex, hermite_poly, horner, igrevlex, igrlex, ilex,
                    interpolate, interpolating_poly, invert,
                    jacobi_poly, laguerre_poly, lcm, legendre_poly, lex,
                    minimal_polynomial, monic, nroots, parallel_poly_from_expr,
                    primitive, primitive_element, quo, random_poly, real_roots,
                    reduced, rem, resultant, ring, roots, spherical_bessel_fn,
                    sqf, sqf_list, sqf_norm, sqf_part, subresultants,
                    swinnerton_dyer_poly, symmetric_poly, symmetrize,
                    terms_gcd, together, trunc, viete)
from .printing import (StrPrinter, ccode, dotprint, fcode, latex,
                       mathematica_code, mathml, octave_code, pprint,
                       pprint_use_unicode, pretty, pretty_print, python, srepr,
                       sstr, sstrrepr)
from .sets import (Complement, Contains, EmptySet, ExtendedReals, FiniteSet,
                   ImageSet, Integers, Intersection, Interval, Naturals,
                   Naturals0, ProductSet, Range, Rationals, Reals, Set,
                   SymmetricDifference, Union, imageset)
from .simplify import (FU, EPath, besselsimp, bottom_up, collect,
                       collect_const, combsimp, cse, denom, epath, exptrigsimp,
                       fraction, fu, hyperexpand, hypersimilar, hypersimp,
                       logcombine, nsimplify, numer, posify, powdenest,
                       powsimp, radsimp, ratsimp, ratsimpmodprime, rcollect,
                       separatevars, signsimp, simplify, sqrtdenest, trigsimp,
                       use)
from .solvers import dsolve, reduce_inequalities, rsolve, solve
from .tensor import (Array, DenseNDimArray, Idx, ImmutableDenseNDimArray,
                     ImmutableSparseNDimArray, Indexed, IndexedBase,
                     MutableDenseNDimArray, MutableSparseNDimArray, NDimArray,
                     SparseNDimArray, derive_by_array,
                     get_contraction_structure, get_indices, permutedims,
                     tensorcontraction, tensorproduct)
from .utilities import (cantor_product, default_sort_key, filldedent, flatten,
                        group, has_dups, has_variety, lambdify,
                        numbered_symbols, ordered, postorder_traversal, sift,
                        subsets, unflatten)


__all__ = (
    'Add', 'Atom', 'AtomicExpr', 'Basic', 'Catalan', 'Derivative', 'Dict',
    'Dummy', 'E', 'Eq', 'Equality', 'EulerGamma', 'Expr', 'Float', 'Function',
    'FunctionClass', 'Ge', 'GoldenRatio', 'GreaterThan', 'Gt', 'I', 'Integer',
    'Lambda', 'Le', 'LessThan', 'Lt', 'Mod', 'Mul', 'N', 'Ne', 'Number',
    'NumberSymbol', 'PoleError', 'Pow', 'PrecisionExhausted', 'Rational',
    'Rel', 'Relational', 'S', 'StrictGreaterThan', 'StrictLessThan', 'Subs',
    'Symbol', 'SympifyError', 'Tuple', 'Unequality', 'Wild', 'WildFunction',
    'cacheit', 'comp', 'count_ops', 'diff', 'evaluate', 'expand',
    'expand_complex', 'expand_func', 'expand_log', 'expand_mul',
    'expand_multinomial', 'expand_power_base', 'expand_power_exp',
    'expand_trig', 'factor_nc', 'factor_terms', 'gcd_terms',
    'integer_digits', 'integer_nthroot', 'mod_inverse', 'nan', 'nfloat',
    'oo', 'pi', 'preorder_traversal', 'symbols', 'sympify', 'var',
    'vectorize', 'zoo', 'ITE', 'And', 'Equivalent', 'Implies', 'Nand', 'Nor',
    'Not', 'Or', 'Xor', 'false',
    'satisfiable', 'simplify_logic', 'to_cnf', 'to_dnf', 'to_nnf', 'true',
    'LC', 'LM', 'LT', 'BasePolynomialError', 'CoercionFailedError',
    'ComputationFailedError', 'DomainError', 'EvaluationFailedError',
    'ExactQuotientFailedError', 'ExtraneousFactorsError', 'FlagError',
    'FractionField', 'GeneratorsError', 'GeneratorsNeededError',
    'GroebnerBasis', 'HeuristicGCDFailedError', 'HomomorphismFailedError',
    'IsomorphismFailedError', 'Monomial', 'MultivariatePolynomialError',
    'NotAlgebraicError', 'NotInvertibleError', 'NotReversibleError', 'OperationNotSupportedError',
    'OptionError', 'PolificationFailedError', 'Poly', 'eliminate',
    'PolynomialDivisionFailedError', 'PolynomialError', 'PolynomialRing', 'PurePoly',
    'RefinementFailedError', 'RootOf', 'RootSum', 'UnificationFailedError',
    'UnivariatePolynomialError', 'UnivarPolynomialRing', 'apart',
    'apart_list', 'assemble_partfrac_list', 'cancel', 'chebyshevt_poly',
    'chebyshevu_poly', 'cofactors', 'compose', 'construct_domain', 'content',
    'count_roots', 'cyclotomic_poly', 'decompose', 'degree',
    'discriminant', 'div', 'exquo', 'factor', 'factor_list', 'field',
    'field_isomorphism', 'gcd', 'gcdex', 'grevlex', 'grlex',
    'groebner', 'half_gcdex', 'hermite_poly', 'horner', 'igrevlex', 'igrlex',
    'ilex', 'interpolate', 'interpolating_poly', 'invert',
    'jacobi_poly', 'laguerre_poly', 'lcm', 'legendre_poly', 'lex',
    'minimal_polynomial', 'monic', 'nroots', 'parallel_poly_from_expr',
    'primitive', 'primitive_element', 'quo', 'random_poly',
    'real_roots', 'reduced', 'rem', 'resultant', 'ring', 'roots',
    'spherical_bessel_fn', 'sqf', 'sqf_list', 'sqf_norm', 'sqf_part',
    'subresultants', 'swinnerton_dyer_poly', 'symmetric_poly',
    'symmetrize', 'terms_gcd', 'together', 'trunc', 'viete',
    'CC', 'EX', 'FF', 'GF', 'GROUND_TYPES', 'QQ', 'RR', 'ZZ', 'AlgebraicField',
    'ComplexAlgebraicField', 'ComplexField', 'Domain', 'ExpressionDomain',
    'FF_gmpy', 'FF_python', 'FiniteField', 'IntegerRing', 'PythonRational',
    'QQ_gmpy', 'QQ_python', 'RationalField', 'RealAlgebraicField', 'RealField',
    'ZZ_gmpy', 'ZZ_python', 'Limit', 'O', 'Order', 'limit', 'residue',
    'E1', 'Abs', 'Chi', 'Ci', 'DiracDelta', 'Ei', 'Eijk', 'FallingFactorial',
    'Heaviside', 'Id', 'KroneckerDelta', 'LambertW', 'LeviCivita', 'Li', 'Max',
    'Min', 'Piecewise', 'RisingFactorial', 'Shi', 'Si', 'Ynm', 'Ynm_c', 'Znm',
    'acos', 'acosh', 'acot', 'acoth', 'acsc', 'adjoint', 'airyai',
    'airyaiprime', 'airybi', 'airybiprime', 'arg', 'asec', 'asin', 'asinh',
    'assoc_laguerre', 'assoc_legendre', 'atan', 'atan2', 'atanh',
    'bell', 'bernoulli', 'besseli', 'besselj', 'besselk', 'bessely',
    'beta', 'binomial', 'bspline_basis', 'bspline_basis_set', 'catalan',
    'cbrt', 'ceiling', 'chebyshevt', 'chebyshevt_root', 'chebyshevu',
    'chebyshevu_root', 'conjugate', 'cos', 'cosh', 'cot', 'coth', 'csc',
    'csch', 'digamma', 'dirichlet_eta', 'elliptic_e', 'elliptic_f',
    'elliptic_k', 'elliptic_pi', 'erf', 'erf2', 'erf2inv', 'erfc', 'erfcinv',
    'erfi', 'erfinv', 'euler', 'exp', 'exp_polar', 'expint', 'factorial',
    'factorial2', 'ff', 'fibonacci', 'floor', 'fresnelc', 'fresnels', 'gamma',
    'gegenbauer', 'genocchi', 'hankel1', 'hankel2', 'harmonic', 'hermite',
    'hyper', 'im', 'jacobi', 'jacobi_normalized', 'jn', 'jn_zeros', 'laguerre',
    'legendre', 'lerchphi', 'li', 'ln', 'log', 'loggamma', 'lowergamma',
    'lucas', 'meijerg', 'periodic_argument', 'piecewise_fold', 'polar_lift',
    'polarify', 'polygamma', 'polylog', 'principal_branch', 're', 'real_root',
    'rf', 'root', 'sec', 'sech', 'sign', 'sin', 'sinh', 'sqrt', 'subfactorial',
    'tan', 'tanh', 'transpose', 'trigamma', 'unbranched_argument', 'unpolarify',
    'uppergamma', 'yn', 'zeta', 'Sieve', 'binomial_coefficients',
    'binomial_coefficients_list', 'continued_fraction_convergents',
    'continued_fraction_iterator', 'continued_fraction_periodic',
    'continued_fraction_reduce', 'cycle_length', 'discrete_log',
    'divisor_count', 'divisor_sigma', 'divisors', 'egyptian_fraction',
    'factorint', 'factorrat', 'is_nthpow_residue', 'is_primitive_root',
    'is_quad_residue', 'is_square', 'isprime', 'jacobi_symbol',
    'legendre_symbol', 'mobius', 'multinomial_coefficients', 'multiplicity',
    'n_order', 'nextprime', 'npartitions', 'nthroot_mod', 'perfect_power',
    'pollard_pm1', 'pollard_rho', 'prevprime', 'prime', 'primefactors',
    'primepi', 'primerange', 'primitive_root', 'primorial',
    'quadratic_residues', 'randprime', 'sieve', 'sqrt_mod', 'sqrt_mod_iter',
    'square_factor', 'totient', 'trailing', 'Product', 'Sum', 'product',
    'summation', 'FU', 'EPath', 'besselsimp', 'bottom_up', 'collect',
    'collect_const', 'combsimp', 'cse', 'denom', 'epath', 'exptrigsimp',
    'fraction', 'fu', 'hyperexpand', 'hypersimilar', 'hypersimp',
    'logcombine', 'nsimplify', 'numer', 'posify', 'powdenest', 'powsimp',
    'radsimp', 'ratsimp', 'ratsimpmodprime', 'rcollect', 'separatevars',
    'signsimp', 'simplify', 'sqrtdenest', 'trigsimp', 'use', 'Complement',
    'Contains', 'EmptySet', 'FiniteSet', 'ImageSet', 'Integers',
    'Intersection', 'Interval', 'Naturals', 'Naturals0', 'ProductSet',
    'Range', 'Rationals', 'Reals', 'Set', 'SymmetricDifference', 'Union',
    'imageset', 'dsolve', 'reduce_inequalities', 'rsolve', 'solve',
    'Adjoint', 'BlockDiagMatrix', 'BlockMatrix', 'Determinant',
    'DiagonalMatrix', 'DiagonalOf', 'FunctionMatrix', 'GramSchmidt',
    'HadamardProduct', 'Identity', 'ImmutableDenseMatrix',
    'ImmutableMatrix', 'ImmutableSparseMatrix', 'Inverse', 'MatAdd',
    'MatMul', 'MatPow', 'Matrix', 'MatrixBase', 'MatrixExpr',
    'MatrixSlice', 'MatrixSymbol', 'MutableDenseMatrix', 'MutableMatrix',
    'MutableSparseMatrix', 'NonSquareMatrixError', 'ShapeError', 'SparseMatrix',
    'Trace', 'Transpose', 'ZeroMatrix', 'block_collapse', 'blockcut',
    'casoratian', 'det', 'diag', 'eye', 'hadamard_product', 'hessian',
    'jordan_cell', 'list2numpy', 'matrix2numpy', 'matrix_multiply_elementwise',
    'ones', 'randMatrix', 'rot_axis1', 'rot_axis2', 'rot_axis3', 'symarray',
    'trace', 'vandermonde', 'wronskian', 'zeros', 'Fraction',
    'cantor_product', 'default_sort_key',
    'filldedent', 'flatten', 'group', 'has_dups', 'has_variety', 'lambdify',
    'numbered_symbols', 'ordered', 'postorder_traversal',
    'sift', 'subsets', 'unflatten',
    'CosineTransform', 'FourierTransform', 'HankelTransform',
    'Integral', 'InverseCosineTransform', 'InverseFourierTransform',
    'InverseHankelTransform', 'InverseLaplaceTransform',
    'InverseMellinTransform', 'InverseSineTransform', 'LaplaceTransform',
    'MellinTransform', 'SineTransform', 'cosine_transform', 'fourier_transform',
    'hankel_transform', 'integrate', 'inverse_cosine_transform',
    'inverse_fourier_transform', 'inverse_hankel_transform',
    'inverse_laplace_transform', 'inverse_mellin_transform',
    'inverse_sine_transform', 'laplace_transform',
    'mellin_transform', 'sine_transform', 'Array', 'DenseNDimArray', 'Idx',
    'ImmutableDenseNDimArray', 'ImmutableSparseNDimArray', 'Indexed',
    'IndexedBase', 'MutableDenseNDimArray', 'MutableSparseNDimArray',
    'NDimArray', 'SparseNDimArray', 'derive_by_array',
    'get_contraction_structure', 'get_indices', 'permutedims',
    'tensorcontraction', 'tensorproduct', 'maximize', 'minimize',
    'AbelianGroup', 'AlternatingGroup', 'Cycle', 'CyclicGroup',
    'DihedralGroup', 'DirectProduct', 'GrayCode', 'IntegerPartition',
    'Partition', 'Permutation', 'PermutationGroup', 'Polyhedron', 'Prufer',
    'RGS_enum', 'RGS_rank', 'RGS_unrank', 'RubikGroup', 'Subset',
    'SymmetricGroup', 'alternating', 'cube', 'cyclic', 'dihedral',
    'dodecahedron', 'icosahedron', 'octahedron', 'symmetric', 'tetrahedron',
    'StrPrinter', 'ccode', 'dotprint', 'fcode', 'latex', 'mathematica_code',
    'mathml', 'octave_code', 'pprint', 'pprint_use_unicode', 'pretty',
    'pretty_print', 'python', 'srepr', 'sstr', 'sstrrepr', 'init_printing',
    'ExtendedReals', 'IntegerModRing')


__version__ = version(__name__)
del version
