Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Just compare the solutions returned with solution_dict=True and solution_dict=False (which is the default):

sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=True)
[{0: b,
  a: b,
  b_2: a_2,
  -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2: 0}]
sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=False)
[[0 < a, a < b, b_2 < a_2, 0 < b, -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2 > 0]]

Hence, the : between keys and values means < in the first three elements of the dictionary and > in the last one.

Just compare the solutions returned with solution_dict=True and solution_dict=False (which is the default):

sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=True)
[{0: b,
  a: b,
  b_2: a_2,
  -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2: 0}]
sage: solve([b_2<a_2,a<b,0<a<a_1<a_2,0<b<b_1<b_2,a_1^2+b_1^2-2*a_1*b_1
....: +(a_2-b_2)*(a-b)<0],a,a_1,a_2,b,b_1,b_2,solution_dict=False)
[[0 < a, a < b, b_2 < a_2, 0 < b, -a_1^2 - a*a_2 + a_2*b + 2*a_1*b_1 - b_1^2 + a*b_2 - b*b_2 > 0]]

Hence, the : between keys and values means < in the first three elements of the dictionary and > in the last one. By the way, I think that your inequalities can be compressed to $$\begin{gather} 0\lt a\lt a_1\lt a_2 \\ a\lt b\lt b_1\lt b_2\lt a_2 \\ (a_1-b_1)^2\lt (b-a)(b_2-a_2) \end{gather}$$