def affine_transformations_line(R, names=['X', 'Y'], representation='bracket'): """ The Lie algebra of affine transformations of the line. EXAMPLES:: sage: L = lie_algebras.affine_transformations_line(QQ) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y} sage: X, Y = L.lie_algebra_generators() sage: L[X, Y] == Y True sage: TestSuite(L).run() sage: L = lie_algebras.affine_transformations_line(QQ, representation="matrix") sage: X, Y = L.lie_algebra_generators() sage: L[X, Y] == Y True sage: TestSuite(L).run() """ if isinstance(names, str): names = names.split(',') names = tuple(names) if representation == 'matrix': from sage.matrix.matrix_space import MatrixSpace MS = MatrixSpace(R, 2, sparse=True) one = R.one() gens = tuple(MS({(0, i): one}) for i in range(2)) from sage.algebras.lie_algebras.lie_algebra import LieAlgebraFromAssociative return LieAlgebraFromAssociative(MS, gens, names=names) X = names[0] Y = names[1] from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients s_coeff = {(X, Y): {Y: R.one()}} L = LieAlgebraWithStructureCoefficients(R, s_coeff, names=names) L.rename( "Lie algebra of affine transformations of a line over {}".format(R)) return L
def affine_transformations_line(R, names=['X', 'Y'], representation='bracket'): """ The Lie algebra of affine transformations of the line. EXAMPLES:: sage: L = lie_algebras.affine_transformations_line(QQ) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y} sage: X, Y = L.lie_algebra_generators() sage: L[X, Y] == Y True sage: TestSuite(L).run() sage: L = lie_algebras.affine_transformations_line(QQ, representation="matrix") sage: X, Y = L.lie_algebra_generators() sage: L[X, Y] == Y True sage: TestSuite(L).run() """ if isinstance(names, str): names = names.split(',') names = tuple(names) if representation == 'matrix': from sage.matrix.matrix_space import MatrixSpace MS = MatrixSpace(R, 2, sparse=True) one = R.one() gens = tuple(MS({(0,i):one}) for i in range(2)) from sage.algebras.lie_algebras.lie_algebra import LieAlgebraFromAssociative return LieAlgebraFromAssociative(MS, gens, names=names) X = names[0] Y = names[1] from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients s_coeff = {(X,Y): {Y:R.one()}} L = LieAlgebraWithStructureCoefficients(R, s_coeff, names=names) L.rename("Lie algebra of affine transformations of a line over {}".format(R)) return L
def three_dimensional_by_rank(R, n, a=None, names=['X', 'Y', 'Z']): r""" Return a 3-dimensional Lie algebra of rank ``n``, where `0 \leq n \leq 3`. Here, the *rank* of a Lie algebra `L` is defined as the dimension of its derived subalgebra `[L, L]`. (We are assuming that `R` is a field of characteristic `0`; otherwise the Lie algebras constructed by this function are still well-defined but no longer might have the correct ranks.) This is not to be confused with the other standard definition of a rank (namely, as the dimension of a Cartan subalgebra, when `L` is semisimple). INPUT: - ``R`` -- the base ring - ``n`` -- the rank - ``a`` -- the deformation parameter (used for `n = 2`); this should be a nonzero element of `R` in order for the resulting Lie algebra to actually have the right rank(?) - ``names`` -- (optional) the generator names EXAMPLES:: sage: lie_algebras.three_dimensional_by_rank(QQ, 0) Abelian Lie algebra on 3 generators (X, Y, Z) over Rational Field sage: L = lie_algebras.three_dimensional_by_rank(QQ, 1) sage: L.structure_coefficients() Finite family {('Y', 'Z'): X} sage: L = lie_algebras.three_dimensional_by_rank(QQ, 2, 4) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y, ('X', 'Z'): Y + Z} sage: L = lie_algebras.three_dimensional_by_rank(QQ, 2, 0) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y} sage: lie_algebras.three_dimensional_by_rank(QQ, 3) sl2 over Rational Field """ if isinstance(names, str): names = names.split(',') names = tuple(names) if n == 0: from sage.algebras.lie_algebras.abelian import AbelianLieAlgebra return AbelianLieAlgebra(R, names=names) if n == 1: L = three_dimensional(R, 0, 1, 0, 0, names=names) # Strictly upper triangular matrices L.rename("Lie algebra of 3x3 strictly upper triangular matrices over {}".format(R)) return L if n == 2: if a is None: raise ValueError("The parameter 'a' must be specified") X = names[0] Y = names[1] Z = names[2] from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients if a == 0: s_coeff = {(X,Y): {Y:R.one()}, (X,Z): {Y:R(a)}} # Why use R(a) here if R == 0 ? Also this has rank 1. L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("Degenerate Lie algebra of dimension 3 and rank 2 over {}".format(R)) else: s_coeff = {(X,Y): {Y:R.one()}, (X,Z): {Y:R.one(), Z:R.one()}} # a doesn't appear here :/ L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("Lie algebra of dimension 3 and rank 2 with parameter {} over {}".format(a, R)) return L if n == 3: #return sl(R, 2) from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients E = names[0] F = names[1] H = names[2] s_coeff = { (E,F): {H:R.one()}, (H,E): {E:R(2)}, (H,F): {F:R(-2)} } L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("sl2 over {}".format(R)) return L raise ValueError("Invalid rank")
def three_dimensional_by_rank(R, n, a=None, names=['X', 'Y', 'Z']): """ Return a 3-dimensional Lie algebra of rank ``n``, where `0 \leq n \leq 3`. Here, the *rank* of a Lie algebra `L` is defined as the dimension of its derived subalgebra `[L, L]`. (We are assuming that `R` is a field of characteristic `0`; otherwise the Lie algebras constructed by this function are still well-defined but no longer might have the correct ranks.) This is not to be confused with the other standard definition of a rank (namely, as the dimension of a Cartan subalgebra, when `L` is semisimple). INPUT: - ``R`` -- the base ring - ``n`` -- the rank - ``a`` -- the deformation parameter (used for `n = 2`); this should be a nonzero element of `R` in order for the resulting Lie algebra to actually have the right rank(?) - ``names`` -- (optional) the generator names EXAMPLES:: sage: lie_algebras.three_dimensional_by_rank(QQ, 0) Abelian Lie algebra on 3 generators (X, Y, Z) over Rational Field sage: L = lie_algebras.three_dimensional_by_rank(QQ, 1) sage: L.structure_coefficients() Finite family {('Y', 'Z'): X} sage: L = lie_algebras.three_dimensional_by_rank(QQ, 2, 4) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y, ('X', 'Z'): Y + Z} sage: L = lie_algebras.three_dimensional_by_rank(QQ, 2, 0) sage: L.structure_coefficients() Finite family {('X', 'Y'): Y} sage: lie_algebras.three_dimensional_by_rank(QQ, 3) sl2 over Rational Field """ if isinstance(names, str): names = names.split(',') names = tuple(names) if n == 0: from sage.algebras.lie_algebras.abelian import AbelianLieAlgebra return AbelianLieAlgebra(R, names=names) if n == 1: L = three_dimensional(R, 0, 1, 0, 0, names=names) # Strictly upper triangular matrices L.rename("Lie algebra of 3x3 strictly upper triangular matrices over {}".format(R)) return L if n == 2: if a is None: raise ValueError("The parameter 'a' must be specified") X = names[0] Y = names[1] Z = names[2] from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients if a == 0: s_coeff = {(X,Y): {Y:R.one()}, (X,Z): {Y:R(a)}} # Why use R(a) here if R == 0 ? Also this has rank 1. L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("Degenerate Lie algebra of dimension 3 and rank 2 over {}".format(R)) else: s_coeff = {(X,Y): {Y:R.one()}, (X,Z): {Y:R.one(), Z:R.one()}} # a doesn't appear here :/ L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("Lie algebra of dimension 3 and rank 2 with parameter {} over {}".format(a, R)) return L if n == 3: #return sl(R, 2) from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients E = names[0] F = names[1] H = names[2] s_coeff = { (E,F): {H:R.one()}, (H,E): {E:R(2)}, (H,F): {F:R(-2)} } L = LieAlgebraWithStructureCoefficients(R, s_coeff, tuple(names)) L.rename("sl2 over {}".format(R)) return L raise ValueError("Invalid rank")