[Next] [Prev] [_____] [Left] [Up] [Index] [Root]
Infinities
Infinities
Occasionally it is convenient to work with infinite quantities (for example,
when working with valuations or cardinalities). {Magma} provides two such
objects, the positive and negative "integer" infinities. This section
describes the {Magma} facilities for dealing with such objects.
Subsections
Creation
Certain system intrinsics such as Valuation which normally return an
integer may return an infinite object for appropriate exceptional cases.
Two special intrinsics are also provided to create infinite objects.
Infinity() : -> Infty
The positive infinity object.
MinusInfinity() : -> Infty
The negative infinity object.
Arithmetic
Only basic arithmetic operations are provided for infinite objects. Here
the infinite objects are viewed as belonging to the integers in that either
of the arguments to the operation may be an integer. Certain forms (such as
infinity - infinity or
infinity * 0)
are not well defined and will trigger a runtime error.
- x : Infty -> Infty
x + y : Infty, Infty -> Infty
x + y : Infty, RngIntElt -> Infty
x + y : RngIntElt, Infty -> Infty
x - y : Infty, Infty -> Infty
x - y : Infty, RngIntElt -> Infty
x - y : RngIntElt, Infty -> Infty
x * y : Infty, Infty -> Infty
x * y : Infty, RngIntElt -> Infty
x * y : RngIntElt, Infty -> Infty
x / y : RngIntElt, Infty -> RngIntElt
x / y : Infty, RngIntElt -> Infty
x ^ n : Infty, Infty -> Infty
x ^ n : Infty, RngIntElt -> Infty
Comparison
Infinite objects may be compared with themselves and integers.
x eq y : Infty, Infty -> BoolElt
x eq y : Infty, RngIntElt -> BoolElt
x eq y : RngIntElt, Infty -> BoolElt
x ne y : Infty, Infty -> BoolElt
x ne y : Infty, RngIntElt -> BoolElt
x ne y : RngIntElt, Infty -> BoolElt
x lt y : Infty, Infty -> BoolElt
x lt y : Infty, RngIntElt -> BoolElt
x lt y : RngIntElt, Infty -> BoolElt
x le y : Infty, Infty -> BoolElt
x le y : Infty, RngIntElt -> BoolElt
x le y : RngIntElt, Infty -> BoolElt
x gt y : Infty, Infty -> BoolElt
x gt y : Infty, RngIntElt -> BoolElt
x gt y : RngIntElt, Infty -> BoolElt
x ge y : Infty, Infty -> BoolElt
x ge y : Infty, RngIntElt -> BoolElt
x ge y : RngIntElt, Infty -> BoolElt
Maximum(x, y) : Infty, Infty -> .
Maximum(x, y) : Infty, RngIntElt -> .
Maximum(x, y) : RngIntElt, Infty -> .
Minimum(x, y) : Infty, Infty -> .
Minimum(x, y) : Infty, RngIntElt -> .
Minimum(x, y) : RngIntElt, Infty -> .
Miscellaneous
Sign(x) : Infty -> RngIntElt
Returns 1 if x is the positive infinite object, -1 if x is the negative
infinite object.
IsFinite(x) : Infty -> BoolElt
IsFinite(x) : RngIntElt -> BoolElt
True if x is finite, otherwise false. This is more convenient than checking
the type of x.
[Next] [Prev] [_____] [Left] [Up] [Index] [Root]