Hello I'm a newbie in TLA+.
I knew that Cartesian product is something like this: S × T × U = {<<a, b, c>> : a ∈ S, b ∈ T,c ∈ U }.
The result of product is a set of sequence.
And I wonder how can I get a set like this in TLA+,if I have sets S,T and U: {{a, b, c} : a ∈ S, b ∈ T,c ∈ U }.
This set's element should be sets,not sequences.
Thank you.
Just to summarize the excellent answer on the mailing list: insert a colon into the mathematical definition and use
\in
, then you're there:Creating a model and choosing "evaluate constant expression" you can enter
Tuples
to get:If you try the same with
Sets
it won't work because TLC can only evaluate homogenous sets but we would need to mix integers and strings here (this is a design decision of TLC, the language itself allows us to express this). SettingB == {100}
we get:I can also highly recommend Leslie Lamport's book Specifying Systems. It explains TLA+ in detail and has a chapter on TLC as well.