# Product(A, B)¶

This domain implements cartesian product. If the underlying domains are both Finite then the resulting Product is also Finite and can be enumerated via size(), index(), location(), etc. The index of the second component (B) varies most quickly.

0: % if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianMonoid
1: % if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
*: (%, %) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from Magma
*: (Integer, %) -> % if A has AbelianGroup and B has AbelianGroup
from AbelianGroup
*: (NonNegativeInteger, %) -> % if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianMonoid
*: (PositiveInteger, %) -> % if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianSemiGroup
+: (%, %) -> % if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianSemiGroup
-: % -> % if A has AbelianGroup and B has AbelianGroup
from AbelianGroup
-: (%, %) -> % if A has AbelianGroup and B has AbelianGroup
from AbelianGroup
/: (%, %) -> % if B has Group and A has Group
from Group
<: (%, %) -> Boolean if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from PartialOrder
<=: (%, %) -> Boolean if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from PartialOrder
=: (%, %) -> Boolean
from BasicType
>: (%, %) -> Boolean if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from PartialOrder
>=: (%, %) -> Boolean if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from PartialOrder
^: (%, Integer) -> % if B has Group and A has Group
from Group
^: (%, NonNegativeInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
^: (%, PositiveInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from Magma
~=: (%, %) -> Boolean
from BasicType
coerce: % -> OutputForm
from CoercibleTo OutputForm
commutator: (%, %) -> % if B has Group and A has Group
from Group
conjugate: (%, %) -> % if B has Group and A has Group
from Group
construct: (A, B) -> %
construct(a, b) creates element of the product with components a and b.
convert: % -> InputForm if B has Finite and A has Finite
from ConvertibleTo InputForm
enumerate: () -> List % if B has Finite and A has Finite
from Finite
first: % -> A
first(x) selects first component of the product
hash: % -> SingleInteger
from SetCategory
hashUpdate!: (HashState, %) -> HashState
from SetCategory
index: PositiveInteger -> % if B has Finite and A has Finite
from Finite
inv: % -> % if B has Group and A has Group
from Group
latex: % -> String
from SetCategory
leftPower: (%, NonNegativeInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
leftPower: (%, PositiveInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from Magma
leftRecip: % -> Union(%, failed) if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
lookup: % -> PositiveInteger if B has Finite and A has Finite
from Finite
max: (%, %) -> % if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from OrderedSet
min: (%, %) -> % if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from OrderedSet
one?: % -> Boolean if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
opposite?: (%, %) -> Boolean if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianMonoid
random: () -> % if B has Finite and A has Finite
from Finite
recip: % -> Union(%, failed) if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
rightPower: (%, NonNegativeInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
rightPower: (%, PositiveInteger) -> % if B has Group and A has Group or A has Monoid and B has Monoid
from Magma
rightRecip: % -> Union(%, failed) if B has Group and A has Group or A has Monoid and B has Monoid
from MagmaWithUnit
sample: % if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup or A has Monoid and B has Monoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has Group and A has Group
from AbelianMonoid
second: % -> B
second(x) selects second component of the product
size: () -> NonNegativeInteger if B has Finite and A has Finite
from Finite
smaller?: (%, %) -> Boolean if A has OrderedSet and B has OrderedSet or B has Finite and A has Finite or B has Comparable and A has Comparable or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from Comparable
subtractIfCan: (%, %) -> Union(%, failed) if B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has AbelianGroup and A has AbelianGroup or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from CancellationAbelianMonoid
sup: (%, %) -> % if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from OrderedAbelianMonoidSup
zero?: % -> Boolean if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup
from AbelianMonoid

AbelianGroup if A has AbelianGroup and B has AbelianGroup

AbelianMonoid if B has AbelianGroup and A has AbelianGroup or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid

AbelianSemiGroup if B has AbelianGroup and A has AbelianGroup or A has AbelianMonoid and B has AbelianMonoid or B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

BasicType

CancellationAbelianMonoid if B has CancellationAbelianMonoid and A has CancellationAbelianMonoid or B has AbelianGroup and A has AbelianGroup or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

Comparable if A has OrderedSet and B has OrderedSet or B has Finite and A has Finite or B has Comparable and A has Comparable or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

ConvertibleTo InputForm if B has Finite and A has Finite

Finite if B has Finite and A has Finite

Group if B has Group and A has Group

Magma if B has Group and A has Group or A has Monoid and B has Monoid

MagmaWithUnit if B has Group and A has Group or A has Monoid and B has Monoid

Monoid if B has Group and A has Group or A has Monoid and B has Monoid

OrderedAbelianMonoid if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

OrderedSet if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup or A has OrderedSet and B has OrderedSet

PartialOrder if A has OrderedSet and B has OrderedSet or B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

SemiGroup if B has Group and A has Group or A has Monoid and B has Monoid

SetCategory

unitsKnown if B has Group and A has Group