AInterval R

ainterval.spad line 219 [edit on github]

AInterval(R) implements arithmetic with intervals.

0: % if R has SetWithZero

from SetWithZero

1: % if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

*: (%, %) -> % if R has OrderedMagma or R has OrderedMagmaWithZero

from AIntervalCategory R

*: (Integer, %) -> % if R has AbelianGroup or % has AbelianGroup and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and % has AbelianGroup or R has OrderedMagma and R has SemiRing and % has AbelianGroup or % has AbelianGroup and R has OrderedMagma and R has SemiRng

from AIntervalCategory R

*: (NonNegativeInteger, %) -> % if % has AbelianMonoid and R has OrderedMagma and R has SemiRng or R has AbelianMonoid or % has AbelianMonoid and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng

from AbelianMonoid

*: (PositiveInteger, %) -> %

from AIntervalCategory R

*: (R, %) -> % if R has OrderedMagma or R has OrderedMagmaWithZero

from AIntervalCategory R

+: (%, %) -> %

from AIntervalCategory R

+: (%, R) -> %

from AIntervalCategory R

-: % -> % if R has AbelianGroup or % has AbelianGroup and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and % has AbelianGroup or R has OrderedMagma and R has SemiRing and % has AbelianGroup or % has AbelianGroup and R has OrderedMagma and R has SemiRng

from AIntervalCategory R

-: (%, %) -> % if R has AbelianGroup or % has AbelianGroup and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and % has AbelianGroup or R has OrderedMagma and R has SemiRing and % has AbelianGroup or % has AbelianGroup and R has OrderedMagma and R has SemiRng

from AIntervalCategory R

/: (%, %) -> % if R has Field and R has OrderedRing

from AIntervalCategory R

=: (%, %) -> Boolean

from AIntervalCategory R

^: (%, NonNegativeInteger) -> % if R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from AIntervalCategory R

^: (%, PositiveInteger) -> % if R has OrderedMagma or R has OrderedMagmaWithZero

from AIntervalCategory R

~=: (%, %) -> Boolean

from BasicType

abs: % -> % if R has AbelianGroup

from AIntervalCategory R

antiCommutator: (%, %) -> % if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

from NonAssociativeSemiRng

coerce: % -> List R

from AIntervalCategory R

coerce: % -> OutputForm

from CoercibleTo OutputForm

contains?: (%, %) -> Boolean

from AIntervalCategory R

contains?: (%, R) -> Boolean

from AIntervalCategory R

error?: % -> Boolean

from AIntervalCategory R

inf: % -> R

from AIntervalCategory R

interval: (R, R) -> %

from AIntervalCategory R

inv: % -> % if R has Field and R has OrderedRing

from AIntervalCategory R

latex: % -> String

from SetCategory

leftPower: (%, NonNegativeInteger) -> % if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

leftPower: (%, PositiveInteger) -> % if R has OrderedMagma or R has OrderedMagmaWithZero

from Magma

leftRecip: % -> Union(%, failed) if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

negative?: % -> Boolean if R has SetWithZero

from AIntervalCategory R

one?: % -> Boolean if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

opposite?: (%, %) -> Boolean if % has AbelianMonoid and R has OrderedMagma and R has SemiRng or R has AbelianMonoid or % has AbelianMonoid and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng

from AbelianMonoid

positive?: % -> Boolean if R has SetWithZero

from AIntervalCategory R

qinterval: (R, R) -> %

from AIntervalCategory R

recip: % -> Union(%, failed) if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

rightPower: (%, NonNegativeInteger) -> % if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

rightPower: (%, PositiveInteger) -> % if R has OrderedMagma or R has OrderedMagmaWithZero

from Magma

rightRecip: % -> Union(%, failed) if R has MagmaWithUnit and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

from MagmaWithUnit

sample: % if R has Monoid and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagma or R has SetWithZero

from MagmaWithUnit

subtractIfCan: (%, %) -> Union(%, failed) if % has AbelianGroup and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing and % has AbelianGroup or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and % has AbelianGroup or % has AbelianGroup and R has OrderedMagma and R has SemiRng

from CancellationAbelianMonoid

sup: % -> R

from AIntervalCategory R

unit?: % -> Boolean if R has Field and R has OrderedRing

from AIntervalCategory R

width: % -> R if R has AbelianGroup

from AIntervalCategory R

zero?: % -> Boolean if R has SetWithZero

from SetWithZero

AbelianMonoid if R has AbelianMonoid

AbelianSemiGroup

AIntervalCategory R

BasicType

BiModule(%, %) if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

CancellationAbelianMonoid if % has AbelianGroup and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing and % has AbelianGroup or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma and % has AbelianGroup or % has AbelianGroup and R has OrderedMagma and R has SemiRng

CoercibleTo OutputForm

LeftModule % if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

Magma if R has OrderedMagma or R has OrderedMagmaWithZero

MagmaWithUnit if R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma or R has MagmaWithUnit and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has MagmaWithUnit and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing

MagmaWithZero if R has MagmaWithZero and R has OrderedMagma or R has OrderedMagmaWithZero and R has MagmaWithZero and R hasn’t OrderedMagma

Monoid if R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has Monoid and R has OrderedMagma

NonAssociativeSemiRing if R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma

NonAssociativeSemiRng if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

RightModule % if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

SemiGroup if R has OrderedMagma and R has SemiRing or R has OrderedMagma and R has SemiGroup or R has OrderedMagma and R has SemiRng or R has OrderedMagmaWithZero and R has Monoid and R hasn’t OrderedMagma or R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiGroup or R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has Monoid and R has OrderedMagma or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma

SemiRing if R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma

SemiRng if R has OrderedMagmaWithZero and R hasn’t OrderedMagma and R has SemiRng or R has OrderedMagma and R has SemiRing or R has SemiRing and R has OrderedMagmaWithZero and R hasn’t OrderedMagma or R has OrderedMagma and R has SemiRng

SetCategory

SetWithZero if R has SetWithZero