Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Added function frattini_sublattice().
Browse files Browse the repository at this point in the history
  • Loading branch information
jm58660 committed Aug 25, 2015
1 parent d85c873 commit b1e97bc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/sage/combinat/posets/hasse_diagram.py
Expand Up @@ -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))
25 changes: 25 additions & 0 deletions src/sage/combinat/posets/lattices.py
Expand Up @@ -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
Expand Down

0 comments on commit b1e97bc

Please sign in to comment.