assumeAlso

Adds an assumption to the ones already set on a symbolic variable.

Category: Mathematics > Assumptions

Syntax

assumeAlso(cond)

Adds the condition to the existing assumptions.

assumeAlso(x, set)

Adds the membership of x in a set.

Description

assume discards earlier assumptions on the variables it mentions; assumeAlso keeps them and puts the new one next to them. This lets assumptions be built up step by step, for example first that x is real and then that it is smaller than 5, and the set of assumptions can be read with assumptions.

Input arguments

cond
Relation such as x < 5.
set
Name of a set, as text.

Example

Two variables

syms x y
assume(x, 'real')
assumeAlso(y, 'real')
assumptions
Output
ans = 
[in(x, 'real'), in(y, 'real')]

Notes

In MatLivre, relations such as x < 5 are not recorded; the set form with 'real' is.

See also

assume assumptions syms simplify