Skip to content

Commit 82a4509

Browse files
author
Release Manager
committed
gh-35630: Implement the octonions <!-- 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
2 parents 92c3735 + 4370091 commit 82a4509

File tree

6 files changed

+1023
-8
lines changed

6 files changed

+1023
-8
lines changed

src/doc/en/reference/algebras/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ Non-associative algebras
110110
.. toctree::
111111
:maxdepth: 1
112112

113+
sage/algebras/octonion_algebra
113114
lie_algebras
114115
lie_conformal_algebras
115116
sage/algebras/jordan_algebra

src/doc/en/reference/references/index.rst

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1900,9 +1900,9 @@ REFERENCES:
19001900
.. [CW2005] \J. E. Cremona and M. Watkins. Computing isogenies of elliptic
19011901
curves. preprint, 2005.
19021902
1903-
.. [CHW2015] Cui, Shawn X.; Hong, Seung-Moon; Wang, Zhenghan Universal quantum computation
1903+
.. [CHW2015] Cui, Shawn X.; Hong, Seung-Moon; Wang, Zhenghan Universal quantum computation
19041904
with weakly integral anyons. Quantum Inf. Process. 14 (2015),
1905-
no. 8, 2687-2727.
1905+
no. 8, 2687-2727.
19061906
19071907
.. [CW2015] Cui, S. X. and Wang, Z. (2015). Universal quantum computation with
19081908
metaplectic anyons. Journal of Mathematical Physics, 56(3), 032202.
@@ -2287,7 +2287,7 @@ REFERENCES:
22872287
.. [Dy1993] \M. J. Dyer. *Hecke algebras and shellings of Bruhat
22882288
intervals*. Compositio Mathematica, 1993, 89(1): 91-115.
22892289
2290-
.. [Dy1994] \M. J. Dyer. *Bruhat intervals, polyhedral cones and
2290+
.. [Dy1994] \M. J. Dyer. *Bruhat intervals, polyhedral cones and
22912291
Kazhdan-Lusztig-Stanley polynomials*. Math.Z., 215(2):223-236, 1994.
22922292
22932293
.. _ref-E:
@@ -3526,7 +3526,7 @@ REFERENCES:
35263526
:doi:`10.1016/j.bbr.2011.03.031`, :arxiv:`0909.2442`.
35273527
35283528
.. [JS2021] \D. Jahn, C. Stump.
3529-
*Bruhat intervals, subword complexes and brick polyhedra for
3529+
*Bruhat intervals, subword complexes and brick polyhedra for
35303530
finite Coxeter groups*, 2021, :arxiv:`2103.03715`.
35313531
35323532
.. [JV2000] \J. Justin, L. Vuillon, *Return words in Sturmian and
@@ -3946,7 +3946,7 @@ REFERENCES:
39463946
set as the intersection of super greedy linear extensions. Order 4,
39473947
293-311 (1987).
39483948
:doi:`10.1007/BF00337892`
3949-
3949+
39503950
.. [Kuh1987] \W. Kühnel, "Minimal triangulations of Kummer varieties",
39513951
Abh. Math. Sem. Univ. Hamburg 57 (1987), 7-20.
39523952
@@ -4210,7 +4210,7 @@ REFERENCES:
42104210
889-929. :doi:`10.1090/mcom/3358`.
42114211
42124212
.. [Lon2013] \S. London,
4213-
*Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*.
4213+
*Constructing New Turyn Type Sequences, T-Sequences and Hadamard Matrices*.
42144214
PhD Thesis, University of Illinois at Chicago, 2013.
42154215
https://hdl.handle.net/10027/9916
42164216
@@ -5448,6 +5448,9 @@ REFERENCES:
54485448
.. [Sch1996] \E. Schaefer. A simplified data encryption
54495449
algorithm. Cryptologia, 20(1):77--84, 1996.
54505450
5451+
.. [Scha1996] Richard D. Schaefer. *An Introduction to Nonassociative Algebras*.
5452+
Dover, New York, 1996.
5453+
54515454
.. [Sch1999] Gilles Schaeffer, *Random Sampling of Large Planar Maps and Convex
54525455
Polyhedra*, Annual ACM Symposium on Theory of Computing
54535456
(Atlanta, GA, 1999). :doi:`10.1145/301250.301448`.
@@ -5621,7 +5624,7 @@ REFERENCES:
56215624
Journal of Cryptology. 12. 193-196. 1999.
56225625
:doi:`10.1007/s001459900052`.
56235626
5624-
.. [Smi2023] \D. Smith, J. S. Myers, C. S. Kaplan and C. Goodman-Strauss,
5627+
.. [Smi2023] \D. Smith, J. S. Myers, C. S. Kaplan and C. Goodman-Strauss,
56255628
*An aperiodic monotile*,
56265629
:arxiv:`2303.10798`
56275630
@@ -6501,7 +6504,7 @@ REFERENCES:
65016504
Combinatorics, 19(1), P53, 2012. :doi:`10.37236/2087`
65026505
65036506
.. [Zie1959] \N. Zierler. *Linear Recurring Sequences*.
6504-
Journal of the Society for Industrial and Applied Mathematics 7(1)
6507+
Journal of the Society for Industrial and Applied Mathematics 7(1)
65056508
(1959): 31-48. :doi:`10.1137/0107003`
65066509
65076510
.. [Zie1998] \G. M. Ziegler. *Shelling polyhedral 3-balls and

src/sage/algebras/all.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848

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

51+
lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra')
52+
5153
lazy_import('sage.algebras.shuffle_algebra', 'ShuffleAlgebra')
5254

5355
from .clifford_algebra import CliffordAlgebra, ExteriorAlgebra

src/sage/algebras/catalog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
- :class:`algebras.MalvenutoReutenauer <sage.combinat.fqsym.FreeQuasisymmetricFunctions>`
4949
- :class:`algebras.NilCoxeter
5050
<sage.algebras.nil_coxeter_algebra.NilCoxeterAlgebra>`
51+
- :class:`algebras.Octonion <sage.algebras.octonion_algebra.OctonionAlgebra>`
5152
- :class:`algebras.OrlikTerao
5253
<sage.algebras.orlik_terao.OrlikTeraoAlgebra>`
5354
- :class:`algebras.OrlikSolomon
@@ -137,5 +138,6 @@
137138
'ACEQuantumOnsagerAlgebra', 'AlternatingCentralExtensionQuantumOnsager')
138139
lazy_import('sage.algebras.down_up_algebra', 'DownUpAlgebra', 'DownUp')
139140
lazy_import('sage.algebras.yangian', 'Yangian')
141+
lazy_import('sage.algebras.octonion_algebra', 'OctonionAlgebra', 'Octonion')
140142

141143
del lazy_import # We remove the object from here so it doesn't appear under tab completion
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""
2+
Octonions
3+
"""
4+
5+
from sage.structure.element cimport AlgebraElement
6+
from sage.modules.free_module_element cimport FreeModuleElement
7+
8+
cdef class Octonion_generic(AlgebraElement):
9+
cdef FreeModuleElement vec
10+
11+
cpdef Octonion_generic conjugate(self)
12+
cpdef quadratic_form(self)
13+
cpdef norm(self)
14+
cpdef abs(self)
15+
cpdef real_part(self)
16+
cpdef Octonion_generic imag_part(self)
17+
18+
cdef class Octonion(Octonion_generic):
19+
pass

0 commit comments

Comments
 (0)