[Previous] [Next] [Contents]

## `Dom::Tropical` -- tropical semiring

#### Introduction

`Dom::Tropical` creates a domain for the tropical semiring.

#### Details

- The domain element `Dom::Tropical``(n)` represents the tropical constant n if n is a positive integer, or ∞ if n is infinity.

#### Creating Elements

``Dom::Tropical`(n)`

#### Parameters

`n` | - | integer or infinity.

#### Categories

`Cat::SemiRing`

#### Related Domains

`Dom::Boolean`

#### Entries

zero

the tropical constant infinity.

one

the tropical constant 0.

#### Method _plus: sum of tropicals

- `_plus(dom a1...)`

- The sum `a1+a2+...+ak` of tropicals is defined to be the smallest of positive integers or infinity `a1,a2,...,ak`.
- This method overloads the function `_plus`.

#### Method _mult: product of tropicals

- `_mult(dom a1...)`

- The sum `a1*a2*...*ak` of tropicals is defined to be `a1+a2+...+ak`.
- This method overloads the function `_mult`.

#### Method _power: power of a tropical

- `_power(dom a,Dom::Integer n)`

- The nth power `a^n` of the tropical `a`.
- This method overloads the function `_power`.

#### Method expr: convert a tropical into an integer or infinity.

- `expr(dom a)`

- This method returns a integer or infinity such that generating a tropical from that integer or infinity would result in `a`.

#### Example 1

This example shows the idempotency of the tropical semiring:

    >> T:=Dom::Tropical:

    >> T(infinity) + T(infinity);
       T(3) + T(3)

                                     infinity

                                         3

    >> T(6) + T(infinity);
       T(6) + T(3);
       T(6)*T(infinity);
       T(6)*T(3)

                                         6

                                         3

                                     infinity

                                         9

#### Super-Domain

`Dom::BaseDomain`

#### Axioms

`Ax::canonicalRep, Ax::normalRep`

#### Changes

- `Dom::Tropical` is a new function

[Previous] [Next] [Contents]

MuPAD Combinat, an open source algebraic combinatorics package