Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

135

136

137

138

139

140

141

142

143

144

145

146

147

148

149

150

151

152

153

154

155

156

157

158

159

160

161

162

163

164

165

166

167

168

169

170

171

172

173

174

175

176

177

178

179

180

181

182

183

184

185

186

187

188

189

190

191

""" 

Abelian Lie Algebras 

 

AUTHORS: 

 

- Travis Scrimshaw (2016-06-07): Initial version 

""" 

 

#***************************************************************************** 

# Copyright (C) 2013-2017 Travis Scrimshaw <tcscrims at gmail.com> 

# 

# This program is free software: you can redistribute it and/or modify 

# it under the terms of the GNU General Public License as published by 

# the Free Software Foundation, either version 2 of the License, or 

# (at your option) any later version. 

# http://www.gnu.org/licenses/ 

#***************************************************************************** 

 

from sage.structure.indexed_generators import (IndexedGenerators, 

standardize_names_index_set) 

from sage.categories.lie_algebras import LieAlgebras 

from sage.algebras.lie_algebras.lie_algebra_element import LieAlgebraElement 

from sage.algebras.lie_algebras.lie_algebra import InfinitelyGeneratedLieAlgebra 

from sage.algebras.lie_algebras.structure_coefficients import LieAlgebraWithStructureCoefficients 

from sage.rings.polynomial.polynomial_ring_constructor import PolynomialRing 

from sage.rings.infinity import infinity 

from sage.sets.family import Family 

 

class AbelianLieAlgebra(LieAlgebraWithStructureCoefficients): 

r""" 

An abelian Lie algebra. 

 

A Lie algebra `\mathfrak{g}` is abelian if `[x, y] = 0` for all 

`x, y \in \mathfrak{g}`. 

 

EXAMPLES:: 

 

sage: L.<x, y> = LieAlgebra(QQ, abelian=True) 

sage: L.bracket(x, y) 

0 

""" 

@staticmethod 

def __classcall_private__(cls, R, names=None, index_set=None, **kwds): 

""" 

Normalize input to ensure a unique representation. 

 

TESTS:: 

 

sage: L1 = LieAlgebra(QQ, 'x,y', {}) 

sage: L2.<x, y> = LieAlgebra(QQ, abelian=True) 

sage: L1 is L2 

True 

""" 

names, index_set = standardize_names_index_set(names, index_set) 

if index_set.cardinality() == infinity: 

return InfiniteDimensionalAbelianLieAlgebra(R, index_set, **kwds) 

return super(AbelianLieAlgebra, cls).__classcall__(cls, R, names, index_set, **kwds) 

 

def __init__(self, R, names, index_set, **kwds): 

""" 

Initialize ``self``. 

 

EXAMPLES:: 

 

sage: L = LieAlgebra(QQ, 3, 'x', abelian=True) 

sage: TestSuite(L).run() 

""" 

LieAlgebraWithStructureCoefficients.__init__(self, R, Family({}), names, index_set, **kwds) 

 

def _repr_(self): 

""" 

Return a string representation of ``self``. 

 

EXAMPLES:: 

 

sage: LieAlgebra(QQ, 3, 'x', abelian=True) 

Abelian Lie algebra on 3 generators (x0, x1, x2) over Rational Field 

""" 

gens = self.lie_algebra_generators() 

if gens.cardinality() == 1: 

return "Abelian Lie algebra on generator {} over {}".format(tuple(gens)[0], self.base_ring()) 

return "Abelian Lie algebra on {} generators {} over {}".format( 

gens.cardinality(), tuple(gens), self.base_ring()) 

 

def _construct_UEA(self): 

""" 

Construct the universal enveloping algebra of ``self``. 

 

EXAMPLES:: 

 

sage: L = LieAlgebra(QQ, 3, 'x', abelian=True) 

sage: L._construct_UEA() 

Multivariate Polynomial Ring in x0, x1, x2 over Rational Field 

""" 

return PolynomialRing(self.base_ring(), self.variable_names()) 

 

def is_abelian(self): 

""" 

Return ``True`` since ``self`` is an abelian Lie algebra. 

 

EXAMPLES:: 

 

sage: L = LieAlgebra(QQ, 3, 'x', abelian=True) 

sage: L.is_abelian() 

True 

""" 

return True 

 

# abelian => nilpotent => solvable 

is_nilpotent = is_solvable = is_abelian 

 

class Element(LieAlgebraWithStructureCoefficients.Element): 

def _bracket_(self, y): 

""" 

Return the Lie bracket ``[self, y]``. 

 

EXAMPLES:: 

 

sage: L.<x, y> = LieAlgebra(QQ, abelian=True) 

sage: L.bracket(x, y) 

0 

""" 

return self.parent().zero() 

 

class InfiniteDimensionalAbelianLieAlgebra(InfinitelyGeneratedLieAlgebra, IndexedGenerators): 

r""" 

An infinite dimensional abelian Lie algebra. 

 

A Lie algebra `\mathfrak{g}` is abelian if `[x, y] = 0` for all 

`x, y \in \mathfrak{g}`. 

""" 

def __init__(self, R, index_set, prefix='L', **kwds): 

""" 

Initialize ``self``. 

 

EXAMPLES:: 

 

sage: L = LieAlgebra(QQ, index_set=ZZ, abelian=True) 

sage: TestSuite(L).run() 

""" 

cat = LieAlgebras(R).WithBasis() 

InfinitelyGeneratedLieAlgebra.__init__(self, R, category=cat) 

IndexedGenerators.__init__(self, index_set, prefix=prefix, **kwds) 

 

def dimension(self): 

r""" 

Return the dimension of ``self``, which is `\infty`. 

 

EXAMPLES:: 

 

sage: L = lie_algebras.abelian(QQ, index_set=ZZ) 

sage: L.dimension() 

+Infinity 

""" 

return infinity 

 

def is_abelian(self): 

""" 

Return ``True`` since ``self`` is an abelian Lie algebra. 

 

EXAMPLES:: 

 

sage: L = lie_algebras.abelian(QQ, index_set=ZZ) 

sage: L.is_abelian() 

True 

""" 

return True 

 

# abelian => nilpotent => solvable 

is_nilpotent = is_solvable = is_abelian 

 

# For compatibility with CombinatorialFreeModuleElement 

_repr_term = IndexedGenerators._repr_generator 

_latex_term = IndexedGenerators._latex_generator 

 

class Element(LieAlgebraElement): 

def _bracket_(self, other): 

""" 

Return the Lie bracket ``[self, y]``. 

 

EXAMPLES:: 

 

sage: L = lie_algebras.abelian(QQ, index_set=ZZ) 

sage: B = L.basis() 

sage: l1 = B[1] 

sage: l5 = B[5] 

sage: l1.bracket(l5) 

0 

""" 

return self.parent().zero()