MVR5
I'liealg=6"%&falseGE\[l8%%initGRF$F$F$F$@%30%)INITFLAGG-%&evalnG6#F,F,-%'RETURN
G6#-F.6#-F'F$C1-%*unprotectG6^pF--F.6#%+GENERATORSG-F.6#%+DIRECTSUMSG-F.6#%+FAC
TORALGSG-F.6#%+TRIANGALGSG-F.6#%*DONTPRINTG-F.6#%*free_plusG-F.6#%+free_minusG-
F.6#%&_plusG-F.6#%'_minusG-F.6#%&_zeroG-F.6#%'SIMPLEG-F.6#%%dumpG-F.6#%&deltaG-
F.6#%+generatorsG-F.6#%&idealG-F.6#%*directsumG-F.6#%$useG-F.6#%#&>G-F.6#%#&<G-
F.6#%#&=G-F.6#%$&>=G-F.6#%$&<=G-F.6#%$&<>G-F.6#%)evaluateG-F.6#%$&!<G-F.6#%$&!>
G-F.6#%%&!>=G-F.6#%%&!<=G-F.6#%$&!=G-F.6#%%&!<>G-F.6#%(extractG-F.6#%,isgenerat
orG-F.6#%,functionizeG-F.6#%'reduceG-F.6#%)simplifyG-F.6#%&storeG-F.6#%'deleteG
-F.6#%#wtG-F.6#%,independentG-F.6#%)symbasisG-F.6#%'expandG-F.6#%+lieconvertG-F
.6#%*listtolieG-F.6#%%compG-F.6#%)genbasisG-F.6#%+triangularG-F.6#%%scpdG-F.6#%
3triangularsimplifyG-F.6#%*factoralgG-F.6#%/factorsimplifyG-F.6#%*stablesetG-F.
6#%(overlapG-F.6#%&subwdG-F.6#%+comparewtsG-F.6#%+genhallmonG-F.6#%-genhallmono
mG-F.6#%%grabG-F.6#%#&*G-F.6#%(MODFLAGG-F.6#%)MODVALUEG-F.6#%%charG-F.6#%-mains
implifyG-F.6#%'simpleG-F.6#%(matbaseG-F.6#%&AnmatG-F.6#%&DnmatG-F.6#%&EnmatG-F.
6#%&BnmatG-F.6#%&CnmatG-F.6#%&FnmatG-F.6#%&GnmatG-F.6#%:simplefunction_ADE_matr
ixG-F.6#%8simplefunction_B_matrixG-F.6#%8simplefunction_C_matrixG-F.6#%)F4Looku
pG-F.6#%)G2LookupG-F.6#%(ALGEBRAG-F.6#%,MATRIX_TYPEG-F.6#%/epsilon_type_AG-F.6#
%/epsilon_type_DG-F.6#%/epsilon_type_EG-%%withG6#%'hiddenG>F<7">%*WITHRULESG<">
F?F_\l>FBF_\l>FEF_\l>F,%%trueG>FdwF%>Fgw.Fgw>FZF_\l>Fjz.Fjz>F][l.F][l-%(protect
G6^pF-F:F=F@FCFXFHFKFNFQFTFWFgnFjnF]oF`oFcoFfoFioF\pF_pFbpFepFhpF[qF^qFaqFdqFgq
FjqF]rF`rFcrFfrFirF\sF_sFbsFesFhsF[tF^tFatFdtFgtFjtF]uFcuFfuFiuF\vF_vFbvFevFhvF
[wF^wFawFgwFbwF]xFjwF`xF[zF`uFcxFfxFixF\yF_yFbyFeyFhyF^zFazFdzFjzF][lF`[lFc[lFf
[lFgz-F16#%%NULLG6#%jninitializing~function,~called~when~the~package~liealg~is~
loadedG6-F<FjzF^\lF?FBFEF,FdwFgwFZF][lF$FfoR6#'%(AlgebraG%%nameG6$%&TableG%"iGF
$F$C%@$2"""9#-%&ERRORG6$%3too~many~argumentsG9">8$-%#opG6$""%-%%evalGF\o@%0Fi^l
Fb]l@%-%'memberG6$7#9$7#-%(indicesG6#Fi^lC'-F86$F:Fhz>F<7#&Fi^l6#Fg_l>FjzFg_l-F
^]lF^`l-F16#/Fjz-%-anglebracketG6#&F<F$-Fd^l6%%2specified~algebraGFg_l%0is~not~
defined.G-Fd^l6#%4no~algebras~definedG6#%_ruse(algname)~changes~the~algebra~cur
rently~in~use~to~the~specified~(sets~|+~~~~~~~~~~~~~~~GENERATORS~to~that~algebr
a)G6$F<FjzF$FioR6$'%"AG%*algebraicG'%"BGFjal6$%#LAG%#LBGF$F$C'@%-%%typeG6$Fg_l%
"+G>Fi^l-%(leadingG6$Fg_lFjz>Fi^lFg_l@$-Fcbl6$Fi^l%"*G>Fi^l-F[_l6$""#Fi^l@%-Fcb
l6$9%Febl>8%-Fhbl6$FfclFjz>FhclFfcl@$-Fcbl6$FhclF^cl>Fhcl-F[_l6$FbclFhcl-F16#-%
&evalbG6#2-%(rankingG6#Fhcl-FidlF[`l6#%gtmonomial~&>~monomial~defines~the~opera
tor~"&>",~which~is~interface~to~the~|+~~~~~~~~~~~~~~~~~function~evaluate;~works
~only~with~the~default~set~of~generatorsGF$F$F_sRF$6+%$rhsG%$lhsG%$resGF]^l%"jG
F\^l%&StartG%$EndG%$AlgGF$F$C'%)rememberG@'/Fb^l""!-F1F$/&Fg^l6#Fa^lFH>8*Fbcl>F
aflFa^l-%'subsopG6$/F]_lFb]l-F__lFer?(8'FaflFa^lFb^lFd\lC%@)4-Fcbl6$&Fg^l6#Fifl
%%listG-Fd^l6$%Cexpected~a~list~of~rules,~receivedGF_gl-Fcbl6$&Fg^l6$Fifl-%%nop
sG6#F_glFj]lC$>8+,&FiglFa^l!""Fa^l>8,Fggl/F<F\\l-Fd^l6#%iocan't~set~rules~for~d
efault~algera,~since~there~is~no~default~algebra~defined.GC$>F^hlFigl>FbhlFjz@$
4-Fd_l6$FbhlF^\lC%-F86#-F.6#F^\l>F^\l-%&unionG6$F^\l<#Fbhl-F^]lF`il?(8(Fa^lFa^l
F^hlFd\l@%4-Fcbl6$&Fg^l6$FiflFjil%"=G-Fd^l6$%Aexpected~an~expression,~receivedG
F_jlC)@$550-Fjgl6#&F_gl6#FjilFbcl0-Fjgl6#-F[_l6$Fa^lF\[mFbcl-Fcbl6$Fa[m%(indexe
dG-Fd^l6$%Tincorrect~rule,~correct~form:~[name]&*[name]=[expr]GF_gl>Fhcl-F[_l6$
Fa^lFa[m>Fi^l-F[_l6$FbclFa[m>8&-F[_l6$FbclF\[m@$5-Fcbl6$Fhcl%)constantG-Fcbl6$F
i^lFg\m-Fd^l6$%fnincorrect~rule,~no~constants~are~allowed~in~the~LHS~of~exprGF\
[m@$/-Ffr6$-F.6#-Faw6$FhclFi^lFbhl%%FAILGC$@%30-F[_l6$F]_l-F__lF^sFb]l-Fd_l6$7#
Fbhl7#-Fj_l6#Fj]m@%0FhclFi^l>-F_s6#Fbhl7%&&Fj]mFg^mF$/Fc]mF`\m/-Faw6$Fi^lFhcl,$
F`\mF`hl>Ff^m7$Fi^mF[_m@%Fd^m>Ff^m7$/Fa]mF`\m/-F.6#F]_mF__m>Ff^m7#Fe_mFcfl@$0F^
flFHC$-%&printG6#Fe_m@$Fd^m-F_`m6#Ff_mF`]l6#%instore()~saves~a~given~rule~and~i
ts~reverse~in~the~lookup~tableGFbilF$FjtR6#'%'WeightG-Fagl6#%(integerG6.F]^lFce
lF\^l%(EntriesG%&IdealGFfel%*StableSetG%&BasisG%)DeleteItG%)maximizeG%%TempG%(F
actAlgG6$%'systemGFhelF$C,>8-R6$'FialFj`m'F\blFj`m6$F]^l%'ResultGF$F$C$@%/-Fjgl
Fb`l-Fjgl6#FfclC$>FhclF\\l?(Fi^lFa^lFa^lFdbmFd\l@%2&FfclF[`l&Fg_lF[`l>Fhcl7$&Fh
clF$F]cm>Fhcl7$F`cmF\cm-Fd^l6'%(weightsGFg_l%$andGFfcl%9are~of~different~length
.G-F1FjdlF$F$F$@'2FbclFb^lFc^l/Fb^lFbcl>8/&Fg^l6#Fbcl>F]dmFjz>F`\m-F[_l6$F]_l-F
__lFeu@%0F`\mFb]lC$>Fifl7#-Fj_l6#F`\m@%-Fd_l6$F]dmFBC$>8)&&F`\m6#F]dmF_fl>Fjil&
FcemF_dm-Fd^l6%%/factor~algebraGF]dm%/isn't~defined.G-Fd^l6#%;no~factor~algebra
s~definedG@%-Fd_l6%7$Fjil%(stabsetGFifl.%"kG@%53-Fgq6$Fg_l&7#&F`\m6#&&Fifl6#Fdf
mF$F_fl-Fdq6$Fg_l7#-%$seqG6$F[fl/Fi^lFg_l3-FdqFifm-FgqFbgm>Fafl&F[gmF_dm@'34-Fa
qFifmFagmC%>8.-Fjam6$FjfmFg_l>Fafl-F\v6%7#&-F[_l6$F]_l-F__lF_oF][mFchmFaem>-Ffu
6$FjilFbfm6$FchmFafl34-F^qFifmFjgmC%>Fchm,$-Fjam6$,$FjfmF`hl,$Fg_lF`hlF`hl>Fafl
Fghm>F_imFaimC$>Fafl-F\v6%FihmFg_lFaem>F_im6$Fg_lFaflC$>FaflF`jm>F_imFcjm>F^hl-
Fhv6$Fg_lFaem@%Fagm>Fafl-%$mapG6$R6#%"xGF$F$F$@$-Fgq6$-Fes6$-Fhbl6$Fg_lT#Fi[nT&
Fg_lF$F$6&FfelFaemFi`mFg_lFafl>Fafl-F][n6$RF`[nF$F$F$@$-FdqFd[nFg_lF$F$F[\nFafl
>Fi^lFa^l?(F$Fa^lFa^lF$32F[fl-Fjgl6#F^hl1Fi^lFf\nC&>FbhlF%>FhclFa^l?(F$Fa^lFa^l
F$1Fhcl-Fjgl6#FaflC$@$0-Fbv6%&FaflFjdl&F^hlF[`lFaemF\\lC$>FbhlFd\l%&breakG>Fhcl
,&FhclFa^lFa^lFa^l@%Fbhl>F^hl-Fdfl6$/Fi^lFb]lF^hl>Fi^l,&Fi^lFa^lFa^lFa^l-F1Fg\n
6#%!GF$F$F\pRFgalF]blF$F$C'@%Fbbl>Fi^lFgbl>Fi^lFg_l@$F\cl>Fi^lF`cl@%Fdcl>FhclFi
cl>FhclFfcl@$F]dl>FhclF`dl-F16#-Fedl6#2F[elFhdl6#%gtmonomial~&<~monomial~define
s~the~operator~"&<",~which~is~interface~to~the~|+~~~~~~~~~~~~~~~~~function~eval
uate;~works~only~with~the~default~set~of~generatorsGF$F$FbsRF$6#F]^lF$F$@'FjelC
$@$Fchl-Fd^l6#%hocannot~delete~rules~for~default~algebra,~there~is~no~default~a
lgebra~defined.G@%-Fd_l6$FjzF^\lC'>&Fj]mFiz-F.6#Ff`nF_il>F^\l-%&minusG6$F^\l<#F
jzFhil-F_`m6#/-%%subsG6$<#/FhzFjz-F.6#-F_sFiz7#Fb]l-F_`m6#/FaanFe]m3/Fb^lFa^lF]
flC$@$FchlF^`n@%Fb`nC&>Ff`nFg`nF_il>F^\lFj`nFhilF\flC&@%F]fl>Fi^lFbcl>Fi^lFa^l?
(F$Fa^lFa^lF$31Fi^lFb^lFi]mC$@%-Fd_l6$&Fg^lF[`lF^\lC'>&Fj]m6#F`cn-F.6#Fccn@$F\`
m-F_`m6#/-Fban6$<#/-F.FdcnF`cn-F.6#-F_sFdcnFianF_il>F^\l-F[an6$F^\l<#F`cnFhil@$
F\`m-F_`m6#/F[dnFe]m>Fi^lFb^n@$3F[cnF\`m?(Fi^lFa^lFa^lFb^lFd\lFhdnF\fl6#%ingets
~rid~of~rules~defined~for~an~algebra~in~the~remember~tableGFbilF$F]uR6$'%&Label
GFj]l'%%ListG-Fagl6#Fj]l61F]^lFcelF\^l%#WpG%#WhG%#WnG%#GpG%#GnG%#GhGFdam%#LpG%#
LnG%"HG%$LenGF^amF$F$C%Fhel>F`\mFj^l@$FfdmC;@%33-Fd_l6$7#&FfclF_flFidm-Fd_l6$7#
&FfclF_dmFidm-Fd_l6$7#&Ffcl6#""$Fidm@'/&&F`\m6$F^gn%'weightGF_fl7#-Fegm6$F[fl/F
i^lF[hnC$>80F^gn@%-Fgq6$&&F`\m6$FbgnF^hnF_fl7#-Fegm6$F[fl/Fi^lFihnC$>F]dmFbgn>F
chmFfgnC$>FchmFbgn>F]dmFfgn/FihnF\inC$>FehnFbgn@%-Fgq6$F[hnF_hnC$>F]dmF^gn>Fchm
FfgnC$>FchmF^gn>F]dmFfgnC$>FehnFfgn@%FjinC$>F]dmF^gn>FchmFbgnC$>FchmF^gn>F]dmFb
gn-Fd^l6%%9one~of~the~algebras~fromG&FfclF$%@is~not~defined~in~generators().G>F
ifl&F`\m6$FchmF^hn>81-Fjgl6#&FiflF_fl?(Fi^lFa^lFa^l-FjglF`glFd\l@&-%(hastypeG6$
&FiflF[`l%)negativeG-Fd^l6$%Knegative~weight~is~not~allowed~for~algebraGFchm0-F
jgl6#F^\oFd[o-Fd^l6'FecmFg[oFfcmF^\o%8have~different~lengths.G>Fjil&F`\m6$FehnF
^hn?(Fi^lFa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l@$/-Ffr6$-F.6#-Faw6$Fgdo&FbhlFjdlFg_lFe]m-F_s6$FH7$/F^goF[flFg_l-
F86#FC>FE-Feil6$FE<#Fg_l-F^]lFhgo>-F]oFb`l6%&FaflF$&FbhlF$&F^hlF$>-F]o6$Fg_lF^h
n7%&FiflF$&FjilF$&FaemF$>-F]uFb`l6%FchmFehnF]dm-%'printfG6#Q"|+6"-F16#/Fg_l-Fi`
lF]io6#%\oallows~the~construction~of~algebras~with~triangular~decompositionGFDF
$F]oR6$Fcen'%%GensGFgen6%%&DefwtGF]^lFcfnF$F$C+Fhel@$2FhgnFb^lFc^l@%Fa_o@%4-Fcb
l6$Fe_o-Fagl6#Fagl-Fd^l6$%8expected~list,~receivedGFe_oC$?(FhclFa^lFa^l-Fjgl6#F
e_oFd\l@$1FbclFhcl@$0-Fjgl6#&Fe_o6#,&FhclFa^lF`hlFa^l-Fjgl6#&Fe_oFjdl-Fd^l6%%@w
eights~are~of~different~lengthGFf[pF[\p>Fi^lFe_oC$>Fi^l7#-Fegm6$7#-Fegm6$F[fl/F
hcl;Fa^lFebmFh\p?(FhclFa^lFa^lFebmFd\l>&&Fi^lFjdlFjdlFa^l>F_ho-F[_lFfbm>FehoFi^
l>-F`oFb`lF_]p>-F`o6$Fg_l%(algebraGFg_l@$5Fchl/Fg_lFjz-FfoFb`l-F16$/Fg_l-Fi`l6#
F_]pFi^l6#%izgenerators(algname,~|frgenerators|hr<,[weights]>)~uses~its~remembe
r-table~to~store|+~~~~~~~~~~~~~~~the~different~sets~of~generators~in~a~table~fo
rm;~everytime~a~new~set~of~|+~~~~~~~~~~~~~~~generators~is~added,~the~list~GENER
ATORS~is~set~to~that~list~by~defaultGFealF$F_pRFgalF]blF$F$C'@%Fbbl>Fi^lFgbl>Fi
^lFg_l@$F\cl>Fi^lF`cl@%Fdcl>FhclFicl>FhclFfcl@$F]dl>FhclF`dl-F16#-Fedl6#/7#-F`r
6$Fi^lFjz7#-F`r6$FhclFjz6#%gtmonomial~&=~monomial~defines~the~operator~"&=",~wh
ich~is~interface~to~the~|+~~~~~~~~~~~~~~~~~function~evaluate;~works~only~with~t
he~default~set~of~generatorsGF$F$FbpRFgalF$F$F$-F16#4-F\p6$Fg_lFfcl6#%htmonomia
l~&>~monomial~defines~the~operator~"&>=",~which~is~interface~to~the~|+~~~~~~~~~
~~~~~~~~function~evaluate;~works~only~with~the~default~set~of~generatorsGF$F$Ff
uRFben6)F\^lF^amF\jo%)CutOffWtGFi]lF_am%$WtsGF$F$C1Fhel@)FajoFc^lFchl-Fd^l6#%En
o~algebras~defined~in~generators().GFa_oC$@$4-Fcbl6$Fe_oFj`m-Fd^l6$%Va~list~of~
integers~is~expected~for~the~cut~off~weightGFe_o>FiflFe_o>FiflF\\l@'2FbclFebm-F
d^l6$%Dexpected~[algebra,~ideal],~receivedGFfcl/FebmFa^lC$>FjilFjz>FaemF^[oC$>F
i^lFj^l@%-Fd_l6$F]gnFh_lC$>FjilF^gn>FaemFbgnC$>FaemF^gn>FjilFbgn>Fi^lFj^l@%Fa_l
C$>FhclFh_l@%-Fd_l6$7#FjilFhclC$>F`\m&Fi^lF][m@%-Fd_l6$7$FjilF^hnFhcl>Fafl&Fi^l
6$FjilF^hn-Fd^l6$%?no~weights~defined~for~algebraGFjil-Fd^l6%Ff]pFjil%/is~not~d
efinedGF`al>Fi^lF[im@%Fa_lC$>FhclFh_l@%-Fd_l6$7#FaemFhclFb]l-Fd^l6%F`oFaemFadp-
Fd^l6#%2no~ideals~definedG>-FfuFb`l6$FjilFaem>F_hoF`\m>FehoFafl@$0FiflF\\l>-Ffu
6$FaemFbfm6$Fifl-F\v6%&7#F`\mF_dmFiflFjil-F86#F@>FB-Feil6$FBF\ho-F^]lF_fp-F16#/
Fg_l-Fi`lFaep6#%csfactoralg(factoralgname,~idealname,~algname(optional))~This|+
~~~~~~~~~~~~~~~function~defines~a~factor~algebra~of~an~ideal~and~its~algebraGFA
F$FcoR6$Fcen'%%AlgsGFgen6'F\^l%(Weight1G%(Weight2G%*DefWeightGF]^lF$F$C&Fhel@$F
jcmFc^l>Fi^lFj^l@%Fa_l@%-Fd_l6$7#-F[_l6$Fa^lFfcl<#Fi_l@%-Fd_l6$7#-F[_l6$FbclFfc
lF\hpC,>-FcoFb`l6$FjgpFahp>F_ho6$&Fi^l6#Fjgp&Fi^l6#Fahp>Fhcl7#-F[_l6#&Fi^l6$Fjg
pF^hn>F`\m7#-F[_l6#&Fi^l6$FahpF^hn@%/-Fjgl6#&FhclF_fl-Fjgl6#&F`\mF_fl>Fifl7$-F[
_lFjdl-F[_lF[emC%@%2F^jpF[jp>Fifl7#-Fegm6$7#-Fegm6$F[fl/Fjil;Fa^lF[jp/Fjil;Fa^l
,&-FjglFjdlFa^l-FjglF[emFa^l>Fifl7#-Fegm6$7#-Fegm6$F[fl/Fjil;Fa^lF^jpFa[q?(Fjil
Fa^lFa^lFd[qFd\l>&FiflF][m-%$zipG6&R6$Fa[n%"yGF$6$%)operatorG%&arrowGF$,&Fg_lFa
^lFfclFa^lF$F$F$Fa\q&FhclF][mF[fl?(FjilFa^lFa^lFe[qFd\l>&Fifl6#,&FjilFa^lFd[qFa
^l-Fc\q6&RFf\qF$Fh\qF$F[]qF$F$F$F_]q&F`\mF][mF[fl>FehoFifl-F86#F=>F?-Feil6$F?F\
ho-F^]lFh]q-F16#/Fg_l-Fi`lFfhp-Fd^l6$Fahp%-not~defined.G-Fd^l6$FjgpFc^q-Fd^l6#%
;no~generators~are~defined.G6#%]wdirectsum(dirsumname,~|fralg1,~alg2|hr)~This~f
unction~produces~a~directsum~of~two~|+~~~~~~~~~~~~~~algebras;~calling~sequence:
~~directsum([name~of~dir.sum.~alg],|frset~of~(two)~|+~~~~~~~~~~~~~~algebras|hr)
GF>F$FepRFgalF$F$F$-F16#4-FioF``p6#%htmonomial~&<~monomial~defines~the~operator
~"&<=",~which~is~interface~to~the~|+~~~~~~~~~~~~~~~~~function~evaluate;~works~o
nly~with~the~default~set~of~generatorsGF$F$FhpRFgalF$F$F$-F16#4-F_pF``p6#%htmon
omial~&=~monomial~defines~the~operator~"&<>",~which~is~interface~to~the~|+~~~~~
~~~~~~~~~~~~function~evaluate;~works~only~with~the~default~set~of~generatorsGF$
F$Fjn=%)identityGF%E\[l!FcrR6#'%$VarG%)anythingG6(%*indmemberG%)checkgenGF]^lF\
jo%%FlagGFdamFfamF$C)>FhclR6$F^`q'%(GenListGFagl6$Fd`qFdamFfamF$C&>Fi^lF%@%-Fcb
l6$Fg_lF^cl>Fhcl-F[_l6$FbclFg_l>FhclFg_l@%-Fd_l6$FhclFfcl>Fi^lFd\l@$-Fcbl6$Fhcl
Fe[m>Fi^l-Fi[nFgaq-F1F[`lF$F$6$Fb`qFi^l>Fi^lRFh`q6$F]^lFd`qFfamF$C%>FhclF%?(Fi^
lFa^lFa^lFebmFd\l@$-Fcbl6$F\cmFe[m@$/-F[_l6$F[flF\cm-F[_l6$F[flFg_l@&-Fcbl6$7#-
F[_l6#F\cmFgen@$3-Fcbl6$7#-F[_lFb`l-Fagl6#Fg\m/-FjglFdcqFdbmC$>FhclFd\lFi]n-Fcb
l6$FbcqF[dq@$/F\cmFg_lC$>FhclFd\lFi]nFhcmF$F$F$@(FjcmFc^lFchlFi`pF[dmC$>FiflFjz
@$0FjzF^dm-Ffo6#F^dm@$4-Fcbl6$F<Fagl-Fd^l6#%7no~generators~defined.G@%-Fcbl6$Fg
_lFaglC%>F`\mFa^l>FjilFd\l?(F$Fa^lFa^lF$31F`\mFdbmFjilC$>Fjil-Fhcl6$&Fg_lF[emF<
>F`\m,&F`\mFa^lFa^lFa^l>Fjil-Fhcl6$Fg_lF<@$3F[dm0FiflFjz-FfoF`gl-F1F][m6#%\[lis
generator(Var[,algname])~checks~to~see~whether~the~passed~on~variable~or~in~|+~
~~~~~~~~~~~~~~~case~of~a~list~all~elements~in~the~list~are~generators~or~not;~s
earches~through~|+~~~~~~~~~~~~~~~~the~list~GENERATORS~and~returns~true~if~found
,~false~if~not~foundGF;F$F\sRF$6%Fdam%"GGFfelF$F$C)>Fi^l-%*traperrorG6#-F]x6#Fg
^l@$/Fi^l%*lasterrorG-Fd^l6#F[hq@$5FjcmFjelFc^l>FhclF^fl@%F[dm>F`\mF^dm>F`\mFjz
@&-Fcbl6$FhclFebl-F16#-F][n6$RF`[nF$Fh\qF$@%F_aq*&-F[_l6$Fa^lFg_lFa^l-F]x6$Fbaq
Fi[nFa^l-F]xFh[nF$F$6$FfelF`\mFhclF]dl-F16#*&-F[_l6$Fa^lFhclFa^l-F]x6$F`dlF`\mF
a^l@%Fdw@'-Fcbl6$Fi^lFebl-F16#-F][n6%RFf\qF$Fh\qF$@%F_aq*&-%$modG6$-%'NormalG6#
F^iqFfclFa^lFbaqFa^l*&-Fgjq6$-FjjqF_flFfclFa^lFg_lFa^lF$F$F$Fi^lFgwF\cl-F16#*&-
Fgjq6$-Fjjq6#-F[_l6$Fa^lFi^lFgwFa^lF`clFa^l-F16#*&-Fgjq6$F_[rFgwFa^lFi^lFa^lF^b
q6#%\pthis~is~an~interface~to~the~function~mainsimplify()~which~is~the~main~sim
pl.~procGF$F$F`oR6$Fcen'F\jo-Fagl6#Fjal6$FfelF]^lF$F$C(Fhel@)FajoFc^lFchlFi`pFa
_oC$@$4-Fcbl6$Fe_oFj]l-Fd^l6$%Fexpecting~an~algebra's~name,~recievedGFe_o>Fi^lF
e_o>Fi^lFjz?(FhclFa^lFa^lFebmFd\l-F`r6$&FfclFjdlFi^l>Fb]pF_]p>Fd]pFi^l-F16#F]^p
6#%enideal(idealname,~idealgens)~let's~the~user~define~an~idealGF$F$FhvRFg`m6.F
\joFfel%$SetGF]^lFcelFdfm%"UGF\blFa[n%"wG%$AddG%-right_weightG6#FhelF$C+>F]dmR6
#'%$genGFjalF$F$F$@%/-FesFb`lT$-F16#Fd\l-F16#F%6#%boChecks~whether~a~weight~of~
a~generator~equals~to~Weight,~used~in~selectGF$6$Fi`mFg_l@'FjcmFc^lF[dmC%>Fi^lF
jz>FhclF^dm@$0F^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/-F[_l6$F[flF_hr-F[_l6$F[flF`hr45-F\\o6$7#F]irFj]l-F\\o6$7#FjhrFg\m@%Fb
hr>FiflFehr>FiflF`ir-F1F`glF$F$6$FidrFi^l@$FjcmFc^l@$F[dm@%F[eqC$>FiflFjzF\eq>F
iflFjz>FhclFj^l>Fjil&Fhcl6$FjzF^hn>F`\m-Fi^l6%Fg_lFjilF<@$3F[dm0FjzFiflF[gq-F1F
[em6#%juwt(expression)~calculates~the~weight~of~a~given~expression~using~values
~defined~|+~~~~~~~~~~~~~~~for~the~generators~in~generators();~---->~doesn't~wor
k~for~directsums~yet~<----GF;F$F`xR6$Fcen'%'CartanGFj]l6.FcelFdfm%"MGF\jo%"nGFf
`p%(_matrixGFdam%'type_AG%'type_DG%'type_EG%%noneGF$F$C/Fhel@)2F]_lFb^l-Fd^l6$F
f^l&Fg^lF$/Fb^lF]_l@'-Fcbl6$Fe_oFgenC$>FiflFe_o>Faem&Fg^l6#F]_lFejoC$>FaemFe_o>
FiflFf]s-Fd^l6$%boinvalid~parameter~(expected~a~list~of~generators~and~a~list~o
f~weights)GFe_oFa_o@'Fa]sC$>FiflFe_o>FaemF\\lFejoC$>FaemFe_o>FiflF\\l-Fd^l6$%ao
invalid~parameter~(expected~a~list~of~generators~or~a~list~of~weights)GFe_oC$>F
iflF\\l>FaemF\\l@%554-Fcbl6$FfclFe[m0FebmFa^l4-Fcbl6$F_]pF\am-Fd^l6$%Iincorrect
~name~for~type~of~Cartan~matrixGFfcl>FjilF_]p@%/FiflF\\lC%>%"eG.F]`s>%"hG.F``s>
Fifl7$&F]`s6#-Fegm6$(FhclFi^l/Fi^l;Fa^lFjil&F``s6#(F]^lFa^l>Fifl7$&Fg[oFe`s&&Fi
flF_dmF\as@%/FaemF\\l>Faem7$7#Ff`s7#-Fegm6$F[flFi`sC$>F^hl7#-Fegm6$F[fl/Fi^l;Fa
^l-Fjgl6#&FaemF_fl>Faem7$FjhoF^hl@0/-F[_l6$F[flFfclFialC$>F`\m-FfxF][m>-F`x6$Fg
_lFcbl6$(%$ADEGFaflFbhl/Fibs%"DGC$>F`\m-FixF][m>F_cs6$FbcsFjam/Fibs%"EGC$>F`\m-
F\yF][m>F_cs6$FbcsFchm/FibsF\blC$>F`\m-F_yF][m>F_cs6$(F\blFaflFjam/Fibs%"CGC$>F
`\m-FbyF][m>F_cs6$(FjdsFaflFbhl/Fibs%"FGC&@$0FjilF]_l-Fd^l6$&FbesF][m%Kis~not~a
~supported~type~of~simple~algebra.G-FdzF$>F`\m-FeyF][m>F_cs6$(FbesFaflFchm/Fibs
FagqC'@$0FjilFbcl-Fd^l6$&FagqF][mFies-Fgz6$-F[_l6$F[flFg[o-F[_l6$F[flFbas>F`\m-
FhyF][m>F_cs6$(FagqFafl%'type_GG>-F`x6$%#G2GFj_l7.7$Fa^lF[fl7$F[flFa^l7$Fa^lFa^
l7$FbclFa^l7$FhgnFa^l7$FhgnFbcl7$F`hlF[fl7$F[flF`hl7$F`hlF`hl7$!"#F`hl7$!"$F`hl
7$FdhsFbhs>-F`xFb`l-F__lF[em-F86$FXFail>FZ-Feil6$FZF\ho>F^\l-Feil6$F^\lF\ho-F^]
lFjhs>((Fial%"_GFg_lFhhs-F16#-F]o6%Fg_lFiflFaem6#%Lsupports~the~declaration~of~
simple~algebrasG6&FZF^\lF]`sF``sF$%)KacMoodyGR6$Fcen'F`\sF``q63F]^lFcelFb\sFf`p
F\joFc\s%&RulesG%(DefGensGF`fn%#LmG%#LzG%'SerrePG%'SerreMG%&TempPG%&TempMGFdamF
dfmF$F$C:Fhel@'F[]sF\]sF_]sC$>FjilFe_o>FiflFf]sC$>FjilF\\l>FiflF\\l@'-Fcbl6$Ffc
l%'matrixG>F`\mFfcl55-Fcbl6$FfclFagl-Fcbl6$Ffcl%&arrayG-Fcbl6$Ffcl%'vectorG>F`\
m-FacoFd[t-Fd^l6$%inexpected~an~input~of~type~matrix~(or~list,~or~array),~recei
vedGFfcl@%0-Fjgl6#-Faco6$-&%'linalgG6#%$rowG6$F`\mFa^lFagl-Fjgl6#-Faco6$-&F^]t6
#%$colGFa]tFagl-Fd^l6$Ffcl%8is~not~a~square~matrix.G>FaemFh\t?(Fi^lFa^lFa^lFaem
Fd\l?(FhclFa^lFa^lFi^lFd\l@&0Fi^lFhcl@&2F[fl&F`\mF^_m-Fd^l6$Fd^t%inis~a~positiv
e~value~outside~the~diagonal~in~the~cartan~matrix.G3/Fd^tF[fl4/&F`\mFd]mF[fl-Fd
^l6#%gnzeros~are~not~in~a~symmetrical~fashion~in~the~cartan~matrix.G3/Fi^lFhcl4
/Fd^tFbcl-Fd^l6%%/diagonal~entryG0Fd^tFbcl%2in~cartan~matrix.G@$/FjilF\\lC$>F^h
l7%%"fGF``sF]`s>Fjil-F][n6%RFf\qF$F$F$-F][n6%RFf\qF$F$F$&FfclFb`lF$F$F$FfclFg_l
F$F$F$F^hl7#-Fegm6$Fi^l/Fi^l;Fa^lFaem>FjamFbfr>Fchm&FjilF_dm>Fbhl&FjilFggn@%Fj_
sC'-F]o6$(Fg_l%+_free_plusGFbhl>Fifl7#-Fegm6$7#-Fegm6$F[fl/Fi^lFchmF^bt-F]o6%(F
g_lFWFchmFifl?(Fi^lFa^lFa^lFi[oFd\l>&Fifl6$Fi^lFi^lF`hl-F]o6%(Fg_l%,_free_minus
GFjamFiflC%-F]o6%FeatFbhlFifl-F]o6%FhbtFjam,$FiflF`hl-F]o6%FabtFchm7#-Fegm6$7#-
Fegm6$F[fl/Fi^lFi^l/Fi^lFifl@$550F\doFaem0-Fjgl6#FjamFaem0-FjglF``oFaem-Fd^l6$%
gnincorrect~number~of~generators~for~the~cartan~matrix~of~sizeGFaem>FaflF\\l>F]
dmF\\l>FehnF\\l?(Fi^lFa^lFa^lFaemFd\l?(FhclFa^lFa^lFaemFd\l@%Fa_tC$>Fafl7%Faho/
-F.6#-Faw6$Fgdo&FjamF[`l&FchmF[`l/-F.6#-Faw6$FeetFbgo*&Fd^tFa^lFbgoFa^l>Fafl7%F
aho/-F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