-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Copy pathfeatures.tex
165 lines (126 loc) · 7.59 KB
/
features.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
% Features to discuss in depth:
This section gives a basic introduction of SymPy, and lists its features.
A few features---assumptions, simplification, calculus, polynomials, printers,
solvers, and matrices---are core components of SymPy and are discussed in
depth. Many other features are discussed in depth in the supplementary
material.
\subsection{Basic Usage}
\label{sec:basic-usage}
\input{basic_usage.tex}
\subsection{List of Features}
Although SymPy's extensive feature set cannot be covered in depth in this
paper, bedrock areas, that is, those areas that are used throughout the
library, are discussed in their own
subsections below. Additionally, Table~\ref{features-table} gives a compact listing
of all major capabilities present in the SymPy codebase. This grants a
sampling from the breadth of topics and application domains that SymPy
services. Unless stated otherwise, all features noted in
Table~\ref{features-table} are symbolic in nature. Numeric features are
discussed in Section~\ref{sec:numerics}.
\begin{longtable}[htbc]{>{\raggedright}p{0.30\linewidth}p{0.63\linewidth}}
\caption{SymPy Features and Descriptions.\label{features-table}}\\
\toprule
\textbf{Feature (submodules)} & \textbf{Description} \\
\midrule
Calculus (\texttt{sympy.core}, \texttt{sympy.calculus}, \texttt{sympy.integrals}, \texttt{sympy.series}) & Algorithms for computing derivatives, integrals, and limits.\\
Category Theory (\texttt{sympy.categories}) & Representation of objects, morphisms, and diagrams. Tools
for drawing diagrams with Xy-pic~\cite{rose1999xy}.\\
Code Generation (\texttt{sympy.printing}, \texttt{sympy.codegen}) & Generation of compilable and executable code in a
variety of different programming languages from expressions directly. Target
languages include C, Fortran, Julia, JavaScript,
Mathematica, MATLAB and Octave, Python, and Theano.\\
Combinatorics \& Group Theory (\texttt{sympy.combinatorics}) & Permutations, combinations,
partitions, subsets, various permutation groups (such as polyhedral, Rubik,
symmetric, and others), Gray codes~\cite{Nijenhuis1978combinatorial},
and Prufer sequences~\cite{biggs1976graph}.\\
Concrete Math (\texttt{sympy.concrete}) & Summation, products, tools for determining whether summation
and product expressions are convergent, absolutely convergent, hypergeometric,
and for determining other properties; computation of Gosper's normal form~\cite{Petkovsek1997AeqB} for two univariate polynomials.\\
Cryptography (\texttt{sympy.crypto}) & Block and stream ciphers, including shift, Affine,
substitution, Vigen\`{e}re's, Hill's, bifid, RSA, Kid RSA,
linear-feedback shift registers, and Elgamal encryption.\\
Differential Geometry (\texttt{sympy.diffgeom}) & Representations of manifolds, metrics, tensor
products, and coordinate systems in Riemannian and pseudo-Riemannian
geometries~\cite{sussman2013functional}.\\
% TODO: Someone verify that this is a good summary of the diffgeom module
Geometry (\texttt{sympy.geometry}) & Representations of 2D geometrical entities, such as lines and
circles. Enables queries on these entities, such as asking the area of an
ellipse, checking for collinearity of a set of
points, or finding the intersection between objects.\\
Lie Algebras (\texttt{sympy.liealgebras}) & Representations of Lie algebras and root systems.\\
Logic (\texttt{sympy.logic}) & Boolean expressions, equivalence testing, satisfiability, and normal
forms.\\
Matrices (\texttt{sympy.matrices}) & Tools for creating matrices of symbols and expressions.
Both sparse and dense representations, as well as symbolic linear
algebraic operations (e.g., inversion and factorization), are
supported.\\
Matrix Expressions (\texttt{sympy.matrices.expressions}) & Matrices with symbolic dimensions (unspecified entries).
Block matrices.\\
Number Theory (\texttt{sympy.ntheory}) & Prime number generation, primality testing, integer
factorization, continued fractions, Egyptian fractions, modular arithmetic,
quadratic residues, partitions, binomial and multinomial coefficients,
prime number tools, hexidecimal digits of $\pi$, and integer factorization. \\
Plotting (\texttt{sympy.plotting}) & Hooks for visualizing expressions via matplotlib~\cite{Hunter:2007}
or as text drawings when lacking a graphical back-end. 2D function plotting,
3D function
plotting, and 2D implicit function plotting are supported.\\
Polynomials (\texttt{sympy.polys}) & Polynomial algebras over various coefficient domains.
Functionality ranges from simple operations (e.g., polynomial division) to
advanced computations (e.g., Gr\"obner bases~\cite{Adams1994intro} and multivariate
factorization over algebraic number domains).\\
Printing (\texttt{sympy.printing}) & Functions for printing SymPy expressions in the terminal with ASCII
or Unicode characters and converting SymPy expressions to \LaTeX{} and
MathML.\\
Quantum Mechanics (\texttt{sympy.physics.quantum}) & Quantum states, bra--ket notation, operators, basis sets,
representations, tensor products, inner products, outer products, commutators,
anticommutators, and specific quantum system implementations.\\
Series (\texttt{sympy.series}) & Series expansion, sequences, and limits of sequences.
This includes Taylor, Laurent, and Puiseux series as well as special series, such
as Fourier and formal power series.\\
Sets (\texttt{sympy.sets}) & Representations of empty, finite, and infinite sets (including
special sets such as the natural, integer, and complex numbers). Operations
on sets such as union, intersection, Cartesian product, and building sets from
other sets are supported.\\
Simplification (\texttt{sympy.simplify}) & Functions for manipulating and simplifying expressions.
Includes algorithms for simplifying hypergeometric functions, trigonometric
expressions, rational functions, combinatorial functions, square root
denesting, and common subexpression elimination.\\
Solvers (\texttt{sympy.solvers}) & Functions for symbolically solving equations, systems
of equations, both linear and non-linear, inequalities, ordinary differential
equations, partial differential equations, Diophantine equations, and
recurrence relations.\\
Special Functions (\texttt{sympy.functions}) & Implementations of a number of well known special functions,
including Dirac delta, Gamma, Beta, Gauss error functions, Fresnel integrals,
Exponential integrals, Logarithmic integrals, Trigonometric integrals, Bessel,
Hankel, Airy, B-spline, Riemann Zeta, Dirichlet eta, polylogarithm, Lerch
transcendent, hypergeometric, elliptic integrals, Mathieu, Jacobi polynomials,
Gegenbauer polynomial, Chebyshev polynomial, Legendre polynomial, Hermite
polynomial, Laguerre polynomial, and
spherical harmonic functions.\\
Statistics (\texttt{sympy.stats}) & Support for a random variable type as well as the ability to
declare this variable from prebuilt distribution functions such as
Normal, Exponential, Coin, Die, and other custom distributions~\cite{rocklin2012symbolic}.\\
Tensors (\texttt{sympy.tensor}) & Symbolic manipulation of indexed objects.\\
Vectors (\texttt{sympy.vector}) & Basic operations on vectors and differential calculus with respect
to 3D Cartesian coordinate systems.\\
\bottomrule
\end{longtable}
%% Assumptions
\subsection{Assumptions}
\label{sec:assumptions}
\input{assumptions.tex}
\subsection{Simplification}
\input{simplification}
\subsection{Calculus}
\label{sec:calculus}
\input{calculus}
\subsection{Polynomials}
\input{polys}
\subsection{Printers}
\input{printers.tex}
% Solvers (regular equations, maybe also mention other types of solvers like ODEs/recurrence/Diophantine)
\subsection{Solvers}
\input{solvers.tex}
% Matrices (worth emphasizing that they are symbolic)
\subsection{Matrices}
\input{matrices}