Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/sage/categories/category_with_axiom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1678,6 +1678,7 @@ class ``Sets.Finite``), or in a separate file (typically in a class
"Differentiable", "Smooth", "Analytic", "AlmostComplex",
"FinitelyGeneratedAsMagma",
"WellGenerated",
"Bounded",
"Facade", "Finite", "Infinite", "Enumerated",
"Complete",
"Nilpotent",
Expand Down
19 changes: 18 additions & 1 deletion src/sage/categories/finite_lattice_posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
# *****************************************************************************

from sage.categories.category_with_axiom import CategoryWithAxiom
from sage.categories.lattice_posets import LatticePosets
from sage.misc.cachefunc import cached_method


class FiniteLatticePosets(CategoryWithAxiom):
Expand All @@ -21,7 +23,9 @@ class FiniteLatticePosets(CategoryWithAxiom):
sage: FiniteLatticePosets()
Category of finite lattice posets
sage: FiniteLatticePosets().super_categories()
[Category of lattice posets, Category of finite posets]
[Category of lattice posets,
Category of finite posets,
Category of bounded posets]
sage: FiniteLatticePosets().example()
NotImplemented

Expand All @@ -37,6 +41,19 @@ class FiniteLatticePosets(CategoryWithAxiom):
True
sage: TestSuite(C).run()
"""
@cached_method
def extra_super_categories(self):
r"""
Implement the fact that a finite lattice is a bounded poset.

EXAMPLES::

sage: FiniteLatticePosets().super_categories()
[Category of lattice posets,
Category of finite posets,
Category of bounded posets]
"""
return [LatticePosets().Bounded()]

class ParentMethods:

Expand Down
1 change: 1 addition & 0 deletions src/sage/categories/lattice_posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def join(self, x, y):
"""

class SubcategoryMethods:

def Stone(self):
r"""
A Stone lattice `(L, \vee, \wedge)` is a pseudo-complemented
Expand Down
39 changes: 39 additions & 0 deletions src/sage/categories/posets.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from sage.misc.abstract_method import abstract_method
from sage.misc.lazy_import import LazyImport
from sage.categories.category import Category
from sage.categories.category_with_axiom import CategoryWithAxiom
from sage.categories.sets_cat import Sets


Expand Down Expand Up @@ -719,3 +720,41 @@ class ElementMethods:
# sage: x <= y
# """
# return self.parent().le(self, other)

class SubcategoryMethods:
def Bounded(self):
r"""
A bounded poset is a poset with a unique maximal element
and a unique minimal element.

EXAMPLES::

sage: P = posets.DivisorLattice(24)
sage: P in Posets().Bounded()
True
"""
return self._with_axiom("Bounded")

class Bounded(CategoryWithAxiom):
"""
The category of bounded posets.

EXAMPLES::

sage: cat = Posets().Bounded(); cat
Category of bounded posets

sage: cat.super_categories()
[Category of posets]
"""
class ParentMethods:
def is_bounded(self):
"""
Return whether ``self`` is a bounded poset.

EXAMPLES::

sage: posets.TamariLattice(4).is_bounded()
True
"""
return True
Loading