The variables $a,b,c \in \{0,1\}$, thus $a^k, b^k, c^k \in \{0,1\}$
I want to pass a query to an oracle that returns the coefficients of each term $(1,a,b,c,ab,ac,bc,abc)$ in the expansion of products such as this one $(1-a+ab)(1-b+bc)(b-bc)$. There could be more variables and more brackets to expand.
Do I require a single FP query to do this or something more?
edit:
Input: $(1-a+ab)(1-b+bc)$
Expand: $a b^2 c - a b^2 - a b c + 2 a b - a + b c - b + 1$
Apply property of idempotence: $a b c - a b - a b c + 2 a b - a + b c - b + 1$
Simplify: $1 - a - b + ab +bc$
Extract coefficients: \begin{matrix} 1 & 1 \\ a & -1 \\ b & -1 \\ c & 0 \\ ab & 1 \\ ac & 0 \\ bc & 1 \\ abc & 0 \end{matrix}
Question: What is the 'weakest' oracle capable of extracting the coefficients above from the input?