algebraixlib.extension module¶
Facilities for extending operations from one algebra to another.
-
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.For this extension, the elements of the extended algebra must be sets of the elements of the original 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
andset2
.
Returns: A set that consists of the defined results of
op
when executed on all combinations of the elements ofset1
andset2
, orUndef()
if either set is not aSet
.- set1 – A set with elements on which
-
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.For this extension, the elements of the extended algebra must be multisets of the elements of the original 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
andmultiset2
.
Returns: A multiset that consists of the defined results of
op
when executed on all combinations of the elements ofmultiset1
andmultiset2
, orUndef()
if either set is not aMultiset
.- multiset1 – A multiset with elements on which
-
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.For this extension, the elements of the extended algebra must be sets of the elements of the original 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 ofset1
, orUndef()
ifset1
is not aSet
.- set1 – A set with elements on which
-
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.For this extension, the elements of the extended algebra must be multisets of the elements of the original 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 ofmultiset1
, orUndef()
ifset1
is not aMultiset
.- multiset1 – A multiset with elements on which