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

""" 

Tensor Product Functorial Construction 

 

AUTHORS: 

 

- Nicolas M. Thiery (2008-2010): initial revision and refactorization 

""" 

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

# Copyright (C) 2008-2010 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 sage.categories.covariant_functorial_construction import CovariantFunctorialConstruction, CovariantConstructionCategory 

 

class TensorProductFunctor(CovariantFunctorialConstruction): 

""" 

A singleton class for the tensor functor. 

 

This functor takes a collection of vector spaces (or modules with 

basis), and constructs the tensor product of those vector spaces. 

If this vector space is in a subcategory, say that of 

``Algebras(QQ)``, it is automatically endowed with its natural 

algebra structure, thanks to the category 

``Algebras(QQ).TensorProducts()`` of tensor products of algebras. 

 

The tensor functor is covariant: if ``A`` is a subcategory of ``B``, then 

``A.TensorProducts()`` is a subcategory of ``B.TensorProducts()`` (see 

also 

:class:`~sage.categories.covariant_functorial_construction.CovariantFunctorialConstruction`). Hence, 

the role of ``Algebras(QQ).TensorProducts()`` is solely to provide 

mathematical information and algorithms which are relevant to tensor 

product of algebras. 

 

Those are implemented in the nested class 

:class:`~sage.categories.algebras.Algebras.TensorProducts` 

of ``Algebras(QQ)``. This nested class is itself a subclass of 

:class:`~sage.categories.tensor.TensorProductsCategory`. 

 

 

TESTS:: 

 

sage: TestSuite(tensor).run() 

""" 

_functor_name = "tensor" 

_functor_category = "TensorProducts" 

symbol = " # " 

 

tensor = TensorProductFunctor() 

""" 

The tensor product functorial construction 

 

See :class:`TensorProductFunctor` for more information 

 

EXAMPLES:: 

 

sage: tensor 

The tensor functorial construction 

""" 

 

class TensorProductsCategory(CovariantConstructionCategory): 

""" 

An abstract base class for all TensorProducts's categories 

 

TESTS:: 

 

sage: C = ModulesWithBasis(QQ).TensorProducts() 

sage: C 

Category of tensor products of vector spaces with basis over Rational Field 

sage: C.base_category() 

Category of vector spaces with basis over Rational Field 

sage: latex(C) 

\mathbf{TensorProducts}(\mathbf{WithBasis}_{\Bold{Q}}) 

sage: TestSuite(C).run() 

""" 

 

_functor_category = "TensorProducts" 

 

def TensorProducts(self): 

""" 

Returns the category of tensor products of objects of ``self`` 

 

By associativity of tensor products, this is ``self`` (a tensor 

product of tensor products of `Cat`'s is a tensor product of `Cat`'s) 

 

EXAMPLES:: 

 

sage: ModulesWithBasis(QQ).TensorProducts().TensorProducts() 

Category of tensor products of vector spaces with basis over Rational Field 

""" 

return self 

 

def base(self): 

""" 

The base of a tensor product is the base (usually a ring) of the underlying category. 

 

EXAMPLES:: 

 

sage: ModulesWithBasis(ZZ).TensorProducts().base() 

Integer Ring 

""" 

return self.base_category().base()