EuclideanDomain

catdef.spad line 413 [edit on github]

A constructive euclidean domain, i.e. one can divide producing a quotient and a remainder where the remainder is either zero or is smaller (euclideanSize) than the divisor. Conditional attributes: multiplicativeValuation Size(a*b)=Size(a)*Size(b) additiveValuation Size(a*b)=Size(a)+Size(b)

0: %

from AbelianMonoid

1: %

from MagmaWithUnit

*: (%, %) -> %

from Magma

*: (Integer, %) -> %

from AbelianGroup

*: (NonNegativeInteger, %) -> %

from AbelianMonoid

*: (PositiveInteger, %) -> %

from AbelianSemiGroup

+: (%, %) -> %

from AbelianSemiGroup

-: % -> %

from AbelianGroup

-: (%, %) -> %

from AbelianGroup

=: (%, %) -> Boolean

from BasicType

^: (%, NonNegativeInteger) -> %

from MagmaWithUnit

^: (%, PositiveInteger) -> %

from Magma

~=: (%, %) -> Boolean

from BasicType

annihilate?: (%, %) -> Boolean

from Rng

antiCommutator: (%, %) -> %

from NonAssociativeSemiRng

associates?: (%, %) -> Boolean

from EntireRing

associator: (%, %, %) -> %

from NonAssociativeRng

characteristic: () -> NonNegativeInteger

from NonAssociativeRing

coerce: % -> %

from Algebra %

coerce: % -> OutputForm

from CoercibleTo OutputForm

coerce: Integer -> %

from NonAssociativeRing

commutator: (%, %) -> %

from NonAssociativeRng

divide: (%, %) -> Record(quotient: %, remainder: %)

divide(x, y) divides x by y producing a record containing a quotient and remainder, where the remainder is smaller (see sizeLess?) than the divisor y.

euclideanSize: % -> NonNegativeInteger

euclideanSize(x) returns the euclidean size of the element x. Error: if x is zero.

expressIdealMember: (List %, %) -> Union(List %, failed)

from PrincipalIdealDomain

exquo: (%, %) -> Union(%, failed)

from EntireRing

extendedEuclidean: (%, %) -> Record(coef1: %, coef2: %, generator: %)

extendedEuclidean(x, y) returns a record rec where rec.coef1*x+rec.coef2*y = rec.generator and rec.generator is a gcd of x and y. The gcd is unique only up to associates if canonicalUnitNormal is not asserted. principalIdeal provides a version of this operation which accepts an arbitrary length list of arguments.

extendedEuclidean: (%, %, %) -> Union(Record(coef1: %, coef2: %), failed)

extendedEuclidean(x, y, z) either returns a record rec where rec.coef1*x+rec.coef2*y=z or returns “failed” if z cannot be expressed as a linear combination of x and y.

gcd: (%, %) -> %

from GcdDomain

gcd: List % -> %

from GcdDomain

gcdPolynomial: (SparseUnivariatePolynomial %, SparseUnivariatePolynomial %) -> SparseUnivariatePolynomial %

from GcdDomain

latex: % -> String

from SetCategory

lcm: (%, %) -> %

from GcdDomain

lcm: List % -> %

from GcdDomain

lcmCoef: (%, %) -> Record(llcm_res: %, coeff1: %, coeff2: %)

from LeftOreRing

leftPower: (%, NonNegativeInteger) -> %

from MagmaWithUnit

leftPower: (%, PositiveInteger) -> %

from Magma

leftRecip: % -> Union(%, failed)

from MagmaWithUnit

multiEuclidean: (List %, %) -> Union(List %, failed)

multiEuclidean([f1, ..., fn], z) returns a list of coefficients [a1, ..., an] such that `` z / prod fi = sum aj/fj``. If no such list of coefficients exists, “failed” is returned.

one?: % -> Boolean

from MagmaWithUnit

opposite?: (%, %) -> Boolean

from AbelianMonoid

plenaryPower: (%, PositiveInteger) -> %

from NonAssociativeAlgebra %

principalIdeal: List % -> Record(coef: List %, generator: %)

from PrincipalIdealDomain

quo: (%, %) -> %

x quo y is the same as divide(x, y).quotient. See divide.

recip: % -> Union(%, failed)

from MagmaWithUnit

rem: (%, %) -> %

x rem y is the same as divide(x, y).remainder. See divide.

rightPower: (%, NonNegativeInteger) -> %

from MagmaWithUnit

rightPower: (%, PositiveInteger) -> %

from Magma

rightRecip: % -> Union(%, failed)

from MagmaWithUnit

sample: %

from AbelianMonoid

sizeLess?: (%, %) -> Boolean

sizeLess?(x, y) tests whether x is strictly smaller than y with respect to the euclideanSize. Note: zero is considered smaller than every nonzero element.

subtractIfCan: (%, %) -> Union(%, failed)

from CancellationAbelianMonoid

unit?: % -> Boolean

from EntireRing

unitCanonical: % -> %

from EntireRing

unitNormal: % -> Record(unit: %, canonical: %, associate: %)

from EntireRing

zero?: % -> Boolean

from AbelianMonoid

AbelianGroup

AbelianMonoid

AbelianSemiGroup

Algebra %

BasicType

BiModule(%, %)

CancellationAbelianMonoid

CoercibleTo OutputForm

CommutativeRing

CommutativeStar

EntireRing

GcdDomain

IntegralDomain

LeftModule %

LeftOreRing

Magma

MagmaWithUnit

Module %

Monoid

NonAssociativeAlgebra %

NonAssociativeRing

NonAssociativeRng

NonAssociativeSemiRing

NonAssociativeSemiRng

noZeroDivisors

PrincipalIdealDomain

RightModule %

Ring

Rng

SemiGroup

SemiRing

SemiRng

SetCategory

TwoSidedRecip

unitsKnown