Skip to content

Commit 289860f

Browse files
committed
more nesting
1 parent 00a3fee commit 289860f

File tree

1 file changed

+69
-68
lines changed

1 file changed

+69
-68
lines changed

src/sage/categories/finite_lattice_posets.py

Lines changed: 69 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
from sage.categories.category_with_axiom import CategoryWithAxiom
1313
from sage.misc.cachefunc import cached_method
14-
14+
from sage.categories.category_singleton import Category_singleton
1515

1616
class FiniteLatticePosets(CategoryWithAxiom):
1717
r"""
@@ -257,7 +257,8 @@ def Stone(self):
257257
sage: P in FiniteLatticePosets().Stone()
258258
True
259259
"""
260-
return self._with_axioms(["Distributive", "Stone"])
260+
return self._with_axioms(("Semidistributive", "CongruenceUniform",
261+
"Distributive", "Stone"))
261262

262263
def Distributive(self):
263264
r"""
@@ -276,7 +277,8 @@ def Distributive(self):
276277
sage: P in FiniteLatticePosets().Distributive()
277278
True
278279
"""
279-
return self._with_axiom("Distributive")
280+
return self._with_axioms(("Semidistributive", "CongruenceUniform",
281+
"Distributive"))
280282

281283
def CongruenceUniform(self):
282284
r"""
@@ -290,7 +292,7 @@ def CongruenceUniform(self):
290292
sage: P in FiniteLatticePosets().CongruenceUniform()
291293
True
292294
"""
293-
return self._with_axioms(["Semidistributive", "CongruenceUniform"])
295+
return self._with_axioms(("Semidistributive", "CongruenceUniform"))
294296

295297
def Semidistributive(self):
296298
r"""
@@ -392,113 +394,112 @@ def is_congruence_uniform(self):
392394
"""
393395
return True
394396

395-
class Extremal(CategoryWithAxiom):
396-
"""
397-
The category of extremal uniform lattices.
397+
class Distributive(CategoryWithAxiom):
398+
"""
399+
The category of distributive lattices.
398400
399-
EXAMPLES::
401+
EXAMPLES::
400402
401-
sage: cat = FiniteLatticePosets().Extremal(); cat
402-
Category of finite extremal lattice posets
403+
sage: cat = FiniteLatticePosets().Distributive(); cat
404+
Category of finite distributive lattice posets
403405
404-
sage: cat.super_categories()
405-
[Category of finite lattice posets]
406-
"""
407-
class ParentMethods:
408-
def is_extremal(self):
406+
sage: cat.super_categories()
407+
[Category of finite lattice posets]
409408
"""
410-
Return whether ``self`` is an extremal lattice.
409+
@cached_method
410+
def extra_super_categories(self):
411+
r"""
412+
Return a list of the super categories of ``self``.
411413
412-
EXAMPLES::
414+
This encode implications between properties.
413415
414-
sage: posets.TamariLattice(4).is_extremal()
415-
True
416-
"""
417-
return True
416+
EXAMPLES::
418417
419-
class Trim(CategoryWithAxiom):
420-
"""
421-
The category of trim uniform lattices.
418+
sage: FiniteLatticePosets().Distributive().super_categories()
419+
[Category of finite lattice posets]
420+
"""
421+
return [FiniteLatticePosets().Trim()]
422422

423-
EXAMPLES::
423+
class ParentMethods:
424+
def is_distributive(self):
425+
"""
426+
Return whether ``self`` is a distributive lattice.
424427
425-
sage: cat = FiniteLatticePosets().Trim(); cat
426-
Category of finite trim extremal lattice posets
427-
sage: cat.super_categories()
428-
[Category of finite extremal lattice posets]
429-
"""
430-
class ParentMethods:
431-
def is_trim(self):
428+
EXAMPLES::
429+
430+
sage: P = posets.Crown(4).order_ideals_lattice()
431+
sage: P.is_distributive()
432+
True
433+
"""
434+
return True
435+
436+
class Stone(CategoryWithAxiom):
432437
"""
433-
Return whether ``self`` is a trim lattice.
438+
The category of Stone lattices.
434439
435440
EXAMPLES::
436441
437-
sage: posets.TamariLattice(4).is_trim()
438-
True
442+
sage: cat = FiniteLatticePosets().Stone(); cat
443+
Category of finite distributive stone lattice posets
444+
445+
sage: cat.super_categories()
446+
[Category of finite distributive lattice posets]
439447
"""
440-
return True
448+
class ParentMethods:
449+
def is_stone(self):
450+
"""
451+
Return whether ``self`` is a Stone lattice.
452+
453+
EXAMPLES::
441454
442-
class Distributive(CategoryWithAxiom):
455+
sage: posets.DivisorLattice(12).is_stone()
456+
True
457+
"""
458+
return True
459+
460+
class Extremal(CategoryWithAxiom):
443461
"""
444-
The category of distributive lattices.
462+
The category of extremal uniform lattices.
445463
446464
EXAMPLES::
447465
448-
sage: cat = FiniteLatticePosets().Distributive(); cat
449-
Category of finite distributive lattice posets
466+
sage: cat = FiniteLatticePosets().Extremal(); cat
467+
Category of finite extremal lattice posets
450468
451469
sage: cat.super_categories()
452470
[Category of finite lattice posets]
453471
"""
454-
@cached_method
455-
def Finite_extra_super_categories(self):
456-
r"""
457-
Return a list of the super categories of ``self``.
458-
459-
This encode implications between properties.
460-
461-
EXAMPLES::
462-
463-
sage: FiniteLatticePosets().Distributive().super_categories()
464-
[Category of finite lattice posets]
465-
"""
466-
return [FiniteLatticePosets().CongruenceUniform(),
467-
FiniteLatticePosets().Trim()]
468-
469472
class ParentMethods:
470-
def is_distributive(self):
473+
def is_extremal(self):
471474
"""
472-
Return whether ``self`` is a distributive lattice.
475+
Return whether ``self`` is an extremal lattice.
473476
474477
EXAMPLES::
475478
476-
sage: P = posets.Crown(4).order_ideals_lattice()
477-
sage: P.is_distributive()
479+
sage: posets.TamariLattice(4).is_extremal()
478480
True
479481
"""
480482
return True
481483

482-
class Stone(CategoryWithAxiom):
484+
class Trim(CategoryWithAxiom):
483485
"""
484-
The category of Stone lattices.
486+
The category of trim uniform lattices.
485487
486488
EXAMPLES::
487489
488-
sage: cat = FiniteLatticePosets().Stone(); cat
489-
Category of finite distributive stone lattice posets
490-
490+
sage: cat = FiniteLatticePosets().Trim(); cat
491+
Category of finite trim extremal lattice posets
491492
sage: cat.super_categories()
492-
[Category of finite distributive lattice posets]
493+
[Category of finite extremal lattice posets]
493494
"""
494495
class ParentMethods:
495-
def is_stone(self):
496+
def is_trim(self):
496497
"""
497-
Return whether ``self`` is a Stone lattice.
498+
Return whether ``self`` is a trim lattice.
498499
499500
EXAMPLES::
500501
501-
sage: posets.DivisorLattice(12).is_stone()
502+
sage: posets.TamariLattice(4).is_trim()
502503
True
503504
"""
504505
return True

0 commit comments

Comments
 (0)