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

""" 

Dual functorial construction 

 

AUTHORS: 

 

- Nicolas M. Thiery (2009-2010): initial revision 

""" 

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

# Copyright (C) 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/ 

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

 

# could do SelfDualCategory 

 

from sage.categories.covariant_functorial_construction import CovariantFunctorialConstruction, CovariantConstructionCategory 

 

class DualFunctor(CovariantFunctorialConstruction): 

""" 

A singleton class for the dual functor 

""" 

_functor_name = "dual" 

_functor_category = "DualObjects" 

symbol = "^*" 

 

class DualObjectsCategory(CovariantConstructionCategory): 

 

_functor_category = "DualObjects" 

 

def _repr_object_names(self): 

""" 

EXAMPLES:: 

 

sage: VectorSpaces(QQ).DualObjects() # indirect doctest 

Category of duals of vector spaces over Rational Field 

""" 

# Just to remove the `objects` 

return "duals of %s"%(self.base_category()._repr_object_names())