Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 09b54f5

Browse files
committed
Merge remote-tracking branch 'trac/public/lie_algebras/base_class_nilponent-26074' into u/gh-ehaka/free_nilpotent_lie_algebras-26076
2 parents b7c8a2a + a5ec3ad commit 09b54f5

6 files changed

+31
-6
lines changed

src/sage/categories/category_with_axiom.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,14 +1679,15 @@ class ``Sets.Finite``), or in a separate file (typically in a class
16791679
"WellGenerated",
16801680
"Facade", "Finite", "Infinite","Enumerated",
16811681
"Complete",
1682+
"Nilpotent",
16821683
"FiniteDimensional", "Connected", "WithBasis",
16831684
"Irreducible",
16841685
"Commutative", "Associative", "Inverse", "Unital", "Division", "NoZeroDivisors", "Cellular",
16851686
"AdditiveCommutative", "AdditiveAssociative", "AdditiveInverse", "AdditiveUnital",
16861687
"Distributive",
16871688
"Endset",
16881689
"Pointed",
1689-
"Stratified", "Nilpotent"
1690+
"Stratified",
16901691
)
16911692

16921693
def uncamelcase(s,separator=" "):
@@ -2268,6 +2269,14 @@ def _repr_object_names_static(category, axioms):
22682269
result = result.replace("graded ", "graded connected ", 1)
22692270
elif axiom == "Connected" and "filtered " in result:
22702271
result = result.replace("filtered ", "filtered connected ", 1)
2272+
elif axiom == "Stratified" and "graded " in result:
2273+
result = result.replace("graded ", "stratified ", 1)
2274+
elif axiom == "Nilpotent" and "finite dimensional " in result:
2275+
# We need to put nilpotent before finite dimensional in the
2276+
# axioms ordering so we do not (unnecessarily) display
2277+
# 'nilpotent' in 'finite dimensional nilpotent stratified'.
2278+
# So we need to swap the order here.
2279+
result = result.replace("finite dimensional ", "finite dimensional nilpotent ", 1)
22712280
elif axiom == "Endset" and "homsets" in result:
22722281
# Without the space at the end to handle Homsets().Endset()
22732282
result = result.replace("homsets", "endsets", 1)

src/sage/categories/finite_dimensional_graded_lie_algebras_with_basis.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,20 @@ class Stratified(CategoryWithAxiom_over_base_ring):
114114
to say, for a graded Lie algebra `L = \bigoplus_{k=1}^M L_k`,
115115
we have `L_{k+1} = [L_1, L_k]`.
116116
117+
EXAMPLES::
118+
119+
sage: C = LieAlgebras(QQ).WithBasis().Graded().Stratified().FiniteDimensional()
120+
sage: C
121+
Category of finite dimensional stratified lie algebras with basis over Rational Field
122+
123+
A finite-dimensional stratified Lie algebra is nilpotent::
124+
125+
sage: C is C.Nilpotent()
126+
True
127+
117128
TESTS::
118129
119-
sage: C = LieAlgebras(QQ).Graded().FiniteDimensional().WithBasis().Stratified()
130+
sage: C = LieAlgebras(QQ).WithBasis().Graded().FiniteDimensional().Stratified()
120131
sage: TestSuite(C).run()
121132
"""
122133
class ParentMethods:

src/sage/categories/finite_dimensional_lie_algebras_with_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class FiniteDimensionalLieAlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
3838
Many of these tests should use non-abelian Lie algebras and need to
3939
be added after :trac:`16820`.
4040
"""
41-
_base_category_class_and_axiom = [LieAlgebras.FiniteDimensional, "WithBasis"]
41+
_base_category_class_and_axiom = (LieAlgebras.FiniteDimensional, "WithBasis")
4242

4343
def example(self, n=3):
4444
"""

src/sage/categories/finite_dimensional_nilpotent_lie_algebras_with_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class FiniteDimensionalNilpotentLieAlgebrasWithBasis(CategoryWithAxiom_over_base
4545
True
4646
sage: TestSuite(C1).run()
4747
"""
48-
_base_category_class_and_axiom = [LieAlgebras.FiniteDimensional.WithBasis, "Nilpotent"]
48+
_base_category_class_and_axiom = (LieAlgebras.FiniteDimensional.WithBasis, "Nilpotent")
4949

5050
class ParentMethods:
5151
def _test_nilpotency(self, **options):

src/sage/categories/graded_lie_algebras.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def Stratified(self):
3939
EXAMPLES::
4040
4141
sage: LieAlgebras(QQ).Graded().Stratified()
42-
Category of stratified graded Lie algebras over Rational Field
42+
Category of stratified Lie algebras over Rational Field
4343
"""
4444
return self._with_axiom("Stratified")
4545

@@ -60,6 +60,11 @@ class FiniteDimensional(CategoryWithAxiom_over_base_ring):
6060
r"""
6161
Category of finite dimensional stratified Lie algebras.
6262
63+
EXAMPLES::
64+
65+
sage: LieAlgebras(QQ).Graded().Stratified().FiniteDimensional()
66+
Category of finite dimensional stratified Lie algebras over Rational Field
67+
6368
TESTS::
6469
6570
sage: C = LieAlgebras(QQ).Graded().Stratified().FiniteDimensional()

src/sage/categories/lie_algebras_with_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class LieAlgebrasWithBasis(CategoryWithAxiom_over_base_ring):
2525
"""
2626
Category of Lie algebras with a basis.
2727
"""
28-
_base_category_class_and_axiom = [LieAlgebras, "WithBasis"]
28+
_base_category_class_and_axiom = (LieAlgebras, "WithBasis")
2929

3030
def example(self, gens=None):
3131
"""

0 commit comments

Comments
 (0)