X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Foctonions.py;h=87bf5ff1ed06b1a77b5815df8dd2248fda4b7edb;hb=9ffb2ed473d62df9f6b6db9636b0bf8fa8f3be25;hp=73acf2db2ebf76258f47ed1156113925f4f257ed;hpb=4d0aae306aa9f80009cbbea9088382e30df919af;p=sage.d.git 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"""