Ask Your Question

Revision history [back]

Try substitution:

sage: P.subs(x==z)
0 == 0
sage: P.subs(x==y)
0 == 0
sage: P.subs(x==1,y==1)
0 == 0

Try substitution:The result consists of two lists: [{x: z}, {x: y}] and [1, 1]. Each list is a possible result that solves the equation. The first list is a Python dictionary (which by definition has no order but gives the values that specific variables will need to satisfy the equation); the second is a list (which simply gives the needed values for the variables in the order the vars were given as argument. Substitution confirms:

sage: P.subs(x==z)
0 == 0
sage: P.subs(x==y)
0 == 0
sage: P.subs(x==1,y==1)
0 == 0