sage: set_random_seed()
sage: n = ZZ.random_element(1,5)
- sage: field = QuadraticField(2, 'sqrt2')
sage: B = ComplexHermitianEJA._denormalized_basis(n)
sage: all( M.is_symmetric() for M in B)
True
# * The diagonal will (as a result) be real.
#
S = []
+ Eij = matrix.zero(F,n)
for i in range(n):
for j in range(i+1):
- Eij = matrix(F, n, lambda k,l: k==i and l==j)
+ # "build" E_ij
+ Eij[i,j] = 1
if i == j:
Sij = cls.real_embed(Eij)
S.append(Sij)
else:
# The second one has a minus because it's conjugated.
- Sij_real = cls.real_embed(Eij + Eij.transpose())
+ Eij[j,i] = 1 # Eij = Eij + Eij.transpose()
+ Sij_real = cls.real_embed(Eij)
S.append(Sij_real)
- Sij_imag = cls.real_embed(I*Eij - I*Eij.transpose())
+ # Eij = I*Eij - I*Eij.transpose()
+ Eij[i,j] = I
+ Eij[j,i] = -I
+ Sij_imag = cls.real_embed(Eij)
S.append(Sij_imag)
+ Eij[j,i] = 0
+ # "erase" E_ij
+ Eij[i,j] = 0
# Since we embedded these, we can drop back to the "field" that we
# started with instead of the complex extension "F".
# * The diagonal will (as a result) be real.
#
S = []
+ Eij = matrix.zero(Q,n)
for i in range(n):
for j in range(i+1):
- Eij = matrix(Q, n, lambda k,l: k==i and l==j)
+ # "build" E_ij
+ Eij[i,j] = 1
if i == j:
Sij = cls.real_embed(Eij)
S.append(Sij)
else:
# The second, third, and fourth ones have a minus
# because they're conjugated.
- Sij_real = cls.real_embed(Eij + Eij.transpose())
+ # Eij = Eij + Eij.transpose()
+ Eij[j,i] = 1
+ Sij_real = cls.real_embed(Eij)
S.append(Sij_real)
- Sij_I = cls.real_embed(I*Eij - I*Eij.transpose())
+ # Eij = I*(Eij - Eij.transpose())
+ Eij[i,j] = I
+ Eij[j,i] = -I
+ Sij_I = cls.real_embed(Eij)
S.append(Sij_I)
- Sij_J = cls.real_embed(J*Eij - J*Eij.transpose())
+ # Eij = J*(Eij - Eij.transpose())
+ Eij[i,j] = J
+ Eij[j,i] = -J
+ Sij_J = cls.real_embed(Eij)
S.append(Sij_J)
- Sij_K = cls.real_embed(K*Eij - K*Eij.transpose())
+ # Eij = K*(Eij - Eij.transpose())
+ Eij[i,j] = K
+ Eij[j,i] = -K
+ Sij_K = cls.real_embed(Eij)
S.append(Sij_K)
+ Eij[j,i] = 0
+ # "erase" E_ij
+ Eij[i,j] = 0
# Since we embedded these, we can drop back to the "field" that we
# started with instead of the quaternion algebra "Q".