From: Michael Orlitzky Date: Tue, 2 Mar 2021 16:14:30 +0000 (-0500) Subject: octonions: add is_hermitian() for octonion matrices. X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=9ffb2ed473d62df9f6b6db9636b0bf8fa8f3be25;p=sage.d.git octonions: add is_hermitian() for octonion matrices. --- 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"""