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

from fractions import Fraction
import pkg_resources
__version__ = pkg_resources.get_distribution(__name__).version
del pkg_resources

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 .logic import (ITE, And, Equivalent, Implies, Nand, Nor, Not, Or,
                    Xor, false, satisfiable, simplify_logic, to_cnf,
                    to_dnf, to_nnf, true)
from .polys import (LC, LM, LT, BasePolynomialError, CoercionFailed,
                    ComputationFailed, DomainError, EvaluationFailed,
                    ExactQuotientFailed, ExtraneousFactors, FlagError,
                    FractionField, GeneratorsError, GeneratorsNeeded,
                    GroebnerBasis, HeuristicGCDFailed, HomomorphismFailed,
                    IsomorphismFailed, Monomial, MultivariatePolynomialError,
                    NotAlgebraic, NotInvertible, NotReversible,
                    OperationNotSupported, OptionError, Options,
                    PolificationFailed, Poly, PolynomialDivisionFailed,
                    PolynomialError, PolynomialRing, PurePoly,
                    RefinementFailed, RootOf, RootSum, UnificationFailed,
                    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, itermonomials, 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 .domains import (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, IntegerModRing)
from .series import Limit, O, Order, limit, residue
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 .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 .concrete import Product, Sum, product, summation
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 .sets import (Complement, Contains, EmptySet, FiniteSet, ImageSet,
                   Integers, Intersection, Interval, Naturals, Naturals0,
                   ProductSet, Range, Rationals, Reals, Set,
                   SymmetricDifference, Union, imageset, ExtendedReals)
from .solvers import dsolve, reduce_inequalities, rsolve, solve
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 .geometry import (Circle, Curve, Ellipse, GeometryError, Line,
                       Point, Polygon, Ray,
                       RegularPolygon, Segment, Triangle,
                       are_similar, centroid, convex_hull, deg, idiff,
                       intersection, rad)
from .utilities import (cantor_product, capture, default_sort_key, filldedent,
                        flatten, group, has_dups, has_variety, lambdify,
                        numbered_symbols, ordered, postfixes,
                        postorder_traversal, prefixes, sift, subsets,
                        topological_sort, unflatten, variations)
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, line_integrate, mellin_transform,
                        sine_transform)
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 .calculus import maximize, minimize
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 .plotting import (plot, plot3d, plot3d_parametric_line,
                       plot3d_parametric_surface, plot_backends, plot_implicit,
                       plot_parametric)
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 .interactive import init_printing


__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', 'CoercionFailed',
    'ComputationFailed', 'DomainError', 'EvaluationFailed',
    'ExactQuotientFailed', 'ExtraneousFactors', 'FlagError',
    'FractionField', 'GeneratorsError', 'GeneratorsNeeded',
    'GroebnerBasis', 'HeuristicGCDFailed', 'HomomorphismFailed',
    'IsomorphismFailed', 'Monomial', 'MultivariatePolynomialError',
    'NotAlgebraic', 'NotInvertible', 'NotReversible', 'OperationNotSupported',
    'OptionError', 'Options', 'PolificationFailed', 'Poly',
    'PolynomialDivisionFailed', 'PolynomialError', 'PolynomialRing', 'PurePoly',
    'RefinementFailed', 'RootOf', 'RootSum', 'UnificationFailed',
    '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', 'itermonomials',
    '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', 'Circle', 'Curve', 'Ellipse',
    'GeometryError', 'Line', 'Point', 'Fraction',
    'Polygon', 'Ray', 'RegularPolygon', 'Segment',
    'Triangle', 'are_similar', 'centroid', 'convex_hull', 'deg', 'idiff',
    'intersection', 'rad', 'cantor_product', 'capture', 'default_sort_key',
    'filldedent', 'flatten', 'group', 'has_dups', 'has_variety', 'lambdify',
    'numbered_symbols', 'ordered', 'postfixes', 'postorder_traversal',
    'prefixes', 'sift', 'subsets', 'topological_sort', 'unflatten',
    'variations', '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', 'line_integrate',
    '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',
    'plot', 'plot3d', 'plot3d_parametric_line', 'plot3d_parametric_surface',
    'plot_backends', 'plot_implicit', 'plot_parametric', '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')
