Exemplo n.º 1
0
def _check_graph(obj: _mo.MathObject) -> bool:
    """Return ``True`` if ``obj`` is a :term:`graph`, ``False`` if not.

    ``obj`` is expected to be a :term:`clan`.
    """
    return obj.is_set and obj.get_left_set() == _mo.Set('s', 'p', 'o') \
        and _properties.is_regular(obj)
Exemplo n.º 2
0
def _check_graph(obj: _mo.MathObject) -> bool:
    """Return ``True`` if ``obj`` is a :term:`graph`, ``False`` if not.

    ``obj`` is expected to be a :term:`clan`.
    """
    return obj.is_set and obj.get_left_set() == _mo.Set('s', 'p', 'o') \
        and _properties.is_regular(obj)
Exemplo n.º 3
0
def _check_graph(obj: _mo.MathObject) -> bool:
    """Return ``True`` if ``obj`` is (almost) a :term:`graph`. Perform all checks except for the
    membership in the :term:`algebra of clans`."""
    return isinstance(obj, _mo.Set) and obj.get_left_set() == _mo.Set('s', 'p', 'o') \
        and obj.is_left_regular()
Exemplo n.º 4
0
def _check_triple(obj: _mo.MathObject) -> bool:
    """Return ``True`` if ``obj`` is (almost) a :term:`triple`. Perform all checks except for the
    membership in the :term:`algebra of relations`."""
    # noinspection PyUnresolvedReferences
    return isinstance(obj, _mo.Set) and obj.cardinality == 3 \
        and obj.get_left_set() == _mo.Set('s', 'p', 'o')