algebraixlib.mathobjects.mathobject module

The abstract base class for all math objects.

algebraixlib.mathobjects.mathobject.raise_if_not_mathobject(obj)[source]

Raise a TypeError exception if obj is not an instance of MathObject.

algebraixlib.mathobjects.mathobject.raise_if_not_mathobjects(*objs)[source]

Raise a TypeError exception if any member of objs is not a MathObject.

class algebraixlib.mathobjects.mathobject.MathObject[source]

Bases: abc.ABC

An abstract base class (see the base class abc.ABC) for all classes that represent data.

Note

This class can’t be instantiated. Only derived classes that implement all abstract methods can be instantiated. Since derived classes are expected to be hashable, they must be immutable.

get_ground_set() → algebraixlib.structure.Structure[source]

Return the ground set of the lowest-level algebra of this MathObject.

get_left_set() → bool[source]

Return the left set or Undef() if not applicable.

get_right_set() → bool[source]

Return the right set or Undef() if not applicable.

is_left_regular() → bool[source]

Return True if left-regular or Undef() if not applicable.

is_left_functional() → bool[source]

Return True if left-functional or Undef() if not applicable.

is_right_functional() → bool[source]

Return True if right-functional or Undef() if not applicable.

is_bijection() → bool[source]

Return True if left- and right-functional or Undef() if not applicable.

is_reflexive() → bool[source]

Return True if reflexive or Undef() if not applicable.

is_symmetric() → bool[source]

Return True if symmetric or Undef() if not applicable.

is_transitive() → bool[source]

Return True if transitive or Undef() if not applicable.

is_equivalence_relation() → bool[source]

Return True if equivalence relation or Undef() if not applicable.

get_repr() → str[source]

Return the instance’s code representation.

get_str() → str[source]

Return the instance’s string representation.

__eq__(other) → bool[source]

Return True if self and other are equal, based on their values.

__ne__(other) → bool[source]

Return True if self and other are not equal, based on their values.

__hash__() → int[source]

Return a hash based on the member values (must match the implementation of __eq__).

Note

The fact that we calculate a hash of an instance requires that instances of classes derived from this class are immutable (see also Immutable Sequence Types) and all its contained elements hashable (see also object.__hash__).

__repr__() → str[source]

Return the instance’s code representation.

__str__() → str[source]

Return the instance’s string representation.

cached_is_not_relation
cached_is_relation
cache_is_relation(value: bool)[source]
cached_is_not_clan
cached_is_clan
cache_is_clan(value: bool)[source]
cached_is_not_multiclan
cached_is_multiclan
cache_is_multiclan(value: bool)[source]
cached_is_not_left_functional
cached_is_left_functional
cache_is_left_functional(value: bool)[source]
cached_is_not_right_functional
cached_is_right_functional
cache_is_right_functional(value: bool)[source]
cached_is_not_left_regular
cached_is_left_regular
cache_is_left_regular(value: bool)[source]
cached_is_not_reflexive
cached_is_reflexive
cache_is_reflexive(value: bool)[source]
cached_is_not_symmetric
cached_is_symmetric
cache_is_symmetric(value: bool)[source]
cached_is_not_transitive
cached_is_transitive
cache_is_transitive(value: bool)[source]