# A specific usage of "Solve" function [duplicate]

It is something from Simplifying polynomials with conditions on variables, that intend to minimize the number of variables. The problem is the usage of Solve". I know how to solve equations, like

Solve[x^2 + a x + 1 == 0, x]


However, for

Solve[pol == p + q + r - b && a + b == p + q + r, pol, {b, q, p, r}]


I am confused about "pol" and its position Solve[pol == p + q + r - b && a + b == p + q + r, ? , {b, q, p, r}]". I can not find any similar examples like this in the help document. How does it work? Is "pol" an expression or a variable? May I have more examples?

It is also posted at https://community.wolfram.com/groups/-/m/t/3008281?p_p_auth=Lpw74FtJ

With two equations you can generally solve for one variable while eliminating one variable. However, you get the same result solving for pol irrespective of the variable chosen for elimination (b | q | p | r).

Solve[pol == p + q + r - b && a + b == p + q + r, pol, {#}][] & /@
{b, q, p, r}

(* {{pol -> a}, {pol -> a}, {pol -> a}, {pol -> a}} *)


Further, in this case, Solve doesn't care if you ask to eliminate one or more variables.

Solve[pol == p + q + r - b && a + b == p + q + r, pol, #][] & /@
Subsets[{b, q, p, r}, {1, 4}]

(* {{pol -> a}, {pol -> a}, {pol -> a}, {pol -> a}, {pol -> a},
{pol -> a}, {pol -> a}, {pol -> a}, {pol -> a}, {pol -> a},
{pol -> a}, {pol -> a}, {pol -> a}, {pol -> a}, {pol -> a}} *)

• Thanks for your reply. Another query is about the usage of "[]". I think it means "Flatten". However, I can not find any similar examples(without the head but only two square brackets) in the help document of MMA 13.3. May I have more examples about this? Sep 9 at 1:58
• Look at the documentation for Part Sep 9 at 2:50