Next Page Contents

property::hasprop -- does an object have properties?

Introduction

property::hasprop(object) tests, whether an object has properties.

Call(s)

property::hasprop(object)
property::hasprop()

Parameters

object - any MuPAD object

Returns

TRUE or FALSE

Related Functions

assume, getprop, is, indets, unassume

Details

Example 1

Does the expression 2*(x+1) have any properties?

>> property::hasprop(2*(x + 1))
                                   FALSE
>> assume(x > 0):
   property::hasprop(2*(x + 1))
                                   TRUE
>> getprop(2*(x + 1))
                                    > 2
>> delete x:

Example 2

Is the global property defined?

>> property::hasprop()
                                   FALSE

If the global property is defined, property::hasprop returns always TRUE:

>> assume(Type::Real):
   property::hasprop(2*(x + 1)), property::hasprop()
                                TRUE, TRUE
>> property::hasprop(sin(2*x^sqrt(2)) + cos(2*x)^sqrt(2))
                                   TRUE
>> unassume():

Example 3

property::hasprop returns FALSE, but is can determine an answer unequal to UNKNOWN:

>> property::hasprop(a + 1 > a)
                                   FALSE
>> is(a + 1 > a)
                                   TRUE

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000