Sponsored links: Algebra eBooks
 

Help Index

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

U

V

W

X

Y

Z

The Maxima on-line user's manual

Algebra Calculator

Search:

Assume_pos_pred Calculator

Assume_pos_pred

-- Option variable: assume_pos_pred Default value: false

When assume_pos_pred is assigned the name of a function or a lambda expression of one argument <x>, that function is called to determine whether <x> is considered a parameter for the purpose of assume_pos. assume_pos_pred is ignored when assume_pos is false.

The assume_pos_pred function is called by sign and asksign with an argument <x> which is either an atom, a subscripted variable, or a function call expression. If the assume_pos_pred function returns true, <x> is considered a parameter for the purpose of assume_pos.

By default, a parameter is <x> such that symbolp (<x>) or subvarp (<x>).

See also assume and assume_pos.

Examples:

          (%i1) assume_pos: true$
          (%i2) assume_pos_pred: symbolp$
          (%i3) sign (a);
          (%o3)                          pos
          (%i4) sign (a[1]);
          (%o4)                          pnz
          (%i5) assume_pos_pred: lambda ([x], display (x), true)$
          (%i6) asksign (a);
                                        x = a

          (%o6)                          pos
          (%i7) asksign (a[1]);
                                       x = a
                                            1

          (%o7)                          pos
          (%i8) asksign (foo (a));
                                     x = foo(a)

          (%o8)                          pos
          (%i9) asksign (foo (a) + bar (b));
                                     x = foo(a)

x = bar(b)

          (%o9)                          pos
          (%i10) asksign (log (a));
                                        x = a

Is a - 1 positive, negative, or zero?

          p;
          (%o10)                         pos
          (%i11) asksign (a - b);
                                        x = a

x = b

x = a

x = b

Is b - a positive, negative, or zero?

          p;
          (%o11)                         neg

(%o1)                                true
(%i2) 

Assume_pos_pred Example

Related Examples

pred

A( r ) := 2 * %pi * r...

r : 2;

A(r);

Calculate

pred

A( r ) := 2 * %pi * r...

r : 2;

res : A(r);

Calculate

pred

x=x,pred;

Calculate

pred

1<2;

1<2,pred;

Calculate