"Greater than" condition in integer linear program with a binary variable How can one model the following condition in an integer linear program?

$$A = \begin{cases} 1 &amp; \text{if } B &gt; C\\ 0 &amp; \text{otherwise}\end{cases}$$

where $A \in \{0,1\}$ and $B, C \in \mathbb N$. We have upper and lower bounds on both $B$ and $C$.
I think I found the answer here!
It is sufficient to use the big-M method by introducing the following constraints:

B >= C + 1 - M*(1-A); 

C >= B + 1 - M*A