<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  algebra.msk                  GAP documentation            Willem de Graaf -->
<!-- %% -->
<!-- %A  @(#)<M>Id: algebra.msk,v 1.35 2006/03/10 08:55:52 gap Exp </M> -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Algebras">
<Heading>Algebras</Heading>

<#Include Label="[1]{algebra}">

<!-- %%  The algebra functionality was designed and implemented by Thomas Breuer and -->
<!-- %%  Willem de Graaf. -->


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="sect:InfoAlgebra">
<Heading>InfoAlgebra (Info Class)</Heading>

<#Include Label="InfoAlgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Algebras by Generators">
<Heading>Constructing Algebras by Generators</Heading>

<!-- % AlgebraByGenerators( <A>F</A>, <A>gens</A>, <A>zero</A> ) Left out... -->

<#Include Label="Algebra">
<!-- %  AlgebraWithOneByGenerators( <A>F</A>, <A>gens</A>, <A>zero</A> ) Left out... -->
<#Include Label="AlgebraWithOne">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Algebras as Free Algebras">
<Heading>Constructing Algebras as Free Algebras</Heading>

<#Include Label="FreeAlgebra">
<#Include Label="FreeAlgebraWithOne">
<#Include Label="FreeAssociativeAlgebra">
<#Include Label="FreeAssociativeAlgebraWithOne">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Algebras by Structure Constants">
<Heading>Constructing Algebras by Structure Constants</Heading>

<#Include Label="[2]{algebra}">
<#Include Label="AlgebraByStructureConstants">
<#Include Label="StructureConstantsTable">
<#Include Label="EmptySCTable">
<#Include Label="SetEntrySCTable">
<#Include Label="GapInputSCTable">
<#Include Label="TestJacobi">
<#Include Label="IdentityFromSCTable">
<#Include Label="QuotientFromSCTable">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Some Special Algebras">
<Heading>Some Special Algebras</Heading>

<#Include Label="QuaternionAlgebra">
<#Include Label="ComplexificationQuat">
<#Include Label="OctaveAlgebra">
<#Include Label="FullMatrixAlgebra">
<#Include Label="NullAlgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Subalgebras">
<Heading>Subalgebras</Heading>

<#Include Label="Subalgebra">
<#Include Label="SubalgebraNC">
<#Include Label="SubalgebraWithOne">
<#Include Label="SubalgebraWithOneNC">
<#Include Label="TrivialSubalgebra">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Ideals">
<Heading>Ideals</Heading>

For constructing and working with ideals in algebras the same functions
are available as for ideals in rings. So for the precise description of
these functions we refer to Chapter <Ref Chap="Rings"/>. Here we give examples
demonstrating the use of ideals in algebras.
For an introduction into the construction of quotient algebras
we refer to Chapter <Ref Sect="Algebras" BookName="tut"/>
of the user's tutorial.
<P/>
<Example><![CDATA[
gap> m:= [ [ 0, 2, 3 ], [ 0, 0, 4 ], [ 0, 0, 0] ];;
gap> A:= AlgebraWithOne( Rationals, [ m ] );;
gap> I:= Ideal( A, [ m ] );  # the two-sided ideal of `A' generated by `m'
<two-sided ideal in <algebra-with-one of dimension 3 over Rationals>, 
  (1 generators)>
gap> Dimension( I );
2
gap> GeneratorsOfIdeal( I );
[ [ [ 0, 2, 3 ], [ 0, 0, 4 ], [ 0, 0, 0 ] ] ]
gap> BasisVectors( Basis( I ) );
[ [ [ 0, 1, 3/2 ], [ 0, 0, 2 ], [ 0, 0, 0 ] ], 
  [ [ 0, 0, 1 ], [ 0, 0, 0 ], [ 0, 0, 0 ] ] ]
gap> A:= FullMatrixAlgebra( Rationals, 4 );;
gap> m:= NullMat( 4, 4 );; m[1][4]:=1;;
gap> I:= LeftIdeal( A, [ m ] );
<left ideal in ( Rationals^[ 4, 4 ] ), (1 generators)>
gap> Dimension( I );
4
gap> GeneratorsOfLeftIdeal( I );
[ [ [ 0, 0, 0, 1 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ], [ 0, 0, 0, 0 ] ] ]
gap> mats:= [ [[1,0],[0,0]], [[0,1],[0,0]], [[0,0],[0,1]] ];;
gap> A:= Algebra( Rationals, mats );;
gap> # Form the two-sided ideal for which `mats[2]' is known to be
gap> # the unique basis element.
gap> I:= Ideal( A, [ mats[2] ], "basis" );
<two-sided ideal in <algebra of dimension 3 over Rationals>, 
  (dimension 1)>
]]></Example>

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Categories and Properties of Algebras">
<Heading>Categories and Properties of Algebras</Heading>

<#Include Label="IsFLMLOR">
<#Include Label="IsFLMLORWithOne">
<#Include Label="IsAlgebra">
<#Include Label="IsAlgebraWithOne">
<#Include Label="IsLieAlgebra">
<#Include Label="IsSimpleAlgebra">
<!-- % IsMatrixFLMLOR left out... -->

<ManSection>
<Meth Name="IsFiniteDimensional" Arg='matalg' Label="for matrix algebras"/>

<Description>
returns <K>true</K> (always) for a matrix algebra <A>matalg</A>, since
matrix algebras are always finite dimensional.
<P/>
<Example><![CDATA[
gap> A:= MatAlgebra( Rationals, 3 );;
gap> IsFiniteDimensional( A );
true
]]></Example>
</Description>
</ManSection>

<#Include Label="IsQuaternion">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Attributes and Operations for Algebras">
<Heading>Attributes and Operations for Algebras</Heading>

<!-- % GeneratorsOfLeftOperatorRing left out.... -->
<!-- % GeneratorsOfLeftOperatorRingWithOne left out.... -->
<#Include Label="GeneratorsOfAlgebra">
<#Include Label="GeneratorsOfAlgebraWithOne">
<#Include Label="ProductSpace">
<#Include Label="PowerSubalgebraSeries">
<#Include Label="AdjointBasis">
<#Include Label="IndicesOfAdjointBasis">
<#Include Label="AsAlgebra">
<#Include Label="AsAlgebraWithOne">
<#Include Label="AsSubalgebra">
<#Include Label="AsSubalgebraWithOne">
<#Include Label="MutableBasisOfClosureUnderAction">
<#Include Label="MutableBasisOfNonassociativeAlgebra">
<#Include Label="MutableBasisOfIdealInNonassociativeAlgebra">
<#Include Label="DirectSumOfAlgebras">
<#Include Label="FullMatrixAlgebraCentralizer">
<#Include Label="RadicalOfAlgebra">
<#Include Label="CentralIdempotentsOfAlgebra">
<#Include Label="DirectSumDecomposition">
<#Include Label="LeviMalcevDecomposition">
<#Include Label="Grading">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Homomorphisms of Algebras">
<Heading>Homomorphisms of Algebras</Heading>

<#Include Label="[1]{alghom}">
<#Include Label="AlgebraGeneralMappingByImages">
<#Include Label="AlgebraHomomorphismByImages">
<#Include Label="AlgebraHomomorphismByImagesNC">
<#Include Label="AlgebraWithOneGeneralMappingByImages">
<#Include Label="AlgebraWithOneHomomorphismByImages">
<#Include Label="AlgebraWithOneHomomorphismByImagesNC">
<#Include Label="NaturalHomomorphismByIdeal_algebras">
<#Include Label="OperationAlgebraHomomorphism">
<#Include Label="NiceAlgebraMonomorphism">
<#Include Label="IsomorphismFpAlgebra">
<#Include Label="IsomorphismMatrixAlgebra">
<#Include Label="IsomorphismSCAlgebra">
<#Include Label="RepresentativeLinearOperation">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Representations of Algebras">
<Heading>Representations of Algebras</Heading>

<#Include Label="[1]{algrep}">
<#Include Label="LeftAlgebraModuleByGenerators">
<#Include Label="RightAlgebraModuleByGenerators">
<#Include Label="BiAlgebraModuleByGenerators">
<#Include Label="LeftAlgebraModule">
<#Include Label="RightAlgebraModule">
<#Include Label="BiAlgebraModule">
<#Include Label="GeneratorsOfAlgebraModule">
<#Include Label="IsAlgebraModuleElement">
<#Include Label="IsLeftAlgebraModuleElement">
<#Include Label="IsRightAlgebraModuleElement">
<#Include Label="LeftActingAlgebra">
<#Include Label="RightActingAlgebra">
<#Include Label="ActingAlgebra">
<#Include Label="IsBasisOfAlgebraModuleElementSpace">
<#Include Label="MatrixOfAction">
<#Include Label="SubAlgebraModule">
<#Include Label="LeftModuleByHomomorphismToMatAlg">
<#Include Label="RightModuleByHomomorphismToMatAlg">
<#Include Label="AdjointModule">
<!-- % One would be tempted to call <C>W</C> a left ideal in <C>V</C>, -->
<!-- % but in the current implementation, neither <C>V</C> nor <C>W</C> are themselves -->
<!-- % algebras; note that the element <C>v</C>, although looking like a matrix, -->
<!-- % cannot be multiplied with itself. -->
<#Include Label="FaithfulModule">
<#Include Label="ModuleByRestriction">
<#Include Label="NaturalHomomorphismBySubAlgebraModule">
<#Include Label="DirectSumOfAlgebraModules">
<#Include Label="TranslatorSubalgebra">

</Section>
</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->

