algebraixlib.algebras.clans module

This module contains the algebra of clans.

class algebraixlib.algebras.clans.Algebra[source]

Bases: object

Provide the operations and relations that are members of the algebra of clans.

This class contains only static member functions. Its main purpose is to provide a namespace for and highlight the operations and relations that belong to the algebra of clans. All member functions are also available at the enclosing module scope.

static transpose(clan: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the transposition of the clan clan.

Returns:The unary extension of transposition from the algebra of relations to the algebra of clans, applied to clan, or Undef() if clan is not a clan.
static compose(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the composition of clan1 with clan2.

Returns:The binary extension of composition from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the cross-union of clan1 and clan2.

Returns:The binary extension of union from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static functional_cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the left-functional cross-union of clan1 and clan2.

Returns:The binary extension of the left-functional union from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static lhs_functional_cross_union(lhs: 'PP( MxM )', rhs: 'PP( MxM )', _checked=True)[source]

This data manipulations preforms a left functional cross union, then unions the left hand side elements that were not cross unioned.

Parameters:
  • lhs – The priority left hand clan for this operation
  • rhs – The right hand clan to preform the cross union with
Returns:

PP(MxM) resulting math object

static right_functional_cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the right-functional cross-union of clan1 and clan2.

Returns:The binary extension of the right-functional union from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static cross_intersect(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the cross-intersection of clan1 and clan2.

Returns:The binary extension of intersection from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static substrict(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return the binary extension of substriction of clan1 and clan2.

Returns:The binary extension of substriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
static superstrict(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'[source]

Return a Set of every element of clan1 that is a superset of any element of clan2.

Returns:The binary extension of superstriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.transpose(clan: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the transposition of the clan clan.

Returns:The unary extension of transposition from the algebra of relations to the algebra of clans, applied to clan, or Undef() if clan is not a clan.
algebraixlib.algebras.clans.compose(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the composition of clan1 with clan2.

Returns:The binary extension of composition from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the cross-union of clan1 and clan2.

Returns:The binary extension of union from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.functional_cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the left-functional cross-union of clan1 and clan2.

Returns:The binary extension of the left-functional union from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.lhs_functional_cross_union(lhs: 'PP( MxM )', rhs: 'PP( MxM )', _checked=True)

This data manipulations preforms a left functional cross union, then unions the left hand side elements that were not cross unioned.

Parameters:
  • lhs – The priority left hand clan for this operation
  • rhs – The right hand clan to preform the cross union with
Returns:

PP(MxM) resulting math object

algebraixlib.algebras.clans.right_functional_cross_union(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the right-functional cross-union of clan1 and clan2.

Returns:The binary extension of the right-functional union from the algebra of relations to the algebra of clans, applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.cross_intersect(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the cross-intersection of clan1 and clan2.

Returns:The binary extension of intersection from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.substrict(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return the binary extension of substriction of clan1 and clan2.

Returns:The binary extension of substriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.superstrict(clan1: 'PP(M x M)', clan2: 'PP(M x M)', _checked=True) → 'PP(M x M)'

Return a Set of every element of clan1 that is a superset of any element of clan2.

Returns:The binary extension of superstriction from the algebra of relations (which inherits it from the algebra of sets) to the algebra of clans applied to clan1 and clan2, or Undef() if clan1 or clan2 are not clans.
algebraixlib.algebras.clans.get_name() → str[source]

Return the name and ground set of this algebra in string form.

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

Return the ground set of this algebra.

algebraixlib.algebras.clans.get_absolute_ground_set() → algebraixlib.structure.Structure[source]

Return the absolute ground set of this algebra.

algebraixlib.algebras.clans.is_member(obj: algebraixlib.mathobjects.mathobject.MathObject) → bool[source]

Return True if obj is a member of the ground set of this algebra.

Note

This function calls get_ground_set() on obj.

algebraixlib.algebras.clans.is_absolute_member(obj: algebraixlib.mathobjects.mathobject.MathObject) → bool[source]

Return True if obj is a member of the absolute ground set of this algebra.

return:True if obj is an absolute clan.

Note

This function calls get_ground_set() on obj.

algebraixlib.algebras.clans.get_lefts(clan: 'PP(M x M)', _checked=True) → 'P( M )'[source]

Return the left set of this clan.

Returns:The union of the left sets of all relations in the clan or Undef() if clan is not a clan.
algebraixlib.algebras.clans.get_rights(clan: 'PP(M x M)', _checked=True) → 'P( M )'[source]

Return the right set of this clan.

Returns:The union of the right sets of all relations in the clan or Undef() if clan is not a clan.
algebraixlib.algebras.clans.is_left_regular(clan, _checked=True) → bool[source]

Return True if clan is left-regular.

Returns:True if clan is left-regular or Undef() if clan is not a clan.
algebraixlib.algebras.clans.project(clan: 'PP(M x M)', *lefts) → 'PP(M x M)'[source]

Return a clan with the left components from clan with the values in lefts. See project.

Parameters:
  • clan – The source data. Must be a clan.
  • lefts – The names of the lefts to return. (If you want to pass in an iterable, you need to prefix it with a *.)
Returns:

A clan with only the lefts as indicated by lefts.

algebraixlib.algebras.clans.from_set(left: '( M )', *values: '( M )') → 'PP(M x M)'[source]

Return a clan where all relations contain a single couplet with the same left component.

Parameters:
Returns:

A clan where every relation consists of a single couplet with a left component of left and a right component from values.

algebraixlib.algebras.clans.from_dict(dict1: dict) → 'PP(M x M)'[source]

Return a clan with a single relation where the couplets are the elements of dict1.

algebraixlib.algebras.clans.diag(*args) → 'PP(M x M)'[source]

Return a ‘clan diagonal‘ of the arguments.

algebraixlib.algebras.clans.defined_at(clan, left)[source]

Return the portion of clan where relations in clan are defined for left