algebraixlib.extension module

Definitions for extending and other set operations that P(M) is not closed under.

algebraixlib.extension.binary_extend(set1: 'P( M )', set2: 'P( M )', op, _checked=True) → 'P( M )'[source]

Return the binary extension of op from one algebra to another algebra.

Parameters:
  • set1 – A set with elements on which op operates.
  • set2 – A set with elements on which op operates.
  • op – A binary operation that operates on the elements of set1 and set2.
Returns:

A set that consists of the defined results of op when executed on all combinations of the elements of set1 and set2, or Undef() if either set is not a Set.

algebraixlib.extension.binary_multi_extend(multiset1: 'P( M x N )', multiset2: 'P( M x N )', op, _checked=True) → 'P( M x N )'[source]

Return the binary extension of op from one algebra to another algebra.

Parameters:
  • multiset1 – A multiset with elements on which op operates.
  • multiset2 – A multiset with elements on which op operates.
  • op – A binary operation that operates on the elements of multiset1 and multiset2.
Returns:

A multiset that consists of the defined results of op when executed on all combinations of the elements of multiset1 and multiset2, or Undef() if either set is not a Multiset.

algebraixlib.extension.unary_extend(set1: 'P( M )', op, _checked=True) → 'P( M )'[source]

Return the unary extension of op from one algebra to another algebra.

Parameters:
  • set1 – A set with elements on which op operates.
  • op – A unary operation that operates on the elements of set1.
Returns:

A set that consists of the defined results of op when executed on the elements of set1, or Undef() if set1 is not a Set.

algebraixlib.extension.unary_multi_extend(multiset1: 'P( M x N )', op, _checked=True) → 'P( M x N )'[source]

Return the unary extension of op from one algebra to another algebra.

Parameters:
  • multiset1 – A multiset with elements on which op operates.
  • op – A unary operation that operates on the elements of multiset1.
Returns:

A set that consists of the defined results of op when executed on the elements of multiset1, or Undef() if set1 is not a Multiset.