Testing the triangle inequality in Sage

26 views
Skip to first unread message

714...@gmail.com

unread,
Jul 30, 2013, 3:42:55 PM7/30/13
to sage-s...@googlegroups.com
This question was asked on AskSage here: http://ask.sagemath.org/question/2853/testing-inequalities-in-sage

So I have these commands to test the triangle inequality:

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

I had expected the result to be True, but it returned false.

In general, what other information should I provide to sage e.g. via assume(...) in order for Sage to correctly evaluate an inequality?

Reply all
Reply to author
Forward
0 new messages