## `Type::Zero` -- a type and a property representing zero

#### Introduction

`testtype(obj,` Type::Zero) is equivalent to `iszero(obj)`. `Type::Zero` is a property, too, which can be used in an `assume` call.

#### Call(s)

`testtype(obj,` Type::Zero)
`assume(x,` Type::Zero)
`is(ex,` Type::Zero)

#### Parameters

`obj` | - | any MuPAD object
`x` | - | an identifier or one of the expressions `Re(u)` or `Im(u)` with an identifier `u`
`ex` | - | an arithmetical expression

#### Returns

see `testtype`, `assume` and `is`

#### Related Functions

`testtype`, `is`, `assume`, `Type::NonZero`

#### Details

- The call `testtype(obj,` Type::Zero) is equivalent to `iszero(obj)`, which performs a syntactical test if `obj` is zero. If it is, the call returns `TRUE`, otherwise, `FALSE` is returned.
- The call `assume(x,` Type::Zero) marks the identifier `x` as zero.

  The call `is(ex,` Type::Zero) derives, whether the expression `ex` is zero (or this property can be derived).

- This type represents a property that can be used in `assume` and `is`.
- The call `assume(x = 0)` has the same meaning as `assume(x,` Type::Zero).

#### Example 1

`testtype` determines the syntactical equality to zero:

    >> testtype(0.0, Type::Zero)

                                       TRUE

    >> testtype(x, Type::Zero)

                                       FALSE

#### Example 2

`Type::Zero` can be used within `assume` and `is`:

    >> is(x, Type::Zero)

                                      UNKNOWN

Assumption that `x` is zero:

    >> assume(x, Type::Zero):
       is(x^2, Type::Zero)

                                       TRUE

The next example shows the difference between `testtype` and `is`:

    >> is(x, Type::Zero), testtype(x, Type::Zero)

                                    TRUE, FALSE

Now the property of `x` is removed:

    >> delete x:
       is(x, Type::Zero), testtype(x, Type::Zero)

                                  UNKNOWN, FALSE

A positive number cannot be zero:

    >> assume(x > 0):
       is(x, Type::Zero), testtype(x, Type::Zero)

                                   FALSE, FALSE

But in the next example `x` could be zero:

    >> assume(x >= 0):
       is(x, Type::Zero), testtype(x, Type::Zero)

                                  UNKNOWN, FALSE

    >> delete x:

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000