# Revision history [back]

### 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. 2 retagged

### 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. 3 retagged

### 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. 4 retagged

### 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.