Skip to content

Commit f28ef74

Browse files
authored
Fix all the other references (#291)
In order to reference code blocks, we have to switch from `code` to `code-block` directives. Similarly, tables need wrapping in `table` directives.
1 parent 71fa239 commit f28ef74

File tree

1 file changed

+52
-36
lines changed

1 file changed

+52
-36
lines changed

doc/galgebra_guide.rst

Lines changed: 52 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ Then
225225

226226
where :math:`\breve{a}_{i}` indicates that :math:`a_{i}` is to be deleted from the product. In the standard notation if a vector is denoted with a subscript the reciprocal vector is denoted with a superscript. The set of reciprocal vectors will be calculated if a coordinate set is given when a geometric algebra is instantiated since they are required for geometric differentiation when the ``Ga`` member function ``Ga.mvr()`` is called to return the reciprocal basis in terms of the basis vectors.
227227

228+
.. _sect_manifold:
229+
228230
Manifolds and Submanifolds
229231
--------------------------
230232

@@ -417,6 +419,8 @@ Additionally, one can calculate the connection of the normalized basis as follow
417419
418420
where :math:`{{\displaystyle\frac{\partial {{\eb}_{i}}}{\partial {x^{j}}}}}` is expanded in terms of the :math:`{\boldsymbol{\hat{e}}}_{i}`\ ’s.
419421

422+
.. _ldops:
423+
420424
Linear Differential Operators
421425
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
422426

@@ -581,7 +585,9 @@ or
581585
\be {\lp {A\dot{B}C} \rp }\dot{D} = {\lp {A{\lp {{{D}_{\mathcal{D}}}B} \rp }C} \rp }{{D}_{\mathcal{G}}} = {{\displaystyle}\sum_{l\in{\left \{
582586
{n} \rbrc}}{\lp {A{\lp {D_{l}B} \rp }C} \rp }{{\eb}}^{l}}. \ee
583587
584-
The implementation of equations [splitopV] and [splitopM] is described in sections [makeMV] and [makeMVD].
588+
The implementation of equations :math:`\ref{splitopV}` and :math:`\ref{splitopM}` is described in sections :ref:`makeMV` and :ref:`makeMVD`.
589+
590+
.. _Ltrans:
585591

586592
Linear Transformations/Outermorphisms
587593
-------------------------------------
@@ -685,6 +691,8 @@ that has the proper symmetry for self adjoint transformations :math:`(a\cdot{{T}
685691
686692
Any program/code that represents :math:`T` should allow one to define :math:`T` in terms of :math:`T_{ij}` or :math:`T_{j}^{l}` and likewise given a linear transformation :math:`T` obtain both :math:`T_{ij}` and :math:`T_{j}^{l}` from it. Please note that these considerations come into play for any non-Euclidean metric with respect to the trace and adjoint of a linear transformation since calculating either requires a dot product.
687693

694+
.. _MLtrans:
695+
688696
Multilinear Functions
689697
---------------------
690698

@@ -728,7 +736,7 @@ The arguments (vectors) of the multilinear function can be represented in terms
728736
a_{j} =& a^{i_{j}}{{\eb}}_{i_{j}}, \label{vrep}\\
729737
=& a_{i_{j}}{{\eb}}^{i_{j}}. \label{rvrep}\end{aligned}
730738
731-
Equation ([vrep]) gives :math:`a_{j}` in terms of the basis vectors and eq ([rvrep]) in terms of the reciprocal basis vectors. The index :math:`j` refers to the argument slot and the indices :math:`i_{j}` the components of the vector in terms of the basis. The covariant representation of the tensor is defined by
739+
Equation (:math:`\ref{vrep}`) gives :math:`a_{j}` in terms of the basis vectors and eq (:math:`\ref{rvrep}`) in terms of the reciprocal basis vectors. The index :math:`j` refers to the argument slot and the indices :math:`i_{j}` the components of the vector in terms of the basis. The covariant representation of the tensor is defined by
732740

733741
:math:`\newcommand{\indices}[1]{#1}\begin{aligned} T\indices{_{i_{1}\dots i_{r}}} \equiv& {{T}\lp {{{\eb}}_{i_{1}},\dots,{{\eb}}_{i_{r}}} \rp } \\ {{T}\lp {a_{1},\dots,a_{r}} \rp } =& {{T}\lp {a^{i_{1}}{{\eb}}_{i_{1}},\dots,a^{i_{r}}{{\eb}}_{i_{r}}} \rp } \nonumber \\ =& {{T}\lp {{{\eb}}_{i_{1}},\dots,{{\eb}}_{i_{r}}} \rp }a^{i_{1}}\dots a^{i_{r}} \nonumber \\ =& T\indices{_{i_{1}\dots i_{r}}}a^{i_{1}}\dots a^{i_{r}}.\end{aligned}`\ $
734742

@@ -812,7 +820,7 @@ Now contract between :math:`i_{j}` and :math:`i_{k}` and use the properties of t
812820
g^{i_{j}i_{k}}g_{i_{j}k_{j}}T\indices{_{i_{1}\dots}{}^{k_{j}}{}_{\dots i_{k}\dots i_{r}}} \nonumber \\
813821
=& \delta_{k_{j}}^{i_{k}}T\indices{_{i_{1}\dots}{}^{k_{j}}{}_{\dots i_{k}\dots i_{r}}}. \label{114a}\end{aligned}
814822
815-
Equation ([114a]) is the standard formula for contraction between upper and lower indexes of a mixed tensor.
823+
Equation (:math:`\ref{114a}`) is the standard formula for contraction between upper and lower indexes of a mixed tensor.
816824

817825
Finally if :math:`{{T}\lp {a_{1},\dots,a_{r}} \rp }` is a tensor field (implicitly a function of position) the tensor derivative is defined as
818826

@@ -993,19 +1001,23 @@ The basic geometric algebra operations will be implemented in python by defining
9931001

9941002
.. math:: \be F +\sum_{r=1}^{n}F^{i_{1}\dots i_{r}}\eb_{i_{1}}\dots\eb_{i_{r}} \ee
9951003

996-
where the :math:`F`\ ’s are *sympy* symbolic constants or functions of the coordinates and a multivector class, *Mv*, that wraps *Ga* and overloads the python operators to provide all the needed multivector operations as shown in Table [ops] where :math:`A` and :math:`B` are any two multivectors (In the case of :math:`+`, :math:`-`, :math:`*`, :math:`{\wedge}`, :math:`|`, :math:`<`, and :math:`>` the operation is also defined if :math:`A` or :math:`B` is a *sympy* symbol or a *sympy* real
1004+
where the :math:`F`\ ’s are *sympy* symbolic constants or functions of the coordinates and a multivector class, *Mv*, that wraps *Ga* and overloads the python operators to provide all the needed multivector operations as shown in Table :ref:`ops` where :math:`A` and :math:`B` are any two multivectors (In the case of :math:`+`, :math:`-`, :math:`*`, :math:`{\wedge}`, :math:`|`, :math:`<`, and :math:`>` the operation is also defined if :math:`A` or :math:`B` is a *sympy* symbol or a *sympy* real
9971005
number).
9981006

999-
================== =================================
1000-
:math:`A+B` sum of multivectors
1001-
:math:`A-B` difference of multivectors
1002-
:math:`A*B` geometric product of multivectors
1003-
:math:`A{\wedge}B` outer product of multivectors
1004-
:math:`A{\vert}B` inner product of multivectors
1005-
:math:`A{<}B` left contraction of multivectors
1006-
:math:`A{>}B` right contraction of multivectors
1007-
:math:`A{/}B` division of multivectors
1008-
================== =================================
1007+
.. _ops:
1008+
1009+
.. table:: Operators
1010+
1011+
================== =================================
1012+
:math:`A+B` sum of multivectors
1013+
:math:`A-B` difference of multivectors
1014+
:math:`A*B` geometric product of multivectors
1015+
:math:`A{\wedge}B` outer product of multivectors
1016+
:math:`A{\vert}B` inner product of multivectors
1017+
:math:`A{<}B` left contraction of multivectors
1018+
:math:`A{>}B` right contraction of multivectors
1019+
:math:`A{/}B` division of multivectors
1020+
================== =================================
10091021

10101022
Multivector operations for GA
10111023
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1040,6 +1052,8 @@ For those users who wish to define a default operator precedence the functions `
10401052
10411053
The *sympy* variable ``V`` would evaluate to ``((X|Y)^Z)*W``.
10421054

1055+
.. _BasisMetric:
1056+
10431057
Vector Basis and Metric
10441058
-----------------------
10451059

@@ -1179,11 +1193,11 @@ Since we can now calculate the symbolic geometric product of any two multivector
11791193

11801194
.. math:: \be A_{r}{\wedge}b = {\frac{1}{2}}\lp A_{r}b+\lp -1 \rp ^{r}bA_{r} \rp , \ee
11811195

1182-
where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vector. For our example basis the result is shown in Table [bladexpand].
1196+
where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vector. For our example basis the result is shown in Table :ref:`bladexpand`.
11831197

1184-
[h]
1185-
1186-
.. code:: python
1198+
.. code-block:: python
1199+
:caption: Blade expansions
1200+
:name: bladexpand
11871201
11881202
1 = 1
11891203
a0 = a0
@@ -1194,11 +1208,11 @@ where :math:`A_{r}` is a multivector of grade :math:`r` and :math:`b` is a vecto
11941208
a1^a2 = {-(a1.a2)}1+a1a2
11951209
a0^a1^a2 = {-(a1.a2)}a0+{(a0.a2)}a1+{-(a0.a1)}a2+a0a1a2
11961210
1197-
[bladexpand]
1211+
The important thing to notice about Table :ref:`bladexpand` is that it is a triagonal (lower triangular) system of equations so that using a simple back substitution algorithm we can solve for the pseudo bases in terms of the blades giving Table :ref:`baseexpand`.
11981212

1199-
The important thing to notice about Table [bladexpand] is that it is a triagonal (lower triangular) system of equations so that using a simple back substitution algorithm we can solve for the pseudo bases in terms of the blades giving Table [baseexpand].
1200-
1201-
.. code:: python
1213+
.. code-block:: python
1214+
:caption: Base expansions
1215+
:name: baseexpand
12021216
12031217
1 = 1
12041218
a0 = a0
@@ -1209,9 +1223,7 @@ The important thing to notice about Table [bladexpand] is that it is a triagona
12091223
a1a2 = {(a1.a2)}1+a1^a2
12101224
a0a1a2 = {(a1.a2)}a0+{-(a0.a2)}a1+{(a0.a1)}a2+a0^a1^a2
12111225
1212-
[baseexpand]
1213-
1214-
Using Table [baseexpand] and simple substitution we can convert from a base multivector representation to a blade representation. Likewise, using Table [bladexpand] we can convert from blades to bases.
1226+
Using Table :ref:`baseexpand` and simple substitution we can convert from a base multivector representation to a blade representation. Likewise, using Table :ref:`bladexpand` we can convert from blades to bases.
12151227

12161228
Using the blade representation it becomes simple to program functions that will calculate the grade projection, reverse, even, and odd multivector functions.
12171229

@@ -1252,7 +1264,7 @@ The geometric algebra class is instantiated with
12521264

12531265
``Ga(basis,g=None,coords=None,X=None,norm=False,sig='e',Isq='-',wedge=True,debug=False)``
12541266

1255-
The ``basis`` and ``g`` parameters were described in section [BasisMetric]. If the metric is a function of position, if we have multivector fields, or we wish to calculate geometric derivatives a coordinate set, ``coords``, is required. ``coords`` is a list of *sympy* symbols. For the case of instantiating a 3-d geometric algebra in spherical coordinates we have
1267+
The ``basis`` and ``g`` parameters were described in section :ref:`BasisMetric`. If the metric is a function of position, if we have multivector fields, or we wish to calculate geometric derivatives a coordinate set, ``coords``, is required. ``coords`` is a list of *sympy* symbols. For the case of instantiating a 3-d geometric algebra in spherical coordinates we have
12561268

12571269
.. code:: python
12581270
@@ -1321,7 +1333,7 @@ In addition to the basis vectors, if coordinates are defined for the geometric a
13211333
13221334
(grad,rgrad) = sp3d.grads()
13231335
1324-
for the spherical 3-d geometric algebra. The left derivative :math:`{\lp {{\texttt{grad}} ={\boldsymbol{\nabla}}} \rp }` and the right derivative :math:`{\lp {{\texttt{rgrad}} = {\boldsymbol{\bar{\nabla}}}} \rp }` have been explained in section [ldops]. Again the names ``grad`` and ``rgrad`` used in a program are whatever the user chooses them to be. In the previous example ``grad`` and ``rgrad`` are used.
1336+
for the spherical 3-d geometric algebra. The left derivative :math:`{\lp {{\texttt{grad}} ={\boldsymbol{\nabla}}} \rp }` and the right derivative :math:`{\lp {{\texttt{rgrad}} = {\boldsymbol{\bar{\nabla}}}} \rp }` have been explained in section :ref:`ldops`. Again the names ``grad`` and ``rgrad`` used in a program are whatever the user chooses them to be. In the previous example ``grad`` and ``rgrad`` are used.
13251337

13261338
an alternative instantiation method is
13271339

@@ -1361,6 +1373,8 @@ differential operator ``Dop`` ``dop``
13611373

13621374
for the instantiation of various objects from the ``Ga`` class. This means that in order to instantiate any of these objects we need only to import ``Ga`` into our program.
13631375

1376+
.. _makeMV:
1377+
13641378
Instantiating a Multivector
13651379
---------------------------
13661380

@@ -1441,7 +1455,7 @@ If one wished to calculate the left and right geometric derivatives of ``F`` and
14411455
dFrop = rgrad*F
14421456
dBrop = rgrad*B
14431457
1444-
``dFop``, ``dBop``, ``dFrop``, and ``dBrop`` are all multivector differential operators (again see section [ldops]).
1458+
``dFop``, ``dBop``, ``dFrop``, and ``dBrop`` are all multivector differential operators (again see section :ref:`ldops`).
14451459

14461460
Backward Compatibility Class MV
14471461
-------------------------------
@@ -1714,6 +1728,8 @@ Basic Multivector Functions
17141728

17151729
If ``A`` is a multivector return ``A.rotate_multivector(itheta,hint)`` where ``itheta`` is the bi-vector blade defining the rotation. For the use of ``hint`` see the member function ``Mv.rotate_multivector(self,itheta,hint)``.
17161730

1731+
.. _makeMVD:
1732+
17171733
Multivector Derivatives
17181734
-----------------------
17191735

@@ -1766,7 +1782,7 @@ all return multivector linear differential operators.
17661782
Submanifolds
17671783
------------
17681784

1769-
In general the geometric algebra that the user defines exists on the tangent space of a manifold (see section [sect_manifold]). The submanifold class, ``Sm``, is derived from the ``Ga`` class and allows one to define a submanifold of a manifold by defining a coordinate mapping between the submanifold coordinates and the manifold coordinates. What is returned as the submanifold is the geometric algebra of the tangent space of the submanifold. The submanifold for a geometric algebra is
1785+
In general the geometric algebra that the user defines exists on the tangent space of a manifold (see section :ref:`sect_manifold`). The submanifold class, ``Sm``, is derived from the ``Ga`` class and allows one to define a submanifold of a manifold by defining a coordinate mapping between the submanifold coordinates and the manifold coordinates. What is returned as the submanifold is the geometric algebra of the tangent space of the submanifold. The submanifold for a geometric algebra is
17701786
instantiated with
17711787

17721788
``Ga.sm(map,coords,root='e',norm=False)``
@@ -1790,7 +1806,7 @@ instantiated with
17901806
Linear Transformations
17911807
----------------------
17921808

1793-
The mathematical background for linear transformations is in section [Ltrans]. Linear transformations on the tangent space of the manifold are instantiated with the ``Ga`` member function ``lt`` (the actual class being instantiated is ``Lt``) as shown in lines 12, 20, 26, and 44 of the code listing ``Ltrans.py``. In all of the examples in ``Ltrans.py`` the default instantiation is used which produces a general (all the coefficients of the linear transformation are symbolic constants) linear
1809+
The mathematical background for linear transformations is in section :ref:`Ltrans`. Linear transformations on the tangent space of the manifold are instantiated with the ``Ga`` member function ``lt`` (the actual class being instantiated is ``Lt``) as shown in lines 12, 20, 26, and 44 of the code listing ``Ltrans.py``. In all of the examples in ``Ltrans.py`` the default instantiation is used which produces a general (all the coefficients of the linear transformation are symbolic constants) linear
17941810
transformation. *Note that to instantiate linear transformations coordinates, :math:`{\left \{ {{\eb}_{i}} \rbrc}`, must be defined when the geometric algebra associated with the linear transformation is instantiated. This is due to the naming conventions of the general linear transformation (coordinate names are used) and for the calculation of the trace of the linear transformation which requires taking a divergence.* To instantiate a specific linear transformation the usage of ``lt()`` is
17951811
``Ga.lt(M,f=False,mode='g')``
17961812

@@ -1861,7 +1877,7 @@ The output of this code is.
18611877
Differential Operators
18621878
----------------------
18631879

1864-
For the mathematical treatment of linear multivector differential operators see section [ldops]. The is a differential operator class ``Dop``. However, one never needs to use it directly. The operators are constructed from linear combinations of multivector products of the operators ``Ga.grad`` and ``Ga.rgrad`` as shown in the following code for both orthogonal rectangular and spherical 3-d coordinate systems.
1880+
For the mathematical treatment of linear multivector differential operators see section :ref:`ldops`. The is a differential operator class ``Dop``. However, one never needs to use it directly. The operators are constructed from linear combinations of multivector products of the operators ``Ga.grad`` and ``Ga.rgrad`` as shown in the following code for both orthogonal rectangular and spherical 3-d coordinate systems.
18651881

18661882
.. literalinclude:: python/Dop.py
18671883

@@ -1874,7 +1890,7 @@ Note that for print an operator in the IPython notebook one must implement (yet
18741890
Instantiating a Multi-linear Functions (Tensors)
18751891
------------------------------------------------
18761892

1877-
The mathematical background for multi-linear functions is in section [MLtrans]. To instantiate a multi-linear function use
1893+
The mathematical background for multi-linear functions is in section :ref:`MLtrans`. To instantiate a multi-linear function use
18781894

18791895
``Mlt(self, f, Ga, nargs=None, fct=False)``
18801896

@@ -1898,7 +1914,7 @@ The mathematical background for multi-linear functions is in section [MLtrans].
18981914
Basic Multilinear Function Class Functions
18991915
------------------------------------------
19001916

1901-
If we can instantiate multilinear functions we can use all the multilinear function class functions as described as follows. See section [MLtrans] for the mathematical description of each operation.
1917+
If we can instantiate multilinear functions we can use all the multilinear function class functions as described as follows. See section :ref:`MLtrans` for the mathematical description of each operation.
19021918

19031919
``self(kargs)``
19041920

@@ -1914,7 +1930,7 @@ If we can instantiate multilinear functions we can use all the multilinear funct
19141930

19151931
``self.cderiv()``
19161932

1917-
Returns covariant derivative of tensor field. If ``T`` is a tensor of rank :math:`k` then ``T.cderiv()`` is a tensor of rank :math:`k+1`. The operation performed is defined in section [MLtrans].
1933+
Returns covariant derivative of tensor field. If ``T`` is a tensor of rank :math:`k` then ``T.cderiv()`` is a tensor of rank :math:`k+1`. The operation performed is defined in section :ref:`MLtrans`.
19181934

19191935
Standard Printing
19201936
-----------------
@@ -2116,7 +2132,7 @@ Since the expressions for multivectors or differential operators can be very lon
21162132
+-----------+---------------------------------------------------------------------------------+
21172133
| ``fmt=0`` | ``fmt=0`` prints each element of the list/tuple on an individual lines\ [26]_. |
21182134
+-----------+---------------------------------------------------------------------------------+
2119-
| | ``fmt=1`` prints all elements of the list/tuple on a single line. |
2135+
| | ``fmt=1`` prints all elements of the list/tuple on a single line\ [26]_. |
21202136
+-----------+---------------------------------------------------------------------------------+
21212137

21222138
If l is a list or tuple to print in the LaTeX environment use the command
@@ -2226,7 +2242,7 @@ Since the expressions for multivectors or differential operators can be very lon
22262242
Preprocessing do not occur for the Ipython notebook and the string post processing commands ``%`` and ``#`` are not used in this case.
22272243
22282244
.. [26]
2229-
The formatting of each element is respected as applied by ``A.Fmt(fmt=1,2, or 3)`` where ``A`` is an element of ``obj``\ so that if multivector/differential operation have been formatted to print on multiple lines it will printed on multiple lines.[Fmt_format]
2245+
The formatting of each element is respected as applied by ``A.Fmt(fmt=1,2, or 3)`` where ``A`` is an element of ``obj``\ so that if multivector/differential operation have been formatted to print on multiple lines it will printed on multiple lines.
22302246
22312247
.. |image0| image:: images/submanifold.svg
22322248
.. |image1| image:: images/submanifold1.svg

0 commit comments

Comments
 (0)