If I use instead "i == CHOOSE i \in 1..100: TRUE", I will get always the same number.
The questions are:
* How can I use the same RandomElement several times in a given action?
* Is it possible to avoid having another variable in the spec?
* Can I use an alternative mechanism to achieve a similar functionality?
Thanks for the help!
--------------------------- MODULE RandomElement ---------------------------
EXTENDS Integers,TLC
VARIABLES x,y
Init == /\ x=0
/\ y=0
Next == LET i == RandomElement(1..100)
IN
/\ x' = i
/\ y' = i
Inv == x=y
=============================================================================