Equivalences in Alloy

We say that two Alloy expressions E1 and E2 of the same type are equivalent, written E1 ≡ E2, if they evaluate to the same value in every Alloy instance. Below are some noteworthy equivalences in Alloy.

Set Operators

For all set/relations A, B, and C, the following equivalences hold in Alloy whenever their left- and right-hand sides are well typed:

Boolean Operators

Let ⊤ denote any formula that is alway true (e.g., none = none) and let ⊥ denote any formula that is alway false (e.g., (none != none)).

For all set/relations A, B, C, and x where x is a singleton, the following equivalences hold in Alloy whenever their left- and right-hand sides are well typed:

Boolean Connectives

For all formulas F, F1, F2, G, G1, and G2, the following equivalences hold in Alloy:

Quantifiers

For all formulas F and all sets A and B, the following equivalences hold in Alloy:

Temporal operators

For all formulas F and G, the following equivalences hold in Alloy 6 (Electrum Alloy).

Note: Keep in mind that unary temporal operators bind more strongly than any binary operators.
(E.g., always F and G parses as (always F) and G, not as always (F and G).)

Future operators

  1. always F   ≡   F and after always F
  2. eventually F   ≡   F or after eventually F
  3. always always F   ≡   always F
  4. eventually eventually F   ≡   eventually F
  5. not always F   ≡   eventually not F
  6. not eventually F   ≡   always not F
  7. always (F and G)   ≡   (always F) and (always G)
  8. eventually (F or G)   ≡   (eventually F) or (eventually G)
  9. not after F   ≡   after not F
  10. eventually F   ≡   ⊤ until F
  11. F until G   ≡   G or (F and after (F until G))
  12. after always before ⊤   ≡   ⊤

Past operators

  1. historically F   ≡   F and (not beforeor before historically F)
  2. once F   ≡   F or before once F
  3. historically historically F   ≡   historically F
  4. once once F   ≡   once F
  5. not historically F   ≡   once not F
  6. not once F   ≡   historically not F
  7. historically (F and G)   ≡   (historically F) and (historically G)
  8. once (F or G)   ≡   (once F) or (once G)
  9. once F   ≡   ⊤ since F
  10. F since G   ≡   G or (F and before (F since G))


Copyright: Cesare Tinelli, The University of Iowa, 2021