M7R0
I4TensorConstructions=6"%&falseGE\[lgp%,sympow_mat2Gt+6$%#AaG%"mG60%"nG%#miG%#m
aG%"iG%"jG%"kG%#nuG%#AAG%$vecG%$wecG%"lG%$indG%#muG%"AGF$F$C*>81-%(convertG6$9$
&I'linalgG6$%*protectedG%(_syslibG6#_FC%'matrixG>8$-&FC6#_FC%'rowdimG6#F=>8%-&I
)combinatG6$FEFF6#_FV%)vectointG6#7$9%-%"$G6$""!,&FK"""!""F]o>8&-FU6#7$FhnFgn>8
*,(F`oF]oFSF^oF]oF]o>8+-FB6%FeoFeoF[o?(8)FSF]oF`o%%trueGC$>8,-&FV6#_FV%)inttove
cG6$F\pFK?(8(F]oF]oFKF]p@$0&F`p6#FhpF[o?(8'F]oF]oFKF]pC&>8--%'imoinsG6$F`pFhp>F
aq-%&iplusG6$FaqF^q>80,(-FU6#FaqF]oFSF^oF]oF]o>&Fho6$Fjq,(F\pF]oFSF^oF]oF]oz'6%
F_rF[q&F=6$F^qFhp\[[[\[[[[[[[mF]o[[[[[[[[\[[[lF]o-%&evalmG6#FhoF$F$F$6#""#%&iva
uxGt+6&F7F+F-%"pG6%F0%"NGF8F$F$C*-%)userinfoG6)"#?%$lfiG%'debut:G/.%"LGFA/.%"MG
Fgn/.FS9&/%"PG9'@$/FgnF]o-%'RETURNG6#,(FctF]oFAF]oF^oF]o>FS,&FAF]o-%)binomialG6
$,&F`tF]oF^oF]o,&FgnF]oF^oF]oF^o>F`oFct>FKF]o?(F$F]oF]oF$2F[oFSC%>F`o,&F`oF]oF]
oF]o>FK,&FKF]oF]oF]o>FS,&FSF]o-F]u6$,&F`tF]oFKF^oF`uF^o-Fcs6*FesFfs%'fin~~:GFhs
F[tF^tFat/%#NBGF`o6$F`o-F[s6&,&FSF]oF\vF]oF`u,*F`tF]oF`oF^oFctF]oF^oF]oFguF$F$F
$6#""%%6exterior_power_systemGt+6$F:F+F$F$F$-&F"6#%)extpowerG6$-Fgr6#FAFgnF$F$F
$6#Fjr%*EndSystemG&F"6#%+End_systemG%5Inverse_Gauge_ChangeGt+F$F$F$F$-F?6$-&F"6
#%5inverse_gauge_changeG6#9"%'MatrixGF$F$F$6#F[o%5ThetaCompanionSystemG&F"6#%7T
heta_Companion_SystemG%+tensorprodGt+6$F*%#BaGF$F$F$-&I.LinearAlgebraG6$FEFF6#_
F`y%1KroneckerProductG6$-F?6$FAFdx-F?6$FgnFdxF$F$F$6#Fjr%0CompanionSystemG&F"6#
%1Companion_systemG%5gauge_transformationG&F"6#%-gauge_changeG%4GroupSymmetricP
owerG&F"6#%7Symmetric_power_matrixG%4TensorProductSystemGt+F\yF$F$F$-F?6$-&F"6#
%6tensor_product_systemG6$FAFgnFdxF$F$F$6#Fjr%7Symmetric_power_systemGt+F$F$F$F
$-F?6$-&F"6#%7symmetric_power_systemGFbxFdxF$F$F$6#F[o%,Dual_systemG&F"6#%/Adjo
int_SystemG%7Theta_companion_SystemGFgxF^zt+6#FjsF$F$F$-F?6$-&F"6#%1companion_s
ystemGFdwFdxF$F$F$6#F]o%-Gauge_changeGt+F$F$F$F$-F?6$-F`zFbxFdxF$F$F$6#F[o%$sym
GFf[l%0wedge_mix_left1Gt+6$%#L1GF06%%#n1GF1%#s1GF$F$C*>FK-%%nopsGFdw@$-%'member
G6$FgnFAO6$7"F[o@$2Fgn&FA6#F]oO6$7$Fgn-%#opGFdw)F^oFK@$2&FA6#FKFgnO6$7$Fh^lFgnF
]o>FSFK>F`oF[o?(F$F]oF]oF$2Fgn&FA6#FSC$>FS,&FSF]oF^oF]o>F`oFguO6$7%-%$seqG6$&FA
6#F2/F2;F]oFSFgn-F``l6$Fb`l/F2;,&FSF]oF]oF]oFK)F^oF`oF$F$F$6#Fjr%+hom_systemGt+
6$F:%"BGF$F$F$-F^[l6$FA-Fgr6#,$-&FC6#_FC%*transposeG6#FgnF^oF$F$F$6#Fjr%6Exteri
or_Power_MatrixG&F"6#%6Exterior_power_matrixGFh[lt+6$%%mataGF+6%F-%#DDG%$matGF$
F$-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orPowerMatrixGF^bl%=inverse_gauge_transformationGF_x%+Hom_SystemGt+F_alF$
F$F$-F?6$-&F"6#F]alF_[lFdxF$F$F$6#Fjr%*HomSystemGt+F_alF$F$F$Fj^mF$F$F$6#Fjr%,G
augeChangeGt+F$F$F$F$Fj\lF$F$F$6#F[o%6Exterior_power_systemGt+F]wF$F$F$-F?6$-&F
"6#F[wF_[lFdxF$F$F$6#Fjr%+End_SystemGFgwFe^mt+6#F:F$F$F$-Fgal6#,$FAF^oF$F$F$6#F
]o%6Exterior_Power_SystemG&F"6#Ff_m%)multihomGt+F\jlF$F$F$-Fjil6%-%(collectGF_[
lFgnF`tF$F$F$6#Fa\m%+Hom_systemGt+F_alF$F$F$Fj^mF$F$F$6#Fjr%7Symmetric_Power_Sy
stemGF`^m%+hom_matrixGt+6%F_clF`alF:6&%#nbG%#naGF-FbtF$F$C$@%/F[]mF]oC%>F`o-%%s
qrtG6#&-&F`y6#_F`y%*DimensionG6#FfyFd^l@$4-%%typeG6$F`o%(integerG-%&ERRORG6$FAQ
K~should~have~a~dimension~which~is~a~squareF$>F^q-Fdx6%F`oF`o7#-F``l6$Fecl/F0;F
]o*&F`oF]oF`oF]oC%>FS&-Fcbm6#-F?6$F`tFdxFd^l>FK&-Fcbm6#FhyFd^l>F^q-Fdx6%FKFS7#-
F``l6$Fecl/F0;F]o*&FSF]oFKF]oFgtF$F$F$6#Fa\m%(vectowrGt+6#%&vectoG6&F0F1F-F5F$F
$C%>F^q-F?6$FA%%listG>F`o-Fi]l6#F^q@%/&F^qFd^lF]o-&FC6#_FC%$detG6#-FB6#7$7#-F``
l6$-(%#_yGFK6#F^]m/FK;F]oF`o-F``l6$7#-F``l6$-F\^m6$F\gm-Fin6$F^]m,&&F^qFg_lF]oF
^oF]oF`gm/FS;FjrF`o-Fafm6#-FB6#7#-F``l6$Fdgm/FSFagmF$6#F^gmF$6#F]oFiwt+F``mF$F$
F$-F?6$-&F"6#%+end_systemGFdwFdxF$F$F$6#F]oFcilt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fy>FSFhy-
F^dl6$F`dl-Fgr6#-Fcdl6$F]^m,&-FcdlF_ilF]oFj]mF^oF$F$F$6#Fa\m%7Theta_companion_s
ystemGFgx%7Theta_Companion_systemGFgx%2direct_sum_systemGt+F$F$F$F$-&F"6#F]anFb
xF$F$F$6#F[o%5SymmetricPowerMatrixGFdz%+DualSystemGF[\lFchlt+6%F-F+Fcbl60F0F1F2
F7FiinF^jlFbdoFcdoF`s%$SMUGF^aoF]t%&listeGFfblF$F$C/>F=-F?6$F`tFB-Fcs6%Fa\m%'di
ffopG%Fstarted~computing~the~sympower~matrixG@%52Fa\mF[]m3Fj\m0&Fcx6#Fa\m%5skip
~irrelevant~rowsG?(FKF]oF]oFAF]p?(FSF]oF]oFAF]p>&&%*yyyyyyyyyGF^_lFg_l&F=F_il>F
hio-%&evalnG6#Fhio>%#_eG-F\jo6#F_jo?(FKF]oF]oFAF]p>&FhpF^_l-F?6$7#-F``l6$*&Ffio
F]o&F_joFg_lF]o/FS;F]oFA%"+G>F\p7#-F``l6$&F_joF^_l/FKF][p>FeoFfdo>FhoF]eo>F`p,(
FhoF]oFeoF^oF]oF]o>Faq-FB6$F`pF`p?(FKFeoF]oFhoF]pC$>Fj[oFdeo@%3-F\^l6$Fbio7#Fcx
2F[o&Fj[oFdw>&Faq6$,(FKF]oF]oF]oFeoF^oF]o%/irrelevant~rowGC%>8/-F]am6$-F?6$7#-F
``l6$)&FhpFg_l&Fj[oFg_lF\[p%"*GF\p>Fjq7#-Fh`m6%F]]pF\pFgn?(FSF]oF]oF`pF]p>&Faq6
$Fi\pFS&FjqFg_l-Fcs6%Fa\mFiho%=computed~the~sympower~matrixG-FgrF]rF$6$F_joFhio
F$6#Fa\m%6Tensor_Product_SystemGt+F\yF$F$F$FizF$F$F$6#Fjr%$SymGF`co%1LieExterio
rPowerG&F"6#F]_oF\jmF\zFf]ot+6%F5F+F-6$F0F7F$F$C&>FS-F?6$7#-F``l6$F\v/FK;F]o,&F
c^lF]oF^oF]oF^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