This is an outgrowth of this question.
Suppose I have the following definitions:
eqexp = {a, b, c, d};
eqval = {e, f, g, h};
signval = {{}, {1}, {-1}, {1, -1}};
criteria = {{}, {i}, {j}, {k, l}};
As before, I want signval to determine whether the eqexp component is greater than or less than the eqval component. But now I have an extra list (criteria) which has the same structure as signval. I want the corresponding criteria value to be equal to zero as well, and then the resulting inequalities combined with an Or. So the desired output would be:
{False, b > f && i == 0, c < g && j == 0,
(d > h && k == 0) || (d < h && l == 0)}
The previous answers (without the criteria component) cleverly used a replacement rule on signval. I don't see how to do the same thing here. Any suggestions?