Skip to content

Commit 0fb90e8

Browse files
utiberiousclaude
andcommitted
docs: update dual mode default from I+ to Iinv+ in docs and changelog
- doc/module-components.rst: update method signature and prose to show Iinv+ as default - doc/changelog.rst: add bug#514 entry noting the breaking change and migration path - galgebra/primer.py: update comment to reflect Iinv+ is now the default, not a workaround Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2025e17 commit 0fb90e8

3 files changed

Lines changed: 9 additions & 5 deletions

File tree

doc/changelog.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ Changelog
88
\newcommand {\es}[1] {\mathbf{e}_{#1}}
99
\newcommand {\til}[1] {\widetilde{#1}}
1010
11+
- :bug:`514` The default dual mode has changed from ``'I+'`` to ``'Iinv+'`` so that
12+
``B * B.dual() == I`` holds for unit blades, matching the standard definition
13+
(Doran & Lasenby). To preserve the old behavior, call ``Ga.dual_mode('I+')``
14+
at the start of your program.
15+
1116
- :bug:`518` :class:`~galgebra.mv.Mv` now correctly returns ``Mv`` instance when raise to power of zero. But in general, if one needs to call ``Mv`` methods on a result returned by some GA operations, it would be more prudent to initialize it as an ``Mv`` instance first, as sometimes the result becomes a ``sympy`` object.
1217

1318
- :bug:`516` :attr:`~galgebra.mv.Mv.grades` no longer incorrectly returns ``None`` under some circumstances, as now all initialization branch will correctly call :meth:`~galgebra.mv.Mv.characterise_Mv`.

doc/module-components.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ If we can instantiate multivectors we can use all the multivector class function
339339
.. method:: galgebra.mv.Mv.dual()
340340
:noindex:
341341

342-
The mode of the ``dual()`` function is set by the ``Ga`` class static member function, ``GA.dual_mode(mode='I+')`` of the ``GA`` geometric galgebra which sets the following return values (:math:`I` is the pseudo-scalar for the geometric algebra ``GA``)
342+
The mode of the ``dual()`` function is set by the ``Ga`` class static member function, ``GA.dual_mode(mode='Iinv+')`` of the ``GA`` geometric galgebra which sets the following return values (:math:`I` is the pseudo-scalar for the geometric algebra ``GA``)
343343

344344
=========== ================
345345
``mode`` Return Value
@@ -356,7 +356,7 @@ If we can instantiate multivectors we can use all the multivector class function
356356

357357
For example if the geometric algebra is ``o3d``, ``A`` is a multivector in ``o3d``, and we wish to use ``mode='I-'``. We set the mode with the function ``o3d.dual('I-')`` and get the dual of ``A`` with the function ``A.dual()`` which returns :math:`-AI`.
358358

359-
If ``o3d.dual(mode)`` is not called the default for the dual mode is ``mode='I+'`` and ``A*I`` is returned.
359+
If ``o3d.dual(mode)`` is not called the default for the dual mode is ``mode='Iinv+'`` and ``A*I^{-1}`` is returned.
360360

361361
Note that ``Ga.dual(mode)`` used the function ``Ga.I()`` to calculate the normalized pseudoscalar. Thus if the metric tensor is not numerical and orthogonal the correct hint for then ``sig`` input of the *Ga* constructor is required.
362362

galgebra/primer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
# Default `Dmode=True` causes partial differentiation
3333
# operators to be displayed in shortened form.
3434
Ga.dual_mode('Iinv+')
35-
# Sets multivector dualization to be right multiplication by the
36-
# by the inverse unit pseudoscalar (the convention used in the
37-
# textbooks LAGA, VAGC, and GACS).
35+
# Confirms the default dual mode: right multiplication by the inverse
36+
# pseudoscalar (convention of LAGA, VAGC, and GACS).
3837
initializations_list = r"""\textsf{The following initialization commands were executed:}\\
3938
\quad\texttt{from sys import version}\\
4039
\quad\texttt{import sympy}\\

0 commit comments

Comments
 (0)