# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

# `Type`::`Even`

Type and property representing even integers

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

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

## Description

`Type::Even` represents even integers. This type can also be used as a property to mark identifiers as even integers.

The call `testtype(obj, Type::Even)` checks, whether `obj` is an even number and returns `TRUE`, if it holds, otherwise `FALSE`.

`testtype` only performs a syntactical test identifying MuPAD® objects of type `DOM_INT` and checks, if `bool(domtype(x/2) = DOM_INT)` holds.

The call `assume(x, Type::Even)` marks the identifier `x` as an even number.

The call `is(ex, Type::Even)` derives, whether the expression `ex` is an even number (or this property can be derived).

This type represents a property that can be used in `assume` and `is`.

## Examples

### Example 1

The following numbers are of type `Type::Even`:

```testtype(2, Type::Even), testtype(-4, Type::Even), testtype(8, Type::Even), testtype(-11114, Type::Even), testtype(4185296581467695598, Type::Even)```

### Example 2

We use this type as a property:

`assume(x, Type::Even):`

The following calls to `is` derive the properties of a composite expression from the properties of its indeterminates:

`is(3*x^2, Type::Even), is(x + 1, Type::Even)`

```is(x, Type::Integer), is(2*x, Type::Integer), is(x/2, Type::Integer), is(x/3, Type::Integer)```

`assume(y, Type::Odd): is(x + y, Type::Even)`

`is(2*(x + y), Type::Even)`

`delete x, y:`

## Parameters

 `obj` Any MuPAD object `x` An identifier or a mathematical expression containing identifiers `ex`