Solve() confusion...
I've been experimenting with the solve
function, as it recently gave me unexpected results. In some instances sage outputs nonsensical solutions, but if I provide it with more information (even a trivial equation like x=x) it suddenly parametrizes and outputs correctly.
Can someone explain what is going on in the following code and output?
s=list(var('s_%d' % i) for i in range(3));
var('x y z');
print solve([],s_0,s_1,s_2)
print solve([z==z],s_0,s_1,s_2)
print solve([z==z,y==y],s_0,s_1,s_2)
print solve([z==z,y==y,x==x],s_0,s_1,s_2)
print solve([s_0==0],s_0,s_1,s_2);
print solve([s_0==0,s_1==s_1],s_0,s_1,s_2);
The result:
[[s_0 == c1, s_1 == c2, s_2 == c3]]
({s_0: r1}, [])
[[s_0 == r6, s_1 == r5, s_2 == r4]]
[[s_0 == r9, s_1 == r8, s_2 == r7]]
([s_0 == 0], [1])
[[s_0 == 0, s_1 == r11, s_2 == r10]]