[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlaplus] Sequence of sets -> Set



Hi Richard,

let

T = << {1, 2, 3}, {4, 5, 6}, {7, 8, 9} >>

then

UNION { T[x] : x \in DOMAIN T }

would produce  {1, 2, 3, 4, 5, 6, 7, 8, 9}

Thanks

On Nov 25, 2018, at 3:28 PM, Richard Artoul <richar...@xxxxxxxxx> wrote:

I'm working on my first "production" TLA+ specification and have everything working except for one nagging piece.

I have a sequence that looks like: << {1, 2, 3}, {4, 5, 6}, {7, 8, 9} >> and I need to convert it to: {1, 2, 3, 4, 5, 6, 7, 8, 9}

I know that if you have a set of sets, you can just use the UNION operator, but not sure how to Reduce over a sequence like this.

Any help would be appreciated!

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+u...@xxxxxxxxxxxxxxxx.
To post to this group, send email to tla...@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/tlaplus.
For more options, visit https://groups.google.com/d/optout.