π Moore families#
In mathematics, a Moore family (or a closure system) on a set \(E\) is a family \(\mathcal{F}\) of subsets of \(E\) that:
Contains \(E\) itself: \(E \in \mathcal{F}\)
Is closed under arbitrary intersections: for any subfamily
\(\mathcal{G} \subseteq \mathcal{F}\), we have \(\bigcap \mathcal{G} \in \mathcal{F}\)
The intersection property ensures that for any subset \(A \subseteq E\), there exists a smallest element of \(\mathcal{F}\) containing \(A\), called the closure of \(A\).
Examples#
Using the ExtensibleMooreFamily (or the frozen
FrozenMooreFamily) from the
galactic.algebras.closure.core module, you can create Moore families:
from IPython.display import HTML
from galactic.algebras.closure.core import ExtensibleMooreFamily
from galactic.algebras.lattice.examples.color.core import Color
from galactic.algebras.closure.examples.color.core import Colors
family = ExtensibleMooreFamily()
family.extend(
[
Colors([Color(red=1, blue=0.5), Color(blue=1, red=0.5)]),
Colors([Color(blue=1, green=0.5), Color(green=1)]),
],
)
display(*family.essentials)
Moore families are lattices of closed sets and can be visualized in the GALACTIC framework:
from galactic.algebras.closure.examples.color.viewer import ColorsRenderer
from galactic.algebras.poset.viewer import HasseDiagram
diagram = HasseDiagram[Colors](family, domain_renderer=ColorsRenderer())
diagram
In the GALACTIC framework, you can get the join-irreducible and meet-irreducible
closed sets of a Moore family using the
join_irreducible and
meet_irreducible properties:
display(*family.join_irreducible, HTML("<br>"))
display(*family.meet_irreducible)
Itβs possible to get the principal closed set where an element appears for the first
time using the principals
property:
for elem, closed in family.principals.items():
display(elem, closed, HTML("<br>"))
family.extend(
[
Colors([Color(red=1), Color(green=0.5)]),
]
)
for elem, closed in family.principals.items():
display(elem, closed, HTML("<br>"))
diagram
The irreducibles are:
display(*family.join_irreducible, HTML("<br>"))
display(*family.meet_irreducible)
Itβs also possible to get the elements introduced by a closed set in the family using
the introduced_elems() method:
for closed in family:
display(closed, *family.introduced_elems(closed), HTML("<br>"))