From 9ffb2ed473d62df9f6b6db9636b0bf8fa8f3be25 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Tue, 2 Mar 2021 11:14:30 -0500 Subject: [PATCH] octonions: add is_hermitian() for octonion matrices. --- mjo/octonions.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/mjo/octonions.py b/mjo/octonions.py index 73acf2d..87bf5ff 100644 --- a/mjo/octonions.py +++ b/mjo/octonions.py @@ -463,6 +463,23 @@ class OctonionMatrix(IndexedFreeModuleElement): """ return self.parent() + def is_hermitian(self): + r""" + + SETUP:: + + sage: from mjo.octonions import OctonionMatrixAlgebra + + EXAMPLES:: + + sage: MS = OctonionMatrixAlgebra(3) + sage: MS.one().is_hermitian() + True + + """ + return all( self[i,j] == self[j,i].conjugate() + for i in range(self.nrows()) + for j in range(self.ncols()) ) class OctonionMatrixAlgebra(CombinatorialFreeModule): r""" -- 2.44.2