Skip to content

Instantly share code, notes, and snippets.

@Gro-Tsen
Created May 3, 2022 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gro-Tsen/8538aa3cedcf2788f44eecc9b378af2f to your computer and use it in GitHub Desktop.
Save Gro-Tsen/8538aa3cedcf2788f44eecc9b378af2f to your computer and use it in GitHub Desktop.
C = CartanType("C3")
rk = C.rank()
detcmat = C.cartan_matrix().det()
invcmat = C.cartan_matrix().inverse()
WCR = WeylCharacterRing(C)
WR = WeightRing(WCR)
# Fundamental coweights:
fundcoweights = dict([(i+1, sum([invcmat[i][j]*WCR.simple_coroots()[j+1] for j in range(rk)])) for i in range(rk)])
# Coefficients of highest root:
hwcf = [WCR.highest_root().scalar(fundcoweights[j]) for j in range(1,rk+1)]
# Express the weights of each of fundamental representation as linear
# combinations of the simple coroots:
wgts = [[([w.scalar(fundcoweights[j]) for j in range(1,rk+1)],mlt) for (w,mlt) in WR(WCR(WCR.fundamental_weights()[i]))] for i in range(1,rk+1)]
# Compute the values of the fundamental characters in function of the
# Kac coordinates:
def kac_chars(kc,Nfunc=N):
vals = [Nfunc(exp(2*I*pi*kc[i]/hwcf[i]/detcmat)) for i in range(rk)]
return [sum([mlt*prod([vals[j]^(ZZ(w[j]*detcmat)) for j in range(rk)]) for (w,mlt) in wgts[i]]) for i in range(rk)]
# Now plot the values of the fundamental characters on the edges of
# the fundamental alcove (and, in green, on Kostant's principal SU_2):
parametric_plot((lambda t: real(kac_chars((hwcf[0]*t,hwcf[1]*t,hwcf[2]*t))[0]), lambda t: real(kac_chars((hwcf[0]*t,hwcf[1]*t,hwcf[2]*t))[1]), lambda t: real(kac_chars((hwcf[0]*t,hwcf[1]*t,hwcf[2]*t))[2])), (0,1), color="green", aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((t,0,0))[0]), lambda t: real(kac_chars((t,0,0))[1]), lambda t: real(kac_chars((t,0,0))[2])), (0,1), aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((0,t,0))[0]), lambda t: real(kac_chars((0,t,0))[1]), lambda t: real(kac_chars((0,t,0))[2])), (0,1), aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((0,0,t))[0]), lambda t: real(kac_chars((0,0,t))[1]), lambda t: real(kac_chars((0,0,t))[2])), (0,1), aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((t,1-t,0))[0]), lambda t: real(kac_chars((t,1-t,0))[1]), lambda t: real(kac_chars((t,1-t,0))[2])), (0,1), aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((t,0,1-t))[0]), lambda t: real(kac_chars((t,0,1-t))[1]), lambda t: real(kac_chars((t,0,1-t))[2])), (0,1), aspect_ratio=1) + parametric_plot((lambda t: real(kac_chars((0,t,1-t))[0]), lambda t: real(kac_chars((0,t,1-t))[1]), lambda t: real(kac_chars((0,t,1-t))[2])), (0,1), aspect_ratio=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment