Skip to content

Commit

Permalink
gh-35630: Implement the octonions
Browse files Browse the repository at this point in the history
    
<!-- Please provide a concise, informative and self-explanatory title.
-->
<!-- Don't put issue numbers in the title. Put it in the Description
below. -->
<!-- For example, instead of "Fixes #12345", use "Add a new method to
multiply two integers" -->

### 📚 Description

<!-- Describe your changes here in detail. -->
<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

The octonions are a nonassociative normed division algebra, one of only
4 over the reals, and used to create the 7 dimensional cross product. We
implement a slight generalization with 3 parameters over an arbitrary
commutative ring of characteristic not equal to 2, which allows us to
also define the split-octonions as another special case.

Fixes #32940.

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. It should be `[x]` not `[x
]`. -->

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.
- [x] I have created tests covering the changes.
- [x] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->

<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: #35630
Reported by: Travis Scrimshaw
Reviewer(s): Frédéric Chapoton, Matthias Köppe
  • Loading branch information
Release Manager committed May 27, 2023
2 parents 92c3735 + 4370091 commit 82a4509
Show file tree
Hide file tree
Showing 6 changed files with 1,023 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/doc/en/reference/algebras/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ Non-associative algebras
.. toctree::
:maxdepth: 1

sage/algebras/octonion_algebra
lie_algebras
lie_conformal_algebras
sage/algebras/jordan_algebra
Expand Down
19 changes: 11 additions & 8 deletions src/doc/en/reference/references/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1900,9 +1900,9 @@ REFERENCES:
.. [CW2005] \J. E. Cremona and M. Watkins. Computing isogenies of elliptic
curves. preprint, 2005.
.. [CHW2015] Cui, Shawn X.; Hong, Seung-Moon; Wang, Zhenghan Universal quantum computation
.. [CHW2015] Cui, Shawn X.; Hong, Seung-Moon; Wang, Zhenghan Universal quantum computation
with weakly integral anyons. Quantum Inf. Process. 14 (2015),
no. 8, 2687-2727.
no. 8, 2687-2727.
.. [CW2015] Cui, S. X. and Wang, Z. (2015). Universal quantum computation with
metaplectic anyons. Journal of Mathematical Physics, 56(3), 032202.
Expand Down Expand Up @@ -2287,7 +2287,7 @@ REFERENCES:
.. [Dy1993] \M. J. Dyer. *Hecke algebras and shellings of Bruhat
intervals*. Compositio Mathematica, 1993, 89(1): 91-115.
.. [Dy1994] \M. J. Dyer. *Bruhat intervals, polyhedral cones and
.. [Dy1994] \M. J. Dyer. *Bruhat intervals, polyhedral cones and
Kazhdan-Lusztig-Stanley polynomials*. Math.Z., 215(2):223-236, 1994.
.. _ref-E:
Expand Down Expand Up @@ -3526,7 +3526,7 @@ REFERENCES:
:doi:`10.1016/j.bbr.2011.03.031`, :arxiv:`0909.2442`.
.. [JS2021] \D. Jahn, C. Stump.
*Bruhat intervals, subword complexes and brick polyhedra for
*Bruhat intervals, subword complexes and brick polyhedra for
finite Coxeter groups*, 2021, :arxiv:`2103.03715`.
.. [JV2000] \J. Justin, L. Vuillon, *Return words in Sturmian and
Expand Down Expand Up @@ -3946,7 +3946,7 @@ REFERENCES:
set as the intersection of super greedy linear extensions. Order 4,
293-311 (1987).
:doi:`10.1007/BF00337892`
.. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties",
Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20.
Expand Down Expand Up @@ -4210,7 +4210,7 @@ REFERENCES:
889-929. :doi:`10.1090/mcom/3358`.
.. [Lon2013] \S. London,
*Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*.
*Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*.
PhD Thesis, University of Illinois at Chicago, 2013.
https://hdl.handle.net/10027/9916
Expand Down Expand Up @@ -5448,6 +5448,9 @@ REFERENCES:
.. [Sch1996] \E. Schaefer. A simplified data encryption
algorithm. Cryptologia, 20(1):77--84, 1996.
.. [Scha1996] Richard D. Schaefer. *An Introduction to Nonassociative Algebras*.
Dover, New York, 1996.
.. [Sch1999] Gilles Schaeffer, *Random Sampling of Large Planar Maps and Convex
Polyhedra*, Annual ACM Symposium on Theory of Computing
(Atlanta, GA, 1999). :doi:`10.1145/301250.301448`.
Expand Down Expand Up @@ -5621,7 +5624,7 @@ REFERENCES:
Journal of Cryptology. 12. 193-196. 1999.
:doi:`10.1007/s001459900052`.
.. [Smi2023] \D. Smith, J. S. Myers, C. S. Kaplan and C. Goodman-Strauss,
.. [Smi2023] \D. Smith, J. S. Myers, C. S. Kaplan and C. Goodman-Strauss,
*An aperiodic monotile*,
:arxiv:`2303.10798`
Expand Down Expand Up @@ -6501,7 +6504,7 @@ REFERENCES:
Combinatorics, 19(1), P53, 2012. :doi:`10.37236/2087`
.. [Zie1959] \N. Zierler. *Linear Recurring Sequences*.
Journal of the Society for Industrial and Applied Mathematics 7(1)
Journal of the Society for Industrial and Applied Mathematics 7(1)
(1959): 31-48. :doi:`10.1137/0107003`
.. [Zie1998] \G. M. Ziegler. *Shelling polyhedral 3-balls and
Expand Down
2 changes: 2 additions & 0 deletions src/sage/algebras/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@

lazy_import('sage.algebras.jordan_algebra', 'JordanAlgebra')

lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra')

lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra')

from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra
Expand Down
2 changes: 2 additions & 0 deletions src/sage/algebras/catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
- :class:`algebras.MalvenutoReutenauer <sage.combinat.fqsym.FreeQuasisymmetricFunctions>`
- :class:`algebras.NilCoxeter
<sage.algebras.nil_coxeter_algebra.NilCoxeterAlgebra>`
- :class:`algebras.Octonion <sage.algebras.octonion_algebra.OctonionAlgebra>`
- :class:`algebras.OrlikTerao
<sage.algebras.orlik_terao.OrlikTeraoAlgebra>`
- :class:`algebras.OrlikSolomon
Expand Down Expand Up @@ -137,5 +138,6 @@
'ACEQuantumOnsagerAlgebra', 'AlternatingCentralExtensionQuantumOnsager')
lazy_import('sage.algebras.down_up_algebra', 'DownUpAlgebra', 'DownUp')
lazy_import('sage.algebras.yangian', 'Yangian')
lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra', 'Octonion')

del lazy_import # We remove the object from here so it doesn't appear under tab completion
19 changes: 19 additions & 0 deletions src/sage/algebras/octonion_algebra.pxd
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""
Octonions
"""

from sage.structure.element cimport AlgebraElement
from sage.modules.free_module_element cimport FreeModuleElement

cdef class Octonion_generic(AlgebraElement):
cdef FreeModuleElement vec

cpdef Octonion_generic conjugate(self)
cpdef quadratic_form(self)
cpdef norm(self)
cpdef abs(self)
cpdef real_part(self)
cpdef Octonion_generic imag_part(self)

cdef class Octonion(Octonion_generic):
pass
Loading

0 comments on commit 82a4509

Please sign in to comment.