It would be much better to introduce a Bool sig, and then use it for all your boolean fields, e.g.,
abstract sig Bool{}
one sig True extends Bool
one sig False extends Bool
one sig item {
autoPay: Bool,
Price: Int
}
No additional fact is needed in this case.
If you like this approach, there is a built-in "util/boolean" library which defines Bool
, True
, and False
sigs exactly like I did above, and additionally provides some helper functions (like isTrue
, And
, Or
, etc.) so you can simply say
open util/boolean
one sig item {
autoPay: Bool,
Price: Int
}