Product(A, B)ΒΆ

product.spad line 1 [edit on github]

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 A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianMonoid

1: % if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

*: (%, %) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from Magma

*: (Integer, %) -> % if B has AbelianGroup and A has AbelianGroup

from AbelianGroup

*: (NonNegativeInteger, %) -> % if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianMonoid

*: (PositiveInteger, %) -> % if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianSemiGroup

+: (%, %) -> % if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianSemiGroup

-: % -> % if B has AbelianGroup and A has AbelianGroup

from AbelianGroup

-: (%, %) -> % if B has AbelianGroup and A has AbelianGroup

from AbelianGroup

/: (%, %) -> % if A has Group and B has Group

from Group

<=: (%, %) -> Boolean if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from PartialOrder

<: (%, %) -> Boolean if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from PartialOrder

=: (%, %) -> Boolean

from BasicType

>=: (%, %) -> Boolean if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from PartialOrder

>: (%, %) -> Boolean if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from PartialOrder

^: (%, Integer) -> % if A has Group and B has Group

from Group

^: (%, NonNegativeInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

^: (%, PositiveInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from Magma

~=: (%, %) -> Boolean

from BasicType

coerce: % -> OutputForm

from CoercibleTo OutputForm

commutator: (%, %) -> % if A has Group and B has Group

from Group

conjugate: (%, %) -> % if A has Group and B has Group

from Group

construct: (A, B) -> %

construct(a, b) creates element of the product with components a and b.

convert: % -> InputForm if A has Finite and B has Finite

from ConvertibleTo InputForm

enumerate: () -> List % if A has Finite and B has Finite

from Finite

first: % -> A

first(x) selects first component of the product

hash: % -> SingleInteger if A has Hashable and B has Hashable or A has Finite and B has Finite

from Hashable

hashUpdate!: (HashState, %) -> HashState if A has Hashable and B has Hashable or A has Finite and B has Finite

from Hashable

index: PositiveInteger -> % if A has Finite and B has Finite

from Finite

inf: (%, %) -> % if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

from OrderedAbelianMonoidSup

inv: % -> % if A has Group and B has Group

from Group

latex: % -> String

from SetCategory

leftPower: (%, NonNegativeInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

leftPower: (%, PositiveInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from Magma

leftRecip: % -> Union(%, failed) if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

lookup: % -> PositiveInteger if A has Finite and B has Finite

from Finite

max: (%, %) -> % if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from OrderedSet

min: (%, %) -> % if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet

from OrderedSet

one?: % -> Boolean if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

opposite?: (%, %) -> Boolean if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianMonoid

random: () -> % if A has Finite and B has Finite

from Finite

recip: % -> Union(%, failed) if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

rightPower: (%, NonNegativeInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

rightPower: (%, PositiveInteger) -> % if A has Group and B has Group or A has Monoid and B has Monoid

from Magma

rightRecip: % -> Union(%, failed) if A has Group and B has Group or A has Monoid and B has Monoid

from MagmaWithUnit

sample: % if A has Group and B has Group or B has AbelianGroup and A has AbelianGroup or A has Monoid and B has Monoid or A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianMonoid and A has AbelianMonoid

from MagmaWithUnit

second: % -> B

second(x) selects second component of the product

size: () -> NonNegativeInteger if A has Finite and B has Finite

from Finite

smaller?: (%, %) -> Boolean if A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has OrderedSet and A has OrderedSet or A has Finite and B has Finite or B has Comparable and A has Comparable

from Comparable

subtractIfCan: (%, %) -> Union(%, failed) if B has AbelianGroup and A has AbelianGroup or A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup

from CancellationAbelianMonoid

sup: (%, %) -> % if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

from OrderedAbelianMonoidSup

zero?: % -> Boolean if A has CancellationAbelianMonoid and B has CancellationAbelianMonoid or A has OrderedAbelianMonoidSup and B has OrderedAbelianMonoidSup or B has AbelianGroup and A has AbelianGroup or B has AbelianMonoid and A has AbelianMonoid

from AbelianMonoid

AbelianGroup if B has AbelianGroup and A has AbelianGroup

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

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

BasicType

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

CoercibleTo OutputForm

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

ConvertibleTo InputForm if A has Finite and B has Finite

Finite if A has Finite and B has Finite

Group if A has Group and B has Group

Hashable if A has Finite and B has Finite or A has Hashable and B has Hashable

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

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

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

OrderedAbelianMonoid if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

OrderedAbelianMonoidSup if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

OrderedAbelianSemiGroup if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

OrderedCancellationAbelianMonoid if B has OrderedAbelianMonoidSup and A has OrderedAbelianMonoidSup

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

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

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

SetCategory

TwoSidedRecip if A has Group and B has Group

unitsKnown if A has Group and B has Group