algebraixlib.extension module¶
Facilities for extending operations from one algebra to another.
-
algebraixlib.extension.
binary_extend
()[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
()[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
()[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: - set – A set with elements on which
op
operates. - op – A unary operation that operates on the elements of
set_
.
Returns: A set that consists of the defined results of
op
when executed on the elements ofset_
, orUndef()
ifset_
is not aSet
.- set – A set with elements on which
-
algebraixlib.extension.
unary_multi_extend
()[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: - set_or_mset – A set or a multiset with elements on which
op
operates. - op – A unary operation that operates on the elements of
set_or_mset
.
Returns: A set that consists of the defined results of
op
when executed on the elements ofset_or_mset
, orUndef()
ifset_or_mset
is neither a set nor a multiset.- set_or_mset – A set or a multiset with elements on which