Previous Page Contents

property::simpex -- simplify Boolean expressions

Introduction

property::simpex(ex) simplifies the Boolean expression ex.

Call(s)

property::simpex(ex)

Parameters

ex - Relation of type "_less", "_leequal", "_unequal", "_equal", or "_in"; or Boolean expression whose atoms are Boolean constants or relations

Returns

an expression that is equivalent to the given expression

Related Functions

is, assume, piecewise

Details

Example 1

A relation that is true:

>> property::simpex(1 > 0)
                                   TRUE

An expression that is false:

>> property::simpex(x > 1 and x < -1)
                                   FALSE

Find out the strongest border:

>> property::simpex(x > 3 and x > PI and x > ln(23))
                                  PI < x

Example 2

Simplification of relations with the same variable:

>> property::simpex(x >= 2 and x <= 2)
                                   x = 2

expand expands nested expressions (property::simpex does not call expand):

>> property::simpex(expand(0 < x and x < 2 and
                           (-1 < x and x <= 0 or 3 < x and x <= 4)))
                                   FALSE

Expressions that contains identifiers with properties can often be simplified:

>> assume(x > 0):
   property::simpex(x <> 0), property::simpex(x > 1)
                                TRUE, 1 < x

Also relations between identifiers are considered:

>> assume(x < y, _and):
   property::simpex(x < y and (x > y or x > 0) and y <> 0)
                                   TRUE

Example 3

Expressions of type _in can be simplified:

>> delete x:
   property::simpex(x in R_ and x >= 0)
                            x in [0, infinity[
>> property::simpex(not x in R_ and not x in Z_)
                                not x in R_

Background

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000