From b1e97bc9896e7c4ede3a948b4b7d321aba1f3fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jori=20M=C3=A4ntysalo?= Date: Tue, 25 Aug 2015 10:13:30 +0300 Subject: [PATCH] Added function frattini_sublattice(). --- src/sage/combinat/posets/hasse_diagram.py | 15 ++++++++++++++ src/sage/combinat/posets/lattices.py | 25 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/sage/combinat/posets/hasse_diagram.py b/src/sage/combinat/posets/hasse_diagram.py index 7d13914756c..7467539c0ea 100644 --- a/src/sage/combinat/posets/hasse_diagram.py +++ b/src/sage/combinat/posets/hasse_diagram.py @@ -1643,6 +1643,21 @@ def sublattice(elms, e): return result + def frattini_sublattice(self): + """ + Return the list of elements of the Frattini sublattice of the lattice. + + EXAMPLES:: + + sage: H = Posets.PentagonPoset()._hasse_diagram + sage: H.frattini_sublattice() + [0, 4] + """ + # Just a direct computation, no optimization at all. + max_sublats = self.maximal_sublattices() + return [e for e in range(self.cardinality()) if + all(e in ms for ms in max_sublats)] + from sage.misc.rest_index_of_methods import gen_rest_table_index import sys __doc__ = __doc__.format(INDEX_OF_FUNCTIONS=gen_rest_table_index(HasseDiagram)) diff --git a/src/sage/combinat/posets/lattices.py b/src/sage/combinat/posets/lattices.py index 21e92d24805..e99a9e613e9 100644 --- a/src/sage/combinat/posets/lattices.py +++ b/src/sage/combinat/posets/lattices.py @@ -947,6 +947,31 @@ def maximal_sublattices(self): return [self.sublattice([self.bottom()]), self.sublattice([self.top()])] return [self.sublattice([self[x] for x in d]) for d in self._hasse_diagram.maximal_sublattices()] + def frattini_sublattice(self): + r""" + Return the Frattini sublattice of the lattice. + + Frattini sublattice `\Phi(L)` is the intersection of all + proper maximal sublattices of `L`. It is also the set of + "non-generators" - if the sublattice generated by set `S` of + elements is whole lattice then also `S \setminus \Phi(L)` + generates whole lattice. + + EXAMPLES:: + + sage: L = LatticePoset(( [], [[1,2],[1,17],[1,8],[2,3],[2,22], + ....: [2,5],[2,7],[17,22],[17,13],[8,7], + ....: [8,13],[3,16],[3,9],[22,16],[22,18], + ....: [22,10],[5,18],[5,14],[7,9],[7,14], + ....: [7,10],[13,10],[16,6],[16,19],[9,19], + ....: [18,6],[18,33],[14,33],[10,19], + ....: [10,33],[6,4],[19,4],[33,4]] )) + sage: sorted(L.frattini_sublattice().list()) + [1, 2, 4, 10, 19, 22, 33] + """ + return LatticePoset(self.subposet([self[x] for x in + self._hasse_diagram.frattini_sublattice()])) + ############################################################################ FiniteMeetSemilattice._dual_class = FiniteJoinSemilattice