# Watching Intermediate Calculations or Estimate Remaining Time in Eliminate Command

I want to use Eliminate commands to 70 coupled multivariable polynomial equations, but the code is too slow. (It does not show result after 30 minutes in my laptop.)

In my code, I want to find a condition on parameters such that the $$4\times 4$$ matrix $$h(px, py)$$ and $$h(px+ps, pyy)$$ has a common eigenvalue and common eigenvector. This condition can be written as a polynomial system. The following code gives background definitions. In particular, cond contains 70 polynomial conditions.

Note:The working mechanism of the code is nicely explained in the following link:

https://math.stackexchange.com/questions/4075581/finding-common-eigenvalues-and-eigenvectors-via-commutative-algebra/4076087?noredirect=1#comment8423617_4076087

The following is my code:

\$Assumptions = {Element[px, Reals],
Element[ps, Reals], \[CapitalDelta] > 0, 0 < \[Phi] < 2*Pi,
Element[\[Mu], Reals], v > 0, 0 < e < \[CapitalDelta], W > 0};
h = ArrayFlatten[{{v*px*PauliMatrix +
v*py*PauliMatrix - \[Mu]*IdentityMatrix,
\[CapitalDelta]*Exp[I*\[Phi]]*
IdentityMatrix}, {\[CapitalDelta]*Exp[(-I)*\[Phi]]*
IdentityMatrix,
-(v*px*PauliMatrix +
v*py*PauliMatrix - \[Mu]*IdentityMatrix)}}] /.
{v -> 1};
totalmat = ArrayFlatten[{{h - e*IdentityMatrix},
{(h /. {\[Phi] -> 0, px -> px + ps, py -> pyy}) -
e*IdentityMatrix}}];
matlist = (totalmat[[#1, {1, 2, 3, 4}]] & ) /@
Subsets[Range, {4}];
cond = (Det[#1] == 0 & ) /@ matlist;


And then, finally, I want to eliminate px, py, and pyy:

Eliminate[cond, {px, py, pyy}]


This part is very slow! I want either of the following:

1. Estimate the remaining time to finish the computation.
2. See the intermediate result of calculation.

How can I do either of the above one?

• (1) Eliminate is using dated technology. For such a task you'd do better with GroebnerBasis[...,MonomialOrder->EliminationOrder]. Mar 27, 2021 at 15:06
• (2) There is no plausible way to know how "close" a Groebner basis computation might be to completion. So the answer to the question asked is "No". Mar 27, 2021 at 15:07
• (3) Even with the best of under-the-hood code, it seems like the size of this computation will put it out of reach. I wonder if there might be different formulations though. This is sometimes the case when dealing with eigenvalue questions: one formulation might involve quadratics while another becomes a linear algebra problem. Mar 27, 2021 at 15:10
• ...and (4) It is an odd coincidence that you have an eigenvalue problem, given that your parents named you "eigenvalue". (Sorry, couldn't let that one pass...) Mar 27, 2021 at 15:11
• Now to look at the underlying problem. As noted in your math.SE post, you can deduce a common eigenvalue condition from a resultant computation involving just two polynomials. This should (a) be tractable and (b) give finitely many values to check. You could then brute-force check each to see if they also share an eigenvector. Mar 27, 2021 at 15:19