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

r""" 

AlgebraIdeals 

""" 

from __future__ import absolute_import 

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

# Copyright (C) 2005 David Kohel <kohel@maths.usyd.edu> 

# William Stein <wstein@math.ucsd.edu> 

# 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

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

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

 

from .category_types import Category_ideal 

from .algebra_modules import AlgebraModules 

 

class AlgebraIdeals(Category_ideal): 

""" 

The category of two-sided ideals in a fixed algebra `A`. 

 

EXAMPLES:: 

 

sage: AlgebraIdeals(QQ['a']) 

Category of algebra ideals in Univariate Polynomial Ring in a over Rational Field 

 

.. TODO:: 

 

- Add support for non commutative rings (this is currently not 

supported by the subcategory :class:`AlgebraModules`). 

- Make ``AlgebraIdeals(R)``, return ``CommutativeAlgebraIdeals(R)`` 

when ``R`` is commutative. 

- If useful, implement ``AlgebraLeftIdeals`` and 

``AlgebraRightIdeals`` of which ``AlgebraIdeals`` 

would be a subcategory. 

""" 

def __init__(self, A): 

""" 

EXAMPLES:: 

 

sage: AlgebraIdeals(QQ['a']) 

Category of algebra ideals in Univariate Polynomial Ring in a over Rational Field 

sage: AlgebraIdeals(QQ) 

Traceback (most recent call last): 

... 

TypeError: A (=Rational Field) must be an algebra 

 

TESTS:: 

 

sage: TestSuite(AlgebraIdeals(QQ['a'])).run() 

""" 

from sage.algebras.algebra import is_Algebra 

if not is_Algebra(A): # A not in Algebras() ? 

raise TypeError("A (=%s) must be an algebra"%A) 

Category_ideal.__init__(self, A) 

 

def algebra(self): 

""" 

EXAMPLES:: 

 

sage: AlgebraIdeals(QQ['x']).algebra() 

Univariate Polynomial Ring in x over Rational Field 

""" 

return self.ambient() 

 

def super_categories(self): 

""" 

The category of algebra modules should be a super category of this category. 

 

However, since algebra modules are currently only available over commutative rings, 

we have to omit it if our ring is non-commutative. 

 

EXAMPLES:: 

 

sage: AlgebraIdeals(QQ['x']).super_categories() 

[Category of algebra modules over Univariate Polynomial Ring in x over Rational Field] 

sage: C = AlgebraIdeals(FreeAlgebra(QQ,2,'a,b')) 

sage: C.super_categories() 

[] 

 

""" 

R = self.algebra() 

try: 

if R.is_commutative(): 

return [AlgebraModules(R)] 

except (AttributeError,NotImplementedError): 

pass 

return []