Constraint satisfaction problem: solve system, then evaluate whether many additional constraints are satisfied one at a time
If the constraints you have are of the form $a &lt; b$ and $a=b$ (i.e., only unconditional inequality constraints), you can model them with a directed graph: each node represents a variable, and an edge $v \to w$ corresponds to the inequality $v &lt; w$.  Then you can answer queries by doing a straightforward reachability check.  (If you see the equality $v=w$, then merge the two vertices $v,w$ into a single vertex.)

When you add conditional equality constraints, the problem becomes NP-hard.
Proof of NP-hardness: I will show a reduction from 3SAT to your problem.  Suppose we have a 3SAT formula $\varphi$ on variables $x_1,\dots,x_n$.  Consider a single $C_i = \ell_i \lor \ell_j \lor \ell_k$, where $\ell_i,\ell_j,\ell_k$ are three literals (e.g., $\ell_i$ is either $x_i$ or $\neg x_i$, etc.).  We will translate this to the constraints
$$\begin{align*}
\ell_i \implies &amp;y_{i0} &gt; y_{i1}\\
\neg \ell_i \implies &amp;y_{i0} &lt; y_{i1}\\
\ell_j \implies &amp;y_{i1} &gt; y_{i2}\\
\neg \ell_j \implies &amp;y_{i1} &lt; y_{i2}\\
\ell_k \implies &amp;y_{i2} &gt; y_{i3}\\
\neg \ell_k \implies &amp;y_{i2} &lt; y_{i3}\\
\end{align*}$$
$$y_{i0} &gt; y_{i3}$$
Notice that if at least one of $\ell_i,\ell_j,\ell_k$ are true, then these seven constraints are simultaneously satisfiable; but if $\ell_i,\ell_j,\ell_k$ are all false, then they are not satisfiable.  So, we translate each clause of $\varphi$ into several constraints as above, obtaining a large system of constraints.  Then this system has a satisfiable solution if and only if $\varphi$ is satisfiable.
In conclusion, testing satisfiability of your kind of constraints is NP-hard.  It follows that answering queries is also NP-hard (answering a query is the same as testing satisfiability of the constraints plus the query).  Consequently, you shouldn't expect any algorithm that is both efficient and always correct.
If you have to solve it in practice, you could try applying a SAT solver.  Add boolean variables $s_{b,c}$ to represent $b&lt;c$; then you can translate each constraint into a clause.  For instance, $b&lt;c$ translates into $s_{b,c}$, and $i \implies b&lt;c$ translates into $\neg i \lor s_{b,c}$.  Finally, add clauses that enforce the consistency of the $s$'s, i.e., $\neg s_{a,b} \lor \neg s_{b,c} \lor s_{a,c}$ for each $a,b,c$.  Now answering a query amounts to conjoining the query and testing satisfiability of the resulting SAT formula, which you could do with an off-the-shelf SAT solver.  Some SAT solver allow you to &quot;push&quot; a clause, test satisfiability, and then &quot;pop&quot; the clause.