Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Testing inequalities in sage

I wanted to show if: $$ |a+b| \leq |a| + |b|$$

So I wrote this in sage:

var('a','b')
eqn1=abs(a+b)
eqn2=abs(a)+abs(b)
bool(eqn1<=eqn2)

The result is False.

I had expected the result to be True. What is the correct way to test this in sage?

Thank you in advance for any help provided.

Testing inequalities in sage

I wanted to show if: $$ |a+b| \leq |a| + |b|$$

So I wrote this in sage:

var('a','b')
eqn1=abs(a+b)
eqn2=abs(a)+abs(b)
bool(eqn1<=eqn2)

The result is False.

I had expected the result to be True. What is the correct way to test this in sage?

Thank you in advance for any help provided.

Testing inequalities in sage

I wanted to show if: $$ |a+b| \leq |a| + |b|$$

So I wrote this in sage:

var('a','b')
eqn1=abs(a+b)
eqn2=abs(a)+abs(b)
bool(eqn1<=eqn2)

The result is False.

I had expected the result to be True. What is the correct way to test this in sage?

Thank you in advance for any help provided.