ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 26 Jul 2013 08:22:04 +0200Testing inequalities in sagehttps://ask.sagemath.org/question/10388/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.ensabaFri, 26 Jul 2013 08:22:04 +0200https://ask.sagemath.org/question/10388/