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

r""" 

Lattice posets 

""" 

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

# Copyright (C) 2011 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.misc.cachefunc import cached_method 

from sage.misc.abstract_method import abstract_method 

from sage.misc.lazy_import import LazyImport 

from sage.categories.category import Category 

from sage.categories.posets import Posets 

 

class LatticePosets(Category): 

r""" 

The category of lattices, i.e. partially ordered sets in which any 

two elements have a unique supremum (the elements' least upper 

bound; called their *join*) and a unique infimum (greatest lower bound; 

called their *meet*). 

 

EXAMPLES:: 

 

sage: LatticePosets() 

Category of lattice posets 

sage: LatticePosets().super_categories() 

[Category of posets] 

sage: LatticePosets().example() 

NotImplemented 

 

.. SEEALSO:: :class:`~sage.categories.posets.Posets`, :class:`FiniteLatticePosets`, :func:`LatticePoset` 

 

TESTS:: 

 

sage: C = LatticePosets() 

sage: TestSuite(C).run() 

 

""" 

@cached_method 

def super_categories(self): 

r""" 

Returns a list of the (immediate) super categories of 

``self``, as per :meth:`Category.super_categories`. 

 

EXAMPLES:: 

 

sage: LatticePosets().super_categories() 

[Category of posets] 

""" 

return [Posets()] 

 

Finite = LazyImport('sage.categories.finite_lattice_posets', 'FiniteLatticePosets') 

 

class ParentMethods: 

 

@abstract_method 

def meet(self, x, y): 

""" 

Returns the meet of `x` and `y` in this lattice 

 

INPUT: 

 

- ``x``, ``y`` -- elements of ``self`` 

 

EXAMPLES:: 

 

sage: D = LatticePoset((divisors(30), attrcall("divides"))) 

sage: D.meet( D(6), D(15) ) 

3 

""" 

 

@abstract_method 

def join(self, x, y): 

""" 

Returns the join of `x` and `y` in this lattice 

 

INPUT: 

 

- ``x``, ``y`` -- elements of ``self`` 

 

EXAMPLES:: 

 

sage: D = LatticePoset((divisors(60), attrcall("divides"))) 

sage: D.join( D(6), D(10) ) 

30 

"""