## `Dom::ImageSet` -- the domain of images of sets under mappings

#### Introduction

`Dom::ImageSet` is the domain of all sets of complex numbers that can be written as the set of all values taken on by some mapping, i.e., sets of the form {f(x1, ..., xn); xi ∈Si } for some function f and some sets S1, ..., Sn .

#### Domain

`Dom::ImageSet()`

#### Details

- Image sets are mainly used by `solve` to express sets like {k*PI ; k in Z } .
- `Dom::ImageSet` belongs to the category `Cat::Set`--arithmetical and set-theoretic operations are inherited from there.

#### Introduction

`Dom::ImageSet``(f, x, S)` represents the set of all values that can be obtained by substituting some element of `S` for `x` in the expression `f`.

`Dom::ImageSet``(f, [x1...], [S1...])` represents the set of all values that can be obtained by substituting, for each i, the identifier xi by some element of Si in the expression `f`.

#### Creating Elements

``Dom::ImageSet`(f, x, S)`
``Dom::ImageSet`(f, [x1...], [S1...])`

#### Parameters

`f` | - | arithmetical expression
`x` | - | identifier or indexed identifier
`S` | - | set of any type

#### Categories

`Cat::Set`

#### Details

- See `solve` for an overview of the different kinds of sets in MuPAD.
- If a list of several identifiers is given, the identifiers must be distinct.

#### Method changevar: change the name of a variable

- `changevar(dom A, identifier oldvar, identifier newvar)`
- - replaces `oldvar` by `newvar` both in the expression and in the list of variables. This gives (mathematically) the same set, since {f(x) ; x ∈S }= {f(y) ; y ∈S }.
  - The new variable `newvar` must not equal any element of the list of variables; this is not checked!

#### Method setvar: set the name of the variable

- `setvar(dom A, identifier newvar)`
- - The only variable of `A` is replaced by `newvar` both in the expression and in the (one-element) list of variables. This method may only be applied for image sets in one variable.

- `setvar(any A, identifier newvar)`
- - For an argument `A` that is not an image set, the method `"setvar"` is applied to all image sets contained in the expression `A`. `A` might be, for example, a union, intersection, etc. of image sets and other sets.

#### Method homogpointwise: define an n-ary pointwise operator for image sets

- `homogpointwise(any Op)`
- - This method returns a procedure which implements a continuation of the function `Op`. `Op` must be a function that maps each finite sequence of (arbitrarily many) complex numbers to a single complex number (e.g. their sum or product). `Op` is set forth to the class of image sets by defining `Op(A1,...,An)` to be the set of all `Op(a1,..,an)`, where ai ∈Ai for each i.
  - `Op` must accept arithmetical expressions as arguments.

#### Method isEmpty: tests whether a set is empty

- `isEmpty(dom A)`
- - `A` is empty if and only if one of its parameters ranges over the empty set. This method tries to decide whether this is the case and returns `TRUE`, `FALSE`, or `UNKNOWN`.

#### Method substituteBySet: substitute an ImageSet for a variable

- `substituteBySet(arithmetical expression a, identifier x, dom A)`
- - This method returns the set of all numbers that can be obtained by substituting some element of `A` for `x` in the expression `a`. That is, viewing a=a(x) as a function C C, this method returns {a(x); x ∈A }, the image of the restriction of that function to `A`.

#### Method indets: free parameters of a set

- `indets(dom A)`
- - This method returns the set of free parameters the set `A` depends on.
  - If A={f(x1, ..., xn, y1, ...yk); xi ∈Si }, the xi are called bound and the yi are called free parameters.
  - Use the slot `"variables"` to obtain the bound parameters.
  - This method overloads the function `indets`.

#### Method expr: the defining mapping as an expression

- `expr(dom A)`
- - If A= {f(x) ; x ∈S }, this method returns the expression `f`; similarly if several variables range over several sets.
  - This method overloads the function `expr`.

#### Method variables: list of variables

- `variables(dom A)`
- - If A= {f(x1,..,xn) ; xi ∈Si }, this method returns the list of variables `[x1,...,xn]`.
  - The free parameters (identifiers appearing in f other than the xi) can be obtained using `indets`.

#### Method nvars: number of variables

- `nvars(dom A)`
- - If A= {f(x1,..,xn) ; xi ∈Si }, this method returns the number n of variables.

#### Method sets: list of sets

- `sets(dom A)`
- - If A= {f(x1,..,xn) ; xi ∈Si }, this method returns the list of sets `[S1,...,Sn]`.

#### Method print: print image set

- `print(dom A)`
- - This method returns a string used for displaying `A` on the screen.

#### Example 1

We define S to be the set of all integer multiples of π.

    >> S:=Dom::ImageSet(k*PI, k, Z_)

                               { X1*PI |  X1 in Z_ }

We may now apply the usual set-theoretic operations.

    >> S intersect Dom::Interval(3..7)

                                    {PI, 2 PI}

#### Super-Domain

`Dom::BaseDomain`

#### Changes

- new function

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