## `Type::Equation` -- a type representing equations

#### Introduction

`Type::Equation` represents equations. The types of the left hand side and the right hand side can be specified.

#### Call(s)

`testtype(obj,` Type::Equation( <lhs_type <, rhs_type>>`)`)

#### Parameters

`obj` | - | any MuPAD object
`lhs_type` | - | the type of the left hand side; a type can be an object of the library `Type` or one of the possible return values of `domtype` and `type`
`rhs_type` | - | the type of the right hand side

#### Returns

see `testtype`

#### Related Functions

`testtype`

#### Details

- The call `testtype(obj,` Type::Equation(lhs_type,rhs_type`)`) checks whether `type(obj)` yields `"`_equal" and `testtype(`lhs(obj), lhs_type) and `testtype(`rhs(obj), rhs_type) both yield `TRUE` and returns `TRUE`, if all holds, otherwise `FALSE`.
- The two optional parameters `lhs_type` and `rhs_type` determine the types of the left hand side and the right hand side, respectively.
- The default values of `lhs_type` and `rhs_type` are `Type::AnyType`.

- The equations `lhs=rhs` and `rhs=lhs` are considered different! E.g., the equation `x=3` matches the type `Type::Equation(DOM_IDENT,DOM_INT)`, but it does not match the type `Type::Equation(DOM_INT,DOM_IDENT)`.

- This type does not represent a property, it cannot be used in an `assume` call.

#### Example 1

The following object is an equation:

    >> testtype(x = 3, Type::Equation())

                                       TRUE

The following calls test, whether the object is an equation with an unknown on the left hand side and a positive integer on the right hand side:

    >> testtype(x = 3, Type::Equation(Type::Unknown, Type::PosInt)),
       testtype(x = 0, Type::Equation(Type::Unknown, Type::PosInt))

                                    TRUE, FALSE

#### Changes

- new function

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